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…
Why don't schools teach debugging? (2014)
161–170 of 174 posts
Re: Why don't schools teach debugging? (2014)
#162It 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…
In the debugging context there are some more specific applications of the general principles, which should also be taught.
Re: Why don't schools teach debugging? (2014)
#163Earlier quoted context omitted.
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…
"populace", not "populous" (an adjective meaning "highly populated").
Re: Why don't schools teach debugging? (2014)
#164Earlier quoted context omitted.
But I can't get them to integrate well with my dev tools. If, for example, I'm using something like babel/webpack/Typescript there is no easy way that I've found to for example just set breakpoint on a line of code in my editor/IDE and have the web browser debugger break when it gets there.
Not as convenient, but you can write the statement `debugger;` and the debugger will stop there.
Re: Why don't schools teach debugging? (2014)
#165Earlier quoted context omitted.
> 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?
Debuggers sometimes simply write wrong values into those nice gui-windows- do not update the values they show, or just dont inform the reader that the value ceased to exist- at all.
Re: Why don't schools teach debugging? (2014)
#166This pernicious attitude, at least in my alma mater, could be traced back to E.W. Dijkstra, e.g.
http://www.cs.utexas.edu/users/EWD/transcriptions/EWD02xx/EW... http://www.cs.utexas.edu/users/EWD/transcriptions/EWD03xx/EW...
And he may not have been entirely wrong; it's not uncommon to see people spend insufficient time on reasoning about the correctness of their code from first principle, and jump directly into testing/debugging.
On the other hand, using correctness proofs as the sole and sufficient means of writing code is just not a workable approach for most non-trivial problems.
Re: Why don't schools teach debugging? (2014)
#167Earlier quoted context omitted.
I find a good logging library will help me narrow down the issue before I enter the debugger to watch what the system is doing. If I'm 90% sure I know what the bug is and it's a system where it's easier to add a print than to enter the debugger (yes, those types of systems exist), I'll do that first.
Systems where debuggers are difficult to access totally exist, of course! But, IME, they're pretty rare by comparison (unless you've footgunned elsewhere). Whether it's something like `pry` in Ruby where you can open a REPL on command or a JVM where you connect with an external debugger, most systems are flexible enough to work with you. If you've written something in a language where you don't have a debugger...that…
It's often hard to run a stepping debugger when you have an embedded hardware at hand. It's equally hard to run such a debugger when you have multi-threaded code. And the same stands for virtually any system that works with network directly, where timeouts are plentiful.
Also, good luck with a debugger in this modern architecture of microservices that happens to be hype nowadays.
Re: Why don't schools teach debugging? (2014)
#168When asked "How do you debug programs?" my Programming Languages professor responded, "I don't. I prove every line correct before I write it."
This can be done in the context of algorithms but not in professional programming in general. Software has dependencies with zillions of components. If you want to formal proof everything, the software field would move like a turtle, with wisdom but very slow.
The real world is different.
Re: Why don't schools teach debugging? (2014)
#169What schools DON'T teach debugging? Simple trace statements were one of the first things we learned in 101. Maybe I was just lucky to have a good teacher. I still remember him not liking my solution to a problem when I was extremely proud of how smart I'd made an object, so that it reacted properly based on whatever was passed in. Instead of arguing with me he offered an extra credit assignment to take all of the log…
It's the first time I hear that anybody got taught debugging, honestly.
Re: Why don't schools teach debugging? (2014)
#170Earlier quoted context omitted.
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?
Once an officer hits their unit, they have someone with 5-10x more experience to supervise them for their first 5-10 years. It would be like a new manager getting a senior engineer to work with 7 days a week to help guide their bad ideas. Additionally, your software engineers aren't indentured servants. In the military, you often can't go home until a problem is fixed and if you quit, you go to jail. The military bur…
I bet you can teach that without all the bad associations people have about the military.