Live data from Hacker News

How to Design Programs (2014)

htdp.org

111–120 of 141 posts

Re: How to Design Programs (2014)

#111
post #54

I am self taught, I worked as a lawyer for six years and four of those were spent prepping for a career change - self-teaching comp sci and software dev in the evenings, then working as a volunteer a few years in. (I come from an engineering family and should have just done it from the start, but oh well.) I'm not sure if it's still on the platform, but about a year into my self studying I took a series of courses on…

I think these are the 2 courses OP is talking about: https://www.edx.org/course/how-to-code-simple-data https://www.edx.org/course/how-to-code-complex-data

I believe op is talking about the entire sequence where after those 2 you learn java and typescript. I also took the entire sequence the java one was really good at explaining aliasing problems, how to figure out an existing codebase by yourself, and all taught by UBC profs.

The two intro courses that use htdp are not nearly as rigorous as the book, you never get to see anything difficult enough to warrant using the design recipes where the book you begin to appreciate that style more and more as it gets harder.

Re: How to Design Programs (2014)

#112

I see a lot of mentions of SICPm, it this book meant to be an update of or at least inspired by SICP?

It is inspired by SICP, but in the sense that it fixes what the authors consider to be problems with SICP's approach. They've published various papers on their criticisms of SICP, eg http://www.ccs.neu.edu/scheme/pubs/jfp2004-fffk.pdf

Re: How to Design Programs (2014)

#113

Earlier quoted context omitted.

I never understood the appeal of this, or SICP, or Scheme in general. I learned much more about computer science reading algorithms and data structures textbooks, especially Knuth. There's a reason MIT uses Python for its intro courses now, after all.

> There's a reason MIT uses Python for its intro courses now, after all. Yes, and IIRC, that reasons were, roughly: a) Python is more popular, b) Python has better robotics libraries, which is what kids coming to MIT care about these days. Notably, I don't recall the reasons they given having anything to do with giving students a good fundamental understanding.

But this is exactly my point. I think it's essentially a myth that Scheme/SICP are somehow more well-suited to providing a "good fundamental understanding." And Python is, as you point out, more practical and accessible.

Re: How to Design Programs (2014)

#114
post #32

Earlier quoted context omitted.

Yes, I agree, that is a caricature. More seriously, I think leaning on this language-specific feature in a book that's supposedly teaching "general programming 101," or whatever, is in bad taste. As it says: > One reason that the distinction between process and procedure may be confusing is that most implementations of common languages (including Ada, Pascal, and C) are designed in such a way that the interpretation…

I wouldn’t really call tail-call elimination a feature, language-specific or otherwise. Instead, I would describe the lack of it as a bug. If you examine what’s actually going on in compilers that lack tail call elimination, what you witness is the saving of registers to the stack whose values are provably never going to be used.

You contend that all C compilers prior to their introduction of TCE were bugged?

Re: How to Design Programs (2014)

#115

Earlier quoted context omitted.

> To caricature SICP-style instruction a bit, I'm imagining someone learning that recursion is useful (Scheme peeps seem to love it) without also being taught it generally has poor performance characteristics. SICP teaches that recursion can have bad performance and how to use it without blowing the stack or wasting time with unnecessary computations. Scheme, the language, requires tail call elimination so compilers…

Yes, I agree, that is a caricature. More seriously, I think leaning on this language-specific feature in a book that's supposedly teaching "general programming 101," or whatever, is in bad taste. As it says: > One reason that the distinction between process and procedure may be confusing is that most implementations of common languages (including Ada, Pascal, and C) are designed in such a way that the interpretation…

SICP point is that you can implement a for loop with tail recursion easily but not viceversa.

Re: How to Design Programs (2014)

#116
post #105
post #42

Earlier quoted context omitted.

Once a SE discovers that they can learn, quite significantly, in a language that may have very little practical day to day use, it's a powerful moment. Sometimes the best tools for teaching aren't the tools we need in our day to day work, and that's ok. When you're in learning mode, it's about discovering those foundational blocks upon which all else is built. Those fundamental blocks are never the actual programming…

I'm sort of experiencing this myself. Currently learning C even though it's not practical in my day to day. My main language is Python and sometimes Scala. Learning about memory management, pointers, etc., has been eye opening to me (I studied math but not CS in college) and I've taken the opportunity to start digging into the CPython code base to see how Python handles things under the hood.

CPython is an excellent C code base to learn from. Readable despite being battle hardened and functional. Lisp tho is a wonder of a deeper kind - towers of dazzling beauty and power. I still recommend On Lisp by Paul Graham. And no, one won’t be using it day to day. But it will carve grooves in your brain that make you forever a deeper thinker about the possibilities of software.

Re: How to Design Programs (2014)

#117

Earlier quoted context omitted.

Sounds like the reasoned schemer!

The whole series is very high grade. I don't appreciate the dialogue format all the time (too fine grained and a bit distracting after the first book). But high density of knowledge here.

Seriously these are not quick reads. If you don’t feel your conceptual space expanding every few pages you are surely missing something.

Re: How to Design Programs (2014)

#118

I never understood the appeal of this book.

'Concepts, Techniques and Models of Computer Programming' by Peter Van Roy and Hadidi may be a better book than this and even SCP, since it presents a well organized "science" of computer programming..

I've read both SICP and CTMCP and would recommend the latter as a first read. Sure the language it teaches in is not practical, but I actually found that to take away the distractions of reading a book in whatever your target language is. Also its the first book that got me thinking about how programming languages actually work and what actually happens under the hood when you're writing code. Great book.

Re: How to Design Programs (2014)

#119
post #61

Earlier quoted context omitted.

Yes, I would like to know too.

The book is indeed http://t3x.org/amk/ I ordered a paperback at: https://www.lulu.com/en/us/shop/nils-m-holm/logic-programmin... in-scheme/paperback/product-1z82nmng.html?page=1&pageSize=4 It was absolutely worth it.

Thanks.

Re: How to Design Programs (2014)

#120
post #87
post #53

Earlier quoted context omitted.

This is basically just Scribble (docs for Racket). If you have input, I'd venture to guess contributions are more than welcome! https://docs.racket-lang.org/scribble/

That is always the response when people point out scribble output is unusable on many phones. But in fact people have offered fixes and they were rejected. Were they high quality fixes? I don’t know, not knowledgeable about CSS. I don’t think the project maintainers consider being useful at all on mobile a goal of scribble. So I would say, contributions do not seem to be welcome on this topic.

And here is the relevant issue if you want some CSS that might work a little better:

https://github.com/racket/scribble/pull/62

It's pretty clear from this that scribble will never support mobile. I can't remember if I pulled the CSS from this change or if I came up with something myself, but making it work slightly better on my phone at least was a pretty small change, not sure if I have it around still or not.

Post reply on HN