9 ms·
How to Design Programs
- mikevm 4y agoWasn't the first edition longer than this one?
- samth 4y agoThey're similar in length, but the First Edition covers somewhat more material, in particular mutation, while the Second edition has more details and exercises, and covers the 2htdp/universe functional animations that are new for that edition.
- soegaard 4y agohttps://htdp.org/2003-09-26/Book/curriculum-Z-H-1.html#node_toc_start https://htdp.org/2003-09-26/Book/curriculum-Z-H-1.html#node_...
- clumsysmurf 4y agoIf my recollection is correct, some thought HTDP was an easier read than SICP. But now, there is a version of SICP adapted for Javascript: https://mitpress.mit.edu/books/structure-and-interpretation-computer-programs-1 https://mitpress.mit.edu/books/structure-and-interpretation-... Does the assertion still hold?
- sudopluto 4y agoi would rec HTDP, simply because DrRacket has some very cool tools for tracing recursive calls
- PeterWhittaker 4y agoI’ve not read HTDP, but I’ve been reading the JS SICP in dribs and drabs and find it very readable. (I’ve not read the original.)
- adamddev1 4y agoI found HTDP a lot easier to read and work through because it works through more "practical" problems (like building a game) whereas SICP gets into some pretty heady math based problems. Also see this article that explains how it takes a different approach to teaching recursion. I found this approach very understandable and helpful. https://parentheticallyspeaking.org/articles/how-not-to-teach-recursion/ https://parentheticallyspeaking.org/articles/how-not-to-teac...
- macco 4y agoYes it does. Scheme is not what makes SICP challenging. The sheer density of concepts is. HtDP is a bit repetitive and gets a bit boring over time. While some things overlap, I would recommend to first work through HtDP (or better through this online course https://www.youtube.com/channel/UC7dEjIUwSxSNcW4PqNRQW8w/about https://www.youtube.com/channel/UC7dEjIUwSxSNcW4PqNRQW8w/abo...) and then work through SICP - especially if you try to learn programming by yourself.
- dang 4y agoRelated: How to Design Programs (2014) - https://news.ycombinator.com/item?id=26493990 https://news.ycombinator.com/item?id=26493990 - March 2021 (136 comments) How to Design Programs, second edition - https://news.ycombinator.com/item?id=16561815 https://news.ycombinator.com/item?id=16561815 - March 2018 (30 comments) How to Design Programs, Second Edition - https://news.ycombinator.com/item?id=14932552 https://news.ycombinator.com/item?id=14932552 - Aug 2017 (40 comments) How to Design Programs - https://news.ycombinator.com/item?id=12768134 https://news.ycombinator.com/item?id=12768134 - Oct 2016 (3 comments) How to Design Programs, Second Edition - https://news.ycombinator.com/item?id=8778569 https://news.ycombinator.com/item?id=8778569 - Dec 2014 (39 comments) How to Design Programs, Second Edition - https://news.ycombinator.com/item?id=6150967 https://news.ycombinator.com/item?id=6150967 - Aug 2013 (26 comments) How to Design Programs, Second Edition - https://news.ycombinator.com/item?id=2958108 https://news.ycombinator.com/item?id=2958108 - Sept 2011 (18 comments) How to Design Programs: An Introduction to Computing and Programming - https://news.ycombinator.com/item?id=2049477 https://news.ycombinator.com/item?id=2049477 - Dec 2010 (17 comments) How to Design Programs - https://news.ycombinator.com/item?id=637152 https://news.ycombinator.com/item?id=637152 - June 2009 (4 comments)
- deleted 4y ago[deleted]
- adamddev1 4y agoAs someone who was a self-taught programmer working through this book has been an absolute game changer for me. After learning about design recipes, type-driven development (although they may not use that term), function wish-lists, recursion, etc. I was able to easily tackle problems that would baffle me before. And my programs just worked with so fewer problems! I mostly build stuff w/ TypeScript/React and I've found the thought process to be very applicable and helpful.
- stanulilic 4y agoHow long did it take you to go through the book?
- adamddev1 4y agoI've worked at it very occasionally, off and on over the last couple of years and currently I'm on section 4/5. If I were to do it consistently for an hour a day 4ish days a week I think I could have finished it all in 2-3 months.
- call-me-al 4y ago> I was able to easily tackle problems that would baffle me before could you please explain how this book helped in tackling a new class of problems?
- s-video 4y agoI started reading this and taking the edx course that’s based on it (How to Code) the other week. I feel pretty comfortable reading code and modifying things, and finding documentation, but tend to get stuck deciding how my data structures or types should be laid out. This week I’ve hit the “How to Design Data” part of the course and it’s been giving me a lot of clarity.
- TekMol 4y agoAfter 20 years of programming, this is what comes to my mind when I hear "How do Design Programs": 1: Start with the data structure The tools to operate on the data can be rewritten or improved without much pain. Changing the data structure is what hurts. If the data structure is elegant, the code will fall into place. If the data structure is messy, the code will grow into a giant hairy ball of madness. 2: Don't use a DB. Use human-readable text files It makes everything so much easier. You can see if your data structure is elegant. Because then the files will be easy to read and navigate. You will be able to start up your software 20 years from now without any installation and without having to go through the hell that is setting up the environment and updating dependencies. The website you are reading this on, Hacker News, stores all data in text files. 3: Build small tools to operate on the data Like Linus started git by writing small tools "git-add", "git-commit", "git-log" etc. On the web you can have one url to do one thing (/urser, /item, /edit here on HN) and map them to one code file on your disk. If you want to use a framework like Django, Laravel or Express, those will unfortunately make it a bit harder to do that. But you can still stick somewhat closely to this approach. 4: Let people use it right away If you are building it for yourself, you already have a user. Great. If not, let your target group use it right away. Otherwise, you will waste many years of your life building software features nobody understands or even wants.
- austinwade 4y ago> 2: Don't use a DB. Use human-readable text files This is interesting, can you elaborate? Do you mean like CSV files, or some JSON structure, etc?
- Thursday24 4y agoI prefer Norvig's "Design of computer programs" over this: https://www.udacity.com/course/design-of-computer-programs--cs212 https://www.udacity.com/course/design-of-computer-programs--... I learned how to build a vocabulary for the problem domain first, and then use the vocabulary to solve the actual problem through this course. Norvig has great examples on bottom-up problem solving approach.
- agumonkey 4y agoThere needs to be a slight 'middle up' come back.
- pindab0ter 4y agoCould you elaborate on what that means a little?
- abecedarius 4y agoThey're both worth checking out. The biggest complaints I've seen about either were about the pace: slow for HtDP, fast for Norvig. I think HtDP's recipes are worth reviewing even if you'd get bored with its pace.
- waynesonfire 4y agoI'm so upset at my early educators that they did not expose me to lisp when I was first starting. Everyone leaving a CS education should work through SICP.
- fat_cantor 4y agoLately I've been wondering how different my life would be if my university had chosen LISP over PASCAL for intro CS, and introduced computation at a deeper level than 'for loops are great for computing the stuff'
- Hunterofemotion 4y agoApproximately how long does it take someone to read this entire book?
- sudopluto 4y agoIt took us a little less than a semester at Uni, so roughly ~2.5 months, if you are doing all the exercises? Note that this was 1/4 classes we were taking that semester, so probably less
- spdegabrielle 4y agohttps://ds26gte.github.io/tyscheme/index-Z-H-2.html#TAG:__tex2page_chap_Temp_2 https://ds26gte.github.io/tyscheme/index-Z-H-2.html#TAG:__te...
- newsoul 4y agoFrom a recent Reddit comment: https://www.reddit.com/r/compsci/comments/vyxqqt/comment/ig51svj/?utm_source=share&utm_medium=web2x&context=3 https://www.reddit.com/r/compsci/comments/vyxqqt/comment/ig5...
- b0afc375b5 4y agoI'm currently going through a youtube (edx?) video course[1] based on htdp, which I found through this hackernews comment[2]. I like it so far, but was initially surprised that there's a systematic way of designing programs. I've just been winging it throughout my self-taught career. [1] https://www.youtube.com/channel/UC7dEjIUwSxSNcW4PqNRQW8w/featured https://www.youtube.com/channel/UC7dEjIUwSxSNcW4PqNRQW8w/fea... [2] https://news.ycombinator.com/item?id=28351733 https://news.ycombinator.com/item?id=28351733
- macco 4y agoIMHO, the best introductory programming course there is. I worked through it when MOOC were still free. I think it is better structured than HtDP and the recipe pages in the wiki are priceless. Do they have a course website?
- b0afc375b5 4y agoI couldn't find the course site used in the videos, but I did find the design recipes and other info on edx: https://edge.edx.org/courses/course-v1:UBC+CPSC110+2021W2/77860a93562d40bda45e452ea064998b/ https://edge.edx.org/courses/course-v1:UBC+CPSC110+2021W2/77...
- 8589934591 4y agoIf anyone wants a faster paced version of the book or the edx course, here's a link to one of the authors' website having videos and problems/solutions. I have found this to be helpful to share with devs who have experience but would like to revisit fundamentals. https://www.cs.utah.edu/~mflatt/htdp-lite/ https://www.cs.utah.edu/~mflatt/htdp-lite/ https://my.eng.utah.edu/~cs5510/htdp-videos.html https://my.eng.utah.edu/~cs5510/htdp-videos.html Here's another course which I have used to train interns. It's faster paced and useful for people who learn and progress at a faster pace. https://web.cs.wpi.edu/~cs1102/a16/index.html https://web.cs.wpi.edu/~cs1102/a16/index.html Here's another version of the same/similar where the assignments are challenging enough. You can do them in either racket or pyret. https://cs.brown.edu/courses/cs019/2018/assignments.html https://cs.brown.edu/courses/cs019/2018/assignments.html
- Pr0ject217 4y agoThanks!
- billfruit 4y agoI do think Concepts, Techniques, and Models of Computer Programming by Van Roy and others, is a more comprehensive book on the same topic. It ties together a lot of programming into a systematic science.
- karakot 4y agoI actually prefer CTM over SICP. A really great book.
- newsoul 4y agoHere is a course (with videos) based on HtDP 2e: https://legacy.cs.indiana.edu/classes/c211/index.html https://legacy.cs.indiana.edu/classes/c211/index.html