Learning to Code is like Learning to Drive

Tue, May 22, 2012 - 11:59am -- Isaac Sukin

A lot of people think about programming as some huge, difficult discipline that you sit down and learn like you would learn History or Math. I think I'll learn how to code today, one might say, and I've really been looking forward to that quantum physics class.

Here's the thing: almost no one learns how to code in a classroom, by hearing about it or by reading about it. People learn how to code by doing it, like driving a car. But most people learn how to drive a car because it gets them from Point A to Point B, not because driving is fun. Lots of people drive for fun, but hundreds of millions of people slog through traffic on their way to work every day.

For many people, coding is not a separate discipline; it is a means to get a job done. Oh, you need 10,000 slightly different copies of that letter? Let me spend 5 minutes and write a script for you and we will never have to worry about that problem again. Did you say you wanted to know who the top 10 East Coast salespeople were this quarter? Why don't you write a quick SQL query to find that out. Want to remind yourself which meetings you've had each week? Google Calendar has an API...

I taught myself programming when I was 15 not because I decided one day that it would be a useful career skill (although it has been, immensely) but because I had a problem I needed to solve and modifying a code snippet seemed like the most effective way to solve it. To this day I think about programming as one (of many) tools to solve problems I encounter rather than as its own field; the ultimate goal of coding is to make people's lives easier, not to write code. When some people are confronted with problems, they write essays or delegate or make phone calls or physically build something. When I am confronted with a problem, sometimes I write code.1

At some level, nearly as many people could benefit from coding as they can from driving – and coding won't get you stuck in traffic. It is a way to accomplish other things that is widely applicable to many different industries and problems. Just like driving to the movies is not much different than driving to the grocery store, if you can write one program you can probably write thousands of others, too. It's probably no surprise that I am a fan of companies who use technology to disrupt other industries. Sometimes I look at the number of startups who consider themselves in the "technology industry" and wonder how long they can scratch their own itch before they scratch their own heads off.

To be clear: I passionately enjoy programming and I've been doing it almost every day since I started in 2007. In many respects and for many applications it is worth pursuing in its own right, and I certainly have the deepest respect for the engineers working hard in the field every day to maintain and improve critical infrastructure (a role I sometimes adopt as well). There is a large class of problems that can only be solved by building things in code, and those problems require specialized knowledge and years of expertise. But there is another, much broader class of problems that everyone else faces on a daily basis that could be solved most effectively with a little bit of code.2

If you want to learn to code, find a problem you care about and choose coding as the solution to it.

Discuss on Hacker News.


1 On the other hand, often the problems I am confronted with are specifically about how to write code. I like those, though it's important to know what the real purpose is. (back)

2 If you're wincing because you've had to deal with one-off legacy code that favored efficiency over canon, I do feel your pain. There are always trade-offs to make no matter the solution. (back)