Last week I was called in to examine the code for a project that had just entered the test phase. Apparently one of the developers was disgruntled and reported his "concerns" about the code quality to management. That's the sort of thing you come to expect from time to time, so it wouldn't have been a big deal if that's where it had stopped (coders are a prickly lot, and managing them has often been compared to herding cats). Unfortunately, he also told someone who told an executive, which is when the excrement came into contact with the rotary airfoil device. :) The project managers needed to be able to come up with something to appease upper management and convince them that the code was OK. At this late phase, my thought was that the best proof of the code's quality would be whether it passed testing or not, since the time to inspect the code was during the development phase (and they had done peer reviews, where the developer in question had ample chances to make his concerns known). However, sometimes the appearance of doing something is more important that what is actually done. Therefore, I was assigned to review the code.
The code consisted of 340 Java files, so there wasn't a chance in hell that I could manually inspect those in the time I was given (I was given a week, but I was only able to spend about 50% of my time on this). Fortunately, we have a site license for Jtest, which when combined with our own coding standards rules gives pretty thorough coverage of the code (including dynamic analysis to find uncaught runtime exceptions). The only downside is that this kind of analysis is very nitpicky. Those 340 Java files generated over 11,000 warning messages.
Of course, that kind of number sounds very alarming at first. And it's not something that you want to feed to upper management, lest they get the wrong impression. As an example, many of those messages have to do with indentation or style standards. While I consider those important to readibility, they don't materially detract from the code's function. So, I had to grovel through all of those messages and categorize them based on severity. When I was done, it turns out that there were only a handful of items that were severe enough to consider errors (like using "=" instead of "==" in a control statement).
That's the kind of mind numbing task that leaves you drained, so when I left work on Friday my eyes were glazed over. I went home, grabbed a cigar and poured myself some Jack and cola and did absolutely nothing. And I stayed away from the computer most of Saturday as well, which is why I hadn't updated this site since Friday morning. I just didn't feel like I had anything worth saying.
Posted by Aubrey at May 11, 2003 02:28 PM | TrackBack