if you don't have time to read the book, do read the sections with 'design' in their title. Compare with Josh Bloch's apologia for the Java API and then ponder why HtDP[2e] preps readers for OOP anyway. I will try to clarify in HtDComponents (forthcoming, eventually, if I live long enough) and HtDSystems (ditto).
I chose small languages -- rejecting powerful Racket features such as define-datatype and pattern matching -- precisely so that the thinking reader and student would be able to adapt the design recipe to almost any language, but especially the popular "scripting languages", the wanna-be Lisps.
Once you program long enough, the design recipe will become second nature and you won't notice it anymore. Well, until some "guru" coins a slogan for some aspect of it -- say TDD or Extreme Programming -- and you think "I have seen this before, I just can't recall where." Conversely, I think I have extracted what experienced programmers taught me about programming and what has been at their and my finger tips for a long time.
If it helps some, great. If others know it all better, fine.
-- Matthias, at it since 1984
p.s. If the first sentence seems juvenile, you haven't been to a physical book store in a while. When I see those books disappear, the sentence will disappear too. In the meantime, I stand by its essence.
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.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.
(do-something (create-something height width7))
I use the arrows to connect the appearances of the unknown functions do-something and create-something with their definition and then read the definitions, and perhaps add more arrows there to previously defined functions. I usually remove the arrows when I understand that the function is not related to my problem or when I understand what the function does.Chapters 9-12 are still empty in the stable release, and only partially done in the draft version.
http://www.ccs.neu.edu/home/matthias/HtDP2e/Draft/index.html
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.
What a horrible title. This is a book about how to program in scheme, not how to design programs. Nothing on architecture or common patterns. Nothing on how to abstract a domain or analyze a problem. Just solutions for common programming a tasks.
Not knocking it but its far from design.
The choice of Scheme, makes getting to recursion easier, and allows for it to be free of arguments regarding language idioms - i.e. the Scheme dialect, BSL does not allow iterative looping (Scheme of course does).
The Racketeers have spent careers looking at the process of teaching languages.
Are these two different issues or one?