Monday, June 20, 2011

Clean and Efficient Code



I read the article http://m.techrepublic.com/blog/programming-and-development/why-clean-code-is-more-important-than-efficient-code/4284 today and the author is of the opinion that

1. Readability: Code should be readable and comprehensible, so that any programmer (including the one who wrote it in the first place) comes back in six months and able to understand it and refactor it. This is very important for open source projects where many developers work together

2. Reusablity: You cannot reuse code, if you cannot read it and make sense of it.

3. Performance: He also says that one cannot ignore optimization altogether, especially for system level software


To sum it up, optimize your code, but that doesn't give you a license to write badly written code

Amen to that!