Do you curse in your computer code?
I was searching Borland’s newsgroups for a solution to a particularly annoying problem and I found this short bit of sample code:
The first thing I noticed was not whether or not it would work – I noticed the F word placed quite conspicuously (and appropriately) in the comments.
The code reminded me of a few (relatively tame) cursing developers I knew…
One fellow was writing in a horribly primitive scripting language provided by a company called, say, “Bozo Company”. The language was incapable of allowing passing an expression as a parameter as such:
x = sqrt(a + b)
His response was to use the following workaround:
bozoCompanySucks = a + b
x = sqrt(bozoCompanySucks )
He did this in hundreds of places.
Another fellow used to sprinkle the application with pungent error message dialog boxes. If you accidently clicked the wrong thing and found a bug, a message box would pop up with some serious sailor language. I was always curious if any of those debug messages made it into our shipping product.
I know that these are kind of lame, and my own code is unfortunately squeaky clean. Team development and code reviews make salty code somewhat risky these days.
How about your code?