Why learning to code is hard

The myth of the not-a-computer-person

“I could never learn to code.”
“I’m not a computer person.”
“My mind just doesn’t work that way.”

I’d love a nickel for every time someone says that.

On the other hand, I’ve never heard anyone say, “I could never learn to fix a car,” or “I could never learn to play the piano,” or “I could never learn to write a business proposal. My mind just doesn’t work that way.” Most things, we figure if we work at them long enough we’ll get them.

Coding seems different. It’s up on a pedestal for a special kind of person. The word “code” even makes you think of spies and secret societies.

If it’s true that programmers are just born that way, it’s scary news. Every career is now linked to code. If success means coding, and coding means having the right DNA, then in a hundred years the masses will be competing in the Hunger Games under an inbred techno-elite.

Fortunately this is baloney. Anyone can code. You don’t need a fancy computer, expensive software, a computer science degree, or to be good at math. You don’t need a single programming book. You can design and publish a million-dollar webpage for free from a library computer.

If learning to code is hard, it’s because we don’t know how to teach it.


Boot camp…?

You can’t become a Marine or a soldier without going through boot camp. Web development “boot camps” imply the same is true of developers.

For 15 months in Washington, DC, I taught the Web Development Immersive, a coding “boot camp” run by General Assembly (GA).

GA’s students — cashiers, bartenders, orthodox Jewish grandmothers, licensed doctors, Air Force colonels, and everyone in between — drop their careers to pay tens of thousands of dollars to bang their heads against an array of technologies for twelve weeks, five days a week, nine hours a day (plus homework).

Their hope is that this investment will pay off in the form of a career in the high-speed, high-paying, wear-sweatpants-and-play-ping-pong-at-work web development industry.

It’s a good investment. Even though GA makes no guarantee that its students will actually get hired, over 90% of its graduates land those coveted positions within three months of completing the program.

It’s a win-win situation, and boot camps are springing up all over to cash in.

The elephant in the room is that a most web developers never went to boot camp. They are self-taught and have no formal training at all.

So what’s the difference between the person who is self-taught, the person who pays for a boot camp, and the person who says “My mind just doesn’t work that way”?


Up-at-night problems

Everyone I know with any interest in code has tried CodeAcademy’s free online web design tutorial. I can count on very few fingers how many retained anything from it.

It’s not that CodeAcademy is bad; for most people, it’s the wrong tool in the wrong place.


Most learn-to-code books and tutorials follow this order:

  1. This is how the Web works.
  2. This is how you make “Hello, world!” show up on a webpage.
  3. Here are 30 HTML tags to memorize.
  4. This is how you make “Hello, world!” look pretty.
  5. Here are 30 CSS properties to memorize.

For comparison, here’s the order of a popular Spanish textbook:

  1. Here are 30 nouns and adjectives to memorize, plus the days of the week, and the seasons.
  2. This is how you say, “This is that.”
  3. Here are 30 regular verbs to memorize.
  4. Here are 30 irregular verbs to memorize.
  5. Here are 5 different tenses to memorize.

This order makes sense. It’s logical. But you won’t finish the textbook knowing how to speak Spanish, and you won’t finish CodeAcademy knowing how to code.

“Hello, world!” works only if you know how you’re going to use it. By itself it shows you how to make something boring and unremarkable. It doesn’t give you an idea of what you can do next.

You need an “up-at-night” problem that requires you to learn to code: a puzzle where making a specific website or program is the only way you’ll be able to stop staying up at night worrying about it, staring at the ceiling instead of sleeping.

The best way to learn Spanish is to be immersed in an environment where you have to speak it to get by. Feeling unsure about how you’re going to survive the next month in Guadalajara without speaking Spanish is an up-at-night problem that can be solved only by learning Spanish.

Having a cool app idea, or wanting to make more to support your family, or wanting to be a better project manager are all great reasons to get interested in coding. But they’re not problems that can be solved only by learning how to code.

(The up-at-night problem that got me into coding was discovering I was too shy to sell things in person or over the phone but still had to pay rent. I thought having a simple website would let me avoid interacting with real people. I couldn’t afford to hire a designer to make it for me.)

Programming is the art of creating small shortcuts. Something slow or unpleasant to use keeps you up at night — a bloated Excel spreadsheet, a repetitive task, an uncomfortable interaction — and you do just enough to grease that wheel.


It’s not you; it’s me

Coders are not necessarily the best people to teach coding. For example:

Self-Taught Steve used a “hello world” tutorial when he was starting out. His motivation was to learn HTML so he could make his company’s website look less terrible.
Since “hello world” worked for him, he feels like starting with it is the right way to learn to code.
Steve is now an experienced developer. Wanting to give back, he writes his own “hello world” tutorial and publishes it on his blog. His friends — other self-taught programmers who also used “hello world” tutorials — review it and tell him it’s great.
His uncle, who has no coding experience but thinks making websites might be a nice source of extra income, completes the tutorial.
A few months later Steve asks him how his coding is going. His uncle hasn’t done anything since “hello world,” having concluded he’s too old and too “not-a-computer-person” to learn code on his own.

This is happens a lot: a person completes a coding tutorial, and doesn’t know what to do next. They assume it’s because they’re not built to be a developer. Really, it’s because they don’t have a pressing need for it. Coding is a tool to solve problems. Without problems, the tool is useless.

So what do you do if you want to learn code but don’t have the “need” of an up-at-night problem?

1. Create the need.

If you want to learn web development, create a website for yourself. Include a picture, a short biography, contact information, and maybe a résumé. Publish it for free on a site like BitBalloon or Github Pages.

Since you know what you want to accomplish, following the steps on CodeAcademy or Dash will be helpful. The tutorials become a tool and a means to an end, instead of an end in themselves.

Then, show your website to other people. It will probably be really ugly, which is great! Not wanting to be embarrassed becomes the up-at-night problem that motivates you to continue learning.

2. Take a class.

One of the biggest advantages of taking a class is that there’s a teacher breathing down your neck. You need to learn and produce results. Not wanting to feel bad becomes your up-at-night problem.

3. Learn some code in about two hours without a computer.

Most programming books assume you already have an up-at-night problem. They tell you how to write code, but they don’t tell you why you might be interested in the first place. So, someone curious about code picks up a book, flips through a few pages, and finds:

  • It looks really boring.
  • It looks really complicated.
  • It looks really long.
  • They need a computer to do anything.

Their curiosity goes poof, and they turn into a “not-a-computer-person”.

My book, “Learn some code in about two hours without a computer”, is for people who are just curious. Instead of telling you how to code, it’s full of fill-in-the-blanks and multiple-choice questions that you solve with a pencil to explore why code is the way it is. It’s all common sense; no computer knowledge necessary.

You answer the same logical, common-sensical questions the inventors of code had to ask themselves.

Experienced programmers will be frustrated that it teaches the “wrong way”—that is, different from the way they learned. If you have an up-at-night problem then starting with “Hello, world!” makes sense. I’m more interested in finding the fun in learning and understanding the language. Code only works as a means to an end if you know what the “end” is.

My hope is that publishing this for cheap will make coding accessible to all the people who would otherwise write themselves off as not-computer-people, or would think they couldn’t afford to learn.

Coding is the future. How to make it a future for everyone is a tough nut, but I think a crackable one.

A good chunk of “Learn some code in about two hours without a computer” is already available online for free. To support writing the rest, I’ve launched a Kickstarter.