Why Not Learn to Code?   Leave a comment

I’m reading Jeff Atwood’s Please Don’t Learn to Code. He’s a software developer by trade, and I’m not. So take my comments with a grain of salt.

Atwood writes, of NYC Mayor Bloomberg tweeting that he is learning to code using Codecademy:

A noble gesture to garner the NYC tech community vote, for sure, but if the mayor of New York City actually needs to sling JavaScript code to do his job, something is deeply, horribly, terribly wrong with politics in the state of New York.

I do not disagree with that sentence. I’d be confused if he needed to write code as part of his job as well.

But suppose Bloomberg is doing this, not to debug JavaScript on the NYC.gov site, but to learn something new. Suppose he’s doing this as a hobby, to learn enough to do something interesting, because he finds it fun. Some people learn about the subtle details of historical events as a hobby. Some people solve crossword puzzles. Others learn to play an instrument (even if poorly), or draw (again, even if poorly). Some do all of these and more. Why not coding as a hobby? Nothing says that because he’s been working on these programming exercises, he has designs on working on this stuff in his daily job.

Later, Atwood lists a number of reasons why he considers what he calls the “‘everyone should learn to code’ movement” is flawed. Some of these reasons are related to the relationship between coding and problem solving.

It assumes that coding is the goal. Software developers tend to be software addicts who think their job is to write code. But it’s not. Their job is to solve problems. Don’t celebrate the creation of code, celebrate the creation of solutions. We have way too many coders addicted to doing just one more line of code already.

Related to problem solving, he also writes:

It puts the method before the problem. Before you go rushing out to learn to code, figure out what your problem actually is. Do you even have a problem? Can you explain it to others in a way they can understand? Have you researched the problem, and its possible solutions, deeply? Does coding solve that problem? Are you sure?

In part, I agree with him. Coding is not an end in itself, but a means to an end. It is a method of solving problems. And without understanding the problem, coding is not going to help. I get that.

But I do believe that knowing coding, even if a little bit, allows you to approach problems differently than before. Instead of, say, using the menus in Stata to perform an analysis, I write a bit of code. It gives me flexibility; if I do it enough, I can abstract away some of the details and make a loop. I can do my own data cleaning and normalization rather than just being content with what I’ve found. I can even start working on different problems, because I can use what I know about coding to write web scrapers to extract data. It works both ways.

Atwood also writes:

It implies that there’s a thin, easily permeable membrane between learning to program and getting paid to program professionally. Just look at these new programmers who got offered jobs at an average salary of $79k/year after attending a mere two and a half month bootcamp! Maybe you too can teach yourself Perl in 24 hours! While I love that programming is an egalitarian field where degrees and certifications are irrelevant in the face of experience, you still gotta put in your ten thousand hours like the rest of us.

I do not understand. Learning the basics of coding does not imply there’s a “thin, easily permeable membrane between learning to program and getting paid to program professionally”, anymore than taking a class in basic art implies the same “easily permeable membrane” between learning art and being a professional or semi-professional artist. Is the problem learning coding per se, or is it that perhaps some of the schools, books, and programs lead people to a false sense of rapid expertise?

In point of fact, I do not consider myself a programmer. I took some computer science courses as an undergrad, I’ve written programs in a variety of languages as a sysadmin, researcher, and business analyst. I know enough to solve some basic problems I run into where other approaches are irritating. But I have no illusion about being a competent programmer, or someone skilled enough to do it as a full-time job, much less a great programmer. It’s one of a few tools in my analytic arsenal, and taking courses on Udacity, Coursera, and Codecademy is only going to help with that.

It seems that Atwood’s problem is less of “learning to code is useful and interesting” than:

  1. People overstating the importance of learning to code (especially vis-à-vis other skills, like critical thinking and clear writing);
  2. A promulgated illusion of going from “zero to expert” (or employable in the software development field in a few steps);
  3. The dangers that the overconfidence fostered in (2) can yield (e.g., so much bad code on projects).

Maybe I am wrong on this; perhaps he actually believes that only people who are willing to devote their careers to programming should program, and that either you should spend the “ten thousand hours” and become an expert, or not do it. (“Go big or go home”, anyone?) But there’s something that just doesn’t ring quite right about that; otherwise, why do much of anything unless we can devote our lives to it?

Leave a Reply