I have been programming for about 20 years and have always been quite, uhhh, spirited with my code comments. The problem arises when one extends their colorful prose to include variable names and printed text. As often happens late in a project (or late at night) when frustration sets in, I will begin naming variables in a way that quite reflects my mood.
for (c*nt = 0; c*nt < f*cked; c*nt++) {
...
if (myass > 10) {
...
while (thiscouldntsuckmore) {
...
About 10 years ago I was pulling an all-nighter on a project that was due the next day. Early in the morning, the program was giving fits and I, being exhausted, frustrated and a little punchy, started really dressing up my code as I tried to chase down one last error. I wrote some code to display in a message box the value of a less-than-professionally name variable. After I fixed the problem, I promptly forgot about the message box code.
At the client's office later that morning, I proceeded to show off the new features. Suddenly up pops a message box...
"Mangey Testicle = 1000"
I explained that it was a technical term. Move along. Nothing to see here.
My partners and I have since instituted the "Prime Directive". No code, comments, or variables of a questionable nature. We, of course, break the Prime Directive constantly. So all code must still be searched against a list of possible infractions before going out the door.
__________________
Out the 10Base-T, through the router, down the T1, over the leased line, off the bridge, past the firewall...nothing but Net.
|