Guess-driven development

A few days ago, I received a link to a blog post called some lesser-known truths about programming. Among other things, it states:

Bad programmers spend much of that 90% debugging code by randomly making changes and seeing if they work.

Patrick, my business partner, jokingly calls this Guess-Driven Development and I now take the liberty to publish the term in writing. I will admit that I have fallen for this type of development quite a few times. But now I have started to wonder: Where is the fine line between guessing and exploring?

When faced with a strange bug or error in some system, we are taught to use e.g. a debugger and over time, we hopefully become more adept at solving bugs. But sometimes (many times) I have solved a problem by almost randomly trying out different solutions. So is this guessing or exploring? I don’t have the answer.

Maybe I should have listened more carefully in Software Engineering class?

2 comments

  1. Hey David,

    Something that I have learned in my time as a developer is to hack less and think more. Making random code changes definitely falls under the category of ‘hacking’. Yes, exploration is an important part of what we do – but it’s guided, scientific (if I may be so bold to use the term) exploration – not random hacking. Cheers,

    Kevin

    1. Hey Kevin,
      Of course I agree with you that we should “hack less and think more”. I think it is actually a problem that many developers do not think hard enough about a problem before implementing a solution for it.
      You’re right on.
      David

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.