September 16, 2012
@ 02:47 AM
I have some thoughts for making better code. I call it 3 rulers plus 2 sub rulers.

1 Readable : small function, single responsibility, straightforward name convention.
2. Re-useable: clear and simple responsibility, DRY
3. Testable : can be tested by UnitTest tools. Also I like write code that I can easily put a break point there.


4. flexible :  Prepare for future change,  configurable, lower coupling. using IoC.
5. performance: improve code for better performance or user experience, Threading, Cache, Ajax, Parallel LinQ,

4 and 5 have lower priority than 123.   You should know why ;)