Friday, July 6, 2012

5 Tips for Software Developers

Here is the sad realization I had last Friday, after I clicked on XCode -> Cocoa Applications for Mac. I have never written any Mac application. XCode created an AppDelegate and I started missing the ViewControllers. I created Document-based application and it created two interface builder files. Where do I set the actions of the MainMenu to? And how to create different Windows for Document based applications! Finally the safe browser for Mac is ready with full screen kiosk mode and is better than most other such browsers they got.

So here is some tips for software developers:

1. Be Resourceful:

Research and Development goes hand in hand, and for a reason. The layman definition of programming is a sequence of instructions given to computer to perform a task. We cannot do nothing which isn't in the API or the Framework we are using.

And guess what, most part of the APIs are documented. All you have to do is open msdn.com or developer.apple.com, etc and voila there you have almost everything you need. The next step is only putting every pieces together, knowing where to take the pieces is winning major part of the battle. For app development, you are as good programmer as good is your availability to Google.




2. Maintain a To Do:

A simple to do list maintained on a notepad or google tasks, is one of the best productive and motivational tool one can have. Divide your project into several smaller tasks, and put them in a to do. Tick them off as its complete and sense the feeling of achievement there only.

3. Use Source Code Control:

Just how many things can go wrong in writing code, occasionally even a hard bug is going to make you want to redo your whole class. Given the power to revert back to days or weeks back and making a fresh start, or to compare why it worked on xx/yy date and not aa/bb date is an advantage.

When using SVN, utilize branch and tags to keep versions of your working program, update before commit. Commit as many times as possible and put detailed comments with each commit.

4. Design Your Project Before Coding:


Unless you are working in Dilbert's office, planning your software architecture and UI wireframe is very critical before writing any code. If you are working on small projects on single you can just design stuffs on white paper and if you are on a team being formal is even more important. The seniors can simply make the wireframes and UMLs and pass it on to the developers to move on with the project.

5. Do Good the First Time:

When you compile programs it will give you warning and it will give you errors. Guess what, you cannot ignore the warnings. Just because your compiler was able to link your program doesn't mean you are good to go, compiler is only trying its best to do its job. What your program does is your job. Logical and performance issues are mostly likely hidden inside the warnings you get, and if you keep on ignoring them the numbers is going to keep on adding.

Understand your platform, know your language and mind the requirements before diving in to coding. I spent around 20 hours on iPad studying the Frameworks and around 6-7 hours on XCode max to get the SmyleSafe done. It would have been easily 60-70days if I tried to reverse and do coding before planning.