Thread: The end of an Era

  1. #16
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    Maybe it is better to use the shorter version. Don't link to the quote, though... that ruins the effect.

  2. #17
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    Yes sir. Sorry sir.

  3. #18
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    For one project I'm involved with we have one developer who is in charge of producing bugs.

    I generally use the debugger when it works with printf but crashes without printf. Oh those are the fun bugs

  4. #19
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by brewbuck View Post

    Continual testing is, of course, a given. But passing tests doesn't prove you have a working product
    Well, the code I write tends to either work perfectly or fail in a spectacular manner. My general debuggin technique is to look at the code, then add some Beep()'s in to see where it is running and where it craps out. Of course theres always the comment everything out until it stops crashing method. I generally use incremental build and auto-precompiled headers, so I usually only have to recompile the one file im in and then relink, takes maybe 10 seconds. Now if I have to recompile all 100,000 lines of code it takes like 2 minutes, which gets annoying. The fact I never use the debugger, and in fact rarely even compile the debug version drives my boss nuts, but most of the bugs I have to find arent ones that will show up in the debugger anyway.
    Last edited by abachler; 11-06-2007 at 04:04 PM.

  5. #20
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by abachler View Post
    I generally use incremental build and auto-precompiled headers, so I usually only have to recompile the one file im in and then relink, takes maybe 10 seconds.
    It's not the compile step that takes forever for me. Our build system manages that correctly. If only one file has changed, only one file gets recompiled.

    The linking step itself takes several minutes. JUST TO LINK. This is due to a poor choice of algorithm inside the GNU linker that scales terribly when you use many, many archive libraries. And yes, I've profiled it, traced it down, and proven it. If you are linking across an NFS share things get almost 3x worse. And of course, our product consists of 25 or 30 libraries, so the problem is greatly amplified.

    I actually tried creating a customized linker tool which merged ELF objects into larger and larger archives to feed into the linker -- it links much faster that way. The resulting tool was brittle and I never trusted the code it produced, so I stopped using it. Now I just put up with the stupidly slow link time.

    On other systems, where the linker is not GNU, the product links in seconds.

  6. #21
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    I don't understand how writing to cout or printf or adding beeps can be easier than running through the debugger, especially if you're using the VC++ debugger. I guess if it works for you, fine, but maybe a few weeks getting used to all the bells and whistles (no pun intended) available could make you even more productive.

  7. #22
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Well, as I said, most of the undocumented features in ym programs arent the kind that will crash the app, they just cause it to display interesting behavior. Even the app crashing bugs are usually easy enough to track down, 99% of them are a bad pointer. In fact the one that made me use the debugger was a bad pointer, but the source was convoluted. I was randomizing the sequence of an array of pointers and somehow a NULL was creeping in even though it 'shouldnt'. Ultimately the whole thing was resolved with a check for NULL prior to executing a function that took the pointer as an argument. I am using a pointer to an array of pointers, so 6.0 just showed me the value of the base pointer, while 2005 showed me the contents of the array ( which is why I can say I like 2005 better than 6.0 without lying about having never needed to use either one before).

  8. #23
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    >> I don't understand how writing to cout or printf or adding beeps can be easier than running through the debugger,
    I'm afraid of my debugger -- never used it. It could be complicated and I could fail at. It's an insecurity thing really.

  9. #24
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Quote Originally Posted by Daved View Post
    I don't understand how writing to cout or printf or adding beeps can be easier than running through the debugger, especially if you're using the VC++ debugger. I guess if it works for you, fine, but maybe a few weeks getting used to all the bells and whistles (no pun intended) available could make you even more productive.
    I've never found a debugger I liked. Never used VC++ and I won't use microsoft compilers anymore (bad incident with one a long time ago). In fact I hardly even use GUI frontends anymore. I have a good text editor and some good command line tools.

    That and the output method is pretty universal so when I'm flipping between a bunch of languages I don't have to remember which debugger does what.

  10. #25
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by abachler View Post
    I was randomizing the sequence of an array of pointers and somehow a NULL was creeping in even though it 'shouldnt'. Ultimately the whole thing was resolved with a check for NULL prior to executing a function that took the pointer as an argument.
    NULL-protection is always good but aren't you concerned that the NULL shouldn't have been present to begin with?

  11. #26
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    >> I'm afraid of my debugger -- never used it.
    I would put the debugger at #1 on my list of favorite/most helpful development tools. I use it more than any other part of the IDE. The VC++ debugger is extremely powerful and makes my life so much easier. I use it even when looking at code of people who post questions here.

    The simple parts are extremely helpful by themselves, including breakpoints, step over/step into/step out and the watch windows. More advanced stuff like modified breakpoints, the memory windows, set next statement and editing memory values as you go are great.

    I don't even use the Edit and Continue feature, either, which if it works could be fantastic.

    My list of best inventions ever goes something like this:

    TiVo
    The wheel
    VC++ debugger
    Tabbed browsing
    Sliced bread

    If you're already using VC++, learning the debugger is a no-brainer (unless of course you're completely happy with how you're doing things right now).


    >> I've never found a debugger I liked.
    I was never much of a fan of gdb when I used it long ago. There's a big difference between command line debuggers and a visual debugger. If you're not compiling with VC++, though, then it doesn't matter how good its debugger is. I don't know if there are any other visual debuggers for C++ that compare.
    Last edited by Daved; 11-06-2007 at 04:59 PM.

  12. #27
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by Daved View Post
    I was never much of a fan of gdb when I used it long ago. There's a big difference between command line debuggers and a visual debugger. If you're not compiling with VC++, though, then it doesn't matter how good it's debugger is. I don't know if there are any other visual debuggers for C++ that compare.
    gdb + emacs + cscope == super winning combo. All integrated in the same UI.

  13. #28
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    Wait. I have used the debugger but I assure you it was an accident. Something to do with just-in-time debugging and an assumption that hitting return fast and hard would make it go away... Would it really be as fast as writing some printing statements and such, Daved? Might take a look at it the next time I'm coding something. It always seemed a bit overkill to me in my simple world to be honest. Aside from the features you mentioned which others would be worth playing with?

  14. #29
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    Quote Originally Posted by Thantos View Post
    For one project I'm involved with we have one developer who is in charge of producing bugs.

    I generally use the debugger when it works with printf but crashes without printf. Oh those are the fun bugs
    I used to get those. The program wouldn't work so I'd put a couple printfs to debug. For whatever reason it would then work. Then I'd take out the printfs expecting the program to not work but it would still work and no other code had changed other than adding/commenting out those printfs. Yeah... fun indeed.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  15. #30
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    >> (bad incident with one a long time ago)
    Deaths?

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, 09:35 AM
  2. Modify to make Doubly Linked List
    By Dampecram in forum C Programming
    Replies: 10
    Last Post: 11-03-2008, 07:25 PM
  3. singly linked to doubly linked
    By jsbeckton in forum C Programming
    Replies: 10
    Last Post: 11-06-2005, 07: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