3 ms·
Isn't K&R's book littered with code examples that were canonical in the 80's but have glaring security holes? I wonder whether it's a good idea to have students
by adrianN 10y ago
Isn't K&R's book littered with code examples that were canonical in the 80's but have glaring security holes? I wonder whether it's a good idea to have students work through "the bible". Hopefully they provide extensive exegesis in the lectures.
- aisofteng 10y agoIntroductory programming language texts do not concern themselves with "security holes" usually. This is a strange criticism.
- Manishearth 10y agoSure they do. To clarify, GP here is probably talking about UB security holes, not stuff like XSS. Most intro texts I've seen have "watch out!" notes all over the place.
- adrianN 10y agoTeaching C without teaching buffer overflows and undefined behavior is reckless.
- taneq 10y ago> I wonder whether it's a good idea to have students work through "the bible". That's probably a pretty good analogy - it's useful maybe for historical value, but it has to be understood that some of what's listed is no longer best practice and you can't, for instance, go around stoning adulterers and amputating thieves' hands.
- pjc50 10y agoNeither K&R nor K&P include any network-facing or security-boundary-crossing code, if I remember rightly.