Live data from Hacker News

Why Don't Schools Teach Debugging?

danluu.com

31–40 of 132 posts

Re: Why Don't Schools Teach Debugging?

#31
I find the professor's attitude quite puzzling. You often learn best when you have made a mistake, and then figure it out ("expectation failure"). Why not take advantage of that? I think bugs are quite useful as "teachers", as I discussed in "4 Reasons Why Bugs Are Good For You" http://henrikwarne.com/2012/10/21/4-reasons-why-bugs-are-goo...

Re: Why Don't Schools Teach Debugging?

#32
The more important issue, at least in my case, is that schools don't teach programming at all, only programming languages and programming is what you learn on your own while you write code, teachers don't help in that process.

Re: Why Don't Schools Teach Debugging?

#33

I find the professor's attitude quite puzzling. You often learn best when you have made a mistake, and then figure it out ("expectation failure"). Why not take advantage of that? I think bugs are quite useful as "teachers", as I discussed in "4 Reasons Why Bugs Are Good For You" http://henrikwarne.com/2012/10/21/4-reasons-why-bugs-are-goo...

[deleted]

Re: Why Don't Schools Teach Debugging?

#34
post #23

Earlier quoted context omitted.

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

Ouch. Does that imply that finishing in the top 80% of your class then put you somewhere near the bottom 33% of developers?

You are assuming that the best CS majors must obviously want to be commercial developers.

People go to grad school in other disciplines (sciences, stats, etc.) which can take advantage of computation, for one thing.

Re: Why Don't Schools Teach Debugging?

#35

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

https://www.sparkfun.com/ - get some toys and start playing. Hands on approach.

Re: Why Don't Schools Teach Debugging?

#36

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

What helped for me:

* Play with circuits all day

* Learn to grok math. No, really. Learn to understand the physical meaning behind what you write. Time integral of some signal? Oh, yes! It's energy = ability of that thing to do work. Fourier series => this signal written as a sum of sine signals which you can analyze separately (with all the implications that has for linear systems). That kind of stuff.

* Learn to look at circuits in terms of transformation of magnitude, phase, frequency, shape and nature of signals, not in terms of connections, adapting this to various use cases in circuits. There's no general answer for this; an inductor is sometimes there to "insist on keeping the current to a constant value", sometimes it's there to exhibit a greater impedance to high-frequency signals, therefore allowing -- along with the capacitor over there -- only signals of a certain narrow frequency band to pass.

* Learn circuits in terms of idioms. Try to look at schematics and understand that "this part" is a filter, "that part" is a preamplifier, "that part" is a current mirror used for biasing and so on.

Re: Why Don't Schools Teach Debugging?

#37

I find the professor's attitude quite puzzling. You often learn best when you have made a mistake, and then figure it out ("expectation failure"). Why not take advantage of that? I think bugs are quite useful as "teachers", as I discussed in "4 Reasons Why Bugs Are Good For You" http://henrikwarne.com/2012/10/21/4-reasons-why-bugs-are-goo...

henrik_w, the professor's attitude is not puzzling once you consider this... the teacher in question intentionally wants to make the students struggle, because it validates their own achievements.

Then you will see that it's not about the teacher doing the most to help the student succeed, it's all about the teacher's ego. Of course such an attitude is not one worth promoting, but everything in the article suggests this is what we're seeing.

Re: Why Don't Schools Teach Debugging?

#38

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

That's a common thing I didn't understand about my fellow CS majors. Many of them did not want to become developers and even took pride in the fact that they made it until the final exams without ever having to hand in a single programming assignment they did themselves.

Yes, these people have amazing careers in management and consulting ahead. Is this good for the industry? I doubt it.

For me, the purpose of a CS course is to make people reasonable at programming with an advanced knowledge about the remainder of the field. It's easier to teach a programmer formal CS methods than to teach a formal methods guy to program.

Re: Why Don't Schools Teach Debugging?

#39

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

Good logs have been especially useful while integrating new motion controls in our wafer handling robot. We have a vendor who's product sometimes does not respond correctly to motion commands. Before logging each movement command, debugging a weird movement error would involve repeatedly moving the robot until the error happened again. Now I just pull the last N commands out of the log file, reproduce the issue, and send a script to the vendor so they can fix it.

Re: Why Don't Schools Teach Debugging?

#40

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…

It also gives a huge advantage to students who've been coding for a few years, especially if they've been involved in open source projects. I used source control tools for my programming classes at uni (not a CS major) and it made me 50% more productive, easily.
Post reply on HN