Thursday, January 01, 2004

I read Rajesh Babu's recent post on "Best Practices". I Cant agree more on this. Best Practices have haunted me everywhere. During a code review in my team, I asked the author why was the code written in a particular way. The answer was "It is a best practice given in xyz website/book". Now Im not arguing whether that code worked well in the given context or not. The point is people start following blindly such kind of stuff, without really understanding the intent.
One example I frequently find in my professional life, being misused again and again is Sun's J2EE design patterns blueprint.
"Best practices" should only act as guidelines to say "hey! here is a way that worked before, in this context!. May be u can try too..". Nothing more , nothing less.
Of course, certaing best practices have become sooooo cast in stone that even talking against them is a crime. Think schools, think traditions.
Here I am, after long lull. I had been to my friend Rajesh's place today, and both of us tried out a few things on TDD and Fitnesse (An acceptance test Wiki). I got a few pointers on how to do TDD for database code. Ive always struggled with the enormity of testing database operations. MockObjects seem to solve that problem for me,now that I have a bit of insight in to the philosophy of TDD :).
We also looked at PicoContainers, a nice way for inversion of control, making ur plumbing code look more and more "configurable". I have to explore this more to see how picocontainers can replace bulky EJBs!
Bought a min basket ball kit and dribbling all around my house disturbing neighbours. :)