Live data from Hacker News

How to Design Programs, Second Edition

ccs.neu.edu

11–20 of 28 posts

Re: How to Design Programs, Second Edition

#11

why do words like 'idiots' and 'dummies' need to be on the first page.

Agreed, it adds nothing and makes the authors seem juvenile. I am not someone sensitive to language either, if it added value I would be open to the most vile introduction imaginable.

Re: How to Design Programs, Second Edition

#13

As a student having gone through a class for introductory programming with this book (1st addition), I can say this was the best way to get into programming, and the lessons in here lead to a beautiful understanding of computer programming.

I think Coursera Systematic Program Design is largely based on HtDP, if so, I agree it's one of the most balanced introduction to programming, where their definition of programming is more thinking through the problem instead of writing LoC or learning syntax. All this without complex problems (whereas SICP first chapters can drive non-math lovers away)

Yeah, I went through the Coursera course. Honestly, it was amazing. I had read through several programming books, but this was systematic. The "design recipes" help you to write clean, testable functions, and to think about your design before you start typing. I actually found it to be one of the best introductions to programming in Haskell. I had read 'Learn You A Haskell', and 'Real World Haskell' but this course made the whole approach to types, and pure functions really click.

Re: How to Design Programs, Second Edition

#14
post #13

Earlier quoted context omitted.

I think Coursera Systematic Program Design is largely based on HtDP, if so, I agree it's one of the most balanced introduction to programming, where their definition of programming is more thinking through the problem instead of writing LoC or learning syntax. All this without complex problems (whereas SICP first chapters can drive non-math lovers away)

Yeah, I went through the Coursera course. Honestly, it was amazing. I had read through several programming books, but this was systematic. The "design recipes" help you to write clean, testable functions, and to think about your design before you start typing. I actually found it to be one of the best introductions to programming in Haskell. I had read 'Learn You A Haskell', and 'Real World Haskell' but this course m…

I remember two times where learning a language that didn't embed the full paradigm (ADA objects) made me understand it better (Class OOP as in Java), the other one was monads in emacs lisp, so I think I understand your point.

The design recipes felt a little bit dull at first, but for a newcomer it's probably the good rhythm anyway. And now I often 'construct' my function through stubs, tests and then full code. Kudos to the authors.

Re: How to Design Programs, Second Edition

#16

As a student having gone through a class for introductory programming with this book (1st addition), I can say this was the best way to get into programming, and the lessons in here lead to a beautiful understanding of computer programming.

I think Coursera Systematic Program Design is largely based on HtDP, if so, I agree it's one of the most balanced introduction to programming, where their definition of programming is more thinking through the problem instead of writing LoC or learning syntax. All this without complex problems (whereas SICP first chapters can drive non-math lovers away)

The course is based on the general principles which underlay HtDP. But HtDP is Matthies Felliesen's particular approach, and Gregor Kiczales (CLOS, Aspect Oriented Programming, The Meta-Object Protocol) has his own points of emphasis.

What both share is a general approach to programming pedagogy - that of the larger Racket community. It includes starting with a simple functional language, BSL, in order to avoid getting hung up on language syntax and to provide better error messages during debugging. BSL prevents FORTRAN in any languages, everything has to be functional. Because it only has

  cons
But not

   list
BSL programs tend to make structure explicit - don't worry, list is added when appropriate.

At first this seems like a lot more training wheels than necessary, but it allows the course to focus on writing signatures, descriptions, and templates in the first weeks, and pays off handsomely when the material hits recursion - there were very few questions about it in the forums, and the answer when those who couldn't picture it felt stuck was, for now just trust the template.

The big idea of the course is to teach a design method. It does so by looking at recursive algorithms and presenting recipes for applying them. The second theme is functional style programming - and it is dictated by necessity. The third theme is model-view-controller through Racket's "worlds".

I've taken a lot away from it, your milage may vary.

Re: How to Design Programs, Second Edition

#17
post #15

From my cursory glance at the book, I always felt the title was misleading. It is more a general introduction to programming through Scheme, with a focus on good practice than a treatise on software architecture.

HtDP, unlike SICP, begins with a purely functional subset of Scheme, BSL (Beginning Student Language). While this obviously means students will learn Scheme from the course, the purpose is to remove syntax and imperative programming from the equation - there is no set! and no macros. There is not even (list...) or lambda or closures or local functions.[1]

In short, BSL is pretty neutral from a language holy war standpoint. Which is not to say that those who self-select to engage with the book as teachers and students are not likely to be somewhat biased toward the Lisp camp - clean syntax and functional style programming are standard arguments in favor of Lisp in language wars.

The other distinction of HtDP is that is definitely not OOP based. The analog in terms of pedagogy might be MIX - there are certain ideas which it is desirable for the language to expose, and OOP hides a lot of those things.

[1] O.K. There is lambda in BSL, actually. But it can only be used in the body of a function definition like this:

  (define (foo x)
    (lambda (x) (* 1 x)))
Outside this (define...) form, lambda is not allowed in BSL.

Re: How to Design Programs, Second Edition

#18

why do words like 'idiots' and 'dummies' need to be on the first page.

They are referring to the Dummies Guide and other books that claim you can learn to program in a very short period of time.

Yes, the three italicized words/phrases are references to the names of popular programming book series:

Programming for Dummies: http://www.dummies.com/store/Computers-Internet/Programming....

Sams Teach Yourself X in 21 Days: http://www.informit.com/search/index.aspx?query=21+days

The Complete Idiot's Guide to X: e.g. http://www.help4web.net/webmaster/Java/NewJS/JavaScriptIdiot...

Maybe those series are no longer as well known as they used to be? They were household names in the '90s and everyone would've gotten the references, but it's possible they're now dated and better removed from the intro.

Re: How to Design Programs, Second Edition

#20

Earlier quoted context omitted.

I think Coursera Systematic Program Design is largely based on HtDP, if so, I agree it's one of the most balanced introduction to programming, where their definition of programming is more thinking through the problem instead of writing LoC or learning syntax. All this without complex problems (whereas SICP first chapters can drive non-math lovers away)

The course is based on the general principles which underlay HtDP. But HtDP is Matthies Felliesen's particular approach, and Gregor Kiczales (CLOS, Aspect Oriented Programming, The Meta-Object Protocol ) has his own points of emphasis. What both share is a general approach to programming pedagogy - that of the larger Racket community. It includes starting with a simple functional language, BSL, in order to avoid gett…

I agree with everything you just said.
Post reply on HN