Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Debugging and diagnosis is not being taught

Debugging and diagnosis is not being taught

Scheduled Pinned Locked Moved The Lounge
debuggingc++delphivisual-studiocom
39 Posts 27 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Lost User

    making stupid and glaring mistakes isn't taught either - but they're damn good at that. so why the difference?

    CPalliniC Offline
    CPalliniC Offline
    CPallini
    wrote on last edited by
    #16

    :-D

    In testa che avete, signor di Ceprano?

    1 Reply Last reply
    0
    • R Rage

      I found that so .. straight-forward that I could not have imagined it is something that needs to be taught.

      Do not escape reality : improve reality !

      G Offline
      G Offline
      glennPattonWork3
      wrote on last edited by
      #17

      Me too, I only tend to debug my own code these days, the single step function is the one I use the most...

      1 Reply Last reply
      0
      • L Lost User

        I don't think that lack of debugging knowledge is the issue, so much as an inability even to understand what steps to take in problem analysis. Look at some of the questions here and you can see that some so called developers do not really understand the code they may even have written themselves. I suspect there are far too many people following a career into IT because they think it pays well, rather than because they have an interest in problem analysis and finding solutions.

        T Offline
        T Offline
        theoldfool
        wrote on last edited by
        #18

        :thumbsup: Agreed. There is a big difference between being able to use debugging tools and being able to do problem solving. Kinda like the super intelligent person who lacks common sense. A course in OR (Operations Research) could help. Working with real time systems will really test those skills. :)

        If you can keep your head while those about you are losing theirs, perhaps you don't understand the situation.

        1 Reply Last reply
        0
        • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

          It seems that problem solving at all is not a skill taught to anyone anywhere... Actually - 'you have a problem' is considered rude to tell a student, as it implies the need to take responsibility, which totally uncommon these days (and to force it on someone is unforgivable)...

          "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

          R Offline
          R Offline
          raddevus
          wrote on last edited by
          #19

          Kornfeld Eliyahu Peter wrote:

          It seems that problem solving at all is not a skill taught to anyone anywhere..

          Agreed. And even more broadly, critical thinking skills simply aren't taught. That's the nature of schooling being based upon multiple choice and t/f exams.

          M 1 Reply Last reply
          0
          • L Lost User

            It's even worse than that: debug-by-printing is often explicitly recommended.

            N Offline
            N Offline
            Nelek
            wrote on last edited by
            #20

            harold aptroot wrote:

            It's even worse than that: debug-by-printing is often explicitly recommended.

            And why is that so bad? I have found a lot of bugs just adding a couple of messageboxes / wprintf in places of the code If you are programming things that might have a timing component, debugging alters the real world use case when you hit the stop points. Saving a couple of values there and printing them later on the screen doesn't screw your performance or timing relational so bad. And as de2k88 said... you might use it always. You can even "debug" the release version with it. I think this is like the "goto"... it is not bad per se. But I can agree with you that it might get messy pretty fast.

            M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

            K 1 Reply Last reply
            0
            • D Dominic Burford

              As one of the senior developers where I work, I am tasked with mentoring the junior members of the team. This is a part of my role I really enjoy, as I get to pass down my hard won knowledge and experience to the next generation of software developers. What I have found over the years is that they all seem to lack one vital ingredient. How to debug / diagnose a problem. I have seen many of them struggle to use the debugger, set breakpoints, step through code, use the F12 browser tools etc. Even those with First Class honours degrees have struggled with this. I remember when doing my own degree (many years ago) we were taught these basic skills (using a Borland C++ IDE). Is this vital skill no longer being taught to new graduates? I feel this is a vital skill in any software developer's tool chest.

              "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare Home | LinkedIn | Google+ | Twitter

              M Offline
              M Offline
              Marc Clifton
              wrote on last edited by
              #21

              It's worse than that. The code the junior devs write is often so algorithmically and/or architecturally wrong that debugging won't actually solve the problem. Abstracting the problem, breaking the problem down into smaller problem sets, asserting on inputs, writing try-catch handlers, none of this taught. As a result, debugging something that is broken from the get-go is pointless. And debugging existing code that hopefully someone with more experience wrote? Forget it. Simple syntax like null continuation, generics, lambda functions, LINQ, callbacks...it's all Greek to them because they were never exposed to real programming. The mantra my mentee kept repeating over and over again was "oh my god, why didn't they teach us that in school???" :sigh:

              Latest Article - A 4-Stack rPI Cluster with WiFi-Ethernet Bridging Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

              D 1 Reply Last reply
              0
              • R raddevus

                Kornfeld Eliyahu Peter wrote:

                It seems that problem solving at all is not a skill taught to anyone anywhere..

                Agreed. And even more broadly, critical thinking skills simply aren't taught. That's the nature of schooling being based upon multiple choice and t/f exams.

                M Offline
                M Offline
                megaadam
                wrote on last edited by
                #22

                raddevus wrote:

                critical thinking skills simply aren't taught

                You are wrong. I was taught to contradict everybody!

                "If we don't change direction, we'll end up where we're going"

                R 1 Reply Last reply
                0
                • M Marc Clifton

                  It's worse than that. The code the junior devs write is often so algorithmically and/or architecturally wrong that debugging won't actually solve the problem. Abstracting the problem, breaking the problem down into smaller problem sets, asserting on inputs, writing try-catch handlers, none of this taught. As a result, debugging something that is broken from the get-go is pointless. And debugging existing code that hopefully someone with more experience wrote? Forget it. Simple syntax like null continuation, generics, lambda functions, LINQ, callbacks...it's all Greek to them because they were never exposed to real programming. The mantra my mentee kept repeating over and over again was "oh my god, why didn't they teach us that in school???" :sigh:

                  Latest Article - A 4-Stack rPI Cluster with WiFi-Ethernet Bridging Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

                  D Offline
                  D Offline
                  Dominic Burford
                  wrote on last edited by
                  #23

                  Marc Clifton wrote:

                  And debugging existing code that hopefully someone with more experience wrote? Forget it. Simple syntax like null continuation, generics, lambda functions, LINQ, callbacks...it's all Greek to them because they were never exposed to real programming.

                  I have to regularly explain how the code works at both the architectural level, as well as the code level. This is to get them to understand the underpinning design decisions, as well as the detail of how the code itself works. Generics and LINQ were completely brand new to them. It took several sessions to get them to understand the problem that Generics solves, nevermind understanding the syntax behind it.

                  "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare Home | LinkedIn | Google+ | Twitter

                  1 Reply Last reply
                  0
                  • D Dominic Burford

                    As one of the senior developers where I work, I am tasked with mentoring the junior members of the team. This is a part of my role I really enjoy, as I get to pass down my hard won knowledge and experience to the next generation of software developers. What I have found over the years is that they all seem to lack one vital ingredient. How to debug / diagnose a problem. I have seen many of them struggle to use the debugger, set breakpoints, step through code, use the F12 browser tools etc. Even those with First Class honours degrees have struggled with this. I remember when doing my own degree (many years ago) we were taught these basic skills (using a Borland C++ IDE). Is this vital skill no longer being taught to new graduates? I feel this is a vital skill in any software developer's tool chest.

                    "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare Home | LinkedIn | Google+ | Twitter

                    abmvA Offline
                    abmvA Offline
                    abmv
                    wrote on last edited by
                    #24

                    or u could just hire guys who know how to debug ..

                    Caveat Emptor. "Progress doesn't come from early risers – progress is made by lazy men looking for easier ways to do things." Lazarus Long

                    We are in the beginning of a mass extinction. - Greta Thunberg

                    1 Reply Last reply
                    0
                    • L Lost User

                      It's even worse than that: debug-by-printing is often explicitly recommended.

                      W Offline
                      W Offline
                      WiganLatics
                      wrote on last edited by
                      #25

                      Debug by printing can be useful at times. That's the whole point of having log files. It shouldn't be the only tool in the box, but it shouldn't be completely discarded.

                      D 1 Reply Last reply
                      0
                      • D Dominic Burford

                        As one of the senior developers where I work, I am tasked with mentoring the junior members of the team. This is a part of my role I really enjoy, as I get to pass down my hard won knowledge and experience to the next generation of software developers. What I have found over the years is that they all seem to lack one vital ingredient. How to debug / diagnose a problem. I have seen many of them struggle to use the debugger, set breakpoints, step through code, use the F12 browser tools etc. Even those with First Class honours degrees have struggled with this. I remember when doing my own degree (many years ago) we were taught these basic skills (using a Borland C++ IDE). Is this vital skill no longer being taught to new graduates? I feel this is a vital skill in any software developer's tool chest.

                        "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare Home | LinkedIn | Google+ | Twitter

                        J Offline
                        J Offline
                        Jacquers
                        wrote on last edited by
                        #26

                        I had to learn debugging / fault finding the hard way working in a support department. Not fun, but I learned a lot!

                        1 Reply Last reply
                        0
                        • OriginalGriffO OriginalGriff

                          When I was at uni, you added punch cards to say

                          PRINT *, 'The value of I is ", i

                          Assuming you had enough runs left: Our score for an assignment decreased by 10% for each run over three. :sigh: When I moved into the "real world" and started working with embedded Z80 assembler, I had to write my own debugger to stop the process and display register / memory data in real time ... Visual Studio has so many tools to make beginners life easier, and many of them have no idea that they even exist, much less that "debugging" is different from "fixing the compilation errors". :sigh:

                          Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                          R Offline
                          R Offline
                          Rick York
                          wrote on last edited by
                          #27

                          That's my favorite : "well, it compiles. Why doesn't run right?"

                          "They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"

                          1 Reply Last reply
                          0
                          • D Dominic Burford

                            As one of the senior developers where I work, I am tasked with mentoring the junior members of the team. This is a part of my role I really enjoy, as I get to pass down my hard won knowledge and experience to the next generation of software developers. What I have found over the years is that they all seem to lack one vital ingredient. How to debug / diagnose a problem. I have seen many of them struggle to use the debugger, set breakpoints, step through code, use the F12 browser tools etc. Even those with First Class honours degrees have struggled with this. I remember when doing my own degree (many years ago) we were taught these basic skills (using a Borland C++ IDE). Is this vital skill no longer being taught to new graduates? I feel this is a vital skill in any software developer's tool chest.

                            "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare Home | LinkedIn | Google+ | Twitter

                            D Offline
                            D Offline
                            Dave Kreskowiak
                            wrote on last edited by
                            #28

                            May I direct your attention to QA and the programming forums where you can easily evaluate for yourself if debugging skills are being taught or not. In my humble opine, the answer to that is "#$@% NO". Tell someone to use the debugger to see the values the code is using and they react like you've slapped them with a fish. They're not sure how to respond, either with being insulted or afraid of the debugger like it's some form of dark magic they're afraid to mess with.

                            Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
                            Dave Kreskowiak

                            1 Reply Last reply
                            0
                            • D Dominic Burford

                              As one of the senior developers where I work, I am tasked with mentoring the junior members of the team. This is a part of my role I really enjoy, as I get to pass down my hard won knowledge and experience to the next generation of software developers. What I have found over the years is that they all seem to lack one vital ingredient. How to debug / diagnose a problem. I have seen many of them struggle to use the debugger, set breakpoints, step through code, use the F12 browser tools etc. Even those with First Class honours degrees have struggled with this. I remember when doing my own degree (many years ago) we were taught these basic skills (using a Borland C++ IDE). Is this vital skill no longer being taught to new graduates? I feel this is a vital skill in any software developer's tool chest.

                              "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare Home | LinkedIn | Google+ | Twitter

                              K Offline
                              K Offline
                              kmoorevs
                              wrote on last edited by
                              #29

                              From my college experience around 20 years ago, debugging was not taught, or maybe it was skimmed over enough that I never learned. At that time it was VS6 and I remember being amazed when I learned about breakpoints and F8 at my first job! :-D As for problem solving, college was pretty weak there also. Assignments were mostly based on identical scenarios covered in the chapter...change a few variable names and get an A. There just wasn't much that required thinking outside the box. That said, I also remember having to get creative to debug classic asp and javascript. The IDEs, languages and browsers have made web development so much easier than it used to be 20 years ago at least in terms of being able to debug. My 2 cents. :)

                              "Go forth into the source" - Neal Morse

                              1 Reply Last reply
                              0
                              • M megaadam

                                raddevus wrote:

                                critical thinking skills simply aren't taught

                                You are wrong. I was taught to contradict everybody!

                                "If we don't change direction, we'll end up where we're going"

                                R Offline
                                R Offline
                                raddevus
                                wrote on last edited by
                                #30

                                megaadam wrote:

                                I was taught to contradict everybody!

                                :laugh: Here's your motto: I disagree, therefore I am! :-D One always needs a sense of porpoise.

                                1 Reply Last reply
                                0
                                • D Dominic Burford

                                  As one of the senior developers where I work, I am tasked with mentoring the junior members of the team. This is a part of my role I really enjoy, as I get to pass down my hard won knowledge and experience to the next generation of software developers. What I have found over the years is that they all seem to lack one vital ingredient. How to debug / diagnose a problem. I have seen many of them struggle to use the debugger, set breakpoints, step through code, use the F12 browser tools etc. Even those with First Class honours degrees have struggled with this. I remember when doing my own degree (many years ago) we were taught these basic skills (using a Borland C++ IDE). Is this vital skill no longer being taught to new graduates? I feel this is a vital skill in any software developer's tool chest.

                                  "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare Home | LinkedIn | Google+ | Twitter

                                  realJSOPR Offline
                                  realJSOPR Offline
                                  realJSOP
                                  wrote on last edited by
                                  #31

                                  From my article - Being a Programmer[^] 8) If you're writing code using Visual Studio, learn how to use the built-in debugger. In fact, don't settle for being a "decent" debugger. Strive to be a GREAT debugger, because that's probably where you'll spend 75% of your coding time - tracking down and fixing issues cause by not only yourself, but by others as well. Exercise due caution while debugging someone else's code. Be diligent, and explore all possible side effects that might be caused by fixing an issue. If your shop is truly SDLC-compliant, the testers will regression test a new release candidate, but you should not count on the tests being able to capture every little nuance. (Unit tests are only as thorough as the person writing them.)

                                  ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                                  -----
                                  You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                                  -----
                                  When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                                  1 Reply Last reply
                                  0
                                  • N Nelek

                                    harold aptroot wrote:

                                    It's even worse than that: debug-by-printing is often explicitly recommended.

                                    And why is that so bad? I have found a lot of bugs just adding a couple of messageboxes / wprintf in places of the code If you are programming things that might have a timing component, debugging alters the real world use case when you hit the stop points. Saving a couple of values there and printing them later on the screen doesn't screw your performance or timing relational so bad. And as de2k88 said... you might use it always. You can even "debug" the release version with it. I think this is like the "goto"... it is not bad per se. But I can agree with you that it might get messy pretty fast.

                                    M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

                                    K Offline
                                    K Offline
                                    Kevin McFarlane
                                    wrote on last edited by
                                    #32

                                    We should use both. Sometimes printing (really logging) is essential (e.g., async and parallel programming). In fact, one of my bugbears at various client sites is the lack of logging features.

                                    Kevin

                                    1 Reply Last reply
                                    0
                                    • D Dominic Burford

                                      As one of the senior developers where I work, I am tasked with mentoring the junior members of the team. This is a part of my role I really enjoy, as I get to pass down my hard won knowledge and experience to the next generation of software developers. What I have found over the years is that they all seem to lack one vital ingredient. How to debug / diagnose a problem. I have seen many of them struggle to use the debugger, set breakpoints, step through code, use the F12 browser tools etc. Even those with First Class honours degrees have struggled with this. I remember when doing my own degree (many years ago) we were taught these basic skills (using a Borland C++ IDE). Is this vital skill no longer being taught to new graduates? I feel this is a vital skill in any software developer's tool chest.

                                      "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare Home | LinkedIn | Google+ | Twitter

                                      D Offline
                                      D Offline
                                      dandy72
                                      wrote on last edited by
                                      #33

                                      If graduates were taught how to use the VS2017 debugger, 6 months from now someone would complain why they weren't taught how to use the VS2019 debugger. Well, this is a bad example because typically the debugger doesn't change all that drastically from one version to the next, but you understand where I'm headed with that. They should learn about the debugging process, rather than the specific of any given tool. Indirectly related: When no debugger is available (eg, software is running on a customer's system and nobody has access to it)...do said developers have access to a great logging library, and *know what to log and when*? The importance of this particular aspect cannot be stressed enough. Knowing how to use a debugger won't get anyone very far if you can't reproduce a problem locally and can't install any debugging tool--and a log file is all you have at your disposal.

                                      D 1 Reply Last reply
                                      0
                                      • W WiganLatics

                                        Debug by printing can be useful at times. That's the whole point of having log files. It shouldn't be the only tool in the box, but it shouldn't be completely discarded.

                                        D Offline
                                        D Offline
                                        Dean Roddey
                                        wrote on last edited by
                                        #34

                                        If you are building code to ship to customers, then in the field problem diagnosis is a fundamentally important thing. If something only fails in the field and you can't reproduce it, it can turn into a major circle-jerk (with you being the jerk in the circle.) Good logging, with variable threshold, is a key part of that. And, since it's already there, it will serve you just as well during development as well. For me, I have a very powerful logging system that is supported throughout the entire code base, and the ability to log to a centralized log server. This has saved me more times than I can count. I mean, we all love being jerked in a circle, but sometimes you just don't have time for it.

                                        Explorans limites defectum

                                        1 Reply Last reply
                                        0
                                        • D dandy72

                                          If graduates were taught how to use the VS2017 debugger, 6 months from now someone would complain why they weren't taught how to use the VS2019 debugger. Well, this is a bad example because typically the debugger doesn't change all that drastically from one version to the next, but you understand where I'm headed with that. They should learn about the debugging process, rather than the specific of any given tool. Indirectly related: When no debugger is available (eg, software is running on a customer's system and nobody has access to it)...do said developers have access to a great logging library, and *know what to log and when*? The importance of this particular aspect cannot be stressed enough. Knowing how to use a debugger won't get anyone very far if you can't reproduce a problem locally and can't install any debugging tool--and a log file is all you have at your disposal.

                                          D Offline
                                          D Offline
                                          Dominic Burford
                                          wrote on last edited by
                                          #35

                                          I agree, and that's why I suggested that understanding concepts such as setting breakpoints and stepping through code are vital skills (without making any mention of any particular IDE). I have't found a recent graduate yet who seemed to understand these skills. Even whilst writing vanilla code, you will still need to understand these skills when your own code fails to give the expected results. And they are definitely needed when fixing bugs and maintaining code. In answer to your other questions, we use tools such as Azure Application Insights which does an incredible job of logging diagnostic information to enable us to debug production errors.

                                          "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare Home | LinkedIn | Google+ | Twitter

                                          D 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups