Member preview

How it feels to teach yourself to code: an extended metaphor

There's this weird thing about programming. People decide that they need to learn "programming", like it's a binary thing. Or they say "programming" is too hard, and walk away.

It's like saying, "I'm going to learn cooking." But you've never seen a kitchen, and you actually don't know the word kitchen, and everyone who knows how to cook might make fun of you for trying to boil water in a frying pan even though "boiling" is a new and exciting thing for you and you've only ever heard of chefs who are incredibly good at what they do. They seem to spend a lot of time arguing over the absolute best techniques and tools to make things you've never before heard of, but it all sounds terribly impressive.

Or perhaps carpentry is an easier metaphor to extend. "I'm going to learn constructing," you say. And with all the faith of a digital native, you head to the internet and try to find the right search terms.

You find a YouTube video that shows you how to make a beautiful inlaid wooden vase, and watch it, mystified. Diligent, you write down the tips the artisan gives in this particular application of the wood lathe.

All right, what's next? Got a bit of theory, but what about the day to day? You're going to have to learn this "code" thing, right? A language?

In the metaphor, let's say you need to learn how to use a saw. You've heard of saws, and you're pretty sure you will need to know how to use one of those. There are lots of different types: coping saws, hack saws, automated jigsaws. "Saws" as a whole seem of a piece to you, so you pick one basically at random. You've seen people talk about the hand saw, let's try that. Hopefully won't regret whatever implications come with learning this one!

Great, now you've got a saw. Someone friendly to your cause has given you some lengths of wood and pointed you to Codecademy -er, a Web page with some different sawing technique exercises. This seems just the thing, so you spend an hour or two a week on it for several months.

At first, it feels like progress. But as the sawn lengths of wood stack up, you get the uncomfortable notion that you're still not a carpenter. You're getting pretty comfortable with the saw; shouldn't you feel like you're on the inside of things now?

Of course not, you realize. You set down your saw in frustration. You can use a saw now, but at the end of the day, you thought "learning carpentry" meant you'd be able to make something. And after all that work, you still haven't the foggiest idea where to start.

What’s the solution? Somehow, magically, you have to find an "in". You have to find someone who knows what they’re doing. That person will probably look at you and say, as though the next step is obvious, "you have to find a project. You have to build something."

Of course you do. But you don't know how; that's the problem. You don't even know what a project would look like. Querulously, you ask, "like an inlaid vase?"

No, not like an inlaid vase. Like... a box. A rectangular one. "Trust me," your new friend says. "It's simple." And they hand you a hammer, helpfully informing you, "Here, I like this kind of hammer. Other people will tell you different kinds of hammers are better, but this is a good one to get started with."

"Hammer," you repeat to yourself, and write it down while your friend walks away. Then, "Wait!" You call out. "What's a hammer? What are hammers for?"

A little sadly, you look at your saw. "Do I still need to use this, too? Or just the hammer, now?"

I'm sorry to break the metaphor, but I'm not sure how to convey the utter confusion of a new programmer presented with a preferred type of text editor, knowing that probably this code language they've learned is coming in somewhere, trying to figure out what to do next.

When it was me, I was shown a tutorial online with some sort-of-followable code I could copy and paste. Someone told me to download Sublime, and showed me how to open a terminal on my computer. The tutorial looked great, but I had no idea what to do with the two open windows. They seemed the same, with an unfamiliar set of colorful words on black backgrounds. My biggest quandary for a while was figuring out into which window I was meant to copy and paste.

So anyway, you're standing there with a saw and a hammer and a piece of wood. You tap the hammer on the wood, and it doesn't split into two pieces like it did with the saw. You try again. Still no, so you discard the hammer (seems useless) and saw through the board.

Great, but we’re still standing at: how do I make a box? You saw some more lengths. You look at your pile of ten lengths of wood all in a heap. You throw away the pieces of wood. It’s not clear that a piece of wood of that length and type would ever be a part of a box. What do you know about boxes?

Your friend comes back, and you feel stupid. You've spent an hour cutting wood and now you've thrown it away. You salvage a piece and show it to them. Your friend is perplexed.

"Yes, it's a piece of wood. What's your question?"

What can you ask? This question is sure to be stupid. "Um. What is a box made of?"

Your friend helpfully makes a box in front of you. It takes ten minutes, but you feel a little better about the idea.

You pick up your saw, cut a piece of wood, and realize you've forgotten the next step. Patiently, your friend walks you through each step.

You make another box. You still need a lot of help and you feel bad about taking your friend's time. But you feel like maybe you can make boxes now.

You smile. And then you frown. You think, "okay, I'm a maker of simple boxes. But I don't think I'm really a carpenter yet."

You keep making boxes anyway. You make some different sizes and shapes. You hear about lids and try making those too.

You start meeting people who are building houses. You talk to them and feel like a fraud. You start to speak the language.

Eventually, you think maybe you could work on a house. A lot of the tools seem the same.

You meet someone who needs help building their first box, and you feel strange because you can help them.

Then suddenly you wonder: am I a real programmer now?

Back in the kitchen metaphor, you're someone who can make fancy macaroni and cheese. So are you a cook? Sure. You know what a saucepan is. You can feed yourself. Can you butterfly a chicken? You don't need to right now. But you start to think, "if I had to, I could figure it out."

Want to read more of Kelsey’s writing? Check out her blog at ifoundthemeaningoflife.com/adventures