Gas station without pumps

2012 June 12

AP CS growing, but still tiny

Mark Guzdial was very pleased to find out that the number of students taking the AP computer science exam has grown from about 21,000 to about 26,000 this year: Huge (unofficial) rise in AP CS Test Takers « Computing Education Blog.

I’m pleased to see a bigger than 20% increase in numbers also, but the number of students taking the AP computer science test is still tiny: smaller than the 35000 taking Physics C: Mechanics and much smaller than the 85,000 taking Calculus BC, both of which are arguably higher level classes than the computer science one.  Physics B and Calculus AB may be at about the same level, but have 76,000 and 255,000 test takers.  What would it take to get the CS numbers increased by a factor of 10, up to the calculus numbers? Since computer science is arguably more useful to more people than either physics or calculus, why is the exam so rarely taken?

There are three main possibilities:

  • Few high schools offer computer science.
  • Few students take the computer science classes that are offered.
  • The computer science high schools offer is not compatible with the AP exam.

I suspect that all three contribute to the problem, and there is evidence for all three patterns locally:

  • The neighborhood high school offers no computer science (even though a fairly large fraction of the community works for the software industry).
  • The AP-laden charter school that we tried for 4 years to get my son into, before finally getting a slot and turning it down as longer a good fit for him has an AP CS class.  In 2011, they had 429 AP exams taken in 15 different subjects, with 78 in World History, 71 in US History, 63 in English Language, 61 in Biology, 24 in Statistics, 21 in Physics B, 20 in Calculus BC, but only 10 in Computer Science. The exams with over 60 test takers were required classes, those with under 25 were electives or subjects studied outside of class.  No test has between 25 and 60 takers.
  • The private 6–12 school where my son went to middle school offers a pretty good CS course, which my son took in 8th grade instead of their rather feeble 8th grade science class, but the CS course is based on Scheme, not Java, and does not prepare students at all for the strictly-Java AP exam.

What subjects get ingrained in the school culture and the popular imagination is often a mystery to me.  Why, for example, do so many students take calculus rather than statistics (255k vs 142k), when statistics is needed by many more college majors and is useful even to non-college-bound students?  Why is computer science (which leads to good job prospects) so much less studied in high schools than European History (which has few job prospects and is not a popular major in college)?

Mark Guzdial’s belief (as I understand it—I’m sure he’ll correct me if I’m mistaken) is that the bottleneck is that schools are not teaching computer science and that they aren’t doing it because of a shortage of trained teachers.  While I agree that there are few high school teachers trained to teach computer science, I think that the problem is bigger than that—there are few schools willing to hire such teachers if they existed and students are not clamoring to take computer science in high school, so schools feel no pressure to look for or create high-school CS teachers.  In short, I think that computer science has a public-relations problem in high schools, and not just a teacher-shortage problem.  I’ve no idea how to fix that—PR is not one of skills.

Another small part of the problem is that the AP CS test is testing the wrong part of the subject, concentrating as it does on Java programming.  The exam is a poor fit for students who were taught CS using a more sensible pedagogy (starting with Scratch and Python, for example, rather than Java, or using a Scheme-based curriculum). I don’t think that the proposed lower-level AP CS Principles exam is going to fix this problem, as the problem is not that the CS content is too difficult, but that it is too language-specific.  What is needed, I think is an AP Algorithms exam that tests algorithms and data structures in an almost language-independent way.

My son easily has the amount of computer science covered in the first year or so of college CS classes, from a variety of sources. He’s pretty good at object-oriented programming in Python, he can program in Scheme (but doesn’t by choice), he can do simple Arduino C/C++ programs, he can do some JavaScript programming (but he finds the language irritating), and he’s learned other languages in the past (Scratch and Logo, for example). Just today he wrote an interrupt-driven timer program for the Arduino with a queue implemented in a circular buffer for recording data from our homemade super pulley and sending it to a Python program for saving the data on the laptop, to replace the cruder program I had written that lacked interrupts or queues and just dumped the data to the Arduino serial monitor.  He is currently working on a multi-threaded Python program to record the data from the Arduino while listening for user commands from the keyboard, for a more convenient user interface. (Both of these projects are ones he set himself—I was content with cutting and pasting from the Arduino serial monitor.)  He’s done several computer science projests as science-fair projects: collision resolution algorithms for hashing as a science fair projectminimax search programs to play Connect 4a circuit analyzer to do DC and AC analysis of linear circuits, and machine-learning algorithms for cancer diagnosis from gene expression arrays. He’s even designed some esolangs for fun. In short, his computer science education level is more like a CS major who has finished 2 years of college than one who has finished 2 years of high school.

Despite all this CS, I doubt that he could currently pass the AP CS exam, because it is firmly tied to Java, and he has not learned that language yet.  It is next on his list of languages to learn though, since Art of Problem Solving is offering an online course on Java programming for people who already know some programming (the equivalent of their first course which uses Python). I suspect that even the AoPS course will be a little low-level for him, but it is the only Java-after-Python course I’ve been able to find that seems likely to be a decent fit for him.  He was enthusiastic about the AoPS Precalculus and Calculus classes, and looks forward to the Java class, even though he already knows much of the CS content of the course and just needs to translate his understanding into fluency in Java.

He’ll need the structure of a course to get through the initial barriers of the tedious Java syntax to get to the point where he can program fluently in Java.  Without external constraints on what language he uses, he’d probably prefer to stick with a familiar language like Python, and use tricks like Pyrex, NumPy, or PyPy when he needed more speed (he’s used NumPy and Pyrex already—PyPy does not seem to be quite ready for prime time as it doesn’t include many of the most useful Python libraries, but it looks quite promising).  Eventually he’ll be working on big enough projects that he’ll need the stricter interface requirements of a statically typed language like Java, but it would be better for him to learn the language and be fluent with it before joining such a multi-person project.


  1. No computer science in our high school, which is in a fairly wealthy district in Westchester County NY. I doubt they would ever hire a computer science teacher, since the district is very small, and due to all the budget cuts, they are just trying to avoid layoffs right now. We almost lost the orchestra and band programs this year. There is also just a total lack of understanding of computer science in the school. They see computing as “technology”, and teach Powerpoint, Word, and something called “digital citizenship”. Last winter, I tried to organize a afterschool club on Scratch for the 4th and 5th graders. The parents were enthused, the parent who runs the clubs was enthused, but it was turned down by the person who coordinates computer technology in the district.

    I know that Mark Guzdial believes that all we have to do is get more computer science teachers into the pipeline, but I don’t think it is that simple. If we train a bunch of new computer science teachers, we will just end up with a bunch of unemployed high school CS teachers. Districts nationwide are not expanding programs right now, and are not likely to be able to do so for the next few years. It may make more sense to train existing teachers in computer science, but then you run into the problem of training them deeply enough in a short amount of time, and also convincing the schools to make room for computer science in the curriculum. Did I say that schools are not in a mood right now to expand programs?

    BTW, a new CS AP course is being developed which might be closer to your tastes
    The computer science community is very excited about it. Personally, while I like the idea, I think it is even less likely to gain traction in high schools because it is very hard to explain to non-computer science people. I do not see how, for example, a math teacher who has taken a shallow summer program in computer science, would have enough real understanding to do this well.

    Comment by Bonnie — 2012 June 14 @ 10:35 | Reply

  2. Since the US has changed to providers of information instead of products, it seems that we should be getting more students involved in computer science. I am currently looking to hire a programmer in Boulder, Colorado and am finding there are more jobs than candidates, so it is tough to hire. Many applicants are non-US born but have done their post-secondary ed in the US.

    It is imperative that we encourage students to become more involved in creating using a computer as opposed to consumers only or our computer science jobs will all flow off shore as many other jobs have done.

    Comment by Mike Elings — 2012 June 16 @ 09:10 | Reply

    • I’m surprised you are having trouble hiring in Boulder, as the university there pumps out a lot of CS students, and Boulder is a very desirable collegetown living environment with still reasonable housing prices. I’ve heard more about students having to leave Boulder because they couldn’t find jobs than about Boulder companies not being able to hire competent staff. (Unless, of course, you are trying to get people to work for less than a living wage, in which case you will be limited to those who have no other choices.)

      Comment by gasstationwithoutpumps — 2012 June 16 @ 10:02 | Reply

  3. I wander which computer school is best in the world? I have heard so much good things about MIT, but who knows, maybe there are

    Comment by Skola Racunara — 2012 June 22 @ 09:04 | Reply

    • I don’t think that the concept “which computer school is best in the world” makes much sense. The goal is to find a good fit for a particular student, where their learning will be optimized. A student who is pushy may thrive in a very different environment than one who is shy. A student interested in machine learning may find a different set of schools “best” than one interested in compilers. The balance of theoretical and applied computer science varies a lot from school to school. Some schools (including MIT) are large, are strong in several areas, and have very smart professors and students; others may be good in a few areas (better than MIT in some); others may be weak in everything. But “best” depends very much on what function you are optimizing, and that should be different for each student.

      Comment by gasstationwithoutpumps — 2012 June 22 @ 12:01 | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: