Debugging, a lost art?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PsychoCoder
    Recognized Expert Contributor
    • Jul 2010
    • 465

    Debugging, a lost art?

    NOTE: I posted this on my blog a while back but feel the community can benefit from it.

    I don’t know how many times I’ve seen someone post an error message and ask how to fix it. Does it irritate me , you bet it does. Students today have 100 times the resources at their disposal then what I had so many moons ago, yet they don’t (or wont I’m not sure at this point) use them.

    When I was going for my BS in Computer Science the instructors drilled debugging into our heads. We didn’t have Google or Bing, we didn’t have e-books to read, all we had was each other and our brains.

    I think this fail starts with the teachers, it seems no one harps on debugging in institutions anymore and it’s showing. Read forums and you’ll find hundreds of instances where simple debugging wasnt used. Where typing the error message into Google (or Bing) the answer is there, but the student is just too lazy to go that route.

    Sure I’ve asked questions on forums, such as StackOverflow and others, but not until I had exhausted every resource I could get my hands on. I never ask for help until I’ve tried all other options, then, and only then, will I ask for assistance.

    Teachers today seem as if they just want to get the students into the real world as fast as possible, thus diluting the programmer poll. In my opinion debugging is 25% of the programming process, yet students aren’t being taught anything about it.

    It seems like that these students see an error message and immediately want help, because that’s how they were taught in today’s institutions, and it’s turning debugging into a lost art.

    Someone tell me, just how hard is it to type an error message into Google and follow the links? Maybe our teachers need to be taught how to teach, maybe teachers who teach programming classes should know that debugging is vital and needs to be taught to their students.

    Maybe these teachers should be required to work in the industry for a few years before they can teach programming, where they can see first hand how important debugging is and why it’s so vital to take the time to teach it.
    Last edited by PsychoCoder; Jul 7 '12, 04:51 AM.
  • mythjen
    New Member
    • Jul 2012
    • 2

    #2
    Lost art, lost lessons. Before my graduation about two years ago, I encountered some students in my web development courses who couldn't even get to make a pretty decent website when it came down to project-thesis making. Time and learning does fly (away) when the learners are just taking everything for granted.

    Comment

    • ALX1
      New Member
      • Jul 2012
      • 2

      #3
      I'm sure the moderators get tired of seeing the same questions posted time and again. Why not let the less experienced students / free lancers answer those questions? The best way to retain something is to teach it to others. The more experienced folks can merely over-see things to make sure the posted answers are in line. I'm a novice and have been for 15 years or more. Most of what I've learned has been from forums. Although I'm new to this forum, I've seen moderators totally fly off the handle on other forums because someone asked a dumb question. I'm guessing many of those asking the question never posted another issue again. While I can appreciate taking a little initiative and doing some home work first, shouldn't these forums be part of that homework?

      Comment

      • Claus Mygind
        Contributor
        • Mar 2008
        • 571

        #4
        Your comment reminds me of an Isaac Asimov story in which a young boy is singled out early in life for a different track of education. The boy could not understand why he was forced to learn everything the hard way. Further in the story the boy attends a competition. He is pitted against the best and brightest student and feel hopelessly overwhelmed.

        During the competition something goes wrong with the instruments being used to test the students. The other student who was far ahead in the competition flounders and looses because the instrument is not working as it should.

        Asimov was a great futurist and commented on future society in his stories. In this story he developed his vision of what we are going to become Developers and Users.

        As you, I was taught the fundamentals of debugging and would say that in comprises more than the 25% of programming you suggest.

        I think those who do not take the time or don't want to learn the fundamentals no matter what they are doing are "Users". That applies to those lesser programmers which you refer to.

        Comment

        • lyodmichael
          New Member
          • Jul 2012
          • 75

          #5
          debugging is the scare of all program :), i love your article and i realize something .

          Thank you !

          #tip
          Last edited by lyodmichael; Jul 22 '12, 11:08 PM. Reason: forget to say thanks

          Comment

          • numberwhun
            Recognized Expert Moderator Specialist
            • May 2007
            • 3467

            #6
            @ALX1 You will find that the moderators and experts here on bytes.com are a lot more forgiving than other places on the net. Its not that frustrations don't loom, they do with anyone, but instead of telling you "Let me Google that for you", we instead will do things like ask you for your code, or ask you to try what you are asking. We will even point you in the right direction and see if you can figure it out, rather than just providing you the answers. One of the reasons this happens is because far to many people who are taking classes in school come here and expect to just get the answers they need for their homework.

            As for your comment about letting the less experienced answer, well there are no rules on this site against that. In fact, that is how I began on this site. I joined and jumped in feet first answering questions. Don't be afraid to chime in if you know the answer, but also don't get discouraged if one of the experts or mods point out a better way of doing things or if your answer is not quite right.

            Regards,

            Jeff

            Comment

            • Banfa
              Recognized Expert Expert
              • Feb 2006
              • 9067

              #7
              This kind of reminds me of 17 years ago or so. I was lead developer in a very small company and we used to get 1 or 2 students on their year in industry each year because they were cheap.

              I often had the responsibility of overseeing and teach these students. We had one chap who realising this always came straight to me whenever he had a problem which often meant every 10 minutes and was seriously effecting my own work.

              In the end I said to him that every time he asked for help I would ask him the following questions
              1. Have you checked you've terminated all your strings correctly?
              2. Does your code compile without warnings?
              3. Have you run it in the debugger?


              and if he answered no to any of them I wasn't helping. And with that little shove and a bit of time he turned into quite a good programmer.

              Comment

              • Niheel
                Recognized Expert Moderator Top Contributor
                • Jul 2005
                • 2432

                #8
                I don't recall ever being taught about debugging and code maintenance at school. It was really learned in the field and through painful lessons.

                As Banfa's example shows, it's something you pickup in the field. Thanks to online communities and blogs, lot of the tricks of the trade are accessible via search now.
                niheel @ bytes

                Comment

                • ddyer
                  New Member
                  • May 2010
                  • 8

                  #9
                  I think you are confusing debugging with something else. Dealing with the crap produced by misbehavior of someone else's program is not debugging. Google is a wonderful tool for this.

                  Debugging is moving your own program from concept to release. These days there is virtually no one writing code for bare metal, and so even real debugging involves dealing with lots of the above crap.

                  Comment

                  • Banfa
                    Recognized Expert Expert
                    • Feb 2006
                    • 9067

                    #10
                    As far as the client is concerned dealing with someone else's misbehaving code is debugging. They do not care which bit of code is causing the issue and see it purely as the system is either "working" or "not working". If you are their point of contact then you have to deal with the "bug".

                    Quite often debugging is finding work a around for the misbehaviour of someone else's code.

                    I have even been asked to "debug" the issue on a board that very plainly had no code on it, I spent 10 minutes carefully explaining how it could not possibly be a software issue that needed debugging because of the complete lack of software involved before being asked to look at it anyway. As it happens it turned out to be too much glue on the board connector preventing the electrical contacts being made.

                    The software engineers are always the first port of call if there is any sort of issue and it will always be reported as a bug.

                    Comment

                    • john garvey
                      New Member
                      • Jan 2011
                      • 50

                      #11
                      As another old codger I say - Long live breakpoints

                      Kind regards

                      Comment

                      • kiseitai2
                        New Member
                        • Jul 2007
                        • 93

                        #12
                        You know, some of the bad habits come with the first environment you learn to program. For example, I didn't learn about warnings or about treating warnings as errors when possible until I had the courage to learn C++. Before C++, I learned VB.net 2005, which meant you would get an in-code message if your code had problems or a "Build succeeded" message if the compiler found no errors. So, how high-level you start can affect whether you even become conscious of some basic programing skills.

                        Comment

                        • Frinavale
                          Recognized Expert Expert
                          • Oct 2006
                          • 9749

                          #13
                          Can someone help me please!
                          I'm getting an error: Object reference not set to an instance of an object

                          *wink wink*

                          I don't think that I was taught debugging in school either but I also didn't use forums while in school. I used text books, sought help from my teachers and classmates, and used the web to search for help on the problems. The thing is that I didn't really have a good debugger at school...so my code was constantly littered with output statements helping me to track down bugs.

                          Soon you get to recognise things like null reference errors just by glancing at them...but it takes time to learn what they mean and recognise them.

                          The easy bugs are the ones thrown as errors in a program.
                          The hard ones don't throw the errors.

                          -Frinny
                          Last edited by Frinavale; Aug 1 '12, 02:14 PM.

                          Comment

                          • Dormilich
                            Recognized Expert Expert
                            • Aug 2008
                            • 8694

                            #14
                            yea, first comes that those students seem to be unable to read and then they ask in half a dozen forums in parallel.

                            Comment

                            • kiseitai2
                              New Member
                              • Jul 2007
                              • 93

                              #15
                              Well, Frinavale, now you know how I feel on my current project, which is to make my first videogame. Since I don't want to code the whole thing for the next two game afterwards, I am doing the right thing and coding my classes neatly with comments so I can re-cycle the core engine. As a result I haven't run the actual code, so I'm expecting to put up days dealing with the hard bugs once I start putting a demo together (I want a demo first to clean the engine from bugs before I use game-specific coding).

                              Comment

                              Working...