Live data from Hacker News

Why don't schools teach debugging? (2014)

danluu.com

31–40 of 174 posts

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

#32
post #14

Earlier quoted context omitted.

I just think debugging is art and parcel of programming. Debugging should come up in the first practical exercise in a Graphics 101. It should come up the first time you do an ML assignment in Programming Languages. Its absence in any course is conspicuous. But at the same time more than half of the professional web developers I know don't really use a debugger. Equally problematic.

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.

In many ways, the tooling around web development is far superior to other languages (e.g. golang with delve). Most browsers ship with excellent debug tools.

The caveat obviously being that debugging code written using some JS frameworks, like Polymer, is a nightmare.

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

#33
Debugging is a composition of simulating software in your mind, verifying what you wrote down, and observing what the computer does. The reason why I think that there is no course on debugging, is because it is equivalent to learning how a computer works.

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

#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 incidentally graduates people whom industry happens to find their knowledge at least somewhat useful. If the university professor never needed to debug, use version control, or write clean designs in order to succeed in academia - why should he consider it worthy of being taught? If the university professor never benefitted from remedial review on his academic path towards becoming a professor, why should he consider it worth his time? Of course he's going to dismiss the notion to the tone of "some people just can't hack it in engineering." It's academic survival bias.

People talk about the STEM pipeline like some kind of demigod figure designed it from on high specifically with the intent of producing skilled technical workers, albeit with various flaws related to sexism and skill relevance etc. Of course, this is a ridiculous way of looking at the STEM pipeline, so it shouldn't surprise anyone that different actors in the pipeline have contrary motivations.

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

#35
post #8
post #2

Profusely agree with the author. As someone who switched into CS from the humanities, one of the biggest challenges for me was less about syntax and more about figuring out the errors in my logic. For some reason though the former seems to get more focus by professors. "We excitedly explained our newly discovered technique to those around us, walking them through a couple steps. No one had trouble; not even people wh…

as long as you don't copy paste code That's the million dollar question: how do you know whether a classmate is being earnest or just copying you? Especially in highly competitive environments, cheaters are extremely adept at leveraging your work without substantially contributing anything back. The way it works in law school is that students (at least the social ones) break up into study groups early on. They may or…

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.

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

#36
post #7

> those who were underperforming weren’t struggling with the fundamental concepts in the class, but with algebra: the problems were caused by not having an intuitive understanding of, for example, the difference between f(x+a) and f(x)+a. Those taking that class have spent years trying to learn algebra and still don't get it so we are already trying this. > I’m no great teacher, but I was able to get all but one of t…

I've thought for some time that the idea of understanding is bass ackwarkds - understanding comes after learning how to do something mechanically, particularly in maths. Don't know if that's a learning theory though

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

#37

In school, you're always told to show your work. I'm sure a lot of us here tended to be among the smartest in your class, at least before university, and we often thought having to show our work was silly. That's why a lot of us get tripped up when it comes to the type of debugging the author is talking about (it certainly still happens to me sometimes). Showing our work reminds us that solving problems is an iterati…

> debuggers will often lie to you, and you often have to look into the registers for the real data

What do you mean by this?

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

#38

In school, you're always told to show your work. I'm sure a lot of us here tended to be among the smartest in your class, at least before university, and we often thought having to show our work was silly. That's why a lot of us get tripped up when it comes to the type of debugging the author is talking about (it certainly still happens to me sometimes). Showing our work reminds us that solving problems is an iterati…

I just think debugging is art and parcel of programming. Debugging should come up in the first practical exercise in a Graphics 101. It should come up the first time you do an ML assignment in Programming Languages. Its absence in any course is conspicuous. But at the same time more than half of the professional web developers I know don't really use a debugger. Equally problematic.

Is an ML course now a common part of an undergraduate degree program, though? --I genuinely don't know, which is why I'm asking.

These days it would certainly be much easier to teach students how to use a debugger - most students probably aren't doing their work on mainframes anymore where resources might be limited (anyone else remember getting emails asking you to release your semaphores because the server is running low?), but professors still have to decide which topics are the most important to cover in a limited amount of time.

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

#40
post #4

This can really be extended to basic troubleshooting skills, and goes beyond software development -- beyond technology, even. Troubleshooting is really just a special application of general 'problem solving', which is something schools aim to teach. I'm not sure why troubleshooting skills are not taught, especially something like "divide and conquer" [1]. Even in very complex systems, so long as you have the right ac…

It is interesting to think that there have been those¹ who thought about the converse proposition, and saw early on the potential for the debugging of programs to become a widespread activity which would promote general habits of introspection in children (Seymour Papert's "thinking about thinking").

But that's not how things happened, and today people pretty much do not think about writing (and thus do not end up debugging) the programs they use.

Instead we are all users now, and for many the troubleshooting algorithm is to:

1. google it, or

2. reboot it, or, failing that too,

3. throw it away, or, failing even that,

4. complain and curse.

It's amusing to think that this model is now sometimes used by programmers as well (though hopefully mostly just #1, and sometimes #2).

[1] https://youtu.be/Pvgef9ABDUc?t=43m10s

Post reply on HN