Sunday, December 16, 2012

CS102, let's make it happen!

One of the CS101 students posted a question to the forum asking what to study beyond CS101. Here's a link to that original thread:

The question asked if an Algorithms course should be next in the sequence.

My reply wasn't in terms of actual Udacity courses, but attempted to describe what I believe to be a reasonable curriculum path to pursue the study of computer science, starting with a CS102 to cover more of Python and Object Oriented Programming and Test Driven Development than CS101 covered. Of all my postings to the CS101 forum, this was the one that got the most thumbs-up votes from folks. My reply (which actually pre-dates my reaching the end of CS101):

That depends. A Donald Knuth-style algorithms course is going to have a fair amount of math involved. A student just out of CS101 might need more time to work through enough math courses to be ready for it. Not sure how that would work in a course-at-a-time program like Udacity. I could imagine a course that rolls the teaching of the math in with the teaching of algorithms.

An Artsy next course might have a title like Computers and Society. What can computers do vs. what can people do? How do computers effect society (e.g. economics, privacy, security, censorship, cryptography, digital rights, intellectual property, ...). I remember taking such a course and nicknaming it Computers: Threat or Menace. Assigned reading included "The Moon is a Harsh Mistress". Somewhere in the Pythonic humor of the question is asked "Whatever made you think that 'import skynet' was the right thing to do?"

Another possible direction for the curriculum would be to introduce another programming language. Looking at Cornell U's catalog, I see it now sports CS202 Transition to Java. A more general variation on this would be something I'd call Comparative Programming Languages. Not much interesting to say on Python vs. Perl vs. Ruby, but Python vs. Java vs. C++ vs. Haskell vs. Erlang would make for an interesting series of lectures on automatic memory management vs. do-it-yourself memory management, interpreted vs. compiled, hard typing vs. duck typing, imperative programming vs. functional programming, and how to get along with multi-core processors, among major topics. Library differences are a much more subtle topic. There still may be times when Fortran is the right choice. A Java course would be appropriate if the curriculum was headed in the direction of teaching you how to make stuff for the Web. These days, I would hope it would also at least touch on Javascript too. Despite the mention of J-A-V-A in most names, Java is not Javascript. The Comparative Programming Languages course is a pre-req to learning to implement programming languages (Compilers, Interpreters, and Assembler, Oh my!).

Yet another direction is Computer System Architecture. What is CPU clock speed? Why have cache? what is the difference between 64-bit and 32-bit machines? Internals of data representation? (Floating point vs. decimal vs. binary. ASCII vs. Unicode). Stack machines vs. register machines. Real memory vs. virtual memory. RAM vs. disk vs. tape vs. solid-state. Fundamental limits on storing bits. Parity bits. Error correcting codes. Why are matters of power and cooling important? Quantum computing? Arguably this is a more hardware oriented course than most, but no soldering is required. It's more at the level of concepts and block diagrams and a little bit of Physics. A case can be made that knowledge of computer system architecture is a pre-req for really appreciating issues of multi-core. Computer System Architecture is certainly needed to be able to appreciate an Operating Systems Principles class where the task at hand is to manage and share out the components provided by the hardware. File systems, for example, presumably would be covered in the OS class, but hard to do in a sensible way if you don't know seek time, rotational latency, and so forth. Understanding of Computer System Architecture is also probably needed before you'll be comfy in a Compilers course.

Udacity's CS101 (the end of which I have not yet reached) seems to under teach data types, object oriented programming and such. So, there is certainly room for a CS102 that continues to teach Python and maybe gets into test-driven-development. It would expose you to more algorithms too, which would be good prep for a subsequent algorithms and data structures course.

Hey, computer graphics, data networks, computer data bases and collaborative software development (working as a member of a team) are other topics that don't really fit into any of the above courses.

Bottom line conclusion: a comprehensive study of computer science doesn't really fit into a 4-year program. Maybe that's why there are Master's degrees - to give you another year or 2 to take it all in. Fascinating field.

Donald Knuth set out many, many years ago to write a book "The Art of Computer Programming". He outlined it as 7 chapters. It's been his life's work ever since, and he's only up to Volume 4A so far. Promises to be a 7 volume (or so) set. And that doesn't count the separate textbook "Concrete Mathematics", which expanded the overly terse math review of chapter 1 into a whole book of its own (By Ron Graham, D. Knuth and O. Patashnik).

I hope that helps. I didn't dig into Udacity's actual course offerings and certainly don't know what direction they have in mind. A lot of "what should come next" depends on where you are trying to go. Lots of people can bang out code to print the payroll and know nothing of Directed Acyclic Graphs. In my opinion, "university level courses" are not "trade school" and should aim to convey broad knowledge more than specific skills. Udacity should not be the "Close Cover Before Striking" School of Computer Programming, as advertised on matchbook covers.

Were it up to me, I think I'd provide a CS102 to follow CS101, and next offer an Algorithms plus Data Structures course that embeds the teaching of enough math to hold it together. Then Computer Architectures followed by Comparative Programming Languages next. But I can already hear whining: 5 courses into a Computer Science curriculum and I still haven't been shown how to implement an Ajax application! Life is hard.

My background is in engineering, so I'm probably underestimating the importance of a softer Artsy Computers and Society course. A future senator would have much more use for the material in a Computers and Society course than in mastering test-driven-development or Agile programming.

If you were looking for different information than this, please post again to clarify what you seek.