I’ve had umpteen long and pointless arguments at work for all kinds of dumb reasons. Today at work, there were two things afoot. One was that they are instituting a policy of tying our compensation to the number of reopened bugs in Bugzilla. This is not total bugs, nor new work done, nor anything other than a bug that has been marked fixed and then reopened. The two guys responsible for the policy were both out, so we didn’t hash out the big argument. I can tell you that I have any number of ways of not getting bugs reopened, including not closing them in the first place and not doing new work that might result in same. This is truly a dumb shit move and now I’m in the position of having to once again point out the dumbness of what seems obviously dumb to me. I’m already getting crap for being too negative so I’m going to sit this argument out.
The other one is that one of our developers trotted out the opinion that having comments in code is a bad thing and a sign of bad code. I found this entirely a crazy opinion and still do. I had never heard this opinion before today, but after doing some research I found that this seems to be an extreme programming thing, as I saw on pages like this Wiki. I absolutely don’t buy the arguments. I will agree that comments don’t automatically make code good but I also don’t believe that they are automatically make it bad. The XP camp says that if you need a comment you should refactor the code to make it obvious what is happening. I tend to write my code in similar ways that I write prose – I shell it out first and flesh it out later. This means that I tend to write all the methods I want to have with no actual code but some comments to what I want it to do. Now that I’m trying to integrate unit testing I will also at this time write the unit tests for those methods (which is an XP staple.) Now I have the shell of what I want, a complete interface, unit tests and psuedocode in the forms of comments describing the logic I want. You can tell me all day this is bad but I’ll stop listening.
I’m still trying hard to keep an open mind about XP but I’m slowly forming an opinion that it is a giant placebo. XP is really a framework for getting your shit together and the benefits of it are no more nor no less for any method of getting your shit together. Any system that forces good requirements, short development cycles, being organized, saying what you do and doing what you say, code reviews and such. UML and the unified process actually seems to make more sense to me than XP. I really am not down with doing the majority of my programming in the XP pairs thing. I have personal space issues with that. There are times it makes sense, but I ain’t doing that all day every day.