How school made me hate computer science and programming

Some months ago, when the legendary computer scientist John McCarthy died, I wrote a blog post in which I briefly reminisced about the way I hated computer programming before I came to love it. Today I am filling in some more details about how school (elementary school through college) made me fear, misunderstand, and hate computer science and programming. I am inspired to do this because

My goals in telling my story:

In a forthcoming article, I will engage in a severe critique of the Codeacademy lessons I have so far examined and gone through, while helping my wife learn programming from scratch.

6th grade and BASIC in the early 1980s

When I was in middle school in the 6th grade, my math teacher was crazy about computers. He was convinced that his best math students, including me, should learn computer programming. I was basically coerced into staying after school for sessions in which he taught us to program in BASIC for the TRS-80 microcomputer. The BASIC language was very primitive. We used line numbers and GOTO. Some boys got totally into programming, and tried writing video games. I was not one of them. I was not a natural at programming. I will admit it: I never really understood GOSUB or PEEK or POKE at the time. In fact, one beautiful spring day, since it was nice outside, I decided to simply walk home from school instead of staying around for his class. After missing a couple of sessions, I was shocked that he contacted my parents and basically made me continue on. I finished out the year, then never wrote a BASIC program again (until college).

I did like playing computer games, however. I just had no interest in making them.

7th grade and Pac-Man

In the 7th grade, I was crazy about video games and my sister and I managed to save enough allowance money to buy an Atari 2600 video game console. I had encountered an IBM PC by then, but had no interest in it.

9th grade and my first programming class

When I started high school in the 9th grade, there was a requirement that all students take a semester of “computer literacy”. After several meetings of that class, I wanted out. We were shown slides of tape drives, told about bits and bytes, and I had no interest whatsoever in any of that. I heard that there was a way out of the requirement, which was to take an actual computer programming class. Since my father was working as a mainframe programmer (his degree in information sciences being from the 1970s), he suggested I take COBOL, which were offered by my high school (in addition to Fortran and RPG and probably others I don’t remember).

I switched to the COBOL class. Here we learned about pseudocode, used flowchart templates to draw symbols on paper, wrote our programs out in pencil, and used the big keypunch machine to punch out our programs. Every day we had the opportunity to submit a punch card deck to the teacher (with the appropriate job control and compiler cards) to drop off for overnight processing at some mainframe somewhere.

I hated the class. The whole rigid process we were supposed to go through, the verbosity of the COBOL language, and the nature of the programs we wrote, made computing seem very boring. I started not doing any homework, and after several weeks, I was failing the class, and the teacher called my parents.

I dutifully caught up on all the missing programming projects, got my A in the class, and then never touched COBOL again, and forgot any COBOL I pretended to learn while basically copying and pasting from example programs in the textbook and modifying stuff until it “worked”. I have a confession to make: despite my A in the class, I never really understood COBOL or programming. I was just going through the motions. It was truly cargo-cult programming. This is a warning to all educators to actually verify whether someone has learned something, as opposed to cleverly faked it! (I will come to this subject again.)

10th grade and Pascal

In the 10th grade (in a new high school), my math teacher made it mandatory to write some rudimentary programs in Pascal to illustrate the trigonometry and other stuff we were learning. We used the MacPascal interpreter on the Macintosh for this purpose: there was a computer lab where we did our work and printed out our programs and results. I have almost no memory of any of this except that I was intrigued by the automatic formatting and the proportional fonts in MacPascal.

I should note that at this time in my life, I had no interest in computers. We still did not have one at home, and I had long since outgrown the Atari video game console.

11th grade and Advanced Placement computer science

In the 11th grade, I had the opportunity to take an Advanced Placement course in computer science, taught using the Pascal programming language. (I mentioned this in my previous article.)

I signed up for the class. You might wonder why, given that I had no interest in computers or programming (in Pascal or any other language). I had a perverse incentive. Advanced Placement courses were advertised as a way to get out of equivalent courses in college. I figured that if I ended up in college with a computing course requirement, I wanted to place out of it! So I signed up for Advanced Placement computer science because I hated computers and wanted to get the pain over with earlier rather than later.

The course was taught by a math teacher who made us use as a textbook a book that I found totally over my head, “How to Solve It by Computer”. I’m betting that if I had a copy of this book now to look at, I might actually enjoy it, but at the time, it was forbidding. It was all about loop invariants, proving your algorithms to be correct, etc.

One side effect of the course was that pretty soon it became clear that it was the most time-consuming course. I simply did not have enough time in the computer lab to get my programs running correctly. I had my father buy me an Apple IIe computer so that I could do my coding and debugging at home into the wee hours of the night as necessary.

I found it annoyingly difficult to get out of the BASIC and COBOL mindset into the “structured programming” enforced by Pascal. As a result, I am sensitive to the idea that “learning” inferior programming languages can genuinely get in the way of further progress as a programmer.

I did not enjoy the class at all, but did enjoy the side effect of having a computer at home, which I used for playing some games as well as for word processing, so that I no longer needed to use a typewriter and scissors to work on drafts of papers.

Again, I will admit that for much of the class, I was proceeding with no real understanding of what I was doing. I was copying and pasting and cargo-culting my way through the class, and through my receiving a 5 on the Advanced Placement exam. After this class, I thought I was done with programming for the rest of my life.

The problem was that we never wrote any programs to do anything I found interesting, and was never exposed to the general possibilities of what we could do through programming. Writing a recursive program to generate fractals was not very interesting to me. My biggest project in the class was writing a program to maintain a library of books and be able to sort and search it and write it out to floppy disk and read it back in. That was also not very interesting to me.

Motivations

My hobbies at the time included playing chess, learning languages (I was enthusiastic about French and had taught myself Latin), reading lots of books. If the world had been different then, and someone had told me what I could do by knowing how to program, I could have been very interested. For example, suppose that the Web existed then. Suppose someone told me that by knowing how to program, I could write code to create my own flashcard system for learning languages. Then there would be a question of whether an application already exists for purchase that can do that. (It turns out that I have never been satisfied with any flashcard program I have used.)

I think that to attract interest in computer programming, it is vital to give people reasons that they can relate to. And it is not helpful to discourage potential programmers by telling them that they should be doing something else, like, just focusing on being a doctor or salesman, giving the argument that the “good” programmers are already doing their job creating applications ready to use, and that therefore comparative advantage says that only professional programmers should learn how to program. This is like telling someone centuries ago that it is no use learning to read or write because others can already do it and probably do it much better. I think the proliferation of information means that more and more people need to be able to analyze it. Whether you call it “scripting” or “macros” or “customization”, the truth is that at some point, real programming is necessary in order to truly understand and control one’s data.

After 11th grade

The rest of the story, I already told earlier.

Conclusion

My K-12 schooling did nothing to encourage me to actually understand and apply computer science and programming. I wonder to what extent the kind of experience I had still applies today in K-12.

Postscript

Upcoming topics I will write about:

comments powered by Disqus