Structure and Interpretation of Computer Programs: Motivation

Structure and Interpretation of Computer Programs (which I will call "SICP" from here on out) by Abelson and Sussman is a text I see referenced almost everywhere I turn. Most recently, I've seen it discussed with almost every interviewee in Coders at Work (and there are some big hitters in there). For those that don't know, SICP was the textbook used for MIT's introductory computer science course back in the day. A large portion of people who read it claim it is one of the best books you can read to learn computer science.

There was never a question of whether I would read it or not. It was always a question of "when". It's a long book, 600+ pages, uses a programming language I had never heard of, Scheme, and has a decent amount of math in it. None of these things scare me in isolation, but roll them all together and I guess you could say I was just a tad ... intimidated. So I shelved the book and let it collect digital dust. I'd get around to it "some day".

Fast forward a year and I feel like the universe is shouting "READ SICP!"

One of the interviewee's from Coders at Work was Brandon Eich, the creator of JavaScript. During the interview, Eich reveals that even though he was trying to make JavaScript look like Java (for marketing reasons), what he really wanted was Scheme in the browser. Scheme! I've heard that before! As it turns out, Scheme is a dialect of Lisp, a functional programming language.

I've become increasingly interested in functional programming lately. Rust was heavily influenced by functional languages, and I feel like I've been gravitating towards learning to write my Java and JavaScript in a more functional style for a while now. I'm no expert, but I'm a big fan of "pure functions" and no side effects. I ran into a really nasty bug a month or so ago that was extremely time consuming to solve because of how heavy on side-effects the code was. Functional programming, coupled with testing, seems like a really nice way to reduce the number of those nasty bugs I have to fix.

I've also been increasingly interested in concurrency and coding for multi-core processors. I'm haven't started researching it in earnest, but I've read that using a functional style can make concurrency and parallelism a lot easier. Even though it's an old text, SICP has a section on concurrency.

Universe to Garrett: "Reading SICP would not only help you learn computer science (something you desperately want), but might even make you a better JavaScript programmer in addition to acting as a primer on concurrency."

I couldn't argue, so I decided to open the book and read the forward, preface, intro, etc. One of the first things I read was this:

"The source of the exhilaration associated with computer programming is the continual unfolding within the mind and the computer of mechanisms expressed as programs and the explosion of perception they generate. If art interprets our dreams, the computer executes them in the guise of programs!"

Sold.

Reference: Structure and Interpretation of Computer Programs, Coders at Work