Humor driven development
Happy developers are productive developers. Having fun makes people happy. So sayeth the Chief Happiness Officer.
And the Ruby community in general seems to be a life-loving bunch. _why didn’t rise to fame solely because he was a good programmer. His code was fun and quirky, his documentation and presentations even more so.
Why is our code so boring then?
As developers we spend a lot of time reading code and let’s be honest, code isn’t exactly the most fun text to read. I refuse to believe it has to be that way.
I propose that by investing a little time in making your code more fun to read, you are making your coworkers more happy, increasing productivity of your company in the longer term.
Context and appropriateness?
Bear in mind, that I am not advocating turning your code into a joke – or for that sake, litter actual jokes around your code base. Thing is, people don’t expect humor in code, so you can get far with very little means. There’s no need for a full stand up routine.
Instead, there are parts of your code that you can write with a smile on your face. And just perhaps, if you do, you might transfer that smile to the next developer who reads your code.
Tests provide a great opportunity for getting creative and injecting a bit of humor. I mean, why do we always have to exercise our code using foo, bar, and baz?
I am sure you can come up with a more interesting commit message than “Fixed this and that, closes #42”. Certainly, brevity and clarity is your number one priority, but I dare you to write it with a wink.
Is some code relying on a third party component that’s acting up in some cases forcing you to document with a comment why your code is jumping through hoops? Dry sarcasm works well in those cases, I bet you’ve got that skill mastered.
“So, have you heard the one about…”
I am not a particularly funny guy (as I am sure my Twitter followers can confirm). However, while writing this blog post, I came to the realization that this idea of making code more fun isn’t new.
The first non-me developer we hired at BiQ definitely enjoyed the comments and remarks I had been putting into the code base. Sure, they weren’t thigh-smacking-rolling-on-the-floor-laughing-your-lungs-out-funny, but a chuckle every so often goes a long way.
When asked about his impression of the remarks, he had the following to say:
It made it obvious that BiQ is a company that puts well being and happiness above rigid rules; the project and the code presented itself as a labor of love that has been fun and interesting to produce.
Why would you not want other people to get that impression of your project?
- Thanks to Dr. Nic for letting me waste some of his time while writing this post.