4 ms·
This book should really be called "How to Design Functions" -- not "Programs" -- because it sidesteps the most difficult and interesting topics in making softwa
by catamount 4y ago
This book should really be called "How to Design Functions" -- not "Programs" -- because it sidesteps the most difficult and interesting topics in making software programs, namely the work of a) separating a task into simpler subtasks and then b) composing smaller functions into a program that performs the task. IIRC the most complicated example in this book pertains to calculating the optimal price of movie tickets. There is merit in some of the book's recommendations. But overall this material could be condensed into the 25-page intro of a much more interesting programming textbook. As it stands, HTDP is a buzzkiller.
Speaking of which, here's a 2010 blog post about how Georgia Tech stopped using HTDP, featuring an argument in the comments between the author of HTDP and Alan Kay.
https://computinged.wordpress.com/2010/05/11/playing-the-cards-youre-dealt-a-story-of-gt-and-htdp/ https://computinged.wordpress.com/2010/05/11/playing-the-car...
- systems 4y agoI agree, programs are files, not functions If you want to show me how to design programs you need to show me how to break my analysis of the requirement, into modules, components and files And then how to build and assemble those pieces into the running file (the executable) When you open a Github project you are greeted with a file tree, not a function tree we still program to disk not to a database, where functions exist in an abstract space
- zadberry 4y agoI wonder which edition of HtDP you read? Your comments are somewhat true of the first edition (especially so in terms of the exercises provided), and as far as I know, the authors were aware of such criticsms. In any case, since then, Racket has been enriched with various HtDP student libraries, including a functional I/O framework called Universe [0], and the second edition of HtDP/2e utilizes these libraries for a number of relatively complex beginner projects, including a one-line text editor, a Tetris clone, an MP3 database, and a (very simple) interpreter. There are quite a few more. All of this material guides students to an appropriate first understanding of your points A and B. Also, there are quite a few sibling courses now in what I sometimes call the "How to Design Programs extended universe", and some of these are a bit more project-focused. In particular, there is Marco Morazan's Animated Program Design [1], which iteratively develops a multiplayer Space Invaders-type game called Aliens Attack through multiple sections over the course of the book. The main pedagogic aims of the Universe framework are to introduce students to both event-driven programming and distributed programming, and as far as I'm aware, the Aliens Attack program is the most complex tutorial treatment of an HtDP-style program that combines both aspects. Unfortunately, the book is quite expensive. Personally, I didn't find HtDP to be a buzzkiller, but rather the textbook that helped me understand that programming could potentially be a joyful activity rather than drudgery. As a former music teacher, I loved its insistence on practice and process. But I was also a beginner who had tried and failed to learn to code a few times over the 15 years before I read HtDP/2e. A more experienced programmer surely might not have the same experience. [0] https://www2.ccs.neu.edu/racket/pubs/icfp09-fffk.pdf https://www2.ccs.neu.edu/racket/pubs/icfp09-fffk.pdf [1] https://link.springer.com/book/10.1007/978-3-031-04317-8 https://link.springer.com/book/10.1007/978-3-031-04317-8
- uxcolumbo 4y agoThanks for posting this and your experience. I had HTDP on my to-learn list and the parent comment somehow put a damper on it. The space-invaders project sounds fun.
- zadberry 4y agoWorth mentioning that there is a Space Invaders project included in the first section of HtDP. Personally, I wouldn't give Morazan's Animated Problem Solving a big recommend for someone trying to self-teach CS1, especially not when HtDP and How to Code are free. In my opinion, APS is a bit over-stuffed (it has a tendency to throw relatively advanced terms, like property-based testing, at the beginning student without much context or follow-through) and it can sometimes make exercises (including the Aliens Attack ones) overly complex and tedious. I don't think HtDP is without criticism, but if you can get through the somewhat slow-going first section, it's a great textbook. Alternatively, you can work through UBC's How to Code (H2C), which has a brisker pace. I found the first section of HtDP a bit tough-going myself, so I ended up working through H2C first. I only came back to HtDP because I found some of H2C's explanations of later material shallow, but more importantly, I felt that its exercises were generally lacking in challenge. Nonetheless, I can't recommend H2C enough. Gregor is a friendly, patient teacher, and the H2C presentation of the design recipe somehow seems more fine-grained than HtDP's version but without feeling overly complicated. Note that you can actually access the edX version of H2C for UBC students at the CS110 course page [0], just click on the link to enroll in the "edX Edge course". It appears to be an updated version of the original MOOC course with some small additions. [0] https://cs110.students.cs.ubc.ca/ https://cs110.students.cs.ubc.ca/