|
It all depends. It all depends on who will ever read the code. Sometimes we can't predict where the code will land and sometimes we know the code will land on the hands of very important customers. Sometimes I believe we should refrain ourselves from our humor urges for the sake of our professionalism, even though we may think it doesn't hurt anyone.
It's like going to a job interview with slippers and shorts. We know it does not change our skills or capabilities but it may cost the job opportunity. I've witnessed very skilled people failing to be hired because they didn't pay attention to "look professional".
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
Fabio Franco wrote: It's like going to a job interview with slippers and shorts. We know it does not
change our skills or capabilities but it may cost the job opportunity. I've
witnessed very skilled people failing to be hired because they didn't pay
attention to "look professional".
Thats a good analogy. You can't know what the people on the other side of the table are like until long after it matters.
|
|
|
|
|
Gary Huck wrote: But throwing in a bit of humor never hurt anyone.
Jokes can be consideration in EOC complaints. So someone can end up getting hurt.
And just because you think it is funny doesn't mean that everyone or even anyone else will consider it funny.
Gary Huck wrote: And as for "swear words" ... all I can say is it sure seems that a lot of people
are pretty uptight about "bad" language.
I doubt most offensive comments containing nothing but swear words. The swear words are used to provide an emphasize for some opinion expressed in the comment.
|
|
|
|
|
Personally, I think these people are all way too uptight, and a little humor in comments is fine. All this "unprofessional" and "it distracts...".... Get over yourselves... Just my opinion, of course
-MJC
Michael J. Collins
Web Application Programmer
|
|
|
|
|
Consider that the code you're writing will be delivered to the client after it has been completed to be maintained by their own IT staff.
Imagine how colorful comments may affect the image of the company you work for.
Better yet, imagine you inherit a project written by someone else that besides having some crappy code, also has these type of comments. How would you feel about the original developer?
It's no shame to have some bad code, but it would transmit a very professional image if you acknowledge it and point out it should be improved. It can tell other developers that you, the original writer, are a professional and mature developer instead of looking like a child that does not take work seriously.
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
In our case, we develop an in-house application that we sell to financial institutions, so there's no code delivery to clients, though I 110% agree with you that any delivered code should be devoid of inappropriate comments.
I'm definitely in the camp to not include comments unless they are necessary, particularly to explain complex logic or to explain some weird workaround that had to be implemented. Both of these cases are ripe for hacks and kludges, IMO. So, yes, admitting the problem is the first step, so to speak, but I also think it's good to have a bit of sense of humor about it.
|
|
|
|
|
IndifferentDisdain wrote: In our case, we develop an in-house application that we sell to financial institutions
I do exactly the same, except that the code stays in the financial institution. So I'd never add humor to the code I write because financial institutions tend to take stuff very seriously.
If you are absolutely sure the code will never be requested by the client, then by all means, add some fun to the mess , otherwise, I'd just not risk it. I say that because I know financial institutions require a lot of audits, including source code review for security purposes.
Imagine having to review a huge code base, just to eliminate comments that may transmit a bad image of the company
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia
|
|
|
|
|
I don't know about Inappropriately-Appropriate Code Comments, but I recently took over a project and was pouring through the code and found:
ReDim Preserve F__kMe as BS
The underscores weren't used, but you get the idea. Quite a lot of this type of variable naming.
|
|
|
|
|
Show off some of your creativity, cuss it out without actually using any cuss words
Cuss words sometimes offend coworkers, both current and future, and why would you want to do that? Besides, you never know when some suit will decide to have a peeksie at the code and be offended by the language in the comments.
We can program with only 1's, but if all you've got are zeros, you've got nothing.
|
|
|
|
|
What's funny to you, may not be funny to someone else, having said that, i usually don't write colorful comments (or comments at all for that matter ), but i wouldn't write anything beyond PG, just to be on the safe side.
|
|
|
|
|
People tend to make comments in code (and other areas) where they don't think anyone will ever see them. That is not always the case. At one of my previous jobs we flew to Chicago to look at a system to do monitoring for us. While we were there and taking the 'Grand tour' we noticed one of the techs had a screen up and had put some 'inappropriate' comments about one of their customers. As it turned out that customer had a close working partnership with my company. The end result was they lost both our business and that of our partner. At the time it was several million $ per year. IMHO - don't put anything in comments you would not say out loud to a group of people.
|
|
|
|
|