Beware Book Learning

My youngest son Andy is a junior at arguably the best public high school in the US: Thomas Jefferson in Fairfax County Virginia.   At back to school night tonight I asked his AP Computer Science teacher if/how they encouraged a modular programming style.  He said this wasn’t necessary since they used objects in JAVA, and modularity comes automatically from objects.

My jaw would have dropped had I been less polite. This is so amazingly wrong that I’m not even sure what a good analogy is – I’d better understand a physics teacher working on perpetual motion machines.  My nine years as a computer researcher taught me that modularity is by far our single most powerful programming tool.  Sure objects might help, but only a bit; one must attend to modularity everywhere.

Yes it makes sense for this teacher to ignore modularity if the AP exam ignores it.  And perhaps it even makes sense for the exam to ignore it since modularity tests might take lots longer than other tests.  But for someone with five years experience teaching computing at the nation’s best public high school to not even know that modularity goes way beyond objects – that seems a sad example of off-the-rails book learning.

My wife thought my complaint ridiculous, and didn’t think I should voice it within earshot of other parents.  He was a teacher after all, and I’m just a parent.  (I worry – could I be that book-learning wrong about anything I teach, relative to what practitioners know?)

This example supports the claim that it is mostly the students not the teachers who makes good schools good, and that even in computer science signaling takes precedence over learning.

Fortunately Andy’s other computing teacher seems to know what he is doing.  Andy claims he is well aware of the importance of modularity, and there is some evidence of that in the games he has written (see Rhodium Games and its YouTube soundtracks.)

I fear too many kids see the key to success as scoring on tests and classes and doing politically-correct extra-curricular activities, instead of taking on substantial projects where they learn a bit more about how things really work.  I’m somewhat (but only somewhat) glad I went to a college that was too easy for me, and that the girls showed me little interest, making me invent and pursue my own projects.

GD Star Rating
Tagged as: ,
Trackback URL:
  • Jim Babcock

    > I asked his AP Computer Science teacher if they encouraged a modular programming style. He said this wasn’t necessary since they used objects in JAVA, and modularity comes automatically from objects.

    He probably misunderstood you. He thought you were talking about modules, which are one specific tool for modularity and which are a feature of many languages, including java, but which are not necessary for modularity in Java programs (because classes provide modularity, too).

    • Robin Hanson

      I asked twice, to clarify.

      • Jim Babcock

        In that case, you’re right, he should’ve known better. Thanks for clarifying.

    • mattmc

      That the teacher didn’t understand the question was my immediate thought as well. When I took AP CS at TJ, I think it was in 10th grade, we had to use modules– and Pascal, no objects. Still, we generally wrote fully integrated programs. It would have been interesting to have to do work in a modular fashion on team projects, where we specify an interface between components and you can swap out implementations. That would help bring out the tradeoffs between the flexibility of modular design and problems it causes at the interface points. This is even more important in modern software environments, where you are not simply creating dependencies on library style component modules, but on services (running instances of the component) with their own performance characteristics.

  • Brandon Reinhart

    If your son is ever in the Seattle area, feel free to have him come by Valve for a visit.

    Tell him that writing and shipping his own games (mods, indie games, etc) is the best way to learn the skills he needs to be successful in the industry — should he decide this industry is where he wants to be. By shipping his own games he’ll learn far more about writing practical code and responding to the customer than he ever will in a class room. Not that this should be an excuse for ignoring his homework. 😉

  • jonathan

    I partly disagree that it’s mostly the students not the teachers; I would say it’s the families and the curriculum. Community aspirations drive excellence or mediocrity or disgrace in local schools – much as all research shows that your milieu and your friends has such a huge impact on your aspirations and decisions.

    As for the curriculum, while individual teachers vary widely in quality, if they are in a success-oriented community with high expectations then the curriculum can be much more difficult. There are a lot of ways to approach that problem. One simple measure is that my public high school gives more AP exams than all of Baltimore or a number of other large school districts. This means many more classes are taught to tougher curriculum standards. There are other measures of course – from the number of books assigned in English classes, the number of papers required, whether homework is checked for completion, etc. These are not necessarily “teacher” controlled but are at a minimum departmental standards or even school standards that reflect community aspirations.

  • Brian Holtz

    The importance of modularity depends on the expected lifecycle of the code. Throwaway code has less need to be well-modularized. I would hope that the open-source phenomenon has made code written for classwork to be significantly less throw-away than when I got my software degrees.

    • Doug S.

      Code written for a class is the *essence* of throw-away code. You demonstrate it to a teacher and then, hopefully, nobody ever does anything with it again. You never have to do any maintenance programming and, chances are, you don’t have to document it very well either.

  • Pavitra

    “He said this wasn’t necessary since they used objects in JAVA, and modularity comes automatically from objects. … This is so amazingly wrong that I’m not even sure what a good analogy is.”

    It’s like saying that clarity of writing comes automatically from punctuation, or that electricity comes automatically from wires.

  • aretae


    I’ve been a corporate technical trainer, primarily focused on teaching Java for the last dozen years or so. I have found something similar to you in many (most) training classes. The business of learning the language is treated one way. The business of learning how you should program (OO Design, Patterns, etc.) is treated entirely separately. And it seems as if few people have a good handle on how to teach the modularity bit anyhow. It’s much more highly conceptual…and folks (especially in transition from other languages) don’t take to it well.

    I wish there was an easy solution, but…if you were to take a $2500 course from any of a dozen different technical training firms that I once taught for, you would likely have the same issue. Of course, I agree with you as to the importance, but there appears to be a gulf between people who don’t know it and people who know it so well, they don’t think about it. And the second group tend to err strongly when teaching, because they misestimate their audience’s mental state.

  • Dave

    Judging from the resumes that pass through my inbox every day and the code I have had to read over the years, you can have a perfectly reasonable upper-middle-class career as a software engineer without understanding modularity any more deeply than is necessary to use Java objects. Indoor work. No heavy lifting.

  • Dan

    Robin you are to be honest… 🙂 biased… Since this is a school teacher he probably studied Pascal which I believe is the introductory in k-12 programming . There Modularity specifically refers to functions etc… and well objects are just functions on steroids really. I would have answered the same when confronted by a smarty pants parent to be honest… Functions and Objects is about the most advanced “modularity” stuff in the k-12 curriculum.
    And 90% of education isn’t “book-learning” !?!?! That is all education including undergrad at universities…

    Yes there is higher concepts of modularity like libraries, a GUI toolkit etc.
    But functions, objects is also a concept of modules and all modern programming langugages enforces it.

    Also you only find out that the rest of the world are not like you… it is mediocrity and mere competences “out there”. Kinda like expecting postgrad engineers on assembly lines. If your kid is really smart he will progress to the more advanced stuff.

  • Anonymous

    Hey, it could be worse. I took a CS class at TJ with a new teacher 7 years ago. After a month or two, the teacher gave up on actually teaching and instead “taught” artificial intelligence by playing board games with a few students in a corner while the rest of the class goofed off in lab.

    Despite being unsupervised, many students did learn things by pursuing their own self-motivated projects. So I agree the quality of the students is paramount.

    That said, a few teachers at TJ are excellent at teaching and motivating students. Other teachers aren’t great at teaching, but put in extra effort to help students organize activities. The student activities are a key part of teaching and motivating students to learn interesting things — things not on any standardized tests, like chess or debate or mathematical reasoning*. So decent teachers are important, but I think many weaker schools have comparable teachers.

    * as opposed to calculation

  • ajb

    I think Robin underestimates how much of success in life is just showing up, following the crowd, and doing the socially sophisticated activities. How often do clever engineers end up working for less excellent engineers who know how to finesse marketing and management?

  • OregonGuy

    One of my greatest regrets is that I didn’t spend more time kicking and screaming at my sons’ high school teachers and administration.

    It wasn’t until my son and I spent time repairing my home’s roof the summer after my son’s graduation that I found out how dysfunctional his high school’s curriculum had been. I had been focusing on grades. I should have been focusing on content.

  • Adam

    I don’t see what’s wrong with complaining “within earshot of other parents”. My father frequently told me when he thought my teachers were teaching me rubbish; the conflict between what they said was true and what he said was true made me think a lot more critically rather than just accepting anything at face value.

  • Bruce

    That teacher probably has some big gaps in his knowledge of software engineering. But, think of how much income he has foregone in order to teach. I bet the averge Java hacker in industry pulls in way more bucks in a year.

  • babar

    i don’t take issue with the post except for one detail. what does this have to do with “book learning”? i can’t think of any programming book that makes a statement like “modularity happens automatically because we use objects”. on the contrary: it seems like you have an issue with ignorance, or inexperience, in teachers. i’d wager that this teacher hasn’t read much, nor carefully, about programming.

    • Eliezer Yudkowsky

      Second Babar. The moral is to beware of teachers, not books. A good book can be written by one of the top minds in the field. If I end up talking to average practitioners in a field for some reason, I’m usually dismayed at how little they understand compared to the textbook authors.

      • Robin Hanson

        Agreed. “Book learning” just has a nice association as being opposed to experienced street smarts.

  • Floccina

    I fear too many kids see the key to success as scoring on tests and classes and doing politically-correct extra-curricular activities, instead of taking on substantial projects where they learn a bit more about how things really work. I’m somewhat (but only somewhat) glad I went to a college that was too easy for me, and that the girls showed me little interest, making me invent and pursue my own projects.

    But credentials/signals can be very important better to recommend that students understand that school is a long test to be beat anyway possible short of cheating. For example by attempting to get the easiest graders that give the least work. Then they can use their own time to learn.

  • KenF

    Talk about a thankless job…

    I understand snot-nosed teenagers nitpicking their teachers; it is the stupid arrogance of youth. A parent should know better.

  • Floccina

    As far as complaining in public, I try to resist. You see I was a basketball fanatic and though I was not very talented my study of game and huge amount of practice made me good enough to get a scholarship offer to play at a small college. I read every basketball book that I could find. Well watching what my sons coaches say and do drives me crazy and I want to voice my objections but basketball in not important.

    What is important to your son is that he get as high a grade in his programming class as possible. There will be plenty of time for him to unlearn what he was taught.

  • Matt

    I’m an undergrad CS student at a public American university. The quality of instruction is often poor as well. Many professors have little knowledge of current real-world software or industry, yet have no trouble making authoritative statements when they shouldn’t.

    However, modularity was emphasized quite a bit in the (required) software engineering course. I did think that the course was infected with what I call “object-oriented worship”: the importance and capabilities of object orientation were overstated, and some features of modern OO-capable programming languages were treated as if they were a direct result of that language being OO-capable.

    I consider modularity to be much more than simply writing multiple classes / functions and splitting different parts of a program into different files.

  • Robert Koslover

    Frankly, I’m quite impressed that object-oriented computer programming is now actually being taught in high school (well ok, I realize that you are talking about a truly superior school). But still… wow! There is no shortage of students at my local university who have a lot of trouble programming even the simplest computations, in even the simplest sequential computer languages, let alone the modern object-oriented ones. Modular code? That’s “software engineering,” for goodness sakes! How about merely understanding the concept of conditional branching? Or even… binary numbers? Your son is fortunate indeed to attend such a superb school. And I am not surprised that it may be difficult for them to find teachers who are truly smart enough to work there. :).

    • cat

      Your son is fortunate indeed to attend such a superb school. And I am not surprised that it may be difficult for them to find teachers who are truly smart enough to work there.

      Where I grew up in the late 80’s the public high school and magnet school had no trouble finding qualified teachers for CS classes. They were able to offer me 4 years of CS classes and I arrived at college well ahead of my classmates.

      I’m sure they are able to find competent teachers in NoVa as well.

  • cat

    I’m still at a loss as to why you’d even ask your son’s AP teacher about modular programming other then to preen since any practicing Software Engineer knows there is a time and a place for all the different programming paradigms.

    They are teaching Computer Science not Software Engineering in preparation for college where they will most likely continue to teach your son Computer Science not Software Engineering. There he maybe exposed to SE in some courses, but most of his classes will be focused on Computer Science.

    You should be more upset at them teaching your son a subpar CS curriculum at the arguably the best public high school in the US then a half right answer to your vague question.

    If an AP CS class is really CS 101 and they can’t deal with the lack of abstraction C has while learning the basic CS principals then they aren’t the best computer science public high school students the US has to offer.

  • Doug S.

    My high school didn’t teach any computer science content, at all. The only computer class they had was called “Keyboarding”.

  • Nikhil Punnoose

    So how embarrassed is your son, already?

  • Jaap Weel

    I think there are things wrong with teaching Java in the first place. (I notice your son writes his games in Python. Maybe he’s onto something.)

    One of the most common problems with beginning students of computer programming is that they do not treat the programming language as a system they fully understand (because they don’t), but rather as a system that contains mysteries (rules about implicit typecasting and the order in which to execute the initialization code of various classes etc.) they’ll never understand. This leads to voodoo programming, defined in the Jargon File as “The use by guess or cookbook of an obscure or hairy system, feature, or algorithm that one does not truly understand.” To add insult to injury, the approach to software design that comes with languages like Java is full of things that have the smell of ancient rituals with origins long forgotten, at best—or tax forms to be filled out in triplicate, at worst. The introductory student has no concept of the problems (often deficiencies in the language) that led to the invention of the Factory Visitor Singleton and the like. Hence, once they leave the classroom, they’ll think of such things as bureaucratic fluff and omit it and they are left to rediscover the virtues of modularity all over again.

    How, then, do I propose that Computer Science be taught? Structure and Interpretation of Computer Programs, the classic MIT textbook.

    Abelson and Sussman make a point of “making the magic go away.” (I was told by the person responsible in past years for the smoke effect that at some point during the semester teaching from their book at MIT, one of them used to show up to class wearing a wizard’s hat, which would then disappear in a puff of smoke.) They use a language so simple that they can explain all of it. You learn not one, but several mental models of what is going on, in increasing levels of detail, culminating in an interpreter of the language written in itself (sounds scary? it fits on the blackboard!) and (admittedly in a usually omitted last chapter) a compiler. Scheme has no structured data types or classes or any of that, but in the course of the book, all of those are constructed as facilities within the language, the student gets to see precisely how they work, and why.

    A student that understands SICP understands most of what we can teach about programming. (One exception is the use of type systems.) Of course a CS major may also want to know about Fibonacci heaps and shading algorithms and neural networks and branch prediction and TCP and how to schedule processes in O(1), but none of those are about how to program so much as about what to program, which is a different question.

    So why do high schools teach Java? Because colleges teach Java. Why do colleges (though not, by and large, the best CS schools) teach Java? Because someone has gotten it into their head that computer programming is not a new way of thinking, but a thoroughly practical clerical task, a sideshow to the real thing, be it the Analysis of Really Clever Algorithms, or Corporate Data Processing, or what-have you. And that attitude translates into teaching the “industry standard” cruft and the complaint that if you teach students using a language they actually understand, like Scheme or Machine Code (cf. Harvard) or even Python (but that one’s dangerously close to voodoo-land already), then they’ll have to “learn it all over again.” I even know of colleges that teach C++. I have two degrees in Computer Science, I have written several compilers, and programmed in a dozen different languages, and I cannot wrap my head around C++: I do not understand why on earth we expect freshmen to be able to look at a 3-page Standard Template Library error message. If I had to teach CS1 (and not being likely to ever have to do so is frankly the greatest of my regrets in switching from CS to economics) I would want sophomores to tell next year’s freshmen, “computers aren’t mysterious black boxes; once you’ve taken CS1, you’ll understand it’s all really fairly simple; it’s a big heap of NAND gates and all the rest is but conveniences to help us think about them.”

    There may be another reason, which is that teaching CS well has two drawbacks: it requires better teachers than teaching it poorly, and it fails to give those students who will just never get it the impression that they’ve actually understood it about as well (or as poorly) as the ones who do. As for the latter problem, I can’t really see a solution. As for the former, I think we need to realize that there simply aren’t enough good CS teachers to go around, or rather, that most schools cannot afford them, given how much they can often earn in industry. That is why it’s important to keep thinking about ways to improve textbooks, languages, and other low-marginal-cost educational tools.

    End of rant.

  • anon

    “One exception is the use of type systems.”

    A pretty glaring exception if you ask me. Could Haskell be taught with the same approach?

    BTW, there are subsystems of Java which are simple enough that they can be explained in full, such as Featherweight Java.

  • J.

    Robin, a homeschool friend just pointed me to this post. I didn’t know about you until today. I’m a TJ parent too and homeschooled my daughter for 8th grade.

    You write: “He was a teacher after all, and I’m just a parent.” No, you are never just a parent. We get ourselves into a lot of trouble when we concede that school always knows best and we are just the parent. Many of us TJ parents have come to the realization that it’s the kids who make the school what it is. A lof of parents live under the illusion that TJ is stacked full of the most awesome teachers on earth. Surely there are some outstanding ones, worth their weight in gold. But the overall perception is well over-rated.