
Structure and Interpretation of Computer Programs (SICP) Book - peter_d_sherman
https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book.html
======
swiley
My girlfriend has told me a couple times she wants to learn to program but
this is the only intro book I own. I feel bad giving it to her because it just
beats you with recursion right from the beginning (that isn’t to say it’s bad,
I love it, that’s why I own a copy. I just feel like you’ll appreciate it most
if you already know a little of some non functional language.) On the other
hand she took it with us on a picnic the other day and didn’t seem to mind, in
fact the simplicity of scheme’s syntax actually seemed to help a lot (she
tried python once and there were too many different syntactic structures, but
that was me giving her a tutorial rather than going through a book so maybe
I’m just a bad teacher.)

Does anyone have any suggestions?

~~~
sergiosgc
SICP was used as the reference book for the introductory course on programming
on my degree. People with prior experience had the most trouble with
recursion. Students with no programming experience whatsoever grasped the
concept pretty easily.

I would try it out. It might need some analytically wired thought process, but
again that is true for any kind of programming paradigm.

~~~
tonyedgecombe
Recursion seems to be one of those inflection points that some people just
can't get past.

~~~
Aozora7
What I personally see in academic setting is that when recursion is taught,
it's taught using examples where you would not want to use recursion.

It's easy to understand why recursion is useful when you are tasked with
traversing a file system. It's not when the first example you are given is
calculating Fibonacci sequence.

~~~
Jtsummers
I like the way SICP handles this, actually. They state clearly (in the text,
haven't watched the videos) that the naive recursive form for Fibonacci is
only illustrative, then they proceed to provide the iterative form. Following
that they have this paragraph:

> One should not conclude from this that tree-recursive processes are useless.
> When we consider processes that operate on hierarchically structured data
> rather than numbers, we will find that tree recursion is a natural and
> powerful tool. But even in numerical operations, tree-recursive processes
> can be useful in helping us to understand and design programs. For instance,
> although the first fib procedure is much less efficient than the second one,
> it is more straightforward, being little more than a translation into Lisp
> of the definition of the Fibonacci sequence. To formulate the iterative
> algorithm required noticing that the computation could be recast as an
> iteration with three state variables.

Hopefully a professor in a course would make similar statements (I know mine
did, repeatedly). And, at least in my early programming courses, we quickly
(within a week or two) went on to those other problems where recursion was a
natural and useful solution. The professors [0] introduced problems where
recursion was either necessary (using for/while loops would be a non-trivial
transformation with no performance gain) or, like naive Fibonacci, natural
expressions of the problem.

[0] I transferred universities, not all courses lined up so I got to see the
second school's introduction to this topic even though I was past that point
academically. I was an unpaid TA (technically I guess I was paying to be the
TA).

------
dunefox
This is one of the best books I have read on any topic. It's marvelous. If you
want to run the code you can use Racket with the SICP language mode:
[https://docs.racket-lang.org/sicp-
manual/index.html#%28part....](https://docs.racket-lang.org/sicp-
manual/index.html#%28part._.Installation%29)

There's an interactive version as well:
[https://xuanji.appspot.com/isicp/](https://xuanji.appspot.com/isicp/)

------
theemptiness
I was fortunate enough to encounter this book in a first-year programming
course (Informatik, RWTH Aachen). The years before, they had used Modula-3 and
in the years afterwards they switched to Java.

While it certainly changed my life - first encounter with functional
programming - and I will always appreciate it, it is now 23 years later and I
think it is time to acknowledge some shortcomings.

The thing that comes to my mind first is the lack of any discussion pertaining
to coding against interfaces, with components (and their interfaces) evolving
over time.

Data abstraction gets discussed very early on, but the evolution of
interfaces, its twin sister topic, does not get much air time. This is a pity
since the goal of data abstraction (avoiding making assumptions on data
representation) is pretty much the same, being able to change things later
when the need arises.

~~~
yomly
There is an exercise - 2.29 where you implement a tree-like structure of
objects.

Part d of the question is:

" d. Suppose we change the representation of mobiles so that the constructors
are

(define (make-mobile left right) (cons left right)) (define (make-branch
length structure) (cons length structure))

How much do you need to change your programs to convert to the new
representation? "

It may not be discussed in depth - I suspect they decided it was out of scope
for the book, but they were definitely thinking about it...

------
W0lf
If you decide to work through this book, I suggest to follow along this YT
channel [1] as the owner of this channel is going through each chapter (and
exercises) roughly every week right now (currently at chapter 4.1)

[1] [https://www.youtube.com/watch?v=oA-
FdE3KV88&list=PLVFrD1dmDd...](https://www.youtube.com/watch?v=oA-
FdE3KV88&list=PLVFrD1dmDdvdvWFK8brOVNL7bKHpE-9w0&ab_channel=code_report)

------
bajsejohannes
I finally read SICP half way through my career, but at that point it was too
much old news to keep me interested, even if I recognized that it was a really
well written book. So I actually stopped half way.

Does anyone know of a good summary or alternate text of all the knowledge in
it?

~~~
raptorraver
There is at least [http://www.sicpdistilled.com](http://www.sicpdistilled.com)

~~~
passthejoe
That's gooood. Thanks!

------
barracutha
There is an adaptation of SICP written in JavaScript. It is used by the
University of Singapore and it's frequently updated. It tries it best to
retain the essence of the original but gives a new flavor to it by applying
the concepts in ES6.

Here is the link to the book: [https://source-
academy.github.io/sicp/](https://source-academy.github.io/sicp/)

------
matfil
I make a point of re-reading Alan Perlis' preface from time to time:

[https://mitpress.mit.edu/sites/default/files/sicp/full-
text/...](https://mitpress.mit.edu/sites/default/files/sicp/full-
text/book/book-Z-H-3.html)

Fun is important, and it seems all too easy to lose sight of that.

~~~
CodeArtisan
If i had to retain one thing from SICP, it would be this from the preface of
the first edition:

 _First, we want to establish the idea that a computer language is not just a
way of getting a computer to perform operations but rather that it is a novel
formal medium for expressing ideas about methodology. Thus, programs must be
written for people to read, and only incidentally for machines to execute._

------
cellularmitosis
code_report has been doing a great series of SICP videos recently
[https://www.youtube.com/watch?v=oA-
FdE3KV88&list=PLVFrD1dmDd...](https://www.youtube.com/watch?v=oA-
FdE3KV88&list=PLVFrD1dmDdvdvWFK8brOVNL7bKHpE-9w0)

------
susam
An easy to remember short URL if you need a PDF copy:
[https://git.io/sicp.pdf](https://git.io/sicp.pdf)

~~~
dunefox
IMO opinion this is the best version around:
[http://sarabander.github.io/sicp/](http://sarabander.github.io/sicp/)

Also available as epub:
[https://github.com/sarabander/sicp](https://github.com/sarabander/sicp)

~~~
gonzus
Do you have a working link for the epub version? The one on the page downloads
a text file with three lines, with tags version, oid and size.

~~~
nekopa
After some clicking around:

[https://sicpebook.wordpress.com/](https://sicpebook.wordpress.com/)

Second post on the page.

------
CodeArtisan
html5 version:
[http://sarabander.github.io/sicp/](http://sarabander.github.io/sicp/)

more resources:
[https://bitbucket.org/Tetsumi/workspace/snippets/ke6jL4/sicp](https://bitbucket.org/Tetsumi/workspace/snippets/ke6jL4/sicp)

~~~
schemescape
That HTML port is more complete than the one below, but this link has a built-
in interpreter for playing around with code (without having to install some
heavyweight runtime):

[http://jaredkrinke.github.io/learn-
scheme/](http://jaredkrinke.github.io/learn-scheme/)

------
jll29
If you only ever buy/read two computer science books, get your hands on
Abelson/Sussman's SICP and Knuth's TAOCP.

I could program before studying at uni, but thanks to our two-term course
Algortmics I+II at FAU Erlangen (part I based on SICP), it seems a fog that I
wasn't even aware of cleared.

~~~
mesaframe
Have you read TAOCP?

~~~
Jtsummers
I'm not GP, but I read and worked through almost the entirety of Volume 1. I
found it both approachable and enlightening. I have read (but not worked
through) large chunks of Volumes 2 and 3, I have not purchased a copy of
Volume 4 yet.

Volume 1 really works well if you also work through Concrete Mathematics (my
professor and I started on Volume 1, diverted to CM, then back to Volume 1).
CM provides enough additional math to get through chapter 1, where I was
having a bit of trouble on some of the math heavy portions.

~~~
mesaframe
I want to work through the book I can barely find time for that.

~~~
Jtsummers
Fair enough, I don't have the time anymore myself. College and my mid-20s were
the best time to do all of those things. Now that I'm approaching 40 I have
very little time and have to be more selective in how much time I dedicate to
these kinds of resources.

I actually started working through TAOCP one summer during a very boring sys
admin job. I couldn't actually change the system to improve it, just complete
whatever tasks were given to me and help customers. Maybe 1-3 hours a day of
actual work effort. And in the pre-smart phone days, a book was easy to work
through without distractions until the next ring of a phone call or ding of an
email.

------
criddell
It's pretty annoying that the location of the "next" link keeps shifting as I
turn the pages. It seems like it would be better if the navigation links were
at a fixed position so you could easily flip forward or backwards several
pages.

------
watersb
The very first Computer Science course in college. It was all downhill from
there.

~~~
yomly
The thing that I always find interesting is a bunch of fearless 18 year olds
just throw themselves at SICP. Feel the pain and some survive.

Then some Ruby/PHP/JS developers who have 5-10 years of coding experience tip
their head at the book and say it's too hard or "only for senior people".

Unlike the gym, with intellectual pursuits the only thing you can injure when
you fail is your ego. If you learn to let go you will realise how much you
hamstring yourself with your own preconceptions in life.

~~~
andi999
"intellectual pursuits the only thing you can injure when you fail is your
ego" well, construction, mechanical and electeical engineering might have a
different opinion.

~~~
yomly
Sorry to clarify - the act of studying knowledge from a book, carries limited
risk. What you do with that knowledge or practical learnings are out of scope
here. :)

~~~
andi999
Well, you can also learn things the wrong way and this can give you the
impression you are an expert while the opposite is true.

------
exdsq
I keep meaning to work through this book, and keep getting distracted by other
things. Maybe this will be the time I actually manage it! Probably not
though...

------
peter_d_sherman
[https://en.wikipedia.org/wiki/Structure_and_Interpretation_o...](https://en.wikipedia.org/wiki/Structure_and_Interpretation_of_Computer_Programs)

">Structure and Interpretation of Computer Programs (SICP) is a computer
science textbook by Massachusetts Institute of Technology professors Harold
Abelson and Gerald Jay Sussman with Julie Sussman. It is known as the Wizard
Book in hacker culture.[1][2] It teaches fundamental principles of computer
programming, including recursion, abstraction, modularity, and programming
language design and implementation.

The MIT Press published the first edition in 1985, and the second edition in
1996. It was formerly used as the textbook for MIT's introductory course in
electrical engineering and computer science. SICP focuses on discovering
general patterns for solving specific problems, and building software systems
that make use of those patterns.[3]

The book describes computer science concepts using Scheme, a dialect of Lisp.
It also uses a virtual register machine and assembler to implement Lisp
interpreters and compilers.

Characters

Several fictional characters appear in the book:

Alyssa P. Hacker, a Lisp hacker

Ben Bitdiddle, a hardware expert

Cy D. Fect, a "reformed C programmer"

Eva Lu Ator, an evaluator

Lem E. Tweakit, an irate user

Louis Reasoner, a loose reasoner

Coursework

The book was used as the textbook for MIT's former introductory programming
course, 6.001.[5] That course was replaced by 6.0001,[6] which uses Python.[7]
Other schools also made use of the book as a course textbook.[8] It is used as
the textbook for MIT's Large Scale Symbolic Systems class, 6.945.[9]

Reception

Byte recommended SICP "for professional programmers who are really interested
in their profession". The magazine said that the book was not easy to read,
but that it would expose experienced programmers to both old and new
topics.[10]

Influence

SICP has been influential in computer science education, and several later
books have been inspired by its style."

~~~
dunefox
> Alyssa P. Hacker, a Lisp hacker

I always thought "Alice P. Hacker" would be much better

~~~
peter_d_sherman
Witty Response: She's a Lisp hacker _AND_ a SAP
programmer(!)([https://en.wikipedia.org/wiki/SAP](https://en.wikipedia.org/wiki/SAP))
-- that's why her name is "Alys-saP." and not "Alice P."! <g>

