Live data from Hacker News

Why Don't Schools Teach Debugging?

danluu.com

11–20 of 132 posts

Re: Why Don't Schools Teach Debugging?

#11
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 reluctance is that by the time we'd graduate it will be sort of outdated. I remember we learned subversion and Apache Ant. Everyone now uses git and I'm not even sure if anyone uses Ant

95% of students used std::cout for debugging and 95% of students never set up an IDE.

If I had spent a couple weekend properly learning to use Visual Studio, all of my programming assignment for those 4 long years would have been 10x easier.

Re: Why Don't Schools Teach Debugging?

#12
post #8

Because it isn't fun or exciting.

What do you mean? It is both fun and exciting. It's like solving little mini-mysteries. Hmm, how come this variable is null here? That shouldn't be possible! But it is, so how did that happen? Mystery!

You can also learn from it. Often a bug is caused by some misunderstanding, so figuring that out teaches you something. Here's an example where I learned several things finding and fixing a bug: http://henrikwarne.com/2014/01/27/a-bug-a-trace-a-test-a-twi...

Re: Why Don't Schools Teach Debugging?

#13

The best way to find the source of a problem can be summed up in two words: binary search. On the other hand, having witnessed humans physically search for things in ordered collections, it seems we're instinctively programmed to perform a linear search.

In my experience, good logging is the first step to good debugging. Having good logs lets you find a lot of problems without even debugging "properly" (using a debugger say). http://henrikwarne.com/2014/01/01/finding-bugs-debugger-vers...

Re: Why Don't Schools Teach Debugging?

#15

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…

The purpose of a CS course is not necessarily to teach people to become developers. Indeed it would be interesting to know what % of CS grads even work as programmers post graduation, probably less than HN would imply. Based on the people I keep in touch with from my graduation class, I would put it somewhere near 30%.

Re: Why Don't Schools Teach Debugging?

#16

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"?

Re: Why Don't Schools Teach Debugging?

#17

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"?

> 15 years of experience playing around with electronics

Re: Why Don't Schools Teach Debugging?

#18
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 for harder problems I know have a richer set of tools to work with.

[1] https://www.udacity.com/course/cs259

Re: Why Don't Schools Teach Debugging?

#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.

Re: Why Don't Schools Teach Debugging?

#20

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…

The purpose of a CS course is not necessarily to teach people to become developers. Indeed it would be interesting to know what % of CS grads even work as programmers post graduation, probably less than HN would imply. Based on the people I keep in touch with from my graduation class, I would put it somewhere near 30%.

I'm curious - what do the remaining 70% do?
Post reply on HN