Thought for the week

Discussion in 'NZ Computing' started by Lawrence D'Oliveiro, Oct 4, 2007.

  1. Found this in someone's USENET posting:

    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. --Brian W. Kernighan

    Actually, I don't think I'd agree. To me, debugging seems about as hard as
    writing the code, and seems to take almost the same amount of time.
    Lawrence D'Oliveiro, Oct 4, 2007
    #1
    1. Advertising

  2. In message <>, Don Hills wrote:

    > In article <fe26nl$vs0$>,
    > Lawrence D'Oliveiro <_zealand> wrote:
    >>Found this in someone's USENET posting:
    >>
    >> 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. --Brian W. Kernighan
    >>
    >>Actually, I don't think I'd agree. To me, debugging seems about as hard as
    >>writing the code, and seems to take almost the same amount of time.

    >
    > For me, it depends on how long it is since I wrote the code. By the time a
    > year or two has gone by I marvel at how much smarter I must have been then
    > than I am now, because it takes a significant amount of time to get my
    > head around the code structure again.


    That's the kind of excuse I take to add more comments. :)
    Lawrence D'Oliveiro, Oct 4, 2007
    #2
    1. Advertising

  3. Lawrence D'Oliveiro

    Don Hills Guest

    In article <fe26nl$vs0$>,
    Lawrence D'Oliveiro <_zealand> wrote:
    >Found this in someone's USENET posting:
    >
    > 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. --Brian W. Kernighan
    >
    >Actually, I don't think I'd agree. To me, debugging seems about as hard as
    >writing the code, and seems to take almost the same amount of time.


    For me, it depends on how long it is since I wrote the code. By the time a
    year or two has gone by I marvel at how much smarter I must have been then
    than I am now, because it takes a significant amount of time to get my head
    around the code structure again.

    --
    Don Hills (dmhills at attglobaldotnet) Wellington, New Zealand
    "New interface closely resembles Presentation Manager,
    preparing you for the wonders of OS/2!"
    -- Advertisement on the box for Microsoft Windows 2.11 for 286
    Don Hills, Oct 4, 2007
    #3
  4. Lawrence D'Oliveiro

    Don Hills Guest

    In article <fe2dei$4i7$>,
    Lawrence D'Oliveiro <_zealand> wrote:
    >
    >That's the kind of excuse I take to add more comments. :)


    I'm good at commenting, and I have little trouble working out how the code
    works from them a year later. I just find myself wishing I was as smart as
    the person who wrote the code. because if I had to write it all over again
    I wouldn't be able to make it as elegant and efficient.

    --
    Don Hills (dmhills at attglobaldotnet) Wellington, New Zealand
    "New interface closely resembles Presentation Manager,
    preparing you for the wonders of OS/2!"
    -- Advertisement on the box for Microsoft Windows 2.11 for 286
    Don Hills, Oct 4, 2007
    #4
  5. Lawrence D'Oliveiro

    Puddle Guest

    Don Hills wrote:
    > In article <fe26nl$vs0$>,
    > Lawrence D'Oliveiro <_zealand> wrote:
    >> Found this in someone's USENET posting:
    >>
    >> 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. --Brian W. Kernighan
    >>
    >> Actually, I don't think I'd agree. To me, debugging seems about as hard as
    >> writing the code, and seems to take almost the same amount of time.

    >
    > For me, it depends on how long it is since I wrote the code. By the time a
    > year or two has gone by I marvel at how much smarter I must have been then
    > than I am now, because it takes a significant amount of time to get my head
    > around the code structure again.
    >


    That is a little different to me, when I look back at code I wrote a few
    years ago I always wonder why I didn't write it in a better way and am
    always tempted to rewrite parts to improve it, I generally like to think
    that I am always gaining more experience and learning new tricks :). I
    do agree though it takes a while to work out exactly what is going on in
    a program you haven't worked on in a long time, even with code well
    commented it is not the same thing as when you have been working on it
    constantly and know where everything is completely in your mind etc..
    Puddle, Oct 4, 2007
    #5
  6. Lawrence D'Oliveiro

    Shane Guest

    Lawrence D'Oliveiro wrote:

    > Found this in someone's USENET posting:
    >
    > 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. --Brian W. Kernighan
    >
    > Actually, I don't think I'd agree. To me, debugging seems about as hard as
    > writing the code, and seems to take almost the same amount of time.


    If we were so clever to put bugs in, then of course its going to be harder
    to get them out.. othwerwise we wouldnt have put them there in the first
    place.

    --
    Hardware: n, Parts of a computer that you can kick.
    Shane, Oct 4, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian
    Replies:
    18
    Views:
    663
    TechGeekPro
    Jul 21, 2004
  2. Neil
    Replies:
    10
    Views:
    743
    Rowdy Yates
    Jul 27, 2004
  3. =?Utf-8?B?TWl0Y2ggUy4=?=

    OT : Just a thought

    =?Utf-8?B?TWl0Y2ggUy4=?=, Jul 28, 2004, in forum: MCSE
    Replies:
    26
    Views:
    863
  4. Mike T.
    Replies:
    10
    Views:
    614
    =?Windows-1252?Q?Frisbee=AE?=
    Sep 16, 2004
  5. Giuen
    Replies:
    0
    Views:
    874
    Giuen
    Sep 12, 2008
Loading...

Share This Page