Should everybody learn to program?

Being a teacher in Computer Science I’ve taught many students how to program (actually I view it as I helped them learn themselves how to program). Most of these were studying Computer Science and usually either knew how to program (or at least they thought they knew how to program :) ) or were motivated to learn programming. But I’ve also taught students that did not study Computer Science and but were required to take a programming course – many of these students see no reason for learning how to program. They are interested in whatever subject they are learning not CS/programming and think that it would be better use of their time to take another course.

I’ve also seen/heard people say that ”you have to be a genius to learn to program”, ”nerds don’t have a life”, ”I’m too stupid to learn programming”, ”I have no use for programming”, etc. But they rarely know what programming is or what a programmer do! So why do they have this image of CS and programming?

I think we can blame ourselves, we being programmers and CS people in general. We tend to talk about programming/CS in a jargon that leaves all non-programmers (and several programmers) with that ”dazed” look of total confusion. It’s like listening to some aliens that have learned to use human language but use words and expressions in a way no normal person would. We have failed showing people the usefulness of programming and that it does not need to be complicated.

One group that should take special responsibility for this is the one I belong to myself: the CS teachers. We have completely failed to take into consideration who we are teaching. We have been teaching programming and problem solving from a CS perspective, using ”boring” examples from math or other typical CS examples, giving little thought to the fact that most people have no interest in CS or programming per se. Most people want to solve their problems, not some abstract problem that a CS Professor dreamed up in the office. We have failed in showing them the usefulness of programming!

But there are other problems also: why should people know programming? Because they can solve small specific problems they have in their daily life. But there is an important part missing here: in what environment should they do this? Should they use Eclipse, NetBeans, or XCode? I don’t think so. Or should they use environments like Scratch, Alice, or Agentsheets. No, I don’t think these are the right tools either. In fact I think of any environment today that lets me easily solve simple problems programmatically, one that is ubiquitous to the general public.

The only environment I’ve seen/tried that was aimed a bit in this direction was HyperCard. It was in no means perfect but it allowed me to quickly put together a ‘stack’ to solve a specific problem, it was not fast, it was not beautiful but it got the job done and it was not something you passed on to others (not a problems since it was my problems I as solving). I don’t know of any such tool today (yes, I know about LiveCode/RunRev and SuperCard but haven’t tried them for years).

Back to the original question: Should everybody learn to program?

Yes, I think that programming knowledge can be useful to a lot of people. No, I don’t think people should learn to program Java/Python/Perl/C/C++/Haskell/etc (we want people to learn to problem solve, not learn syntax). Yes, I think learning how to solve problems is useful to anyone (which is actually what programming is all about). No, I don’t think there is a way today for people to take advantage of programming in their daily life.

I think that an interesting twist to the question is the idea of Computational Thinking which has gained some following in the research community. As I understand it this is not about programming per se but about the methodology of problem solving used within Computer Science. I don’t know if this is what people refer to when they say that everybody should learn to program: learning how to solve problems. If so, I’m all for it.

And as soon as that ubiquitous programming environment becomes available then the answer is ”Yes, everybody should learn to program”

  • john personna

    I was just Googling ”learn to program” in the blogs this morning, to see what’s going on. You obviously have a perspective I, an old programmer, long out of school, don’t have.. For me the biggest change in the last 30 years has been the transition from book learnin’ and school learnin’ to web learnin’.

    For that reason, I’m kind of fascinated by the idea that a certain kind of motivated student can learn to be a productive programmer, for free, on the webs. My road map is here. It turns out I just reinvented and reordered Eric Raymond, of course).

    So my perspective is pretty much centered on people who have decided to go for it, and to learn a programming stack.

    I wonder if ”intro programming” classes aren’t just best as a test for that these days. Try some programming, any programming, and if you think you can use it to pay the mortgage, go for it. For everyone else, I kind of think we’ve reached a fair degree of saturation. I mean, how often isn’t there ”an app for that?”

    (To students who say CS is boring, just ask them how many coders they saw on OWS!)

    • chefen

      Web-based learning is certainly something interesting. Sites like ”Eloquent JavaScript where you can easily ”try-while-you-read”, or good tutorial sites like ”Dive into HTML5” are very useful. The problem with these are that they in many cases targets those either interested in programming or those who see the benefit of learning to program. I don’t see these groups as a problem, to me the interesting groups are those who are not interested in programming, or doesn’t realize that programming could be of help to them.

      One of the best compliments I’ve ever received was from a non-CS student who at the beginning of Python course said ”I don’t want to take this course, I don’t like programming. I tried to replace this course with something else but they wouldn’t let me. I hate this course”. When the course was over the same student said ”I still hate programming but I can see that it’s useful”. Personally I was quite happy that I had managed to make the student to see the usefulness of programming.

      It’s a very interesting challenge/problem to make programming/CS interesting/useful for more people.

      As for ”saturation” I don’t agree. Think about what has happened the last few years with mobile application. We have had a explosion of apps, even new types of apps. I don’t think we have seen the end of this and who knows what happens in the future, we might get some new technology that triggers a similar explosion.

      But I would say that the most interesting part is for those who aren’t interested in writing traditional application but want to solve specific problems in their personal life.

      For example, my wife had a course where she handed out customized data for each student in a class. The students then used this data to make construction calculations. The problem for my wife was to create the raw data, make the same calculations as the students so she could check their calculation and of course keep track of all the students and their data. This took a lot of time for her.

      So I wrote a simple application that made generated the data and LaTeX file that could be printed and handed out to the students. The program also generated Matlab-code that my wife could use to check the students calculations. She is telling me that this fairly simple program have saved her numerous hours that she now can spend doing other things.

      I don’t think this is some unique to my wife’s situation but something that most people can relate to.

      • john personna

        Heh, as a programmer yourself you know exactly how to find the corner case with that problem-generator ! ;-)

        It is a great skill. I mean that in good humor.

        But I could name other little apps that I have written for myself in the past that I can find now. Home brewing calculator? An app to project electricity usage of an appliance? They’re all out there.

        Now, I did write my own Android To-Do List app. Not because there weren’t a million of them, but because they all had too many features. An odd defect.

        Anyway, I get you, but I think the corner cases are few these days.



  • Nowak