Charles Harris
2 min readAug 5, 2015
> derp undefined

What are your go-to example variables?

I’m constantly frustrated by code that doesn’t work the way it should, and the last thing I want to waste time doing is writing a sensible console log. I hate naming things, even when I know I’ll kick myself later for naming variables and functions in ambiguous ways.

Nevertheless, I have my quick and nonsensical variables when I wanna store something in a pinch. This is not advisable best practice, but I can’t be the only one who does this either, right guys?

I resort to a quick console log with these variables because I can filter them in my dev tools real easily. I don’t have to dig through other errors or output and nonsense the app may be returning. In a sea of logs I recognize the face of my own.

Do these things even have a proper name to them? Are they called example variables? That just sounds like folk computerology to me…

> yarp {id: ‘Error’, status: ‘Still broken dummy’}

We all see foo, bar, bat used in code examples but does anyone really use those when writing code?

Here are my example variables:

  • derp
  • yarp
  • yarg
  • derg
  • derr

What’s the story behind them? I don’t know. Reddit memes? AIM chat history? Team America: World Police? Who knows how they got there in my head and why they stayed there.

I never try to leave them in my code, they are always taken out before production. But my teammates will be frustrated while collaborating with me when they run across my nonsense variables and wonder, “What the hell is he expecting the output to be here?”

What example variables do you use while developing and testing your code?

Charles Harris

Web Developer. Literature, history, and philosophy enthusiast. Funnier in person.