Live data from Hacker News

If not SICP, then what? Maybe HTDP?

stevenrosenberg.net

181–190 of 227 posts

Re: If not SICP, then what? Maybe HTDP?

#181
A couple of historical clarifications to Sedgewick Wayne's points:

> [SICP] set the curriculum for "beginning" computer science

> All [examples and exercises] use complex domain knowledge. ... Some early sections and the last two chapters cover topics from computer science ...

Why the square quotes around "beginning"? At the time the course, 6.001, was launched it was quite reasonable to assume that an MIT undergrad might arrive at the Institute never having previously used a computer, much less programmed one. This was truly an introductory class and while required for all EE and CS students, was intended for any undergraduate. The material in the examples all covered core subjects every student needs in oder to graduate, or else were computer science topics that should hardly shock someone taking a computer science class.

Some of the other criticism is reasonable in light of the authors' desire for a slightly different approach. 6.001 was and is the basic introductory class and a CS student will take other classes which will address different aspects of program design and application. Choosing a different time of introduction for different objectives is hardly unreasonable.

(And I don't know why object-oriented programming is somehow thought to be in opposition to the principles of SCIP; the latter's heart is abstraction and composition which are the whole point of object-oriented thinking, right?)

Re: If not SICP, then what? Maybe HTDP?

#182

I think programmers reaction to the mathematics in SICP is completely hysterical - in the sense of hysteria, not comedy. For example, the author-professors who wrote HTDP, quoted at length in this article complain about using 'complex domain knowledge' and the author of the blog post does as well, but the running example used is literally arithmetic . In particular: Section 2.1 starts by building a data type of ratio…

I basically disagree. In my opinion, the main mathematical requirement of the book is not knowing how to add fractions and such, but a reasonable amount of mathematical maturity, and many people reading the book will not have this.

When I say mathematical maturity, I mean the kind of basic “real” mathematics that is normally taught only at universities, specifically the idea of what a proof is, what one looks like, how to write one, how to read definitions, and some idea of how one might analyse a problem and work towards its solution.

For example, exercise 1.10 defines the Ackerman function and asks some questions about it. The Ackerman function does not fit the model of any function one might typically encounter in mathematics before this course, it’s definition is hard to reason about, and solving the exercise requires understanding certain cases of the Ackerman function (and not trying to figure it out all at once) and also having a good understanding of various mathematical operations (e.g. +, *, ^, which seems simple but spotting the pattern might not be so easy).

Exercise 1.13 is about proving a closed form for fib(n) which requires a reasonable amount of mathematics and no programming whatsoever. Thankfully the hint gives one some kind of clue as to how to solve it or I think many would find the mathematical bar too high.

Immediately following this is a chapter introducing orders of growth (big-O and friends) which is fine for anyone with a decent background in mathematics or computer science but one must remember that there is a difference between the abstract manipulation of symbols and vague graph-sketching one does in school (e.g. e^x is flat and then shoots up a bit past 0, x^2 shoots up either side of zero, x^3 goes up on the right and down on the left ...) and having a good understanding of how these functions behave and compare.

Exercise 1.19 essentially requires a careful and correct analysis of the Fibonacci sequence (thankfully there are lots of hints) to derive a logarithmic algorithm for computing fib(n). This is essentially the “matrix exponentiation method” except that the matrix is hidden in three variables. I think it is silly to say that all you need is to be able to understand arithmetic to solve these.

I think the book is fine for a course that happens after (or possibly concurrently with) a first course in real mathematics. It is probably less useful if one is lacking in the mathematical background required, and I think it is reasonable for people studying a “first course in computer science” to not have this mathematical background.

Re: If not SICP, then what? Maybe HTDP?

#183

I think programmers reaction to the mathematics in SICP is completely hysterical - in the sense of hysteria, not comedy. For example, the author-professors who wrote HTDP, quoted at length in this article complain about using 'complex domain knowledge' and the author of the blog post does as well, but the running example used is literally arithmetic . In particular: Section 2.1 starts by building a data type of ratio…

For me it wasn't the maths in SICP, it was the physics, or rather the particular examples in the chosen domain. I love physics but coding Newton-Raphson does not engage me. (I had a similar reaction to particular Python book -- Roman numeral conversion? blah!)

The motivation for using that example in particular is, I believe, that it's computing a fixed point - which is an idea that came up several times in the course in increasingly general settings. First you do the concrete example of newton's method, then do a more general fixed-point (higher order) function, and a more general newton's method.

Later on the Y-combinator is presented as computing the fixed point of an (finite) iteratively defined function - the fixed point returned is the full recursive function. Lastly when talking about programming languages, and interpreter computes a fixed point. The scheme language is the fixed point of the scheme meta-circular evaluator.

Re: If not SICP, then what? Maybe HTDP?

#184
post #172

I'm the author of the original blog post, and I wanted to say that SICP, as well as HtDP, and even a book like Robert Sedgewick's Computer Science ( https://www.amazon.com/Computer-Science-Interdisciplinary-Ro... ) are in a completely different category than more mainstream how-to-program books (like anything from O'Reilly, Manning, No Starch, Pragmatic Programmers) and even the other popular college texts like Y. Da…

Thank you for this much more nuanced response. Your original post was very critical of SICP in a way that didn't seem to do it justice - I think that's what set of much of the debate in this thread. But if what you say in this comment is what you really meant, I fully agree with it.

I am writing from the perspective of someone who isn't a CS major and is trying to learn programming on my own. I am very interested in the CS aspects of programming but am finding it hard to learn it in an approachable and understandable way.

If an "ivory tower" approach is working, I'm on board, but I bet more people get value out of SICP after they have a lot of classes and experience under their belt and not the other way around.

Re: If not SICP, then what? Maybe HTDP?

#185
post #139
post #95

Earlier quoted context omitted.

> The original author has to persuade people, and convince people who aren't familiar with them. The "pedagogical" author later is in a more clear position of authority and doesn't need to work as hard. Or perhaps: The "pedagogical" author can assume that by the time of his writing, we live in a society where it is accepted that there is nothing mysterious about the material (e.g. imaginary numbers are nothing myster…

>Unluckily many students who attend lectures have an attitude where they need to be convinced instead of taught. Isn't this backwards? If you're just accepting the lecturer's word as dogma, I would argue you're not really gaining an education at all. The process of being convinced and having doubts about the material resolved improves critical thinking and improves understanding of the underlying material as well.

The lectures of the old 4 semesters of calculus at UT Austin consisted almost entirely of the proofs of why the material worked.

Less than entirely helpful if you wanted to use it.

Re: If not SICP, then what? Maybe HTDP?

#186
post #9

I can fully recommend HtDP for beginning programming - tried various options for my 11 year old. I needed it to involve very little help from me - tried some scratch, mit50x, both which helped but did not spark and sustain interest. Then we came across https://www.edx.org/course/how-code-simple-data-ubcx-htc1x - love it and does not need any help from me :) planning to move on to https://www.edx.org/course/how-code-c…

> we came across There are YouTube videos (I don't know how well they fit with the current course) and they are excellent.

+1 to learning programming thingies from YouTube videos.

Re: If not SICP, then what? Maybe HTDP?

#187
This edition is an amazing improvement on the original ebook: https://sicpebook.wordpress.com/

What mathematics? Now that many states have legalized cannabis, SICP should be read while high in the middle of the night. Its nonstop commentary is profoundly amusing. I love for example the passage that presents tail-recursion as the natural form of iteration, and notes about other languages:

"As a consequence, these languages can describe iterative processes only by resorting to special-purpose “looping constructs” such as do, repeat, until, for, and while."

Of course they're right, and yes that's a mathematical view, but they put it so well. All replacement texts are unreadably dry.

Re: If not SICP, then what? Maybe HTDP?

#188
post #79

Earlier quoted context omitted.

> people with prior knowledge, yet disliked by actual students This is the key!. I was about to say SICP was great then, yeah, I read it only when get interest in build compilers and after 20 years on the craft. I think you need a progression on material: 1- Start with a highly practical book more alike build little experiments/programs "Build a pacgam game" "Make a calculator", etc... ie, do a single pass for the mi…

That’s very well put. I’ve actually really wanted a “cookbook” for compilers. Basically small, self contained lessons for writing a particular part of a compiler. I.e. here’s how to write a typechecker, or how to write a garbage collector. The closest to that I’ve found is Crafting Interpreters. A lot of the compilers textbooks focus on the theory or general concepts, which is great, but I want to get my hands dirty.…

There is a great paper by Abdulaziz Ghuloum, An Incremental Approach to Compiler Construction, that is pretty much the cookbook you want: http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf

"We show that building a compiler can be as easy as building an interpreter. The compiler we construct accepts a large subset of the Scheme programming language and produces assembly code for the Intel x86 architecture, the dominant architecture of personal computing. The development of the compiler is broken into many small incremental steps. Every step yields a fully working compiler for a progressively expanding subset of Scheme. Every compiler step produces real assembly code that can be assembled then executed directly by the hardware."

There is also a work-in-progress effort to write a more extensive textbook that follows the same approach to teaching compiler development, using Racket instead of R5RS Scheme: https://github.com/IUCompilerCourse/Essentials-of-Compilatio...

Re: If not SICP, then what? Maybe HTDP?

#189

There are two models for CS education. One model is for students who want to learn the theories of computer science and be computer scientists , and the other is for students who want to be programmers. SICP is the foundation for people who want to be computer scientists. That’s not everyone. But from what I’ve found, all the top CS schools create computer scientists, and the other CS schools create programmers. Whil…

This is one of the major advantages of computer science over many other sciences: an undergraduate degree in CS is actually useful.

Old joke: What do you call someone with a BS in archaeology?

A ditch digger.

Re: If not SICP, then what? Maybe HTDP?

#190

There are two models for CS education. One model is for students who want to learn the theories of computer science and be computer scientists , and the other is for students who want to be programmers. SICP is the foundation for people who want to be computer scientists. That’s not everyone. But from what I’ve found, all the top CS schools create computer scientists, and the other CS schools create programmers. Whil…

> While it’s easy for a computer scientist to make the jump to programmer with just a little guidance, it’s much harder to go the other way. I don't think it's actually that easy for a computer "scientist" to unlearn all the idealistic stuff that can actually be counter-productive in a real-world programming environment, particularly if they're enamored with languages like LISP or Haskell. These people easily get dep…

Yes, this is why initial salaries from MIT, Stanford, and Berkeley are comparatively low.
Post reply on HN