I’m leaving on Monday for Jerusalem (where I’ll be teaching for the summer). In preparation, I’ve been working with my fellow instructors on a prototype of the project we want the students to build. Doing this work is making me question again what exactly we can and should be teaching students of computer science. It’s not 1969 anymore, and the scope of what’s useful to know is always going to be wider than a single person can grasp. What actually constitutes the foundation of our subject in 2010? What kind of introductory courses make sense?
Seems like we should start with the practicalities of what people do these days. The site we want our students to build is a sort of feel-good version of Plinky, intended to promote connections between diverse people and show them that we all share some common experiences. The technology stack we’re using is MySQL, Tomcat, a minimal homegrown MVC architecture (no Beans or Hibernate or other JSP framework), and JQuery. But the questions this has raised for me would have comes up even if we weren’t using Java: software development has a lot more similarities than differences across the various stacks.
- Voting and moderation
- Badges and awards
- Image upload
- Location metadata and maps
This approach lets us break up the students into smaller groups in order to apply the stuff they’re supposedly learning from our series of lectures. My team will be working on the image upload feature. Originally I was thinking this would be an intermediate goal/milestone on the way to an HTML5 drawing feature — so that users of the site would be able to make a little sketch as a reply to a question. I still think this might be possible, but file uploading is a prerequisite. I hadn’t really looked at what it takes to handle uploads in JSP until I started building a prototype of the feature.
When it’s time to do something that you know a bunch of people have already done a million times, the place to start is Google. You look for a library. And, lo and behold, all the weirdness of dealing with multipart/form-data POST is wrapped up in the lovely Apache Commons FileUpload package. Assuming that for some reason you needed to build your site in J2EE without some kind of framework that does it for you, importing this library seems to me like the best way to get the functionality. In the bigger picture, this is like a lot of problems: you need to know enough to find some useful code, hook up the plumbing, and troubleshoot the problems when they inevitably arise. You usually don’t need to do the “heavy lifting” yourself. The library will probably be more correct and more efficient than what you’re likely to write in the amount of time you have to work on the problem.
I’m going to go out on a citation-needed limb here and say that 90% of working programmers are doing this kind of look-and-hook work 90% of the time. Most programming work is not building brand new solutions to problems (although much interesting work is happening, always, of course) but rather in adapting existing solutions in the form of libraries and frameworks to specific needs, in the context of an existing codebase. Yet it seems silly to me to think of teaching these things all copy-paste-like without a classical programming background, and I’m wondering to what extent that’s just because I have a classical programming background.
I want my students to learn, during a four-week program: enough SQL and relational database concepts to extend an existing schema, enough about Servlets to write and debug one given an example, enough of the MVC pattern to know what goes in that Servlet and what goes in the JSP and what goes in a model object, enough about HTML forms and HTTP post to understand the difference between enctypes, and enough JS to make a popup window that can modify the DOM in its parent window.
Currently they know… Java. This seems insane.
I have to accept that they are not all going to come to an understanding of each of these technologies in the depth I’d like. If we want them to get this project done in four weeks, we’re going to have to push through a bunch of this stuff at a pretty shallow level and just fix it as it breaks. Does that sound familiar to any of you working engineers? To a certain extent, this is fine: programmers never have to write code without access to Google. And I’m pretty sure a modern web app framework like Rails comes with most all of this stuff built-in or as a gem or whatever they call libraries and packages. Yet in order to really be able to: 1. assess the appropriateness of various solutions to a given problem, 2. adapt a given framework or library to a specific use case, and 3. work sensibly in relation to an existing codebase, the programmer has to have a fundamental understanding of what the machine is doing and where the various layers of the stack interface and work together.
Where does this understanding come from? I feel like I learned it one layer and abstraction at a time, starting roughly in the middle, since the course of my education and professional career paralleled the development of a lot of these technologies over the years. So it’s natural, but perhaps not appropriate, for me to think that everyone should take SICP and learn Scheme first. But I’m struggling to think outside of that frame of reference. It seems like we’ll have to figure out how to do this if we want to teach computer science that’s relevant and interesting and gets things done in today’s world. Wish us luck!