Documentation-Driven Development
Last week, I needed to make some pretty major updates to a web component in a design system I use for clients.
I’m a big fan of TDD, but I wasn’t mentally in a place to write my tests first.
I decided the easiest thing to do was document how the new component would work… before actually writing any code to implement the updates.
It was an entirely ADHD-driven decision, but it unlocked something for me! Writing the docs forced me to think about how the component would work: customizations I’d want to include, default settings, backwards compatibility, and so on.
This made writing the tests far easier, which then made writing the code easier.
I’m certainly not the first person to come up with idea of Documentation-Driven Development, but I definitely want to try this approach again.