The end of an Era

This is a discussion on The end of an Era within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Woe is me, for the first time today I actually encountered a problem with some code for which I had ...

  1. #1
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189

    The end of an Era

    Woe is me, for the first time today I actually encountered a problem with some code for which I had to result to running the debugger. After 28 years of programming without once resorting to the debugger, I now hang my head in shame :cry:

    On the up side I like the 2005 debugger better than 6.0
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >After 28 years of programming without once resorting to the debugger
    ...you finally started writing something non-trivial?
    My best code is written with the delete key.

  3. #3
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    Quote Originally Posted by Prelude View Post
    ...you finally started writing something non-trivial?
    Roomba's aren't going to program themselves

  4. #4
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,239
    Quote Originally Posted by abachler View Post
    Woe is me, for the first time today I actually encountered a problem with some code for which I had to result to running the debugger. After 28 years of programming without once resorting to the debugger, I now hang my head in shame :cry:
    If I can't spot a problem within 10 minutes by inspection I usually just go straight to the debugger. Adding print statements is a much slower cycle because the code takes about 3 minutes to link. 3 minute turnaround just to add some debug prints sucks.

    If I was working with a smaller, nimbler codebase I'd probably just use print statements for a lot of things.

    Debugger hardware watchpoints are great for playing the "Who the hell changed the value in this variable" game.

  5. #5
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,728
    Does anyone follow the "test first" principle of extreme programming? It seems to me that such an approach would rarely require the use of a debugger since the currently failing test would immediately show the source the problem.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  6. #6
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,239
    Quote Originally Posted by laserlight View Post
    Does anyone follow the "test first" principle of extreme programming? It seems to me that such an approach would rarely require the use of a debugger since the currently failing test would immediately show the source the problem.
    That would be true if testing was guaranteed to find all errors. Then, you could actually assume that if Build 10 is good, and Build 11 is bad, then an error was introduced somewhere between Build 10 and Build 11.

    In reality, the error may have been introduced back in Build 8, was not uncovered during testing, and now some benign change between Build 10 and Build 11 has caused it to "wake up."

    Continual testing is, of course, a given. But passing tests doesn't prove you have a working product

  7. #7
    Registered User
    Join Date
    Jan 2005
    Posts
    7,318
    >> After 28 years of programming without once resorting to the debugger
    Wow, I almost never run my program except through the debugger. How long do you take to find the causes of bugs if you do it by looking at code?

  8. #8
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,262
    >> On the up side I like the 2005 debugger better than 6.0
    Er... when did you use the other one? LIAR!
    I have yet to use it... though I think it's a-la Prelude's response.

    >> How long do you take to find the causes of bugs if you do it by looking at code?
    I generally don't program bugs into my code

  9. #9
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,728
    That would be true if testing was guaranteed to find all errors. Then, you could actually assume that if Build 10 is good, and Build 11 is bad, then an error was introduced somewhere between Build 10 and Build 11.

    In reality, the error may have been introduced back in Build 8, was not uncovered during testing, and now some benign change between Build 10 and Build 11 has caused it to "wake up."
    Ah, that makes sense.

    I generally don't program bugs into my code
    I have seen this quote attributed to Dijkstra: "If debugging is the process of removing bugs, then programming must be the process of putting them in."
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  10. #10
    Registered User
    Join Date
    Jan 2005
    Posts
    7,318
    >> I generally don't program bugs into my code

    I take pride in the fact that my code only generates a hundred or so bugs per feature. I don't think it's humanly possible to code in our app without creating one.

  11. #11
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,239
    Quote Originally Posted by Daved View Post
    Wow, I almost never run my program except through the debugger. How long do you take to find the causes of bugs if you do it by looking at code?
    I find that sometimes, using a debugger seems to make my brain shut off. I've wasted hours tracing through code where I SWORE the problem was, only to find the error just by stepping back and spending 15 seconds actually thinking about it.

    The other technique I use is to speak to the photograph of my son which sits on my desk. I try to explain the problem to him. Usually when I do this the solution occurs to me. Thanks little guy!

  12. #12
    Registered User
    Join Date
    Jan 2005
    Posts
    7,318
    My kid has a look on her face that says, "Seriously? You're seriously looking at me for help? Have you seen that code? Good luck buddy." Needless to say that doesn't help.

  13. #13
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,262
    God, nobody has a sense of humour anymore. Sure I've programmed bugs into my code. But nothing that needed going to the debugger.

    >> my code only generates a hundred or so bugs per feature
    That's going in my signature. You mind? I understand what you mean, of course, but taken out of context that is very funny!

    I have no kids. Most of my bugs are from me not thinking about something right.
    Last edited by twomers; 11-06-2007 at 12:29 PM.

  14. #14
    Registered User
    Join Date
    Jan 2005
    Posts
    7,318
    >> God, nobody has a sense of humour anymore.
    I think everybody understands you weren't being serious. Either that or you really work on some trivial programs, like write a program that maybe compiles and maybe doesn't, but doesn't do anything. It'd be hard to unintentionally create a bug for that one.

    >> That's going in my signature. You mind?
    You should use the whole line. I take pride in that fact. We're currently on bug #13000, and we reset to 1 several years ago.

  15. #15
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,262
    >> You should use the whole line.
    There is that. Links to the quote though. I'm kinda going for people reading it out of context. Not running a program is a good way not to have any bugs alright.

    >> I think everybody understands you weren't being serious.
    Yeah. I know. But no acknowledgment? What kind of world is this?

Page 1 of 3 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 08:35 AM
  2. Modify to make Doubly Linked List
    By Dampecram in forum C Programming
    Replies: 10
    Last Post: 11-03-2008, 06:25 PM
  3. singly linked to doubly linked
    By jsbeckton in forum C Programming
    Replies: 10
    Last Post: 11-06-2005, 06:47 PM
  4. socket newbie, losing a few chars from server to client
    By registering in forum Linux Programming
    Replies: 2
    Last Post: 06-07-2003, 11:48 AM
  5. Next Question...
    By Azmeos in forum C++ Programming
    Replies: 3
    Last Post: 06-06-2003, 02:40 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21