Monday, March 4, 2013

The Great Programming Debate

Over the last few years, I've noticed a pattern that keeps repeating in Internet forums and blogs:
  1. Someone asserts that programming is or should be for everybody, usually misrepresenting it as a glamorous and easy job full of benefits and no drawbacks, like this.
  2. Someone else posts an emphatic counterpoint, like this.
  3. A third person tries to point out that a certain degree of "programming literacy" should be required and goes on to point out that everyone knows (or should know) how to read and write, like this.
  4. The discussion devolves into polite bickering, because at this point most people are usually past their threshold for completely unbiased discussion and are invested in their own point of view.
I happen to have my own point of view, but it usually gets lost in the noise, since I invariably try to contribute it in a discussion during step 4. Looking back, I can see I've weighed in on both sides of the debate and I think it might be interesting to try to share a more balanced view and, perhaps, bring the people from the two extremes a bit closer.

Why Programming Should Be For Everybody


As I pointed out recently, in a similar discussion, I got into computers when I was 7 years old. Back then, "getting into computers", at least in my country, meant getting something like ZX Spectrum or Commodore and either playing games or learning how to code. Games were in English and a lot uglier than their arcade counterparts, so it should come as no surprise that most kids who had computers went on to learn how to make them "do tricks". That's the real allure of programming for a kid: you're typing in seemingly incomprehensible stuff and the machine does something. It's magic!

Not everyone had a computer, mainly because we were living in Communist Yugoslavia and it was not easy to import one, but nobody told us that computers are "not for everyone" and that only trained professionals can program. It was a slightly weird hobby to have, but it grew into some of the best years of my life: I grew up believing that the world would be transformed and that I would be part of it. Some days I felt like a combination of a wizard, secret agent and super-hero; other times I felt like a rebel straight out of Mentor's Hacker Manifesto.

At no point did I feel like a kid who's playing at being adult and should leave it to professionals.

You might think I'm attacking a straw man here, but this sort of elitism seems to be increasingly more prominent in discussions nowadays:
Sorry, but those things are technology and should be worked on by technologists because there's literally no on else who can work on them
That choice quote came from a discussion on Hacker News and it's the kind of extreme point of view that provokes people to react with very emphatic counterpoints.

Why Programming Isn't For Everybody


The problem with emphatic counterpoints is that they tend to go to the opposite, equally unhealthy extreme. If you've watched "What Most Schools Don't Teach", then you know that the intentions and goals behind the video are laudable. You probably also noticed that programming has been grossly misrepresented.

If you didn't know better, if you were the stereotypical impressionable youth, you might have walked away from that video believing that programming is easy if you know addition, subtraction and multiplication tables and that working as a programmer is a lot of fun, where you get free gourmet food, play video games and jam with a band inside an awesome office. You might also get an impression that you would be programming flying robots, self-driving cars and medical equipment.

As much as I agree that programming should be taught in schools -- and I'll get back to that later -- the fact is that programming is not easy and good programming is damn hard. To make things harder, good programming is a lot more important today, precisely because computers are so widespread. Bad code does have the power to ruin lives. I'm not talking about medical equipment or space shuttle systems here: a bad credit report won't kill you, but it might ruin your life for years; a badly programmed system might incorrectly match you as a terrorist.

When conveying a positive message in service of a good cause, you must take care not to go to extremes. Nobody tells kids that being a doctor is as easy as putting on a stethoscope and learning which side of the body holds the heart and which the liver. By simultaneously downplaying the difficulties of programming too much and painting a glamorous picture of it, you're setting kids up for disappointment:
We’ve all been raised on television to believe that one day we’d all be millionaires, and movie gods, and rock stars. But we won’t. And we’re slowly learning that fact. And we’re very, very pissed off.
-- Chuck Palahniuk, "Fight Club"

Incidentally, you're also bruising the egos of everyone who has worked their ass off for more than ten years trying to get closer to being a master programmer. While that's the most forgivable mistake, it still merits being mentioned, because you're alienating the very people you need the most.

Shades of Grey


In the end, it all boils down to recognizing that things aren't black and white. Putting the programming on a pedestal, unreachable by all but a select few, is as wrong as representing it as a glamorous job where anyone can be a rock star if they only try.

I agree that all schools should teach a certain level of programming, just as they teach literacy and a certain level of mathematics. In our society, computers are everywhere and everyone should be brought up to understand them and be reasonably proficient at manipulating them.

On the other hand, even though everyone is taught reading and writing, not everyone ends up being a writer. Even those who do are not necessarily successful. Likewise:
  • Knowing basic biology does not make you a doctor.
  • Learning how to play an instrument well enough to play it professionally requires constant practice and even then you might never get to be famous and hugely successful.
  • Getting into NBA requires more than being able to run the length of the basketball court.
  • Being able to prepare scrambled eggs or even come up with a recipe or two of your own doesn't make you Jamie Oliver.
Are these analogies exaggerated? Yes, but so are some messages we offer about programming. Let's face it, not everyone will have the aptitude to take make programming more than a hobby.

The important thing is that people of all ages need to be free to try it and we need to welcome them. However, it's equally important to make sure it's okay for them to fail. Our industry needs all the good hands it can get, but it's hard enough as it is without adding tons of bad, unhappy programmers who were promised the world and tricked into believing they could get it by wishing upon a star.

2 comments:

Unknown said...

I was also compelled to blog about this topic yesterday:

http://softwarerealities.com/2013/03/04/who-can-program/

I agree with your balanced approach, but I don't think that the goals of the video were all laudable. I picked out five goals, some were laudable and matched the stuff you pointed out, but I think some were self serving.

I think your Fight Club quote was right on the money of what bugged me about the video and a much better way of stating it than I did.

Vojislav Stojkovic said...

I like your analysis of what the video was trying to achieve. I just took the statement at the end and thought of it as the goal, but it turns out that -- as you pointed out -- it tries to do more than just improve the education.