6 ms·
How to Design Programs 2nd Edition
- agomez314 4y agoHow does this book compare to SICP?
- Al0neStar 4y agothe authors wrote a paper compraing it to sicp. https://users.cs.northwestern.edu/~robby/pubs/papers/htdp-sicp-fdpe2002.pdf https://users.cs.northwestern.edu/~robby/pubs/papers/htdp-si...
- cinntaile 4y agoThere is another book that is usually mentioned when comparing these two. Concepts, Techniques and Models of Computer Programming. I don't know how they all compare to each other, I just mention it for completeness sake. https://www.info.ucl.ac.be/~pvr/book.html https://www.info.ucl.ac.be/~pvr/book.html
- Al0neStar 4y agoi havent read this book but i skimmed the toc and i have to say its probably even harder than sicp. http://www.info.ucl.ac.be/people/PVR/booktoc.pdf http://www.info.ucl.ac.be/people/PVR/booktoc.pdf
- tmtvl 4y agoThere is another book which isn't often mentioned, which I like to consider "SICP-lite", Concrete Abstractions: https://gustavus.edu/mcs/max/concrete-abstractions.html https://gustavus.edu/mcs/max/concrete-abstractions.html
- jhoechtl 4y agoThis is a great book and uses a back then obscure, today defunct programming language Oz. https://en.m.wikipedia.org/wiki/Oz_(programming_language) https://en.m.wikipedia.org/wiki/Oz_(programming_language)
- tacon 4y agoYears ago, the author taught a MOOC covering parts of the book[0]. The course is archived on edX, and the videos are on YouTube[1]. It was fun starting from a super simple functional language and building to a dataflow functional language by the end. [0] https://www.edx.org/course/paradigms-of-computer-programming-fundamentals https://www.edx.org/course/paradigms-of-computer-programming... [1] https://www.youtube.com/playlist?list=PLw454N-VXALSIzIe_eL5U8L4S68v2X_ak https://www.youtube.com/playlist?list=PLw454N-VXALSIzIe_eL5U...
- zabzonk 4y agomuch easier to read, less tedious math/engineering stuff.
- Al0neStar 4y agotheres also a follow up book called "how to design classes" a draft versions is available here https://felleisen.org/matthias/htdc.html https://felleisen.org/matthias/htdc.html
- wffurr 4y agoThat has been a draft for over ten years. I studied out of it in print out form in 2009. I wonder why it’s never finished. Maybe the authors aren’t satisfied with it?
- Al0neStar 4y agoprobably but its still listed as recommended reading in CS 2510 (Spring 2023) https://course.ccs.neu.edu/cs2510/Texts.html https://course.ccs.neu.edu/cs2510/Texts.html
- michidk 4y agoI read the abstraction chapter, but I really have a hard time translating those concepts to different languages like Rust. Seems like this book is very specific to this Racket-based teaching language?
- zabzonk 4y agoconcepts presented seem pretty basic to any programmming language - what were you having problems with?
- czx4f4bd 4y agoIt uses Racket as a teaching language, but the concepts should be generally applicable. The preface explains the goals and ideas behind the book: https://htdp.org/2023-3-6/Book/part_preface.html https://htdp.org/2023-3-6/Book/part_preface.html
- Herval_freire 4y agoRust sacrifices modularity for performance. You're going to have to clone everything if you want to follow along with rust. Additionally you have to use generics and trait bounds extensively for some equivalent function in rust.
- synergy20 4y agoisn't rust said to be good for high performance? it's also move by default instead of copy, that saves memory copies which is a good thing? I'm lost in 'clone everything', not a rust programmer per se.
- Herval_freire 4y agoYes. one of the things rust sacrifices for high performance is modularity. Rust is a better language for safety and high performance, however it is not the best language in terms of modularity. Haskell takes the crown for modularity and safety but as a result it is less performant then rust. Move by default is not modular. Why? Because it is a mutation. The state of your program changes after a move and your program must be structured around that. That variable that was moved can no longer be reused in the same context so your program is less modular as a result as the definition of modularity is high reusability of modules. Clone just means pass by copy. Make a copy and then pass the value. Pass by immutable reference works too. Just keep everything immutable for maximum modularity. But if you want to mutate things and keep things relatively modular then pass by copy (aka clone) is the best alternative. All in all rust is typically harder to program for and harder to make elegant because of all the anti-modularity features used to increase performance and safety.
- catamount 4y agoThis 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
- preserves 4y agoThis book supported the curriculum of my introductory computer science course at Tufts University back in 2013. It was hard but amazingly valuable. By the end of the semester, we were doing natural language classification using binary search trees and higher-order functions [1]. I think learning a Lisp-based language first gave me some very powerful foundational problem solving skills that have made me a successful software engineer today. [1] https://www.cs.tufts.edu/comp/50PSS-2013f/homework/trigrams.html https://www.cs.tufts.edu/comp/50PSS-2013f/homework/trigrams....
- poppafuze 4y ago[dead]