Off late, I don't like to think about designing when I am coding. I know I know designing is important. I am not denying the importance but like to do it differently. I keep SOLID principle in my head when ever I code. These principles are applicable to any domain. And along with these principle I like to follow few rules defined by Jeff Bay in thoughtwork's book.
The Rules
------------
Here are the rules:
1. Use only one level of indentation per method. (My version is two level ;). It's too hard to stick with one.)
2. Don’t use the else keyword.
3. Wrap all primitives and strings.
4. Use only one dot per line.
5. Don’t abbreviate.
6. Keep all entities small.
7. Don’t use any classes with more than two instance variables.
8. Use first-class collections.
9. Don’t use any getters/setters/properties (hummmm take your own call.).
They are easy to follow and does magic with the code...
No comments:
Post a Comment