Home All Posts

Staying Focused on SICP

2018-07-29

It’s been a month and a half, give or take, since I started SICP. I’m about half way through the second chapter now, about to start the section that makes use of the “picture language.” I’ve been able to remain fairly focused on working through the book, while at the same time reading some non-technical books, and also working the Nand2Tetris course.

Since I’ve made it further and further in the book I’m finding that my momentum for doing the exercises and reading have increased. There are still some spots in the book that stump me for a while, most of them related to recursive algorithms that I have to step through a number of times to see how they work. SICP is a book that doesn’t repeat itself, and many of the examples and algorithms given are descried in short fashion.

One of the nice things about working through SICP now is that when you get stuck on an exercise there are typically solutions that you can find online. I guess that this is a good and bad thing, since you may be tempted to look up an answer when you get stumped instead of sticking with it (as I’ve done a few times). Overall I think it’s a positive thing and usually what I find is that when I’m stuck it’s because I’m making something more complicated then it has to be, or because I misread some key term. It is nice being able to check your work against others.

The key part of finishing SICP will be my ability to keep relatively focused on it. I’ve been at it for about 45 days, and I’ve done about 64+ problems. Some of the problems I’ve skipped, so I’ve probably through about 80 problems all together. Adding up all of the exercises in the book there are 356 problems to do. So if I’ve made it through about 80 in 45 days, it roughly means I’ll need half a year to work through it. I’d estimate longer then that, since I’ll probably have some periods where I don’t do as many problems a week.

Most of the problems where I’ve gotten stuck have been because I haven’t paid enough attention to the reading directly before the exercise. The book builds on itself fairly quickly, and if you don’t let all of it sink in, the exercises will be a lot harder. This has taken me some time, especially getting used to all of the functional composition and recursion, as this style is pretty different from a lot of what you’ll encounter in the imperative/OOP realm.

I would like to blog more about some of the problems, especially some of the ones that stumped me at first and I needed to look for help on, but at the same time I want to keep working through the book and not take the time to blog about it. However, I’m always short of things to blog on, and one of my goals is to write a blog entry once a week, so I’m eventually going to do this.

Some of the problems I’d like to write a blog entry about are:

I’d also like to devote an entry to how lists are represented in Scheme, how the accumulate procedure is used, how flatmap works, and the fold-right and fold-left procedures. I’d also like to write an entry that walks through the generate permutations algorithm, which is a nice example of a recursive algorithm that’s definition is simple but requires some thinking to see how it works.

Another entry I’d like to write would be showing how some of the functional and data abstraction concepts described in SICP translate into C#.

Anyway, my primary goal is to finish SICP. I do expect my velocity on working through it to pick up once I get to the 4th and 5th chapter, where it gets to building an interpreter and compiler. While SICP is a highly regarded book in general, my main reason for working through it is to learn Scheme and get the prerequisite knowledge necessary for working through the Essentials of Programming Languages book, and after that LISP in Small Pieces.

Of course, I already of other “projects” that I’ll be doing concurrently, such as finishing Nand2Tetris parts 1 and 2, and then a few other courses on Coursera so I can eventually make it through the “Concrete Mathematics” book. Also, I’m looking foward to the new book by Thorsten Ball, “Writing a Compiler in Go,” which is a follow-up to the “Writing an Interpreter in Go.”

I do need to spend a little more time on coming up with some stuff to blog about besides my status updates on SICP. I’m basically blogging on this because I decided I wanted to write a blog entry once a week to work on improving my writing chops, but it’s pretty repetitive. Also, besides as a tool for keeping me honest, I’m pretty sure nobody would want to read about it.