Live data from Hacker News

Why Don't Schools Teach Debugging?

danluu.com

41–50 of 132 posts

Re: Why Don't Schools Teach Debugging?

#41
post #8

Because it isn't fun or exciting.

Perhaps I'm sick in the mind but I really like debugging, especially hard ones.

Recently our stack fell over when we did a production release. Basically web worker threads were spawning more worker threads and this crashed our AOP proxy (Castle.Core) which uses some global state and was spinlocking for some reason. We ended up with everything whacked at 100% across the cluster. 2 hours into the problem and it was something completely different - a for loop that didn't end on another thread and took up one core per node causing CPU contention. The spinlocks just amplified the problem.

One change to the loop continuation clause and wham -- fixed.

The journey is exciting and you learn so much on the way. It's great.

Re: Why Don't Schools Teach Debugging?

#42

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…

http://www.whyprogramsfail.com/

Re: Why Don't Schools Teach Debugging?

#43
This is by no means isolated to engineering or mathematics either. Nearly all students, especially in higher education, will have gaps in their understanding of topics they are expected to just know. The classroom simply isn't able to personalise learning to each student in the way that's needed. The only thing that really can help here the is clever application of technology.

This is part of the problem that I'm working to solve with my startup Ellumia. Some others are making great strides in areas like language learning, but there's still lots to be tackled. We're building a mobile platform that blends bite-sized content with a highly personalised, social experience – something that would be immensely helpful to the students mentioned in this post. If you're interested in innovative learning methods, please check us out: http://www.ellumia.com

Re: Why Don't Schools Teach Debugging?

#44
I read Agans's Debugging: The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems back when I was in high school and still pretty new to programming. I learned a lot from it, and still recommend it.

When I was in college the administrators were redesigning the CS curriculum (and are probably still fiddling with it). One of the newer classes they had come up with was a mandatory lab course on debugging.

Sure enough, they had everyone read Agans and emphasized thinking of debugging as an application of the Scientific Method. There were also constructed debugging exercises to solve too, but given how hard it is to deliberately craft good bugs that are nevertheless still predictably solvable by beginners within the time frame of a lab session, I think most of the value that people got out of the course was from reading the book.

Re: Why Don't Schools Teach Debugging?

#45

This is by no means isolated to engineering or mathematics either. Nearly all students, especially in higher education, will have gaps in their understanding of topics they are expected to just know. The classroom simply isn't able to personalise learning to each student in the way that's needed. The only thing that really can help here the is clever application of technology. This is part of the problem that I'm wor…

Um, what you're doing might be super-duper valuable, but "bite-sized personalized social innovative learning", frankly, sounds more like a game of buzzword bingo than like a product description.

Re: Why Don't Schools Teach Debugging?

#46

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 debugger should be a concept to be taught, just like the compiler, linker, interpreter, assembler and so on. There should be at least a few lab hours where students are given existing programs and need to go for a bug hunt. This should include strace and valgrind, two essential tools that will probably not be outdated for quite a while.

Now, where I disagree is the IDE part. I have nothing against IDEs per se and I think everyone should be able to choose the tools he can work with best once (s)he starts a professional career. (hence why I like the concept behind cmake btw.). But I think it's a bad idea to start off with this as a student. An IDE comes along as an non separatable entity and it's hard to distinguish between the essential components behind it if that's the only thing you practice developing with. Students should learn what those components do from scratch and that's easier when you can see them as Lego bricks in front of you. IMO it's also a more satisfying learning experience than having MS, the Eclipse Foundation or anyone else holding the hand for you when you do your baby steps.

Re: Why Don't Schools Teach Debugging?

#47
post #38

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

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 co…

Funny, I always thought it the other way around. I struggle whenever I try to teach myself any formal/theoretical stuff because without the aid of a teacher checking my work I'm never sure if I really understand or not.

I never had a problem learning programming languages on my own by following examples though.

Re: Why Don't Schools Teach Debugging?

#48

Earlier quoted context omitted.

I'm curious - what do the remaining 70% do?

Various things, a common aspiration was to try and fast track to a management position at a consultancy or blue chip where things were are more about spreadsheets than code. Others do technical work, but not strictly development like Q&A or technical support. Some went into academia and some did other things altogether, I know at least one person who became a tree surgeon and another who is a session musician.

If Q&A is QA then it should be considered development, in a specialized domain.

Re: Why Don't Schools Teach Debugging?

#49
post #22

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…

Plenty of people still use ant. It's the path of least resistance where I work since we have a lot of tooling and preexisting code that use it.

On that note plenty of people still use svn for the same reasons.

Re: Why Don't Schools Teach Debugging?

#50
It's a top secret recruiting method. Only the top 1% learn to debug code or hardware on their own. Since it's a secret, it's still not a gamed in the interview process by the me-too crowd. Please downvote this story, you will make recruiting much harder.
Post reply on HN