The 10 commandments for the eager developer

1. Think: Before writing code spend some time thinking about what you are going to do – the time spent should be in direct correlation with the scope of the problem you are about to solve – don’t over or under analyze.
2. Don’t write code if you don’t have to: No code contains no bugs and takes no time to write. The more code you write the more bugs you will have the more time you will spend reading your code later on – this piece of code you just wrote thinking you will never have to read again will hunt you in the future – you have been warned. Before writing code make sure it’s needed to be written; a short trip to Google can save you from reinventing the wheel and finding out it has to be circular.
3. Code duplication: No code should be written twice, period. – factor it out.
4. Gold plate when you have gold: Adding this cool animation to entertain the user while using the latest and greatest Core Animation framework is fun and educational just make sure you have everything else in order before delving into the land of gold.
5. Divide and conquer: In the real world encapsulation and compartmentalization comes naturally – when coding chaos tend to creep in – refractor if needed.
6. Hard coding: Hard coding is the root of all evil, everything that is not logic shouldn’t be in your code that includes – most strings, magic numbers, user default settings etc.
7. MVC – http://en.wikipedia.org/wiki/Model-view-controller. Logic and GUI go really well together – until you will have to change your code.
8. Comment where needed: Generally speaking in few weeks time when you will have to read your code you will remember way less than you think you will – write comments – at least for your modules and functions. This elegant creative algorithm you just wrote might not look as elegant in few weeks.
9. Add logging to your application: It helps during development and Important in production
10. Version control: Control your versions – (I.E. http://subversion.tigris.org)

Leave a Reply

Your email address will not be published. Required fields are marked *