Software Design: Tidy First?

Share this post

User's avatar
Software Design: Tidy First?
Getting Untangled

Getting Untangled

Kent Beck's avatar
Kent Beck
Apr 05, 2022
∙ Paid
27

Share this post

User's avatar
Software Design: Tidy First?
Getting Untangled
6
Share

You're changing the behavior of some code. You see a tidying that would make it easier to change. You tidy. Then you write another test case. Now you need to change the behavior some more. That leads to more tidying. An hour later you:

  • Actually understand all the behavior changes that need to be made.

  • Actually understand all the tidying that eases those behavior changes.

  • But you have a mess of tidyings & changes all tangled together.

You have at least 3 options, none of them attractive:

  • Ship it as is. This is impolite to reviewers & prone to errors but it's quick.

  • Untangle the tidyings and changes into separate PRs, or a sequence of PRs, or a sequence of commits in a single PR. This is more polite but it can be a lot of work.

  • Discard your work in progress & start over, tidying first. This is more work but it leaves a coherent chain of commits.

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Kent Beck
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share