Pages

Saturday, June 13, 2009

iPhone programming kungfu

I have a bad habit: before starting learning, researching something, I always want to know what is the highest level of the expert in that domain. Usually I map the research domain into kungfu. I call this bad habit because it often takes my time to know that.
In recent months, we setup a team to research iPhone programming. So, this is a good chance for me to learn a new kungfu. After a few months, I identified the Kungfu levels of iPhone programming. It helps me to know what our current level is to improve more skill.

iPhone programming kungfu

Level 1: Tool master

At this level, you must know:
+ Tools using in iPhone programming, the role and how to use them.
+ MAC OS environment: if you're user from Window, Unix, ... you will be surprise with differences on MAC OS and you must get acquainted with the environment here.
+ Hack to install MAC OS in PC: you should know this if you do not have money to buy a real MAC.
+ Master of languages using in iPhone programming: Objective C, C

Level 2: Native application master

At this level, you must have strong experience with building user interface for native application. Below is the list of thing required:
+ Have deep understanding about Model View Controller pattern and how to implement that using iPhone SDK.
+ Strong knowledge about common UIControl.
+ Experience with touch programming.
+ Must know user interface patterns in iPhone interface design.
+ Familiar with data storage: XML, SQLLite
+ Familiar with interact with calling remote services.
+ Familiar with UI animation and effects.

Level 3: Game programming master

Game is a common application type on iPhone. So, you should know how to develop a game on iPhone. You can use some popular game engines on iPhone to do that. Currently, we choose Cocos2D for the 2D game engine and Chipmunk as the physic engine behind. (Remember that: a game engine can not be completed if it does not have a physic engine)
I don't want to talk much about this level because I am not a master in this domain (game programming). However, below is the required list for level 3 (that I've discovered until now)
+ Can load/use sprite/bitmap into game engine
+ Create scene and navigate between scenes
+ Move and animate with 2D object
+ Using physic engine to create physic effect and animation.

Note: the above list is just for 2D game programming. You can find another list in 3D programming - but it is out of the scope because we do not have enough land to write about that here.

Level 4: Web programming master

At this level, you must know:
+ HTML tags that allows in iPhone safari browser.
+ Layout an HTML page to view best on iPhone
+ Using iUI library to build a web app liked native app.

Level 5: iPhone kungfu master

This is the highest level in iPhone programming. At this level, you can understand and program fluently with 4 above levels. Besides that, you must know:
+ Using advanced services and utilities in iPhone: geopositioning (GPS), maps, weather.
+ Can combine both Web + Native application into one.
+ Can design the system architecture for bigger application on iPhone with big storage data, synchronization solution, ...
+ Know how to optimize the program on iPhone and how to use tool for detect leak memory and high rate CPU cost in code.
Above is the list of 5 levels - kungfu in iPhone programming. Please feel free to post your comments or another level if you found.
Happy programming!

Monday, June 1, 2009

Windows script to change network configuration

Currently, I am using a new laptop (with Windows Vista Home Premium) for working at office and home. At home I always use DHCP network configuration (it depends on the ISP). In my company, I have to change to static IP configuration. It takes my time to switch between them. Anyway, I am a lazy man. I want to do all things just by one click or one command. So, I create script to do these thing easily and package them into 2 script file:
ChangeToStaticIPAtWork.bat and ChangeToDynamicIPAtHome.bat.

ChangeToStaticIPAtWork.bat file
netsh int ip set address "Local Area Connection" static your_static_ip your_net_mask your_default_gateway_ip

netsh int ip set dns "Local Area Connection" static your_dns primary

"Local Area Connection" is the name of your network connection. You can find it in the network connections setting.

ChangeToDynamicIPAtHome.bat
netsh int ip set address "Local Area Connection" dhcp
netsh int ip set dns "Local Area Connection" dhcp
When I need to change to any configuration, I just click to run the bat file.
Hope it may help you in necessary case.