Slashdot Mirror


Printf Debugging Revisited

gsasha writes "After long nights spent in debugging, w e have developed a C++ logging facility geared for debugging - and an article that describes our debugging methodology. The article consists of two parts: the first one describes the basics of the method, and the second one presents advanced techniques (to be completed if there is enough reader interest).
Happy debugging!"

6 of 59 comments (clear)

  1. Looks primitive. by Anonymous Coward · · Score: 2, Insightful

    First look at the code... looks rather primitive[0]. Guess I have to read the paper to figure out what's new here?

    Don't think I will.

    [0] Which isn't necessarily a bad thing, but you'd wonder why it's here to begin with.

    1. Re:Looks primitive. by Viking+Coder · · Score: 2, Insightful

      Look, friend - first you're responding to an Anonymous Coward. Expecting an AC to RTFA is wishful thinking.

      Second, he's right - your code is rather primitive, as you admit. Why not start with a much more advanced logging utility, and then speak about using the logging consistently?

      Third, if your whole point was about a methodology, then talk about the methodology. Reading your article, it doesn't read like that - it reads much more like a User's Manual for how to use your code.

      Fourth, what makes you think that using loggers consistently is the answer? In fact, I can't see how to turn off your code (make it compile down to nothing, not merely something small) in release mode. You're essentially asking people to always use logging, for the sake of sometimes doing debugging.

      Fifth, have you actually researched how people will use your utility, or are you just making a blanket assertion that "it'll be easy to debug" if you merely follow some trick? Gotcha on this one - you're essentially pitching the idea of a silver bullet, while stating that "there is no silver bullet in sight." Well, which is it?

      Look, you might have some good ideas - but when pitching a methodology, speak about it in terms of a methodology, and don't lecture down to some random Anonymous Coward on Slashdot. That's like Bill Gates stopping in the supermarket to argue with some woman about whether "Start | Shutdown" makes any sense.

      --
      Education is the silver bullet.
  2. WTF's up with the links? by Anonymous Coward · · Score: 1, Insightful

    What's wrong with a simple link to the article? It already contains download links and links to the authors' websites. Splitting words up into multiple links isn't just annoying, but confuses people who use screen readers and Google. Editors, it's your job to massage submissions into a decent format.

  3. Some comments by Cthefuture · · Score: 4, Insightful

    I didn't read the paper, but I looked at the code (for me this is usually more telling).

    The first thing that jumps out at me is the coding style. Very junior programmer-ish. College student maybe? The style has that "everything crammed together" very diffcult to read feel. When I dug deeper I found the system to be over-designed and not well implemented.

    Nice try though, get some experience then try again.

    I've found that a simple C based logging facility is much more versatile. It can be used from C or C++ plus most programming languages and applications support calling external C libraries also.

    --
    The ratio of people to cake is too big
    1. Re:Some comments by Brandybuck · · Score: 4, Insightful

      Actually my experience is that you can tell how junior a programmer is by their style. While their styles will vary greatly, old timers will almost uniformly prefer an easy-for-others-to-read style. There are of course exceptions. Some junior programmers have been exposed to professors/managers/reviewers who won't accept unreadable code, and some senior programmers got tagged as "heroes" and have never had to maintain someone elses code.

      --
      Don't blame me, I didn't vote for either of them!
  4. log4c++ by Hard_Code · · Score: 2, Insightful

    Hasn't this wheel already been invented many many times?

    How about Log4C++, a port of the canonical Log4J logging package for Java.

    --

    It's 10 PM. Do you know if you're un-American?