Traits, r

Paul Johnson paul at
Fri Feb 8 16:44:21 GMT 2008

On Fri, Feb 08, 2008 at 04:04:51PM +0000, Peter Corlett wrote:
> On Fri, Feb 08, 2008 at 02:41:29PM +0000, Greg McCarroll wrote:
> > 'i guess it comes down to how clever the guy was before you, if its a
> > great programmer like MJD then even his 50% might be better than my 100%'
> Debugging a program requires you to be much smarter than just writing the
> program. Therefore, anybody writing a program to the full extent of their
> ability will be too dumb to debug it.
> (Of course, you could be brilliant and not bother to debug your code. And if
> you're *that* brilliant, stop coding and get back to writing the rest of
> TAoCP.)

I've never fully understood this argument.  Or more accurately, perhaps,
I've never really believed it.  Or even more accurately, I suppose, it's
the end of the week and there's only a few minutes left before I go to get
my train and I can't be bothered to start anything new so I'm going to
write mail to

But in any case, debugging seems to me to be an integral part of
programming.  If you crank out loads of code which doesn't work properly
you're not programming.  If you can't understand what you just wrote,
then why did you write it?

Now I'm not suggesting that debugging isn't more difficult than writing
code since it clearly is.  I'm just suggesting that the code without the
debugging isn't much use.

Now sometimes I find myself in the happy situation where having written a
bunch of code and associated tests it all just works the first time I run
it.  But I still have to go back and look at it to make sure it is
actually working rather than just appearing to be working.

But even in these situations I think I have done pre-emptive debugging.
That is, experience has taught me to approach the problem in a certain
way.  Or when I have been writing the code I have remembered to pay
special attention to certain points because I have learnt that that is
where bugs could easily creep in.

Actually, I suppose I'm not really disagreeing with anything here.
Perhaps I'm just being disagreeable.  And I'm not sure I really have a
good point to make either.

Perhaps it is just that writing code beyond the extent of your ability to
debug it isn't really programming.  If the code works at all it is
presumably by luck, or because you copied it from somewhere.  That's not

Oh, is that the time?  Must go and get that train ...

Paul Johnson - paul at

More information about the mailing list