How Donuts and Ice Cream Revolutionized My Work

A blinking cursor. An empty form. It’s that time again. You need to test the feature you’re writing. Maybe it’s a blog editor, or a single input field for changing an image caption. You need to write something. It doesn’t matter what it is. You just have to make sure the text is saved.

asldkfja lkjasldkfjasdf kjasdf

It works. It saved your changes. Your feature works.

But you feel empty inside.

Time to write the automated test. Another blinking cursor.

Lorem ipsum dolor sit amet.

Nope. Still empty inside.

Everything is so dull. So boring. You question your existence.

What you need is a revolution.

Here’s how I revolutionized my work and how you can too:

Stop writing boring words.

Okay, since I am a programmer I still write boring things like “deleteTaxonomyConfig,” but when it comes to testing out features or writing tests for those features I’ve given up on the boring and mundane.

Recently, I was writing a unit test for an Angular directive. I needed to write some words to test a thing. Here’s what I came up with:

There once was a honey bee named buzz. She disliked her parents for their lack of creativity. Also, the government does not allow bees to change their legal names. So she hated everyone and everything. Except ice cream.

I’m not going to win any prizes for my literary genius, but for a few minutes there I was a little less bored than I was before. And who knows, maybe another programmer will see those words someday and feel less bored, too.

Here’s another one:

donut_lover4000: i really like ice cream more than donuts. this is my dirty secret. this is my shame.

A lot of my test writing has to do with food, specifically desserts. I like to pick a theme and stick to it for a test suite, or maybe the whole project.

I also like to use this sort of stuff while developing the features themselves, not just for tests.

For example, say I’m building a way to tell users about errors or warnings. Instead of using boring or even real error messages like, “file not found,” I’ll temporarily use something else like this:

  • All out of ice cream.
  • Oh noes! You are all out of donuts!
  • donuts-are-gross.com does not, and should not, exist.
  • Peanut butter ice cream will make you popular and happy.

Testing an image upload feature? Instead of uploading the same picture of the same stock photo of a person happily eating a salad over and over again, mix it up a bit. Upload a picture of the Slothstronaut, Severus Snape, cookies, or puppies. Puppies and kittens have the added benefit of endearing you to animal-loving coworkers.

Maybe other programmers will say this is a bad idea. Maybe it violates some unknown-to-me code of testing ethics. Me? I’ll just keep writing things that make life a little more exciting.

Join the revolution1.


  1. Real engineers like the women and men designing things like cars, bridges, aircraft, spacecraft, medical equipment, or the software to safely run them should not follow my advice.

← 
 →