Live data from Hacker News

SICP: The only computer science book worth reading twice? (2010)

simondobson.org

81–90 of 189 posts

Re: SICP: The only computer science book worth reading twice? (2010)

#81
post #43

Earlier quoted context omitted.

Have you seen "Software Design for Flexibility: How to Avoid Programming Yourself into a Corner" by Chris Hanson and Gerald Jay Sussman It's from 2021.

I hadn't, that looks excellent.

IMO it's not excellent. It's not like SICP, it's obtuse for no reason, I find it a hard slog. Flexibility is good but it seems to try to make every bit of your program flexibile and pluggable and you just need to do something eventually.

My opinion, I'd welcome others on the book; there was a small splash when it came out but not much discussion since.

Re: SICP: The only computer science book worth reading twice? (2010)

#82
Hot take: SICP and SD4F "considered harmful (without counterpoint)"*.

Why? The modus operandi of problem solving in these books is object oriented programming masquerading as functional programming, and it is presented as a _neutral_ beginner book. It is _not neutral_. This is a very opinionated approach to programming.

To be fair, I do not believe the authors intended for this style of programming to be taken as gospel, but it is often presented _without counterpoint_.

The most powerful technique introduced -- implementing complex behavior via extensible polymorphic generics -- is virtually unmaintainable without a compiler-supported static type checker. You would know that if you ever tried to implement the code yourself in a dynamic language of your choice.

The ramifications of these choices can be felt far and wide and are largely unquestioned.

Ironically, they make code hard to understand, hard to extend, and hard to maintain. I need to reiterate, I do not believe the intention of the authors was to suggest these ideas should be used beyond a pedagogical setting, but they often are.

As a specific critique to SD4F, which states as a goal making code more resilient by emulating biology, I would point to Leslie Lamport's talk on logic vs biology[1].

I would add that I think SICP would be fine if it were taught in tandem with Paradigms of Artificial Intelligence Programming by Peter Norvig[2]. PAIP offers a completely different approach to solving problems, also using lisp. This approach is much closer to constructing a language to model a problem and then solving the problem symbolically using the language created. Areas that use OO techniques, such as the chapter in CLOS, are clearly marked as such.

In other words, I say "SICP considered harmful" because thrusting it upon an eager newcomer as a trusted neutral guide to beginner coding (without offering any counterpoint) could set them back by a decade, filling their head with "functional object oriented programming" concepts that don't translate well to industry or CS.

[*]: I say this as someone who has thoroughly studied both books, implemented the code, taken Dave Beazely courses to have the information spoon fed to me (dabeaz is awesome btw, take all his stuff) and used the techniques in production code bases.

[1]: https://lamport.azurewebsites.net/pubs/future-of-computing.p...

[2]: https://github.com/norvig/paip-lisp

Re: SICP: The only computer science book worth reading twice? (2010)

#83
post #6

Earlier quoted context omitted.

And the Python version: http://www.composingprograms.com/

this is not the Python version of SICP. It's a different book inspired by SICP. There's no "picture language" in chapter 2, and there's no "metacircular evaluator" and "register machine" in chapter 5.

It's hard to understand the point without these.

Re: SICP: The only computer science book worth reading twice? (2010)

#84
post #38

It’s interesting, SICP and other many other “classic” texts talk about designing programs, but these days I think the much more important skill is designing systems. I don’t know if distributed systems is consider part of “Computer Science” but it is a much more common problem that I see needs to be solved. I try to write systems in the simplest way possible and then use observability tools to figure out where the de…

I find books like SICP interesting and not very useful. I love reading them because I like this stuff, but I don’t get to apply their teachings in real world software. It’s a problem because naturally I want to spend my time reading these kind of books, but if I do that I would be jobless. I need to divide my time between reading pearls like SICP and boring Kafka/Postgres/Golang/K8s/AWS documentation.

The first reason why I really loved SICP is that it is based on Scheme, a language with powerful primitives. I came from a self-taught world of PL/1, Algol, C, then later C++, Java etc. None of them had closures, hygienic macros, anonymous functions, functional programming, call/cc, and of course, "amb", the non-deterministic choice operator. At an even more basic level, SICP taught me that a lot of non-trivial code can be written with just sequences and maps, with good enough efficiency!

Because SICP's starting point was so high, they could describe many concepts easily from the ground up, from object oriented programming, backtracking, constraint programming and non-determinism.

This taught me a number of techniques to apply in real-life, because I could readily identify the missing building blocks in the language or system I was given to work with. For example, I was able to build a lightweight threads system in Java quite readily because I knew that the missing piece was a continuations feature in Java.

See https://github.com/kilim/kilim

Re: SICP: The only computer science book worth reading twice? (2010)

#85
post #22
post #17

I don’t quite get the cult status of SICP. I read it and it’s a fine beginner programming book, but nothing more.

Just so we're clear, this is a "beginner programming book" that has you create a scheme interpreter, then a register machine simulator, then a compiler out of your interpreter that will then have its compiled code run on the register machine simulator, by the final chapter. This is probably the part where you'd step up and post a link to your repo with solutions to the exercises to back up your talk, but generally I…

Concrete Abstractions, Schematics of Computation and others from the era (also using Scheme) covered similar ground (and went far further!) SICP is denser and sticks to theory forgoing databases, operating systems and actually implementing scheme in assembly.

Re: SICP: The only computer science book worth reading twice? (2010)

#86

My favourite part of SICP and something that has stuck with me for years is the idea of "wishful programming". That is where you build something top-down by simply wishing you had the lower-level routines. Then, of course, you actually go and build those lower-level routines until you reach the bottom. I find this way of thinking works really well with test-driven development. Write a test against functionality you w…

The Smalltalk world has great support for this, through coding in the debugger. You should try Pharo.

Re: SICP: The only computer science book worth reading twice? (2010)

#88
post #81
post #43

Earlier quoted context omitted.

I hadn't, that looks excellent.

IMO it's not excellent. It's not like SICP, it's obtuse for no reason, I find it a hard slog. Flexibility is good but it seems to try to make every bit of your program flexibile and pluggable and you just need to do something eventually. My opinion, I'd welcome others on the book; there was a small splash when it came out but not much discussion since.

I haven't read the book, but my experience is that the way to make things flexible is to make them simple as possible.

When I've used (or built) something that was built in the style like you're talking about, it's almost always wrong, and the extra complexity and stuff now makes it harder to do right. It's not surprising: unknown future requirements are unknown. Over building is trying to predict the future.

It's like someone building a shed and pouring a foundation that can work for a skyscraper. Except it turns out what we needed was a house that has a different footprint. Or maybe the skyscraper is twice the height and has a stop for the newly-built underneath. Now we have to break apart the foundation before we can even begin work on new stuff; it would have been less work if the original just used a foundation for a shed.

Re: SICP: The only computer science book worth reading twice? (2010)

#89
post #81
post #43

Earlier quoted context omitted.

I hadn't, that looks excellent.

IMO it's not excellent. It's not like SICP, it's obtuse for no reason, I find it a hard slog. Flexibility is good but it seems to try to make every bit of your program flexibile and pluggable and you just need to do something eventually. My opinion, I'd welcome others on the book; there was a small splash when it came out but not much discussion since.

Is there another book you'd recommend - more recent than SICP - for how to avoid programming yourself into a corner?
Post reply on HN