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. Kernighans Law

Kernighans Law

Scheduled Pinned Locked Moved The Lounge
debugging
13 Posts 10 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.
  • E Ennis Ray Lynch Jr

    I have never found debugging to by hard. More of a simple algorithmic process of deducing errors using common tools and techniques. It is, however, time-consuming.

    Need custom software developed? I do C# development and consulting all over the United States.
    If you don't ask questions the answers won't stand in your way.
    Doing a job is like selecting a mule, you can't choose just the front half xor the back half so when you ask me to do a job don't expect me to do it half-assed.

    J Offline
    J Offline
    Jim SS
    wrote on last edited by
    #4

    You're right. The debugging is fine, it's finding bugs that's the problem. TDD seems to be catching on. It works if the tests reflect the requirements well enough. Debugging gets bad when you are integrating with something that isn't well documented (Blackberry).

    SS => Qualified in Submarines "We sleep soundly in our beds because rough men stand ready in the night to visit violence on those who would do us harm". Winston Churchill

    1 Reply Last reply
    0
    • P PIEBALDconsult

      That explains why the standard C libraries are only half as clever as they should be.

      J Offline
      J Offline
      Jim Crafton
      wrote on last edited by
      #5

      PIEBALDconsult wrote:

      are only half as clever

      Half is being pretty generous! :)

      ¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog Just Say No to Web 2 Point Oh

      P 1 Reply Last reply
      0
      • J Jim SS

        "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." No wonder no-one can adequately debug their own code.

        SS => Qualified in Submarines "We sleep soundly in our beds because rough men stand ready in the night to visit violence on those who would do us harm". Winston Churchill

        R Offline
        R Offline
        Rama Krishna Vavilala
        wrote on last edited by
        #6

        Yes! In fact one of my plans was to write articles on some tough debugging situations I have been through in my career. In majority of cases fixing the code in question turned out to be very simple. Finding the problem was always hard.

        D 1 Reply Last reply
        0
        • J Jim Crafton

          PIEBALDconsult wrote:

          are only half as clever

          Half is being pretty generous! :)

          ¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog Just Say No to Web 2 Point Oh

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #7

          Well he didn't have access to the plethora of books on C we have and he couldn't post, "Urgent! Need codez for C library!", messages on CP.

          1 Reply Last reply
          0
          • J Jim SS

            "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." No wonder no-one can adequately debug their own code.

            SS => Qualified in Submarines "We sleep soundly in our beds because rough men stand ready in the night to visit violence on those who would do us harm". Winston Churchill

            J Offline
            J Offline
            John M Drescher
            wrote on last edited by
            #8

            If you write multithreaded code with reader writer locks and deadlock avoidance I can fully agree with that statement. In my line of work I have been doing this since the late 1990s since most of my projects have needed 2 or more cores back then and even though CPUs are much faster today a typical dataset is also 4 to 8 times as large so this has not gone away..

            John

            B 1 Reply Last reply
            0
            • R Rama Krishna Vavilala

              Yes! In fact one of my plans was to write articles on some tough debugging situations I have been through in my career. In majority of cases fixing the code in question turned out to be very simple. Finding the problem was always hard.

              D Offline
              D Offline
              Dan Neely
              wrote on last edited by
              #9

              Please do. I'd be interested in reading them.

              Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

              1 Reply Last reply
              0
              • J Jim SS

                "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." No wonder no-one can adequately debug their own code.

                SS => Qualified in Submarines "We sleep soundly in our beds because rough men stand ready in the night to visit violence on those who would do us harm". Winston Churchill

                S Offline
                S Offline
                Shog9 0
                wrote on last edited by
                #10

                Jim (SS) wrote:

                No wonder no-one can adequately debug their own code.

                I can, because i'm lazy and therefore never write particularly clever code. ...unfortunately, in practice i'm also too lazy to ever properly debug my lazy code... :-\

                1 Reply Last reply
                0
                • J Jim SS

                  "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." No wonder no-one can adequately debug their own code.

                  SS => Qualified in Submarines "We sleep soundly in our beds because rough men stand ready in the night to visit violence on those who would do us harm". Winston Churchill

                  L Offline
                  L Offline
                  led mike
                  wrote on last edited by
                  #11

                  Well I am currently debugging some of the most unclever code I have ever seen. I doubt it could be any more uncleverer. It is all but impossible to understand, like trying to solve a 100x100 rubix polygon. X|

                  1 Reply Last reply
                  0
                  • J John M Drescher

                    If you write multithreaded code with reader writer locks and deadlock avoidance I can fully agree with that statement. In my line of work I have been doing this since the late 1990s since most of my projects have needed 2 or more cores back then and even though CPUs are much faster today a typical dataset is also 4 to 8 times as large so this has not gone away..

                    John

                    B Offline
                    B Offline
                    bulg
                    wrote on last edited by
                    #12

                    Why are people so scared of multi-threaded code? Seems rather intuitive to me..

                    J 1 Reply Last reply
                    0
                    • B bulg

                      Why are people so scared of multi-threaded code? Seems rather intuitive to me..

                      J Offline
                      J Offline
                      John M Drescher
                      wrote on last edited by
                      #13

                      Much harder to debug timing issues / race conditions than single threaded code.

                      John

                      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