Joking in code??

One of my coworkers is driving me crazy at work because she often leaves all kinds of goofy and, sometimes, naughty jokes in comments. We are a small shop (only four of us) and the others are pretty casual about stuff like this. I think it's incredibly unprofessional even if our clients don't bother looking through our code. Would you tolerate stuff like that?

Write your answer…

10 answers

I think there are several aspects to jokes in code, however, in general, they are not just tolerable, but might even be part of development culture.

  • Comments. Funny comments, rage comments, jokes, they are all over the place, even in big-brand code bases. Just try to search for swearwords on GitHub, and thousands of comments will show up about bad code, bad algorithms, the developer's friends, alcohol, etc. People are emotional beings, so we need to put some emotion into emotionless professionality ;) Just make sure that any code you give away should be in a state which is representable for your company. If there is a Star Trek quote somewhere, why not? I've done that, and I've seen others do it :) ;;; Give this a read

  • Eastereggs. As developers, we spend a great deal to form and mold a piece of software. We usually are proud of what we do, so we want to give it a personal note. Eastereggs have a long history and cannot only be found in games. One very prominent Easteregg is the no-internet dinosaur race game in Chrome. It's fun which can be shared with users, if they take the time to play around long enough with our software. Of course, the type of Easteregg strongly depends on the application. Also, any user-facing features should get an ok from the customer, so if you want to have one, just ask if it is ok to add it for fun.

As with everything else, though, there's a limit, and if you feel like your coworker is overdoing it, tell her! Most of the time, people keep doing annoying things because they don't know that it's annoying for others. Just by telling them, one can improve the situation instantly.

Reply to this…

Hashnode is a friendly and inclusive dev community.
Come jump on the bandwagon!

  • 💬 Ask programming questions without being judged

  • 🧠 Stay in the loop and grow your knowledge

  • 🍕 More than 500K developers share programming wisdom here

  • ❤️ Support the growing dev community!

Create my profile

As far as they don't show in output, I think they are great...

Reply to this…

If you send the (unminified) code to clients, then I think it's not a good idea unless you know the clients will be okay with it.

If it is internal code (and will stay that way), then it's up to your team to make some code guidelines that most people are happy with.

Reply to this…

"Why so serious?"

Reply to this…

Jokes are a pretty standard thing in technology, in code as well as protocols. Did you know for example that HTTP has a "I'm a teapot" response code?

Just roll with it, life is too serious ;-)

Reply to this…

Load more responses