DEV Community


Discussion on: Do you leave jokes in your code? If so, please share!

codemouse92 profile image
Jason C. McDonald

One of our developers, Scott, was well-known at MousePaw Media for possessing a lethally dry wit. I made the mistake of asking once for a "yay or nay" on something, and from then ever afterwards, he'd respond to yes/no questions with "yay" or "nay". It caught on at the company, even prompting a pair of yay-nay T-shirts to be made for our holiday gift exchange.

When we wrote IOChannel, a featureful wrapper around C++'s std::iostream, we offered a few formatting flags for printing boolean variables. Among those is the undocumented bool_scott...

bool foo = true;
ioc << bool_scott << foo << io_end;

...which would output...


Meanwhile, the official (still unpublished) specification for our upcoming language contains these little gems...

ERROR 22: Paradox. Something impossible happened.
ERROR 22: Paradox. Computer will now self-destruct.

Error 22 is actually useful for "can't happen" scenarios. There will be some way get it to print out the second message instead, though.

ERROR 42: Unknown question.