8 ms·
When I started my CS degree the school was transitioning from teaching C++ to teaching Java, and the state of instruction in C++ was almost as bad as these exam
by phaedrus 8y ago
When I started my CS degree the school was transitioning from teaching C++ to teaching Java, and the state of instruction in C++ was almost as bad as these examples. I had a professor who wanted us to use "new Foo()" everywhere in our code (even local / static variables) because it, "gets the students ready for Java." No matching delete, of course, or mention of RAII. We were supposed to "pretend" we had a garbage collector. By that logic one might prepare students for a course in Spanish by speaking English with a "-o" on the end of every word.
On one of the early homework assignments I realized my professor misunderstood how pointers work - he seemed to believe that (re)assigning pointers created chains rather than changing what the pointer points at. I.e. given "int x,y; int_pointer a,b,c; a=b=c=&x;" he seemed to believe that then executing "c=&y;" would also cause "a" and "b" to point at "y".
I spent the first page of my turned-in assignment excoriating his lack of understanding. Then I presented a class template that implemented a special smart pointer which did behave in the unusual way he seemed to think C pointers work, so that I could write the code exactly as he presented in the assignment and make it actually work.
In retrospect I could have been nicer and considered other pedagogical factors beside technical correctness. I think he took it with more grace than I deserved.
- Improvotter 8y agoSome of my professors also have ridiculous code standards or exam standards. One of them teaches "algorithms and data structures", but he's not allowing us to even use a break or continue in our loops because he thinks it's "bad practice". We end up with a nested hellhole. Another example from the same professor (correct me if I'm wrong on this as I'm not a C++ expert), but he's constantly inheriting from unique or shared pointers in his classes. Like why though? Why do you have to complicate your code like this? Why can't you just have a normal class with unique or shared pointers in it? Lastly, and this is taught by another professor, is my class for Linux. It includes bash and C++ programming and focuses a bit on the POSIX API. Our exam was last week and we had 3 parts. The first part was a theory exam by the professor that taught the class. It was about bash/POSIX commands and very little Linux specific stuff. He expected us to know all of the options from all of the commands you can think of: cut, split... You had to know all of them and off the top of your head. It's ridiculous. I'm pretty sure I failed that one, but I absolutely nailed the next part which was about bash scripting (where you could use if statements and the like, the first part did not allow it, only redirection and piping). The man is mad (hah man, that's what I needed during that first exam part).
- 0xffff2 8y ago>Another example from the same professor (correct me if I'm wrong on this as I'm not a C++ expert), but he's constantly inheriting from unique or shared pointers in his classes. Like why though? You are not wrong. This completely breaks my brain. I really would love to hear the professor's explanation for this.
- daemin 8y agoThe same thing as people inheriting from standard containers. It does not make sense! It's like people see inheritance and then forget that containment is a thing.
- burfog 8y agoClearly, by banning break and continue, he was hoping that you would discover setjmp/longjmp.
- 08-15 8y ago> he's constantly inheriting from unique or shared pointers in his classes That happens when you learn OOP from a bad teacher or text book. Far too many books focused entirely on class hierarchies, as if an inheritance diagram was an almost completed program. That leads to a weird kind of brain damage where you think all problem can and must be solved by inheriting from something. It was the STL that taught people that algorithms matter more than taxonomies, but clearly some professors never got the memo.
- baud147258 8y ago> he's not allowing us to even use a break or continue in our loops You can use a goto then... (yeah, even worst practice, but as long as it's allowed)
- Sohcahtoa82 8y ago> but he's not allowing us to even use a break or continue in our loops because he thinks it's "bad practice". I will never in a million years understand why some people believe this.
- ben509 8y ago> I think he took it with more grace than I deserved. That kind of righteous fury is very common in high school and undergrads. Teachers have to perform in front of a tough crowd.
- btschaegg 8y ago> Teachers have to perform in front of a tough crowd. Certainly true. OTOH, there's hardly anything worse than a teacher with Dunning-Krunger syndrome when it comes to conveying the essentials of low-level programming to newcomers, so I would say that such a reaction is justifiable to a certain extent (as long as the tone wasn't too aggressive). Of course, it doesn't necessarily have to be the teacher's problem. I remember my first programming teacher in high school explaining in the very first lesson that honestly, he didn't have much programming experience (being a math professor) and had just dabbled a bit with pascal, but [sic] "the administration desperately were looking for someone to teach this course" and he didn't really have a say in it.
- klibertp 8y ago> I think he took it with more grace than I deserved. You mean he gathered all of his students, colleagues, and superiors; officially admitted to faking knowledge where there was none, and solemnly apologized, promising never again to teach things he doesn't understand? I somehow doubt it, even though teaching nonsense to eager youth from the position of authority is an offense damn close to sexual molestation of minors. Dealing with subtly (or not so subtly) twisted minds, and holes (and lies) in knowledge, of the corrupted students happens years later and is someone else's problem, but it's all caused by teachers like this. I don't see anything graceful in it, at all.
- erikpukinskis 8y ago> teaching nonsense to eager youth from the position of authority is an offense damn close to sexual molestation You really think this?
- _kst_ 8y ago> ... an offense damn close to sexual molestation of minors ... Wow, that's remarkably offensive.
- klibertp 8y agoNo, well, I mean it. I mean, the mechanism is actually similar: there's a "grown-up" (teacher) who uses their authority to convince a child (student) that something wrong (sex-related, or bad semantics of pointer assignment) is actually OK (and will come up on the next test), which then haunts that child (student) well into adulthood (job). Of course, the degree of harm done is on a completely different level, I'm not arguing that it's the same! But there are undeniable similarities in how this works. The comparison is obviously exaggerated, but by using it I want to change how teaching nonsense is seen, from a minor transgression to a major offense that it is. I just can't understand why teachers are not judged by the same standards that lawyers and doctors are. The damage bad-educators do is very real. It may not look bad on average, but in specific cases, it can be really devastating to students' minds (vulnerable as they are). Is it because people being taught don't (in general) vote? Or for some other reason? I don't know, but I don't think a bad educator should have an easier time than a bad doctor, who (at least in theory) would be removed from the profession outright if found out. Instead, bad teachers are left alone or sometimes transferred, and that's it. It looks incredibly similar to how some churches handle offenses of their priests. If you're a teacher, please realize that you're partially responsible for the future life of many of your students, and start acting like it. Removing people who are not qualified (to teach) should be a priority in your school like it is in courts and hospitals. Please, stay cautious and vigilant, and don't let your colleagues tarnish the profession's reputation by teaching things that are provably (and, sometimes, obviously) wrong.
- oselhn 8y agoI worked on real program developed this way. It was Android/iOS tablet application with large part done in C++. C++ part was somehow generated from Java prototype and development was than outsourced to India. Those guys probably never seen C++ before, so they assumed program is correct and they used same style to extend the application. US managers were just filling reports with green/yellow/red markers preparing for release and having no clue about real state of the app. I worked for another contractor which was also working on this project (there were about 50 people working on small tablet app). I tried to fix those issues but it was really too much work and some guys just continued to broke the program as they really believed they are doing good job. So I decided to find another job and never work for huge US corporation again.
- phaedrus 8y agoI have at times worked with people who, when the TFS task said, "implement this feature", interpreted it to mean "write code vaguely resembling this feature and mark the task complete" but not "test the code works" or even "run the code at least once". It was, apparently, someone else's (whose?) responsibility that the program as a whole actually work. I tried explicitly writing "and write the test and make sure it passes" in the task, and others on the team successfully argued that that is two tasks (we were rated on task completion). But when I made that a separate task, often a different person would end up assigned the task of fixing the result of the other. Anyone who cranked through a lot of the former was rewarded by management for getting so much work done, those who undertook the latter were seen as wasting time perfecting something that was already (supposedly) "done".