Computer Systems: A Programmer’s Perspective, a textbook by Bryant and O’Halloran, is in its third edition and also its third decade of teaching students falsehoods about C
switching over to codegen for overflow checking for addition, we don't appear to get optimal code for any of the obvious ways to do it, from latest GCC or LLVM, unless we use the intrinsic
@regehr I almost didn't graduate because of crap like this, it really sucked the credibility out of the entire university system. Especially since I was barely scraping by, paying my own way through college, and then what is my money going towards? Between being told that every C++ instance has its executable code copied for every method, being assigned UML diagrams by profs that obviously had never written a line of code in their life... ASU CS program was a shit show
@andrewrk@regehr in one of the few programming courses I took, I had an instructor take off points on a program because I used a function-like macro and they couldn't find the function that I was invoking.
A few years ago, I volunteers was one of the "industry" types who review student code for MIT's 6.172 "Performance Engineering" course. It was a maddening experience; often the grad students teaching the course would give advice that was a) wrong, and b) contradicted the industry people. Many times, the reviews were extra difficult because the code from the instructors was incorrect.
We started begging them to give us their code (the assignment frameworks and so on) to review _before_ they gave it to the students, but they kept telling us they were too busy with research and couldn't do it. Finally I had to ask, "if you're too busy to do the bare minimum to avoid wasting _my_ time, why should I continue volunteering?"