top | item 5204762

Ask HN: What should the curriculum be for a Computer Science high school?

6 points| snilan | 13 years ago | reply

My dad has been asked to design the curriculum for a new high school that is geared towards Computer Science. I'm trying to help him so that the kids can get a solid foundation while still being exposed to a bunch of cool areas, and hopefully some modern technologies.

Here is what I have in mind right now:

Freshman year: Intro to Programming with Python (or Java, since that's what the AP is).

Sophomore year: AP Computer Science A. Introduction to Web Programming.

Junior year: Data Structures

Senior year: Have the kids work on their own projects mostly, but also hold one-off informational classes on various topics ie. Machine Learning, Computational Theory, Computer Architecture, maybe intros to various other languages.

There could be also some cool electives they can take their senior year, like game programming.

Any suggestions would be appreciated.

9 comments

order
[+] csense|13 years ago|reply
A lot of my favorite programs in middle and high school were written in QBASIC.

That's because you could write stuff like

  SCREEN 12: CLS
  PSET (8, 3), 10
  CIRCLE (100, 200), 45
  LINE (15, 15)-(25, 25)
Drawing stuff is really a lot more interesting than boring text manipulations or algorithms -- especially for a beginner of middle/high school age. Programming is fun because you're creating your own world with its own rules -- and that resonates right away with a student when that world is something they can visualize and interact with using realtime graphics, rather than just read about with text output.

Python/Pygame is probably the closest modern equivalent. Especially if you put some of the boilerplate like window creation in a file, and tell them to copy it into their program's directory and import it. (Or, having them run the boilerplate file, and having that file import the student's code, might work better.)

Show minimal drawing stuff right away. Then you can go in a lot of directions. Use a FOR loop to draw a pixel or circle going from left to right across the screen at a speed of one pixel per frame. Then you want it to reverse direction at the right edge, so you can show IF statements. Show how you can simplify the code by using negative numbers, this will introduce the concept of having velocity. Having a circle reverse direction is a little trickier than a pixel, because you have to take into account its radius.

Then make your objects go at 45 degrees to the coordinate axes -- more on the velocity concept without being too difficult/technical. Or have an arbitrary number of them -- now you have arrays. Or teach them how to replace circles with an image downloaded from the Web. Then put a background on it. Then introduce user input into the equation. Maybe you can click the mouse to spawn a new particle or move the particle to the mouse location. What happens if it's a circle, you did the radius fix, and the user moves it closer to the edge than it would naturally get? Then think about gravity: Just have the velocity increase a little in the "down" direction every frame. Of course, if you're imagining the bottom of the screen as a wall, then you have to figure out how to stop it when it tries to fall past the bottom of the screen.

A little more work, and you have a simple platform game. You just have to come up with an input scheme, figure out how to do vertical walls, and how to make the "bottom" be different heights depending on the x coordinate. Then have enemies that can "collide" with the player.

For a class project, every student (or small group) picks a different feature to add to the engine -- moving enemies, scrolling, healthbar, dangerous terrain, levels defined by files, levels generated randomly, enemies that shoot, players that shoot, (you could have them "toss baseballs" or "cast spells" if "shooting" is too violent), an animated player sprite (a great idea if there's an artistically talented student in the class, though even the most lacking artists could still complete the assignment with a quick visit to opengameart.org), or student ideas (must be approved by teacher). The teacher picks a couple features of his own to implement. Then everyone gives their patches to the teacher (for grading). After the patched versions are submitted, the teacher publishes them as diff -u style patches to the entire class, and everyone now has to add as many features as possible. This teaches the students a little bit about how collaborative development works in practice.

Having a high school devoted to CS lets you do a really good job with this concept, because you can devote an entire course to it. This should be their first CS course. Its primary purpose is inspiring them, motivating them, getting them excited for the possibilities of what they're learning. It will also:

Introduce students to different program constructs.

Introduce some physics/mathematics theory for the particular problem domain.

Introduce students to the way mathematical modeling/theory can be applied to a practical programming problem.

Introduce students to the use of external tools, libraries, assets, their OS's command-line interface, and API docs.

The beauty of having a high school devoted to CS is that you can have an intro-level project-based course that doesn't have to be comprehensive in any of these areas; later courses can do that. If you don't need recursion or string manipulation, you don't have to cover it. If you don't cover every available tool or every corner of your API docs in this course, that's fine. If this course is in Python because it's the best language for the purpose, but the AP exam is in Java, that's perfectly okay -- they can pick up Java in another class. The goal at this point should be to teach them how, not what -- that is, focus on how to program, and only cover what tools are available on an as-needed basis.

Having current or past large-scale projects when you're programming is useful because it alters your perceptions. Your brain recognizes when the thing you're learning is applicable to the project. This connection helps the memory become more permanent -- the brain flags it as "important" since it's related to something it spent a lot of effort on in the past. The connection also helps the memory become more integrated -- there's now a "pattern match" between the concept and its real-world application, so it's easier to both remember the application when you're confronted with the concept, and remember the concept when you're confronted with the application. You may not cover the entire AP CS content, but what you do cover, you can be sure your students will remember when they take the AP exam 3+ years later.

[+] jdietrich|13 years ago|reply
Machine code on an 8-bit processor - ideally an old microcomputer, failing that an ATtiny. It's the only sensible way of teaching the fundamentals of how computers actually work. A reasonably bright young teenager can easily understand a computer from the metal up, so long as that computer has a bare-bones instruction set and no more memory than can be copied onto a couple of sheets of paper. There are a number of excellent books written for the Vic-20 or Timex 1000 that cover all the fundamentals in an accessible way.
[+] lumberjack|13 years ago|reply
OK, I was going to write a huge post but I'm short on time so I'll just list what I made good use of after HS (my experience wasn't in the US btw). Boolean logic and boolean algebra and database design practices and SQL hands-on all have come handy multiple times. Programming was taught badly but after getting a hint of it, I managed to learn it my myself. Data structures and algorithms (usual stuff that you do in college but we only did up to binary trees, O(n) and without the math behind of it) again taught badly but I complimented school with independent research. OSI layers and other networking stuff. To this I would add some introspection in the popular protocols like TCP/IP, HTTP and SSL. We also had a computer architecture session that came in handy in compilers class later in Uni. And finally we had one of those project workflow sections with UML, waterfall and whatnot. Totally outdated. Should have been thrashed. I would replace it with hand-on deployment and development software hand-ons like Linux/BSD, basic shell, setting up OpenSSH, IP Tables, Nginx, vim/emacs, git...etc
[+] malandrew|13 years ago|reply
Is AP Computer Science any good? When I took it, it sucked horribly. That was when it was Pascal-based. The following year they moved to C++, which I heard was an unmitigated disaster. IIRC Allen Downey, a guy known for his great CS textbooks, was so fed up with the clusterfuck that was the AP Computer Science curriculum, that he wrote his own textbook for the intro course the taught and he based it on Python.

Either Scheme or Python should be the basis of an AP CompSci course.

Check out How to Design Programs version 2. The authors of that book have spent more time on the problem of pedagogy in computer science than anyone else I know. They've really thought the whole thing through very well.

[+] lumberjack|13 years ago|reply
But Pascal was awesome! CRT and GRAPH libraries were super easy to use and the syntax is so clear and easy to understand (or perhaps that was just the impression given by the small resolution of Turbo Pascal on modern high resolution screens).
[+] logn|13 years ago|reply
I think the AP Computer Science C++ program (both semesters) was excellent preparation for everything college and the real-world threw at me. They teach it in Java now which I'd support. My high school had an intro programming course before this as well.

People will get into religious wars about what language to to teach by my $.02 is that Java is sufficiently close to C/C++ for low-level prep and close to JavaScript/Ruby for scripting.

[+] crynix|13 years ago|reply
Shouldn't web programming come before Python/Java? In the class I'm teaching the students picked up Javascript and HTML/CSS much quicker than Python or Java.
[+] csense|13 years ago|reply
No.

Websites have a lot of moving parts.

They're a hodgepodge of an alphabet soup of different technologies. You have HTML, CSS, the JS language, and the DOM. It's simply too much for a beginner to take in at once.

Teaching HTML/CSS on its own, then JS in a later quarter/semester/course, would be a better approach.

Or alternatively, teaching the fundamentals of JS with a minimal website with a console and canvas, or by running programs from the command line with Rhino.

[+] macca321|13 years ago|reply
Browser automation, leading to web crawling