Live data from Hacker News

Why Don't Schools Teach Debugging?

danluu.com

71–80 of 132 posts

Re: Why Don't Schools Teach Debugging?

#71
The author mentions the answer in the first paragraph:

    ECE 352 was the weedout class that would be responsible 
    for much of the damage.
Weed out courses are common in undergraduate education. In some disciplines the logic is plausible because the resources available for upper division undergraduates are limited and vast numbers of Freshmen choose the track. The first year biology sequence is a good example.

The problem is that weed out classes substitute the easier task of deciding who is prepared for the harder task of preparing students. The author's success in the class was primarily due to the skills and knowledge they brought to the first lecture: relative success in the class was not a result of what was taught but of what was not taught. The "difficult" final still only required a few hours coding and not developing the habit of coding every day for several hours.

In my field, architecture, structures is the notorious weed out class at the undergraduate level, and truss design is the the rock which dumps all but an arbitrary few into the sea. Architects don't design trusses in contemporary practice. Hell, outside engineers employed by fabricators structural engineers working on buildings rarely design trusses (mostly they specify their structural requirements).

But my structures course was different. I studied architecture in grad school. Grad schools weed out during admissions and afterward their goal is largely to prove they made the correct decision. Having been in the industry before schooling. I could see that my structures course taught the important elements for practising and skipped the difficult for the sake of difficulty.

Interestingly, participating in Coursera classes I have seen that the more accomplished teachers tend to focus more on what is important and less on how hard the class should be. When the instructor wrote the book, maybe they know that the ideas are hard enough.

Re: Why Don't Schools Teach Debugging?

#72
post #48

Earlier quoted context omitted.

Various things, a common aspiration was to try and fast track to a management position at a consultancy or blue chip where things were are more about spreadsheets than code. Others do technical work, but not strictly development like Q&A or technical support. Some went into academia and some did other things altogether, I know at least one person who became a tree surgeon and another who is a session musician.

If Q&A is QA then it should be considered development, in a specialized domain.

except you just click things on a GUI there.

Re: Why Don't Schools Teach Debugging?

#74

I did an electrical engineering course. Especially with hardware ("welcome to tweak week"), there was a real sink or swim approach. I ended up feeling like it had to do with testability. It's easy to grade a test if you just look for right answers, and mark everything else off. It's easy to grade labs if you just look for the circuit tracking the input frequency. Grading either based on some assessment of how well th…

Does anyone have advice for learning this kind of "intuitive, heuristic, holistic way of grokking circuits"?

Reading application notes can be helpful . They hold plenty of knowledge and in many cases they are described in a less formal more intuitive way.

Re: Why Don't Schools Teach Debugging?

#75
I’m no great teacher, but I was able to get all but one of the office hour regulars up to speed over the course of the semester.

The first part of the sentence is in direct contradiction to the second part. If you did that, it means you had patience, were willing to explain, re-explain, and find alternative ways to explain. And you cared.

Re: Why Don't Schools Teach Debugging?

#76
The short answer is because they're supposed to figure it out themselves.

I've been on the teaching staff of CIS 120 and CIS 121 at Penn for five semesters now (the second and third classes in the intro computer science series). Both have units on debugging, both in Eclipse and independently of an IDE. We teach students proper testing fundamentals, how to use the debugger, and how bottom-up design can make debugging much simpler.

However, it's up to the students to actually use these tools and techniques to figure out why they're so much more effective than print statements. (After all, could you imagine taking French while never having to speak or listen? Piano while never touching an instrument? Same principle here.) Some students will learn to use these tools quickly, but others can still logic through these courses.

However, everyone eventually learns. Take CIS 380, our operating systems class. The final project involves building a simulation OS with kernel, scheduler, file system, shell, etc. Pretty much all system calls aside from read, write, malloc, and free are written from scratch. Even for the hotshots that didn't need to learn how to debug, they eventually learn to use gdb, because you simply can't logic your way through several thousand lines of C, even if you did write them all yourself.

Any computer science or engineering curriculum that doesn't teach debugging fundamentals does students a disservice. However, we can't directly force students to practice these skills. It's up to them to try applying these techniques.

Re: Why Don't Schools Teach Debugging?

#77

I never knew this was a problem in EE, but I know for a fact it's a huge issue in CS. They don't want to teach any "tools" b/c CS professors find teaching people how to be good developers as beneath them. They honest to god think CS is an actually hard science on par with math and physics. You can sum up their attitude with: "It's not an associates degree goddamnit!" (even though it should be) Another source of reluc…

Print statements for debugging is not necessarily a bad thing: http://www.scott-a-s.com/traces-vs-snapshots/

Re: Why Don't Schools Teach Debugging?

#78

It's certainly not exhaustive, but Andreas Zeller's Udacity course[1] has helped me bring a more systematic, methodical approach to my debugging sessions. In addition, his focus on using using tools to assist our debugging effort has encouraged me to automate a lot of what I would previously have done manually. I'll admit my first instinct is still to throw in a couple of printf statements and see what they say, but…

Those course videos have an lite-ASMR inducing quality to them, if you are into that sort of thing.

Re: Why Don't Schools Teach Debugging?

#79
post #19
post #2

Yeah there are two fundamental things that are not taught well in many (not all) computer science programs. 1. Debugging as the author explains. 2. How to properly use version control and work with others using version control on the same codebase. Hopefully Github for education will help with this one.

The author is talking about engineering not cs classes. That being said, I would completely agree with you, having been through a cs degree myself. Version control and working in a group with it would have been very beneficial in school. Although, when I was in school that would have meant svn not git which I have grown to love, but felt the pain of having to learn the hard way.

Who the heck went through a CS degree without using version control? We used it from day 1 until graduation and you didn't get credit if you didn't use version control, even on your projects you did yourself. How does one do group projects in school without version control?

Git didn't exist when I was in school either.

Re: Why Don't Schools Teach Debugging?

#80
post #61

I never knew this was a problem in EE, but I know for a fact it's a huge issue in CS. They don't want to teach any "tools" b/c CS professors find teaching people how to be good developers as beneath them. They honest to god think CS is an actually hard science on par with math and physics. You can sum up their attitude with: "It's not an associates degree goddamnit!" (even though it should be) Another source of reluc…

CS prof. here. We don't want to teach "tools" (e.g. IDE) because they are always changing. There is no point is knowing how to set up an IDE when the IDE will have a different GUI before the student graduates. We teach"unix tools" a bit more because they did not change much during the last decades. My goal is to teach "concepts" (which is hard) and use tools as examples of these concepts. Dealing with the specifics o…

The tools for debugging have changed yes. But the high-level process is the same whether it is fixing a NAND gate, figuring out the cause of a segfault, or finding a the location of the leak in a water pipe.

There is a problem. Many of the interns and recent CS grads I have worked with or hired have struggled with debugging. On a day to day basis, debugging is one of the most important skills. I would argue it is also an important skill in research settings, not just industry.

I don't know the answer, but maybe somehow integrating debugging into every CS class over the four years would help. Because you are right, it also requires a lot of practice/experience to get good at it so it is unlikely that just adding a class would solve the problem.

That is what the Purdue psychology program (I have a minor) does in its undergraduate program. The first 2-4 weeks of every class is spent on research methods often specific to the particular topic of the class. After taking the 4-5 classes to complete the minor, how to reduce bias in surveys, usability tests, etc was beaten into my brain.

Post reply on HN