Making Code Commenting Enjoyable

I have threatened on a couple of occasions to write code comments in character. This would be fun to write and to read. Some examples:

as Jame “Buffalo Bill” Gumb from The Silence of the Lambs:

“It implements the SQL query or else it gets the hose again. Yes, it will, Precious, won’t it? It will get the hose!”

as Neo from The Matrix:

“Whoa. Déjà vu. ” (inner loop comment)

as Ash from Army of Darkness:

“Ok you Primitive Screwheads, listen up! You see this? This… is my shell script!”

One thought on “Making Code Commenting Enjoyable”

  1. That is an awesome idea, even better is you should create your own character with a background and everything and develop as your write your code, so that anyone reading your code will be reading a novel almost. My suggestion other than using Yum! as a comment with any chomp is, if you have a loop that could potentially go on forever, such as a loop that will repeat until the user tells it to stop, use the comment “This is the song that never ends, it just goes on and on my friends, some people started singing it, not knowing what it was, and they’ll continue singing it forever just because…” It’s what I do.

Leave a Reply

Your email address will not be published.