DEV Community

Jonathan Hall
Jonathan Hall

Posted on • Originally published at jhall.io on

Guess-Driven Development

Have you ever seen a pull request with half a dozen, seemingly unrelated changes, all in the name of fixing a specific bug?

The last time this happened to me, I requested clarification on the purpose of a number of the changes, suggested a couple small refactors, pointed out that a couple of the changes were unnecessary or even counter-productive…

After a few back-and-forths, the PR went from about 40 lines changed to 2 lines changed. All the unrelated, unnecessary bits had been removed.

This is the result of what I have come to call Guess-Driven Development.

It happens when someone doesn’t really know what’s causing a bug, so they just start changing things, until the bug goes away. Then they commit their entire change set, without much thought.


If you enjoyed this message, subscribe to The Daily Commit to get future messages to your inbox.

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (1)

Collapse
 
dariusv_65 profile image
darius-v • Edited

I think guessing is good but then after you made it work you would need to understand what fixed the bug and as you say remove unnecessary things.

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay