Only to spend 3+ hours troubleshooting other things, discovering in fact, it was the simple dumb thing.
Only to spend 3+ hours troubleshooting other things, discovering in fact, it was the simple dumb thing.
I TA'd a course in college that (among other things) was the first introduction that CS students at my school had to C programming. Since most students had no prior experience with anything besides Java (and a little OCaml, because one of the intro courses was half Java and half OCaml), they often would be at a complete loss of how to debug errors with pointers, string handling, etc. Whenever I tried to help students debug something in office hours, they would try to steer me away from looking in certain parts of their code because they "knew that was correct", and quite often the error would be in one of those parts of the code. The lesson I tried to teach them was that if you thought you wrote all your code correctly but it still doesn't work correctly, then you must have been wrong about something, so you have to be ready to challenge your assumptions about what's working and what isn't.