What is a variable?

. 2 min read

I was thrilled to present at PyCon Australia this year! I spoke about how to be a brilliant mentor.

Effective mentors know how to adjust their language when explaining ideas. At Codebar, a free coding workshop, I mentor students that are coding for the first time ever. I am very mindful not to use any jargon when explaining a technical concept. Instead of using jargon, I try to build on concepts the student already understands.

With this jargon constraint, it becomes rather difficult to explain even the most basic concepts, such as “What is a variable?”.

If you would like to play along, try to describe a variable without using any of the following technical words:

  • access
  • assign
  • data
  • information
  • label
  • location
  • manipulate
  • memory
  • name
  • program
  • recall
  • reference
  • remember
  • represent
  • reuse
  • stand for
  • store
  • value


If you had difficulty answering “What is a variable?”, you are not alone. I asked the same question at PyCon, at the Sydney Ruby meetup, and at the Sydney CSS meetup. Most software engineers cannot answer the question.

My explaining strategy is to build on concepts the student already understands. I usually explain a variable as a sort of box, useful for putting things in.

When was the last time you moved house? It was probably annoying, took too long, and involved many cardboard boxes. You put your clothes in a box, your blankets in another box, another box for all of your wine glasses, and so on.

To make it easier to find and unpack all of your belongings in the new home, you grab a marker and write “KITCHEN - WINE GLASSES” on the side of the wine glass box. You’re pretty keen on having a drink after this horrendous move.

Without using the exact words, it is possible to discuss storage, recall, and the importance of variable names, in a way that the student will understand.

When I showed you all the words you couldn’t say, I tricked you a little bit. They were the first words that come to mind, but there are so many other words in the English language.

Your student might not know what a memory address is yet, but they probably have used a cardboard box before. Build on the concepts that they already understand, and you will have a successful workshop.

If you’re interested in answering hard questions like this, become a mentor! Codebar is a free coding workshop in many cities around the world. Register at codebar.io.

Photo by Erda Estremera on Unsplash.