This blog post is probably a little more esoteric than others that I have made. It's about a topic which has irked me for more than 2o years! So, if I have lived with it for so long, why write about it now? Mostly it's just a chance to vent.
For the last year or so I've been pretending to be a programmer. I'm not a classically trained programmer, but in the course of my career I have had experience in programming in many different languages and working on and managing software/hardware projects. That said, what changed? A little history:
In a previous age I had a boss who programmed in Pascal (remember Turbo Pascal) and he rarely, if ever, commented his code. If I remember correctly we were doing mostly numerical analysis and some graphical programming. I was annoyed that I had to take time out to figure out what he had done (or intended to do) and a few comments would certainly have made life easier. Since at the time we weren't bound to a particular language I started working in a language that he didn't know: C. I hoped that my change and request that he start commenting his code would be heeded. Alas, it did not. So, as soon as he learned C (courtesy of a class that I taught) I found that my course of action had failed. So, I changed languages again, this time to C++. Well, he never did learn C++, but he did manage to slightly improve his commenting.
At that same company in Southern California I had another colleague that did quite a bit of hacking in FORTH. His code was especially interesting because of the comments. Besides the usual information as to what his code was doing, he would also include quotes, recipes, and stories that he would write in late night programming sessions. I have a dot matrix printout of some of his code saved in a notebook.
These days I am either fixing bugs or adapting code. This usually involves trying to understand other programmer's code. Frequently that code has been touched by several other coders, thus making it even harder to fathom. In a recent Google search I found viewpoints that ranged the entire spectrum: from don't to you must. I'm sure there is a happy medium, but I certainly would appreciate comments. I certainly don't view not commenting code as job security. Sorry about that, rant off.
6.03.2008
Subscribe to:
Post Comments (Atom)


0 comments:
Post a Comment