Monday, March 15, 2010

eight steps to become an iphone developer

Here is the link on how to become an iphone developer.

In brief:
1. buy a mac (done)
2. down the sdk (done)
3. learn objective c
4. start writing something
5. sign-up as an official developer ($99 done)
6. prepare for a few weeks of work
7. submit your app to Apple
8. adapt, market and survive!

It did not mention a iphone but I already bought it. I would spend some effort to become a iphone developer. Learning is important to a programmer, just like several years ago, I learn the development on Linux, and later found that it is useful in my career. I did work on Linux platform. Mobile is a big market as I knew, so I can gain some skill here for the purpose of surviving.

Thursday, February 25, 2010

patching the code using cvs

I have blogged this and this,

But I would use the following command to create a patch and apply the patch.





$ cd /devel/foo
$ cvs diff -uNa > patch.txt
...
$ cvs co -r z_markc_-22jan2010 foo
$ cd foo
$ patch -p0 < /path/to/your/patch.txt


In creating a patch, "-a" is used for added code if needed.

Monday, January 4, 2010

merge library

1. extract the libraries foo and goo.


$ mkdir t
$ cd t
$ ar x ../libfoo.a
$ ar x ../libgoo.a


2. Prepare "Makefile.t"

all:
$(CROSS_COMPILE)g++ -shared -o libbar.so ./t
$(AR) -rcs libbar.a ./t/*.o


3.generate the new lib


$ make -f Makefile.t

Tuesday, November 24, 2009

use glib

1. install glib

$ apt-get install libglib2.0-dev


2. write source code to print "hello world!"

#include
int main(int argc, char** argv)
{
g_printf("hello world!\n");
}


3. compile

gcc `pkg-config --libs --cflags glib-2.0` hello.c

Tuesday, September 22, 2009

find/grep command

The following command searches C/C++ source code to find the content of "equalizer".

$ find ~/myspace/git/opencore -type f -name "*.[ch] -o -name "*.cpp" -exec grep -I "equalizer" {} \; -print

Tuesday, September 15, 2009

ubuntu - recording


I use "alsamixer -c 0" to set up my recording with microphone.

Thursday, August 20, 2009

ubuntu 8.04 - wireless network setup

I spent less than 9 hours to setup my wireless card on ubuntu. When use "lspci" command, I get the name of my wireless card, which is "AR2413 802.11bg".

Here is the brief.

1. disable the Atheros proprietary drivers from "system->adminstrator->hardware drivers"
2. unplug the wired ethernet line

3. extract ndiswrapper-1.55.tar.gz, and make & sudo make install

4. extract madwifi-hal-0.10.5.6-r3835-20080801.tar.gz, make & sudo make install

5. extract Wireless_Atheros.zip, use ndisgtk to install the net5211.inf
or
$ sudo ndiswrapper -a XXXX:YYYY ath0 (here XXXX:YYYY is get from lspci -n for Atheros card)

6. setup
add ndiswrapper at the end of /etc/modprobe.d/blacklist
add ath_pci at the end of /etc/modules

$ sudo iwconfig
$ sudo lshw -C network
$ iwlist scan (to find my wireless network)
$ sudo network-admin (which should setup wireless network)

check the following configuration at /etc/network/interfaces
=======================
iface ath0 inet dhcp
wireless-key XXXX
wireless-essid fade

auto ath0
=======================
Here XXXX is my wep password.
call "/etc/init.d/networking restart" to restart


I also installed wpa_supplicant but it does not seem to be needed.

After I reboot the OS, I found the system could not find ath0, so what I did is "sudo modprobe wlan_scan_sta" and reboot again, this time ath0 appears.