Humor in Documentation
- by Lex Fridman
Is a small amount of lighthearted wording or humor acceptable in source code documentation?
For example, I have an algorithm that has a message hop around a graph (network) until its path forms a cycle. When this happens it is removed from the queue of the node it last resided on which removes it from memory. I write that in a comment, and finish the comment with "Rest in peace, little guy".
That serves very little documenting purpose, but it cheers me up a bit, and I imagine it might cheer up other people I'm working with as they read through the code.
Is this an acceptable practice, or should my in-code documentation resemble as much as possible the speeches of 2004 presidential candidate John Kerry? ;-)