thraxil.org:

designing a high school computer science curriculum

by anders pearson Thu 08 Sep 2005 01:25:11

recently, a friend of mine got a job as the head of the CS department (a one person department so that means he also teaches all the CS classes) in a private high school and is faced with the challenge of redesigning their curriculum. he's been teaching CS courses at the college level for a few years now but hasn't taught high school before or designed a full curriculum. he came to "Eric":http://www.ericmattes.com/ and i for ideas. the school is a typical 4-year high school. CS is an elective there, so one of his goals is to keep things interesting and fun enough that students will actually sign up for the classes. i don't have an educational background, but i have a surplus of opinions about how CS should be taught, so i thought about the problem a while and came up with a rough outline of a curriculum myself. i'm posting it here to see what sort of opinions others have about CS education and how programming should be taught. first of all, i think it's important to consider the different types of CS students and what they may get out of a program. at one end, you have the hardcore computer geek kids. they're already interested in computers and won't need much encouragement; just let them loose and provide them with as much info as they can take. someone without the ability to learn and explore on their own just won't make it far in programming. a good program for these kids will just accelerate the process for them. it should also ensure that if they pursue CS in college, that they'll be well prepared. at the other end are kids who have no real desire to ever be a programmer or even do anything close to math or hard sciences. i happen to think that learning programming still has a lot of value for them. not just because computers have invaded every aspect of modern life and knowing how to subjugate them to your will is becoming a more general useful skill. science and math are valued parts of a liberal arts education because of mental skills that they are supposed to impart to the student: thinking precisely, logical problem solving, breaking a problem down into smaller, solvable sub-problems, the habit of creating testable hypothesis to understand new phenomenon, etc. programming can offer all that but in a very concrete and direct fashion. having a computer that does *exactly* what you tell it to can be very humbling and make you realize that quite often you don't really understand what you're telling it. i've learned from years of programming that unless i can write a program expressing some concept, i probably don't fully understand it. you just can't bullshit your way past a compiler. if they're lucky, beyond picking up those fancy liberal arts sort of values, they'll also gain an appreciation for computers as tools to eliminate repetition. that's largely what they are to me. if you have a computer and you know how to teach it to do things for you, there's no good reason to ever do a boring or time-consuming task twice. being comfortable getting a computer to automate stuff for you is useful in just about any field. unfortunately, though, most CS curriculums i've seen seem almost purposefully designed to drive students away from programming. starting out with such exciting topics as binary and hexadecimal numbers, fibonacci sequences, and factorials. after learning a bunch of meaningless theory, students are then introduced to the exciting world of writing programs that spit out some text or numbers to a console. probably in a language like Java that requires them to understand object oriented programming, static methods, and classpaths just to make sense of a "hello world" program. the lesson to students is clear: programming is arcane, complicated, and boring. the overall goal of the curriculum, then, is to cover as much of that spectrum as possible and avoid scaring them off too early. the obvious approach is to take advantage of the fact that only the relatively hardcore kids are going to stick with it for all four years. so the program starts off gently and tries to get in as many of the basic concepts as possible without causing too much pain and eventually progresses to the more nitty-gritty stuff that's really only going to help the future programmers in the class. h3. year 1 h4. goals: don't scare too many students. cultivate interest. develop understanding of basic computer programming concepts and problem solving techniques. precision, breaking down problems, methodical approach to debugging, etc. h4. curriculum: robotics (probably Lego Mindstorms or similar). fun for the students, makes things very hands on, allows for programming to be introduced in a very concrete manner ("hello world" programs that print stuff on a computer screen are boring. making a real physical thing that moves around and does stuff is much more satisfying.). introduce basic concepts of programming as needed: conditionals, loops, variables, subroutines. follow up each with concrete exercises. heavy focus on problem solving aspects, debugging, and incremental design. avoid too much abstraction. possibly spend some time (towards the end) on stuff like Word Macros, spreadsheets, applescript, etc focusing on how they can let you automate away boring, repetitive tasks. h3. year 2 h4. goals: develop more advanced skills and understanding. build toolset for developing real applications. h4. curriculum: taught in python, scheme, ruby, haskell, etc. something high level with relatively simple syntax, a REPL(Read Eval Print Loop), and built-in simple data structures. emphasis on use of data structures rather than how to build them. basic development process: editor, shell, interpreter, libraries, tools. simple OOP(Object Oriented Programming) concepts. simple algorithms, focusing on graphics rather than math. continued focus on practical scripting and automation; this time just with better, more general tools (python + unix shell rather than Word macros). h3. year 3 h4. goals: advanced programming concepts, databases, web, low level programming. prepare for project work. h4. curriculum: more data structures and algorithms. introduce lower level programming and hardware understanding. memory, process execution, stacks and function calls. work with a processor simulator for a short unit on basic assembly language (simulate a simpler processor than x86. maybe Z80 or MIPS). move to C and focus on pointers and memory management (should be much more concrete after working in assembly). linked lists and trees and their construction in C using pointers. database concepts and SQL. how to access from python (or ruby, etc.), database schema design. intro to web technologies: HTTP, HTML, CSS, work with a simple web server. h3. year 4 h4. goals: project work. get more depth into a particular area. experience building something non-trivial. software engineering, managing complexity, usability, etc. h4. curriculum: student driven. most time spent on individual or group projects. students write project proposals, then develop them. occasional lectures on advanced topics related to student projects, but mostly time is spent on projects. perhaps a short unit or two on some other languages like Java (which they're bound to run into in college, lisp, smalltalk, prolog, etc.)
TAGS: education computer science

comments

I think starting with an explicit focus on mathematic concepts -- variables, functions -- can be an important early concept in programming, and one that is very useful even when the student doesn't continue on in CS. I think a lot of mathematical concepts are *much* easier to grasp in a procedural environment with programming metaphors, than in the declarative environment with math metaphors. Math becomes really dense and difficult to approach around algebra, which is exactly where programming has the potential to pick up the slack. Logo has a heavy emphasis on math, moreso than on the craft of programming, for this reason. Some of that fits well with your year 1 stuff, though I believe the standard Mindstorms environment is too crippled to be reflective of mathematics. Task-oriented learning is definitely the right way to go, because that's the other thing programming has that math usually doesn't -- pure and immediate motivation. It's also great when students come upon the motivation for a concept, and then the concept is revealed to them. I'd put web-related stuff in year 2. HTML isn't quite programming, but I think as an abstract language for describing layout it is useful, and its relevence is undeniable. But web programming should go in there too -- I think it's the most useful programming environment available to a beginner. The big motivating aspect to this is that students can produce real applications that can be used by their peers. And not just their immediate peers, but just about anyone. That's unattainable for beginners (and even intermediate programmers) in any other programming environment. It's also a relatively simple environment, at least once you learn HTML. I think it might also have the potential to keep girls involved in the classes as well, primarily because it's not an isolated activity like many other programming tasks -- it's public, potentially easier to collaborate on (at least if everyone is programming in a central environment, not in private sandboxes), and of course the relevant.
Ian, i like your point about procedural programming having potential for learning mathematical concepts. for a while now, i've been meaning to work through "SICM":http://mitpress.mit.edu/SICM/, which uses Scheme to teach classical mechanics. i'm really curious to see how well that approach works. i'm not at all tied to Mindstorms. i haven't even used them before. the idea for the first year is just to have something that has some real world connection (and his hopefully a bit easier than programming a STAMP chip and wiring your own circuits). yeah, web stuff probably could be a little more prominent. i was just afraid that it would be too much too soon. but then, i remember learning the basics of HTML in about 15 minutes, so i guess it wouldn't be unreasonable to at least do a short unit on it early on.
For an approach that harnesses social forces in positive ways, check out this curriculum at the Canterbury school (pycon2003): http://tech.canterburyschool.org/pycon/teaching_pygame.html And an hs curriculum that incorporates Extreme Programming (pycon2005): http://wiki.python.org/moin/PyConDC2005/Presentations#22 Drawing from my personal experience, the first cs class I took in college was lucky enough to be with Robert Sedgewick, who was working on a grant to develop the Halliday and Resnick of CS. Here is a link to curriculum - http://www.cs.princeton.edu/courses/archive/spr98/cs126/ It was really great - a survey of all the major sub-fields in cs, with a weeklong unit on things like graphics, ai, animation. Not like a psych or sociology survey class, with multiple choice exams - very well designed and integrated lectures and problem sets. One thing that worked incredibly well early on, was that Prof. Sedgwick had us write programs which generated postscript, allowing us to work on programs that had a graphical, "fun" output (although I shiver at how many trees were killed debugging, until we figured out how to use ghostscript). Postscript is essentially logo, and was really easy to master. I remember the second program I wrote in my entire life generated pictures of mandelbrot sets (the equation for generating them is _very_ simple) - that was incredible. The next week we played with recursion, and everyone got to make up their own shape, in postscript, which was repeated in a fractal-like pattern. For the "pointer" project, we had to solve the nearest neighbor problem for a starfield, using a technique where we divided the space into a grid of boxes and only considered a star's nearest neighboring boxes. Perhaps I am just a visual thinker, but the power of this approach is evident in my vivid recollection of these programs. dynamic, high level scripting lang + logo-like postscript = fun entry level programming I am certain that many of these exercises could be adapted for hs.
Honestly, the more I deal with other programmers, the more I think that before you even sit a kid in front of a programming environment, they should have AT LEAST a semester or two of software design classes...design is easily the most important aspect of the software development process, but I think it's not given nearly enough focus in most curricula...
Where's Javascript? I'm thinking you move HTML to the very first day and Javascript's a natural step forward from there. DHTML's undeniably fun to learn. ... I still do it for fun. And, it's a powerful programming language to boot! Something to think about anyway.
ewww...no, no, no! Markup languages are NOT programming. They may be interesting, but I see little value in teaching them to people who want to be programmers - especially first. While JavaScript is a programming language, I think basic concepts are probably best learned before introducing OOP issues into the mix. Trying to explain the ins and outs of the DOM to people who haven't had a decent OOP class is asking for trouble.
This is a highschool curriculum, not a vocational programming course. If it's intended to produce programmers (at least before year 3 or 4) it'll be doing a disservice to those students who intend to go in other directions.
yes...but I won't have to work with those students when they get real jobs (although, i suppose i may have to work FOR them...)...I'm just looking out for #1 here...
Sign me up for Anders' curriculum. Year 4 reminded me a bit of <a href=" http://www.projectaardvark.com/">Project Aardvark</a> at <a href="http://www.fogcreek.com/">FogCreek</a> this summer. Instead of hiring interns to do grunt work, they took college students and built a neat little app called <a href="http://www.copilot.com">Copilot</a> that lets one Windows user help another without having to setup a VNC session. Interns were responsible for the entire product. How many times have you tried to help a user and asked them to describe what they saw on their screen? How wonderful that CS students were given a real world challenge and that they delivered the product. I'm sure they had great support at Fog Creek, but their accomplishment is still impressive.

formatting is with Textile syntax. Comments are not displayed until they are approved by a moderator. Moderators will not approve unless the comment contributes value to the discussion.

namerequired
emailrequired
url
remember info?