Imperative knowledge

As part of my ongoing project to get a do-over on my misspent youth, I’ve started reading the lecture notes for MIT’s EECS 6.001: Structure and Interpretation of Computer Programs.

And I have to say: damn.

I mean, I actually feel like I’m learning something from about Slide Four. Contrast this with the freshman introductory C course I dropped in week one (I wanted to program Macs, not VT100s! — I was an awful hacker), and I can really see why smart people complain that CS is turning into Java vocational training. It’s not at MIT, but it was already on its way (to vocational training, I mean; Java wasn’t yet a twinkle in James Gosling’s eye) when I was at UCSC.

Which is probably one reason I ended up a Japanese major. And that it took me six years after high school to get back to programming. If they’d made CS sound half as interesting as linguistics…

Anyway, I’m hoping to go through the whole course, and write it up as I go. My track record on projects like this is not stellar, but we’ll see. I wish there was someone I could pay to grade me on it.

Meanwhile, speaking of writeups and track records, I still haven’t written up the monad project, but I did throw together a Scala “brush” for Alex Gorbachev’s syntax highlighter (basically just the Java brush with a different set of keywords and an extra regex for the non-alphabetic keywords like => and <: that confuse the regex engine, but it works) so when I do finish writing it up there will be pretty-printed examples:

package pizza;

object ListExample {
  def main(args: Array[String]) {

    val list = List(1, 2, 3)
    println(list map { x => x * 2});

(Also I managed, for purely decorative purposes, to work this diagram into the novelette I finished drafting this weekend. I think for the final version I might prefer this one — it’s fancier, and less completely unrelated to what’s going on in the text than the other one. But I’m not sure I can be arsed recreating it in Illustrator. It seems like I ought to be able to just generate a PDF from the TeX source and use that, but when I try — I have only the barest exposure to TeX — I only get error messages.)

4 thoughts on “Imperative knowledge

  1. The linked image of the VT100 made me all nostalgic. When I first started grad school, my shared office was the only grad student office with a computer – a good ol’ VT100 suitable for accessing email with PINE!

    I miss programming.

  2. Pingback: Scott Hanselman's Computer Zen - Best Code Syntax Highlighter for Snippets in your Blog

  3. Hey, Abel –

    The Scala brush shipped with 1.5.2 might (looking at the code) be based on mine — I vaguely recall some conversation about contributing it back. It’s pretty much identical in any case. But since that was just a quick hack to the existing Java brush, I’m not worried about credit. :)

    Thanks for pointing me to 2.0, though. I’ll have to upgrade when I get a chance.


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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s