Possible Duplicate:
Humor in Documentation
Throughout my professional career, I have often relied on chatty or humorous comments in source code (or source control commit messages) to help break up the tedium of the day or to convey how I felt about the piece of code I was writing. I have always thought that as long as I kept it out of anything a customer can see, it was ok. Recently, I have wondered if they can be distracting to anyone else working on my code, construed as unprofessional, or offer too much room for interpretation. I've worked at some companies with a strict corporate culture and I have never had to answer for such comments, but I would hate to find out that it was throwing someone else off all this time.
So...acceptable or unprofessional? Should they just be avoided?
And, of course, here are some examples (your examples are welcome as well):
try{
obj.execute();
}catch(SomeException e){
//squishy, squishy
}
//pretend you didn't see this...
String password = "bananer$";
//I'm under a lot of pressure. I can configure this later. Dont hate me.
//String fp = "C:\Users\scottpa"
String fp = "/usr/local"
and
Commit Comment: I hate when I forget to format!