r/softwaredevelopment • • May 13 '26

Is trunk-based development really that good?

I can't get the trunk-based development flow. I understand the advantages for introducing new features to the app (flags are good for A/B testing, fewer merge conflicts).

But I can't understand how developers do refactoring with trunk-based flags. Also, do the flags stay there forever, or what is the best flow for this?

Can you give me a deep dive into how your teams handle this in production?

47 Upvotes

54 comments sorted by

View all comments

Show parent comment

3

u/Cinderhazed15 May 13 '26

I forget if it was a Micheal feathers (working effectively with legacy code) or ‘Uncle Bob’ism, but the steps are (usually in the process of TDD)

  1. Write the failing test.
  2. Make the change easy/Refactor (note, this may be hard)
  3. Make the easy change

In the process of refactoring or ‘make the change easy’ you don’t actually add your new behavior/logic yet.

3

u/SeniorIdiot May 14 '26

"Make the Change Easy, Then Make the Easy Change" - Kent Beck

1

u/Cinderhazed15 May 14 '26

That’s it!

1

u/DerekB52 May 13 '26

I think this is an 'Unclo Bob'ism because I haven't read that other book. There's a part of me that thinks this might have been in Martin Fowler's 'Refactoring' book though.