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. Debuggers = wasteful timesink??

Debuggers = wasteful timesink??

Scheduled Pinned Locked Moved The Lounge
javacomquestion
22 Posts 15 Posters 0 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.
  • A Amanjit Gill

    Debuggers are a wasteful Timesink I couldn't disagree more with this article/statement whatever. I mean talking about real life and productiviy. Unbelievable!! Errr now *you* waste your precious time with that article :-) Gotta work. ______________________________ Java: The living proof Moore's law won't solve all your problems

    P Offline
    P Offline
    peterchen
    wrote on last edited by
    #5

    Not having read the article, the title is at least provocative, if not stupid. However, extensive use of the debugger makes people (like me) forget of other debugging techniques (asserts, printf's, "try the simplest first" etc.) that might be more effective. It all change when you're back to a) debugging race conditions or b) microcontroller code [edit]Having read the article, it is stupid.[/edit]


    "Vierteile den, der sie Hure schimpft mit einem türkischen Säbel."
    mlog || Agile Programming | doxygen

    1 Reply Last reply
    0
    • P Paul Watson

      "and a few judiciously placed print statements." The day I found out I could debug ASP.NET apps I rejoiced. Print (or Response.Write in ASP.NET/ASP) statements suck. They get hidden, they get lost, you have to use Response.End if you have redirects. And the number of times I and co-workers have left behind embarassing print statements in our code is not funny. Lets not forget that for web-dev a print statement can be misleading. A > for instance does not appear on the page, just in the source. Same goes for character encoding. Looking at in the debug window though and you can see exactly what the var contains. Plus what happens when you print out one var and leave another that you think is unrelated, but turns out to be the key in the bug? With a print statement, you have to put in and re-run the entire test. With a debug, the vars are all there in the little window that saves lives. I agree stepping through line-by-line is often a time waste, but that is why you have breakpoints to get to the point of break-down. regards, Paul Watson Bluegrass South Africa Brian Welsch wrote: "blah blah blah, maybe a potato?" while translating my Afrikaans. Crikey! ain't life grand?

      A Offline
      A Offline
      alex barylski
      wrote on last edited by
      #6

      Paul Watson wrote: And the number of times I and co-workers have left behind embarassing print statements in our code is not funny. Especially when your me and you use colorful words like "f*ck this s*it" and "f*ck i'm here" Thats kinda gotta look bad...but thats the way i've programmed since I was a wee boy :) so it's a hard habit to kick. Some people have actually laughed at me and asked if I could change that for them before it goes live (web dev projects) Ah well what can u do The word of the day is legs, let's go back to my house and spread the word ;P

      P 1 Reply Last reply
      0
      • A alex barylski

        Paul Watson wrote: And the number of times I and co-workers have left behind embarassing print statements in our code is not funny. Especially when your me and you use colorful words like "f*ck this s*it" and "f*ck i'm here" Thats kinda gotta look bad...but thats the way i've programmed since I was a wee boy :) so it's a hard habit to kick. Some people have actually laughed at me and asked if I could change that for them before it goes live (web dev projects) Ah well what can u do The word of the day is legs, let's go back to my house and spread the word ;P

        P Offline
        P Offline
        Paul Watson
        wrote on last edited by
        #7

        :blush: yeah, know what you mean. Our policy now is all comments that go to the client side (screen or in source) must be preceeded by the developers initials and :. So PMW:. Then before upload the developer must do a search and replace across the entire project. I remember even our graphic designer once left some awful comments in a PSD of a particularly difficult client. regards, Paul Watson Bluegrass South Africa Brian Welsch wrote: "blah blah blah, maybe a potato?" while translating my Afrikaans. Crikey! ain't life grand?

        R 1 Reply Last reply
        0
        • A Amanjit Gill

          Debuggers are a wasteful Timesink I couldn't disagree more with this article/statement whatever. I mean talking about real life and productiviy. Unbelievable!! Errr now *you* waste your precious time with that article :-) Gotta work. ______________________________ Java: The living proof Moore's law won't solve all your problems

          M Offline
          M Offline
          Michael P Butler
          wrote on last edited by
          #8

          What a load of crap! Debuggers are one of the most useful development tools. The ability to step through your code, line by line to make sure it is doing what you want it to do, rather than what you thought you told it to do, is one of the greatest assets of modern development. Obviously this guy hasn't written much serious code in his time, otherwise he wouldn't be talking out of his arse like this. I teach a lot of classes in C++, Java, C#, TDD, XP, Patterns, etc Ah, there we go. Teach. Probably not doing a lot of real world development then. with his or her nose buried in a debugger, painstakingly stepping from line to line, examining variables, setting breakpoints, and generally wasting time. The bug they are tracking could be found through simple inspection of the code. Modern development is far too complicated to rely on just looking at the code. The debugger lets you inspect the code and also check the results you are getting. I find this makes finding bugs so much easier, when you can see what's actually going wrong. Michael Blue canary in the outlet by the light switch Who watches over you Make a little birdhouse in your soul - They Might Be Giants

          A 1 Reply Last reply
          0
          • P Paul Watson

            :blush: yeah, know what you mean. Our policy now is all comments that go to the client side (screen or in source) must be preceeded by the developers initials and :. So PMW:. Then before upload the developer must do a search and replace across the entire project. I remember even our graphic designer once left some awful comments in a PSD of a particularly difficult client. regards, Paul Watson Bluegrass South Africa Brian Welsch wrote: "blah blah blah, maybe a potato?" while translating my Afrikaans. Crikey! ain't life grand?

            R Offline
            R Offline
            Rob Manderson
            wrote on last edited by
            #9

            The fact that such a policy was required kinda tells me that there was a lack of professionalism somewhere :) If you live in Melbourne and you need a street directory the absolute best one to buy is Melways. A few years ago (and unusually for me I can't remember the year - I think it was 1993 but I'm not sure) they did a big update. On the map of Tullamarine Airport (Melbourne's International Airport) someone wrote in the proofs 'looks funny doesn't it'. Someone else missed it and it went to print. That edition is now a collectors item. Hmmmm I wish my mistakes had been half as benign :) Rob Manderson http://www.mindprobes.net "I killed him dead cuz he was stepping on my turf, cutting me out of my bling the same way my ho cuts cookies, officer" "Alright then, move along" - Ian Darling, The Lounge, Oct 10 2003

            1 Reply Last reply
            0
            • P Paul Watson

              "and a few judiciously placed print statements." The day I found out I could debug ASP.NET apps I rejoiced. Print (or Response.Write in ASP.NET/ASP) statements suck. They get hidden, they get lost, you have to use Response.End if you have redirects. And the number of times I and co-workers have left behind embarassing print statements in our code is not funny. Lets not forget that for web-dev a print statement can be misleading. A > for instance does not appear on the page, just in the source. Same goes for character encoding. Looking at in the debug window though and you can see exactly what the var contains. Plus what happens when you print out one var and leave another that you think is unrelated, but turns out to be the key in the bug? With a print statement, you have to put in and re-run the entire test. With a debug, the vars are all there in the little window that saves lives. I agree stepping through line-by-line is often a time waste, but that is why you have breakpoints to get to the point of break-down. regards, Paul Watson Bluegrass South Africa Brian Welsch wrote: "blah blah blah, maybe a potato?" while translating my Afrikaans. Crikey! ain't life grand?

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #10

              Don't you have them controlled by a DEBUG switch that is cleared in the release build ? That way you can switch the statements back on at any time. Elaine :rose: The tigress is here :-D

              P 1 Reply Last reply
              0
              • L Lost User

                Don't you have them controlled by a DEBUG switch that is cleared in the release build ? That way you can switch the statements back on at any time. Elaine :rose: The tigress is here :-D

                P Offline
                P Offline
                Paul Watson
                wrote on last edited by
                #11

                Right, ASP has debug and release builds :-D ASP.NET has, but not for Resonse.Write and it is mighty hard breaking that habit :) regards, Paul Watson Bluegrass South Africa Brian Welsch wrote: "blah blah blah, maybe a potato?" while translating my Afrikaans. Crikey! ain't life grand?

                1 Reply Last reply
                0
                • A Amanjit Gill

                  Debuggers are a wasteful Timesink I couldn't disagree more with this article/statement whatever. I mean talking about real life and productiviy. Unbelievable!! Errr now *you* waste your precious time with that article :-) Gotta work. ______________________________ Java: The living proof Moore's law won't solve all your problems

                  R Offline
                  R Offline
                  Rob Manderson
                  wrote on last edited by
                  #12

                  If you don't know what you're doing yes a debugger will be a timesink. In the world of 'every line of code is perfect everytime' it's a timesink. In the world I live in, where I can't remember every single detail of every line of code I've written but I have an overall view of the code, in a world where I know that 'this' should happen but didn't, so breakpoint there and let's see what really happens so I can match my mental model with the real world, a debugger is invaluable. Rob Manderson http://www.mindprobes.net "I killed him dead cuz he was stepping on my turf, cutting me out of my bling the same way my ho cuts cookies, officer" "Alright then, move along" - Ian Darling, The Lounge, Oct 10 2003

                  1 Reply Last reply
                  0
                  • A Amanjit Gill

                    Debuggers are a wasteful Timesink I couldn't disagree more with this article/statement whatever. I mean talking about real life and productiviy. Unbelievable!! Errr now *you* waste your precious time with that article :-) Gotta work. ______________________________ Java: The living proof Moore's law won't solve all your problems

                    T Offline
                    T Offline
                    Tibor Blazko
                    wrote on last edited by
                    #13

                    the best solution of some developers is self-debugging code just put code into pool and let others to fix it some people simply do not need debugging at all t!

                    1 Reply Last reply
                    0
                    • A Amanjit Gill

                      Debuggers are a wasteful Timesink I couldn't disagree more with this article/statement whatever. I mean talking about real life and productiviy. Unbelievable!! Errr now *you* waste your precious time with that article :-) Gotta work. ______________________________ Java: The living proof Moore's law won't solve all your problems

                      C Offline
                      C Offline
                      ColinDavies
                      wrote on last edited by
                      #14

                      This kinda statement always seems to provoke emotion. Personally I never use the||a debugger. I guess it must be pure habit to use other methods. Regardz Colin J Davies

                      *** WARNING *
                      This could be addictive
                      **The minion's version of "Catch :bob: "

                      It's a real shame that people as stupid as you can work out how to use a computer. said by Christian Graus in the Soapbox

                      1 Reply Last reply
                      0
                      • A Amanjit Gill

                        Debuggers are a wasteful Timesink I couldn't disagree more with this article/statement whatever. I mean talking about real life and productiviy. Unbelievable!! Errr now *you* waste your precious time with that article :-) Gotta work. ______________________________ Java: The living proof Moore's law won't solve all your problems

                        K Offline
                        K Offline
                        KaRl
                        wrote on last edited by
                        #15

                        Of course debuggers aren't indispensable, but what time savers they are! It's like the author lives in a strange world where productivity and time constraints don't exit. Lucky guy?


                        Silence Means Death Stand On Your Feet Inner Fear Your Worst Enemy

                        1 Reply Last reply
                        0
                        • A Amanjit Gill

                          Debuggers are a wasteful Timesink I couldn't disagree more with this article/statement whatever. I mean talking about real life and productiviy. Unbelievable!! Errr now *you* waste your precious time with that article :-) Gotta work. ______________________________ Java: The living proof Moore's law won't solve all your problems

                          M Offline
                          M Offline
                          Mike Dimmick
                          wrote on last edited by
                          #16

                          In theory, if you know all of the possible conditions that could occur, and you're doing development test-first, and your tests cover all the possible cases, you don't need a debugger. Either the test fails, or the program works. Alternatively, all you have to do is read and thoroughly understand the source code, you can prove that the code is correct. :laugh: The problem with this idea is that a program listing is a static entity - a running program (a process) is a dynamic one. Out here in the real world, your program has crashed and left you with the 'Unhandled Exception' box (or as John Robbins quotes Chris Sells as saying, "My program went on vacation and all I got was this lousy address.") How do you know what conditions your tests didn't cover? You pull out the debugger and inspect the state of the program. Robbins tries to teach proactive debugging in his book "Debugging Applications" (and the revised edition, "Debugging Applications for Microsoft .NET and Microsoft Windows", to give it the full title). Basically this involves using the debugger to step through the code while testing it, adjust variables, set the instruction pointer on error handling code, inject faults, etc. I find that it helps me to debug while writing the code - a kind of manual in-depth inspection without writing formal test routines. I feel uncomfortable without a debugger, as I had to be this week when testing a mobile device application that needed to talk to a peripheral through the only available port - therefore, I couldn't connect the debugger. Hello, MessageBox debugging. Test suites are useful for repetitive, repeatable regression tests. But they can't tell you when you don't have a suitable test, and they can't tell you what's wrong when a test does fail.

                          1 Reply Last reply
                          0
                          • A Amanjit Gill

                            Debuggers are a wasteful Timesink I couldn't disagree more with this article/statement whatever. I mean talking about real life and productiviy. Unbelievable!! Errr now *you* waste your precious time with that article :-) Gotta work. ______________________________ Java: The living proof Moore's law won't solve all your problems

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

                            Well, there are several things going on here in this article that are easy to overlook. First off, the guy lures you into the idea that incredibly powerful tools waste time because they're so hard to learn, having so many features. Good grief. When I debug something, I set a breakpoint and I hover the mouse over a variable to see its contents, and I single step to see the flow. That's about it. Do I use all those other fancy features on a regular basis? Of course not! I choose the features I need to efficiently solve the problem at hand. The second problem with this commentary is more insiduous. TDD merely shifts the time spend in debugging from the back-end to the front-end. Essentially, with TDD, you are "debugging" the code first, then writing it. In my mind, TDD is still debugging, but it uses a different tool--the unit test. This fellow seems to fail to recognize this. If you look at programming as two tasks--writing code and testing code (which includes debugging it), he's still spending the same (and probably more) time debugging. He's just doing it before writing code, rather than after. Finally, using students to examplify the problem with debuggers is like saying jumbo jets are bad because your Cessna pilot can't fly it. They're students for a reason. I remember wasting time with a debugger because my skills at reviewing my own code were untrained. But guess what? The debugger became my training tool, and I began to use it less and less because I understand programming better. [edit] And I failed to mention the biggest problem of all--writing good unit tests is at least as complicated, if not more so, of a skill to learn than operating a feature-laden debugger.[/edit] Marc Latest AAL Article My blog Join my forum!

                            A 1 Reply Last reply
                            0
                            • A Amanjit Gill

                              Debuggers are a wasteful Timesink I couldn't disagree more with this article/statement whatever. I mean talking about real life and productiviy. Unbelievable!! Errr now *you* waste your precious time with that article :-) Gotta work. ______________________________ Java: The living proof Moore's law won't solve all your problems

                              J Offline
                              J Offline
                              Joe Woodbury
                              wrote on last edited by
                              #18

                              What silliness. I just fixed a handful of bugs that would have taken ages to track down without a debugger (and I was using all sorts of methods to help find them.) Two more bugs were caught by the VS7 debugging options and the debugger took me right to the offending line. But there is an additional advantage of a debugger; simply stepping through the code and observing what it is actually doing. I cannot overstate the benefit of doing this. Not only has this helped me understand my own, or other's, code better, I've found very obscure bugs and/or performance bottlenecks doing this. My own experience is that developers who understand their tools and use them write more solid code than those who don't. Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

                              A 1 Reply Last reply
                              0
                              • P Paul Watson

                                "and a few judiciously placed print statements." The day I found out I could debug ASP.NET apps I rejoiced. Print (or Response.Write in ASP.NET/ASP) statements suck. They get hidden, they get lost, you have to use Response.End if you have redirects. And the number of times I and co-workers have left behind embarassing print statements in our code is not funny. Lets not forget that for web-dev a print statement can be misleading. A > for instance does not appear on the page, just in the source. Same goes for character encoding. Looking at in the debug window though and you can see exactly what the var contains. Plus what happens when you print out one var and leave another that you think is unrelated, but turns out to be the key in the bug? With a print statement, you have to put in and re-run the entire test. With a debug, the vars are all there in the little window that saves lives. I agree stepping through line-by-line is often a time waste, but that is why you have breakpoints to get to the point of break-down. regards, Paul Watson Bluegrass South Africa Brian Welsch wrote: "blah blah blah, maybe a potato?" while translating my Afrikaans. Crikey! ain't life grand?

                                A Offline
                                A Offline
                                Amanjit Gill
                                wrote on last edited by
                                #19

                                Paul Watson wrote: Lets not forget that for web-dev a print statement can be misleading. [..] I agree! Another one: Consider a layered application, where some high level code (main app) calls another module/class, say in a DLL. Each of them gives verbose output to the debug window - You will have problems sorting out which component gave which output, a total mess. Even with a logging API. ______________________________ Java: The living proof Moore's law won't solve all your problems

                                1 Reply Last reply
                                0
                                • J Joe Woodbury

                                  What silliness. I just fixed a handful of bugs that would have taken ages to track down without a debugger (and I was using all sorts of methods to help find them.) Two more bugs were caught by the VS7 debugging options and the debugger took me right to the offending line. But there is an additional advantage of a debugger; simply stepping through the code and observing what it is actually doing. I cannot overstate the benefit of doing this. Not only has this helped me understand my own, or other's, code better, I've found very obscure bugs and/or performance bottlenecks doing this. My own experience is that developers who understand their tools and use them write more solid code than those who don't. Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

                                  A Offline
                                  A Offline
                                  Amanjit Gill
                                  wrote on last edited by
                                  #20

                                  Joe Woodbury wrote: What silliness. I just fixed a handful of bugs that would have taken ages to track down without a debugger [..]( - Yeah, its basically a very good thing to get your debugger to that line whre the whole problem starts as soon you press F11. you have the whole thing reproduced to that point. you have the stack trace, the variables, everything. - Or leaks - Consider other peoples code you do not know - you have only .h or .dll and you might have debugging info enabled. Its so important - Some runtimes (java,python) automatically give you stack traces via stdout/stderr but with c++/c you would have to dig for it .. debugger of course solves that problem too ______________________________ Java: The living proof Moore's law won't solve all your problems

                                  1 Reply Last reply
                                  0
                                  • M Michael P Butler

                                    What a load of crap! Debuggers are one of the most useful development tools. The ability to step through your code, line by line to make sure it is doing what you want it to do, rather than what you thought you told it to do, is one of the greatest assets of modern development. Obviously this guy hasn't written much serious code in his time, otherwise he wouldn't be talking out of his arse like this. I teach a lot of classes in C++, Java, C#, TDD, XP, Patterns, etc Ah, there we go. Teach. Probably not doing a lot of real world development then. with his or her nose buried in a debugger, painstakingly stepping from line to line, examining variables, setting breakpoints, and generally wasting time. The bug they are tracking could be found through simple inspection of the code. Modern development is far too complicated to rely on just looking at the code. The debugger lets you inspect the code and also check the results you are getting. I find this makes finding bugs so much easier, when you can see what's actually going wrong. Michael Blue canary in the outlet by the light switch Who watches over you Make a little birdhouse in your soul - They Might Be Giants

                                    A Offline
                                    A Offline
                                    Amanjit Gill
                                    wrote on last edited by
                                    #21

                                    Michael P Butler wrote: Ah, there we go. Teach. Probably not doing a lot of real world development then. As far as I can remember, absolute newbees do not get the point of line-by-line execution by a runtime. If they actually see a debugger tracing through their code and see the value of vars change, something inside their heads makes "click" (basically, this way you just set the troff flag in their brain's status register and off they go ;) ). ______________________________ Java: The living proof Moore's law won't solve all your problems

                                    1 Reply Last reply
                                    0
                                    • M Marc Clifton

                                      Well, there are several things going on here in this article that are easy to overlook. First off, the guy lures you into the idea that incredibly powerful tools waste time because they're so hard to learn, having so many features. Good grief. When I debug something, I set a breakpoint and I hover the mouse over a variable to see its contents, and I single step to see the flow. That's about it. Do I use all those other fancy features on a regular basis? Of course not! I choose the features I need to efficiently solve the problem at hand. The second problem with this commentary is more insiduous. TDD merely shifts the time spend in debugging from the back-end to the front-end. Essentially, with TDD, you are "debugging" the code first, then writing it. In my mind, TDD is still debugging, but it uses a different tool--the unit test. This fellow seems to fail to recognize this. If you look at programming as two tasks--writing code and testing code (which includes debugging it), he's still spending the same (and probably more) time debugging. He's just doing it before writing code, rather than after. Finally, using students to examplify the problem with debuggers is like saying jumbo jets are bad because your Cessna pilot can't fly it. They're students for a reason. I remember wasting time with a debugger because my skills at reviewing my own code were untrained. But guess what? The debugger became my training tool, and I began to use it less and less because I understand programming better. [edit] And I failed to mention the biggest problem of all--writing good unit tests is at least as complicated, if not more so, of a skill to learn than operating a feature-laden debugger.[/edit] Marc Latest AAL Article My blog Join my forum!

                                      A Offline
                                      A Offline
                                      Amanjit Gill
                                      wrote on last edited by
                                      #22

                                      Marc Clifton wrote: First off, the guy lures you into the idea that incredibly powerful tools waste time because they're so hard to learn, having so many features. Right, he even comes along with a software development process (Extreme programming) and compares it with a tool (a debugger). People use a tool for a specific reason. It's just a tool. It does not say anything about programming abilities. In 1989 when i was programmming 68k assembly, you basically had step, step into, run-to-line, print exp, etc.. these commands haven't really changed since then. ______________________________ Java: The living proof Moore's law won't solve all your problems

                                      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