View Poll Results: Were you taught how to debug code at college/university?
- Voters
- 39. You may not vote on this poll
-
What's debugging?
-
No.
-
Some help was given.
-
Yes, it was part of the course.
-
Not applicable, self taught programmer
-
September 4th, 2009, 07:58 AM
#1
Were you taught debugging
Assuming you learnt programming in a formal situation, did debugging get taught in any significant way?
"It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong."
Richard P. Feynman
-
September 4th, 2009, 08:07 AM
#2
Re: Were you taught debugging
 Originally Posted by JohnW@Wessex
Assuming you learnt programming in a formal situation, did debugging get taught in any significant way?
Nope, I still don't really know how to do it much.
I used to just cout my code all over to find out what was happening.
I learned at work to investigate a core with the debugger (command line gdb).
I should really learn how to debug a running program... a colleague kind of showed me once, but I forgot...
-
September 4th, 2009, 08:10 AM
#3
Re: Were you taught debugging
Am I being a hopeless optimist in thinking that the What's debugging count will stay at zero?
"It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong."
Richard P. Feynman
-
September 4th, 2009, 08:36 AM
#4
Re: Were you taught debugging
Nope, we weren't taught how to use the debugger, actually, there was only one C++ course at the entire university. All the comp-sci courses were Java except for the graphics courses which were of course C. The one C++ class had a professor who really didn't know much about it. His idea of debugging was:
Code:
void method(void){
//Some code
cout << "Made it here" << endl;
//Some more code;
cout << "Made it here 2" << endl;
}
Useful for some things, but not most.
Last edited by ninja9578; September 4th, 2009 at 08:43 AM.
-
September 4th, 2009, 08:44 AM
#5
Re: Were you taught debugging
 Originally Posted by JohnW@Wessex
Assuming you learnt programming in a formal situation, did debugging get taught in any significant way?
Not really, no.
Not even preventative measures (e.g., [static] assertions) were covered.
-
September 4th, 2009, 08:51 AM
#6
Re: Were you taught debugging
Only had one intro to C++ class that barely even covered the basics, but debugging wasn't mentioned.
-
September 4th, 2009, 08:56 AM
#7
Re: Were you taught debugging
Interesting poll John.
I believe that debugging should be part (or perhaps a parallel course) of a programming course in college. When reading the poll I first thought of marking *Some help was given*. Then, I realized that the correct answer in my case would be *No*.
I did get some help, but it was really something like this: If you want to inspect variable values run your program line by line. Just hit FX instead of FY and place some "bullets" at the places you would like it to stop. Then hit FW to execute a particular statement.
That's everything I was told about debugging at school. This is so far away from actually understanding how debugging works and all the help you can get from it that I decided to vote *No*. The worst part is that I know people that still think that debugging is just that.
Debugging could be considered an art just as programming. We should be taught how the attachment process work, how symbols are generated, how to analyse the stack, how to analyse core dumps, memory layout, among others things. Also, debugging can be a very creative process when you have non-usual situations in which you can't inspect things easily or directly.
I'm not an expert debugger. When possible, I try to learn things and work on it. But surely, school could have helped me better just like it did for writting code. Both subjects are important and complementary.
-
September 4th, 2009, 09:34 AM
#8
Re: Were you taught debugging
It's not just learning how to use the debugger that's important (assuming the platform you're working on has one!) but also designing for debugging.
On some embedded projects that I worked on many, many years ago, the software was compiled on a 286 MSDOS machine and blown into a ROM before it could be tested. Very early on I designed in a diagnostics port into all of the hardware so that I could plug in my debug box (LED display, switches, RS232 port) to get debugging information out.
Nowadays I work on Windows based projects, but I still design in debugging. Now it comes in the form of compile time & run time asserts, logs and exceptions. All are built into the code from the very beginning.
"It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong."
Richard P. Feynman
-
September 4th, 2009, 09:55 AM
#9
Re: Were you taught debugging
It wasn't covered extensively in my college-level classes, no. However, they did at least touch on it when I was at American Computer Experience summer camp on the BU campus, and in my high school APCS course.
The real question is, were you taught how to use man pages?
-
September 4th, 2009, 10:00 AM
#10
Re: Were you taught debugging
That said, could anybody point me to a good gdb debugger tutorial
-
September 4th, 2009, 10:25 AM
#11
Re: Were you taught debugging
You need another poll choice - something like:
"Self taught programmer, but is proficient in debugging."
Debugging is probably the most important skill a developer can, um, develop. It's not just being able to effectively use your debugger (whether it's integrated in an IDE or standalone), but also being able to set up the environment so that your program can be debugged.
Too much time is wasted on ineffective debugging techniques like cout or putting in message boxes. In my opinion these should be a last resort over using more advanced debugging tools.
-
September 4th, 2009, 12:15 PM
#12
Re: Were you taught debugging
 Originally Posted by monarch_dodra
That said, could anybody point me to a good gdb debugger tutorial 
Most programmers use their IDE for debugging, which have wrappers around gdb. XCode's debugger is by far the best, but if you're on Windows, Code::Blocks has a nice interface to the debugger. Just take a look at the Debug menu, most of it is pretty self evident.
-
September 4th, 2009, 02:08 PM
#13
Re: Were you taught debugging
 Originally Posted by Arjay
Too much time is wasted on ineffective debugging techniques like cout or putting in message boxes. In my opinion these should be a last resort over using more advanced debugging tools.
In this day and age of interactive debuggers, it's incredulous (at least to me) that someone using, say Visual Studio, would have a problem with a relatively simple program and not be curious as to what the "Debug" menu item on the IDE is supposed to do. But in too many instances, you have posters not using their own initiative in figuring this out . I would expect this scenario -- "Debug menu item? Let's see, what does this do? Hey, look at this! I can see my program run under my control. That's cool". Nope, you get the "I never used the debugger" responses.
When I was going to school, there were hardly any interactive terminals in schools, let alone interactive debuggers such as Visual Studio's or gdb. This was at the latter part of the punchcard era. In my case, you had to go through the code by hand to make sure the program was error-free. You would then hand your punch cards over to someone you didn't know in a room, and waited several hours for your output to appear on paper. Now given that scenario, you had to learn debugging very quickly or else you would never get your programs completed.
Regards,
Paul McKenzie
-
September 4th, 2009, 08:40 PM
#14
Re: Were you taught debugging
But in too many instances, you have posters not using their own initiative in figuring this out . I would expect this scenario -- "Debug menu item? Let's see, what does this do? Hey, look at this! I can see my program run under my control. That's cool". Nope, you get the "I never used the debugger" responses.
This is really a general attitude issue towards using computers/technology. For a great many people the train of thought goes something more like "Debug menu? What does this do? Hm, I don't know what it is, better leave it alone - might break something".
Even among professional programmers I've known more than a few people who were effectively novice computer users. They have their language(s) and suite of tools that they're familiar with and good at, but throw something different at them, take them out of their comfort zone, and they're completely hopeless without someone to hold their hand and guide them step by step.
-
September 6th, 2009, 03:02 PM
#15
Re: Were you taught debugging
One of my intro C++ classes had a special one-time session outside of class about using the debugger in Visual Studio. Being a stupid freshman I didn't go, and to this day I debug by planting couts everywhere. Gotta look into a tutorial one of these days.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|