Wednesday, April 14, 2010

An Ode To Testing

Even though I am all for quality, testing can get torturous at times. So here is a fun take on the perils of testing by yours truly :)

"O Horrible testing, in ways so many of thee
You take pleasure in tormenting me

Test cases are many, JUnit is one
And these useless stubs under the sun
Trying to focus my eyes water
As my head starts feeling hotter
And I yawn and I fall
Horribly sleepy one and all
In search of quality I seek thee
But a JMocking venomous smirk is all I see
Murderously as you try to JRun me
Yes, you take pleasure in tormenting me"

Tuesday, April 13, 2010

Thinking Quality: Basic Thumb Rules

Quality of code is often a critical issue in a development team. Ensuring the quality can get complicated for a variety of reasons, so let us explore the possible ways to ensure code quality.

First, it is important to get the programmer to think how he can keep improving the quality of his code. Bugs are inevitable, but that is no excuse for shabby programming. However, it is difficult to get most developers to take this seriously without antagonizing them. Nevertheless, making unit testing integral to development can check many if not all bugs. People can also be encouraged to develop a customized check-list for themselves to help them avoid common mistakes. Having a "company-wide" check-list may prove to be both counter-productive and bureaucratic.

Second, code reviews can be useful. However, it can cause antagonism within the team and people may be reluctant to criticize each other. Moreover, it can be done effectively only by senior and more experienced people in the team. Anonymous, time-bound reviews is one potential answer to use this tool.

Third, using Agile and related development technologies will help the manager to leverage the full experience of the team, get them closer to the requirements and avoid many bugs related with misunderstanding specifications.

Finally, the productivity of the team is the function of morale. Morale for different people can mean different things. The best way, however, to build it is by having a clear vision for the company and being able to percolate it meaningfully in every aspect of work. Further, focus on the strengths and interests of each team member instead of focussing on their weaknesses.