7 ms·
Computer science, historically, has been a field filled with books that encourage you to write code while not particularly having you read much of it. K&R is a
by metagame 5y ago
Computer science, historically, has been a field filled with books that encourage you to write code while not particularly having you read much of it. K&R is a good example of this. PAIP went against this notion, and has you spend much of the book reading code.
Yes, this is taking the way learning is done in almost every case and field and applying it to programming. No, it still hasn't really caught on universally in computer science.
- hyperpallium2 5y agoSeems related to Alan Kay calling it a "pop culture". Or perhaps even "punk", meaning it's not learnt from the classics, or some "Elements" text, you just do it.
- throwawaylinux 5y agoI assure you he did not kick start that idea in computer science.
- nuclearnice1 5y agoWho did? (If anyone)
- zvr 5y ago"When was the last time you spent a pleasant evening in a comfortable chair, reading a good program?" -- the famous opening sentence of the column on Literate Programming by Jon Bentley with guest Don Knuth. Communications of the ACM, Volume 29, Issue 5, May 1986 pp 384-369 https://doi.org/10.1145/5689.315644 https://doi.org/10.1145/5689.315644
- throwawaylinux 5y agoI doubt anyone really, a lot of results and major work in computer science came from mathematicians and academia where reading had long been a primary method of teaching. There is a long and rich history of great papers and text books in early computer science. Even getting to the more applied side of things, books are common. Perhaps the most well known one https://en.wikipedia.org/wiki/The_Art_of_Computer_Programming https://en.wikipedia.org/wiki/The_Art_of_Computer_Programmin... predates Norvig by several decades (not that I think Knuth kick started the idea either). Yes it does have exercises after each chapter but these are far less than the very dense extensive reading content including application of algorithms (and questions are obviously optional, and in the typical style of math text books).
- metagame 5y agoTAOCP uses a significantly different methodology of teaching, and it's also very explicitly aimed at a significantly different market of programmer and in a significantly different area of endeavor within computer science. It's a great work (I'd be lying if I'd said I'd poured into the entirety of it extensively, but I've spent weeks on certain portions, like the MMIX fascicle and Sorting and Searching), but PAIP has a significantly better claim at "kickstarting" the "read code instead of write it" trend, because in TAOCP the code doesn't take center stage, and it was never the point for it to (hence the creation of MIX & MMIX).
- throwawaylinux 5y agoI didn't say it attempts the same thing, I said it's an example (just one of many) of learning by reading in computer science that long predates 1992. Pointing to examples (K&R) advocating learning by writing is not evidence that learning by reading was not widely known and used in computer science. That's a logical fallacy.
- metagame 5y agoI edited my comment pretty significantly to clarify; you might want to give it another look. Putting this comment here to avoid the "Wow, what an irrelevant comment" problem. You might find your comment, while a decent literal reading of my initial comment, might not hold up to the new one. I will point out, though, that I never said anything along the lines of "was not widely known [...] in computer science." What an absurd thing to accuse a comment of saying! I do insist that it wasn't widely used, though, and TAOCP, a series that's infamous for not actually being read often, isn't a great example of it being widely used, even if TAOCP did fit the criteria (which in my updated comment above, I contest).
- throwawaylinux 5y ago> I edited my comment pretty significantly to clarify; you might want to give it another look. Putting this comment here to avoid the "Wow, what an irrelevant comment" problem. You might find your comment, while a decent literal reading of my initial comment, might not hold up to the new one. I did not find that. This is the first paragraph of your edited comment: > For anyone not in the loop, Norvig was the author of Paradigms of Artificial Intelligence Programming. This was a substantial contribution to the field of educational computer science literature, and helped to kickstart the idea that the way to learn is to read, not just write. It's still wrong. It did not kickstart that idea in computer science.
- ksaj 5y agoThat might explain why so many people learning a novel programming language start, but nearly never finish, writing a book or tutorial about it. For example, there are far more incomplete Common Lisp tutorials than there are working / fleshed out code examples on GitHub. The endless unfinished tutorials and "books" are suspiciously similar, and nearly always give up at the same not-yet-practical level. The same goes for other technical subjects. Raspberry Pi is another area where you can find different versions of nearly the exact same incomplete tutorials everywhere.
- pvarangot 5y agoThis is because there's a point where you can do something but you don't know how, less even how to explain it. If you ever mentor a more junior engineer this comes up all the time, like "yeah I have no idea why you broke the build, we can fix it together but I am not sure I can step by step explain all my actions".
- bluejekyll 5y agoHas it not caught on because it might not align with people’s experiences? I know for me, reading is only the first step in learning. Doing is far more educational, and often when things go wrong, I go back and read it again. So I wouldn’t argue that reading isn’t worthwhile, but at least in my experience reading is only 50% of my learning process, I might I’m even go lower than that, 20-40% range. As an example, I read the Rust Book beginning to end, but it wasn’t until I started writing code with it that I truly understood some of the concepts, like move-by-default. When I read about move-by-default, I understood what it was saying, but I only grokked it after writing code and experiencing it—and at the same time realizing that it was the first time I’d actually worked with a language that had that as a fundamental piece of it. I have a lot more examples like that, just happens to be a memorable one.
- dhanna 5y agoThis just shot PAIP to the top of my reading list. I’m going to go grab it now.
- metagame 5y agoI hope you enjoy it! I got a lot from checking it out.
- adrianmonk 5y ago> K&R is a good example of this. I don't see how K&R can be a good example (or a bad one or any kind of example at all) in the context of computer science education. Its purpose is to teach the C language to experienced programmers. It has no aspirations of teaching computer science. K&R is not even about teaching you to code. It says in the preface to the first edition that it assumes you already know concepts like loops and assignment statements. It also says if you're a beginner, you need to supplement the book by seeking the assistance of someone with more experience.
- metagame 5y agoK&R is still an example of computer science education. Programming languages are a subset of computer science, it's a book that tries to teach you a language. There's a substantial body of evidence in linguistics research that input is just as important if not more than output when it comes to learning a natural language; programming languages are no different.
- barry-cotter 5y ago> Yes, this is taking the way learning is done in almost every case and field and applying it to programming. No, it still hasn't really caught on universally in computer science. Man, it's almost like a field accidentally discovered a better way of working and other people are slowly trying to make them more normal. Learning by fast feedback on individual action is better than learning by reading and not acting.
- throwawaylinux 5y agoIt's not like that. "Learning by doing" predates language much less writing. Apes do it. Many animals do I'm sure. That has never gone away even from the most stuffy old elitist realms of academia, has it?
- speedcoder 5y agoHmm. Does language itself come from inventing a way to express what one wants to express? What would Chomsky say? https://youtu.be/hdUbIlwHRkY https://youtu.be/hdUbIlwHRkY
- kortilla 5y agoK&R doesn’t even come up in a computer science education. The algorithms class I took 25 years ago now was mostly reading and writing algorithms by hand on paper. I think maybe you’re referring specifically to learning how to program and not computer science at all. Because nearly every CS curriculum was dominated by a lack of hands-on programming and only in the last decade or so became more code-writing focused, which is exactly the opposite of the narrative you are painting here.
- dekhn 5y agoThe malloc exercise in K&R is CS.
- dragonwriter 5y ago> K&R doesn’t even come up in a computer science education. K&R was the main textbook for my first university CS class at Caltech in 1990. (Though, to be fair, the bulk of what I would call “computer science” as distinct from “mechanics of programming in the language used for the class” of that class was taught through other means, but still.)
- pvg 5y agoAll the code in TAOCP is read-first, since you're not readily going to type it in and run it at all.
- fsloth 5y agoI find programming is fairly analogous to math, music, classical art and any other endeavor with both complex analytical component and complex practical component - you need both to study examples and prior art, and do lots of exercises yourself (unless one is genious/savant in which case pedagogy conventions seldom seem to apply).