Live data from Hacker News

Why don't schools teach debugging? (2014)

danluu.com

141–150 of 174 posts

Re: Why don't schools teach debugging? (2014)

#141
post #138

Earlier quoted context omitted.

That sounds like awful pressure to not rock the boat of your study group but maybe it's suitable for lawyers. Cheating was solved in an engineering class I took that had us write a program in our own time, but the assessment was a test where we were asked to modify it and produce the correct output. If you had copied the code without understanding it, you wouldn't be able to pass the test.

A rigorous honor code also solves the cheating problem, as long as the administration actually enforces it by expelling violators.

The problem is actually getting administration to enforce their zero tolerance policies: expel cheaters despite the fact that they pay a hefty tuition.

Re: Why don't schools teach debugging? (2014)

#142
Debugging is a valuable skill that some of us were lucky enough to pick up by chance. A friend recommended an excellent book that very nicely explains the process: "Debugging: The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems"[1]. I found myself nodding along while reading. I think this would have been a hugely valuable primer if I had been exposed to it before I figured out how to do it on my own.

[1]: https://www.amazon.com/dp/B00PDDKQV2

Re: Why don't schools teach debugging? (2014)

#143
post #95

It is a task that shouldn't be learned in university but in middle school. And it's not just useful to stem, it's useful to many things in life. E.g. a disagreement between two educated, smart people usually can be resolved by debugging how everybody got to their point of view and then flashing out the details. It's also how you figure out why the toaster isn't working any more, or why your wife left you. It's also a…

Your comment couldn't be more on point. I viscerally disagree with the direction that a lot of "coding" initiatives are taking in schools nowadays. The claim is that the intentional move away from actual computer science is that it is a way to attract more people. Fine. But when the course is just about making "whatever you want," then that really valuable time of learning these debugging skills gets missed, 'cause y…

[deleted]

Re: Why don't schools teach debugging? (2014)

#144
post #95

It is a task that shouldn't be learned in university but in middle school. And it's not just useful to stem, it's useful to many things in life. E.g. a disagreement between two educated, smart people usually can be resolved by debugging how everybody got to their point of view and then flashing out the details. It's also how you figure out why the toaster isn't working any more, or why your wife left you. It's also a…

One of the first computer class lessons that I remember--in maybe 4th grade?--taught us to use Yahooligans and Altavista and such to research a topic. Incredibly valuable to ingrain at that age the idea that the best way to figure something out is to start running vague queries until you understand enough to synthesize an answer or a theory.

Re: Why don't schools teach debugging? (2014)

#145
post #95

It is a task that shouldn't be learned in university but in middle school. And it's not just useful to stem, it's useful to many things in life. E.g. a disagreement between two educated, smart people usually can be resolved by debugging how everybody got to their point of view and then flashing out the details. It's also how you figure out why the toaster isn't working any more, or why your wife left you. It's also a…

Agree in principle. Another way of putting it is, debugging is another word for applying the "scientific method." E.g., experimental vs control group is a useful concept in debugging

Yes! I've been saying this forever -- debugging is a science.

The best way to find and fix the toughest heisenbugs is to a) form a hypothesis as to what might be happening, b) figure out what would falsify your hypothesis, c) run an experiment that must make the bug happen reliably iff your hypothesis is correct, and finally d) figure out the solution.

Steps a-c are precisely the scientific method.

Re: Why don't schools teach debugging? (2014)

#146
post #135
post #95

It is a task that shouldn't be learned in university but in middle school. And it's not just useful to stem, it's useful to many things in life. E.g. a disagreement between two educated, smart people usually can be resolved by debugging how everybody got to their point of view and then flashing out the details. It's also how you figure out why the toaster isn't working any more, or why your wife left you. It's also a…

I never got military education, but I have to say I admire how well military personal can respond to problems. Anybody have insights how they get educated and if that could be applied to programming/debugging as well?

I have some insight, but not as much as someone who's actually went through formal training.

It's a mindset issue. In the military, a soldier is a tool to get a specific job done. The soldier must understand this and shed away his ego and any ideas he has about his "self."

He must understand that he is a cog and his only job is to be the perfect cog.

This could be applied to programming to increase efficiency, but I'm certain most programmers (and the HN crowd in general) won't be happy with what's to be expected of them.

The success of the mission rests on appointing a competent commander (CEO/Manager/Etc.) that'll make all the final decisions and having soldiers (employees) that can zero-in on doing exactly what the commander tells them to, even at the sacrifice of their comfort.

There's a lot of ego and self-identity in the programming world which collides with the very essence of the "military way of doing things."

Re: Why don't schools teach debugging? (2014)

#147
post #85
post #14

Earlier quoted context omitted.

But at the same time more than half of the professional web developers I know don't really use a debugger. Equally problematic. I wonder how much that has to do with tooling? When programming in python I run everything in a debugger basically all the time. When doing JavaScript front-end work it's back to print debugging.

I almost always start with thinking about where the bug is likely to be, then doing some print/log debugging to confirm or reject my suspicions. I find it pretty effective and simple to do. Debuggers are complicated and create dependency. How many developers do you see every day just sitting at their computer tapping "step" ... "step" ... "step" for hours. I'll break out a debugger if all else fails, but it's not my…

With frontend JS, I usually find the friction of using a debugger lower than the friction of adding logging since I don't have to reload to add/remove it. You can even add a conditional breakpoint that logs and always returns false to capture the effect of adding a log statement.

I rarely use the step functionality, though, because it just takes too long. More frequently when I hit a breakpoint, I examine the current state, figure out the next place that I am interested in stopping and then add a breakpoint there before resuming.

Re: Why don't schools teach debugging? (2014)

#148
post #96
post #34

> why schools don’t teach systematic debugging. It’s one of the most fundamental skills And herein lies Dan Luu's fundamental misconception: that universities see themselves as places where students come to learn skills , i.e. as places of certification producing skilled workers for industry. Most universities see themselves as academic places of learning for the pursuit of knowledge for knowledge's sake, which only…

> places of certification producing skilled workers for industry In Portugal that place belongs to Polytechnics. Universities are to learn to learn.

But wouldn't the debugging process give a better understanding of the whole learning process?

Re: Why don't schools teach debugging? (2014)

#149
post #96

Earlier quoted context omitted.

> places of certification producing skilled workers for industry In Portugal that place belongs to Polytechnics. Universities are to learn to learn.

But wouldn't the debugging process give a better understanding of the whole learning process?

On my CS degree we learned to use debuggers, and how they are written as well.
Post reply on HN