Jeff Atwood has it wrong. He's a writer and programmer that I deeply admire. But his last post, Please Don't Learn to Code, is simply wrong. At least as "wrong" as someone's opinion can be. That is, it rests on a deep equivocation and a deeper underestimation about human thought.
Jeff writes, 'The whole "everyone should learn programming" meme has gotten so out of control ... The "everyone should learn to code" movement isn't just wrong because it falsely equates coding with essential life skills like reading, writing, and math. I wish. It is wrong in so many other ways.' He goes on to enumerate the ways that it is wrong to believe everyone should be able to program.
Now, Jeff is certainly right that not everyone will get jobs as programmers and not every should aspire to this end. In truth, as a pure profession, programming is really only for people who enjoy being skewered between the horns of obsession to detail and ever-changing success criteria. That's beside the point. The question isn't: "Should everyone renounce their careers, put up a poster of Knuth (are there Knuth posters for sale by the way?) and sprout a neckbeard?" The question is: "Should everyone learn to program?" Jeff only gives lip service to this important difference. He equivocates on the point to reinforce a knee-jerk reaction to the recent faddishness of learning to code.
He mixes up points like "can you explain to me how Michael Bloomberg would be better at his day to day job of leading the largest city in the USA if he woke up one morning as a crack Java coder?" (the professional benefits of programming) with points like "Being able to get around on the Internet is becoming a basic life skill, and we should be worried about fixing that first and most of all, before we start jumping all the way into code" (the personal benefits of learning to program). By wandering back and forth between these poles of personal and professional he avoids having to take the argument that learning to program may be tremendously important personally even if you cannot be directly employed to do it.
Jeff equivocates because he has missed the point about why we learn. We learn new things because our perception of the world is shaped by our mental catalogues of what is possible and what it useful. We constantly filtering out perceptual noise on the criterion that it doesn't help us achieve some goal or end. Just think of when you learn a new word. You suddenly hear it everywhere. Not because everyone else just learned it too, but because you had been filtering it out. It didn't help you get around because you didn't know how to use it.
If you don't know how to program, you filter out all parts of the world that involve programming. You miss the loops and divide-and-conquers of everyday life. You cannot recognize programming problems without the understanding that outlines these problems against the noise of useless or random information. Sure, when I see a loved one slavishly reordering a list of contacts by hand, I recognize a programming problem. It's second nature to understand the reason that the form didn't submit or that page couldn't load. Yes, I can "see the code" behind my phone and know that poor memory management, not the mercurial favor of the Gods caused that app to crash hard. But this is only because I understand programming. I am only able to function in this digital wasteland of convenience -- and not be dragged along sipping a slurpy -- because my search space for problem solving and perception has been expanded by my learning to code.
Now, Jeff mentions that we should have some base level of digital literacy. But I am hard-pressed to figure out how I would explain REST in a vacuum (how I explained REST to my wife notwithstanding) or describe what's causing that Android phone to throw a "null pointer exception". I don't know how to teach someone to recognize that a problem is caused by or can be solved by programming without teaching them programming. Maybe that makes me a bad teacher but I find that the abstract notion of, say, an if-then statement is far more sophisticated than, "Hey try this 'if' and a bunch of curly brackets and parentheses in your console".
Jeff writes, "But I can also recognize plumbing problems when I see them without any particular training in the area." This isn't right. He may not have had formal training (the professional/personal equivocation again) but he has been trained by an unruly digestive movement, a low water tank and the horrible things 18-22 year-olds do to and around toilets. My dad showed me how to fix a broken chain in the tank. Before I learned that, toilets had three states: working, cloggged and broken. After learning to fix the chain, I added a new state to which my toilet-perception could resolve: loose or broken chain. Again, the ability to take in, cut up and categorize the world is a product of the things learned.
Jeff makes some good points in his list of reasons why people shouldn't learn to program. Unfortunately, none of them are relevant:
- More code is not necessarily desirable: Jeff goes on to refute this in the next bullet point. This is a strawman. No one wants to write lines of characters. Everyone wants to solve problems and the desire to create code for code sake is a problem in the profession as well as outside of it.
- See above.
- It puts the method before the problem: this is cognitively wrong. You can't figure out your problem without the understanding of what possible problems there might be. Learning these possibilities is learning to code.
- Most programmers aren't good enough to do their jobs: So we shouldn't have new ones? That's like saying the solution to schools failing because of teachers underperforming is to stop training teachers. As if we can eradicate bad teachers/programmers by simply eradicating them all.
- You might not get rich and famous: We didn't start programming because we loved money. We are smart enough to become bankers or silk merchants. We became programmers because we are obsessed with learning and changing and making machines learn and change.
In summary, learning to program is not the same thing as training for a programming career. Learning new skills opens up new perceptual avenues and cognitive spaces. I'm learning to sew right now, not because the world needs another tailor but because I want to be able to recognize quality in clothing and create pieces that I can't find. Novice coders feel the same way about their digital goods and should be encouraged to continue. Learn to program.
You hit the nail on the head. "Learning to Code" is important both professionally and personally to most people. I don't know anyone with a high school education who doesn't appreciate knowing how to "program" the alarm app on their smart phone, knowing which button to click on popups and notifications in a browser, or "program" the clock on their oven or microwave, or perhaps their thermostats. And most people can benefit from the Intuition Pump of being able to manipulate algorithms in their mind, to be able to conceptualize if/then decision trees and imagine how they might be automated in a machine. Learning to code isn't an if/else decision, it's a lifelong prioritization of thinking intelligently and clearly vs reactively and emotionally. Program or be programmed. You can see where "being programmed" leads a society and what power being able to program gives to the kinds of people who write blog posts like this... in markdown or other machine-interpretable code.