Amy Blankenship
1 min readJul 23, 2024

--

I do TDD. Not always, because the codebase I was hired to work on isn't of sufficient quality to make it feasible, but as I can. And the chief benefit of writing the test first is that it forces you to describe, in code, what your code should do, before you write it.

It's actually far faster to write test-first than any other way, because the only code you have to run as you work on it is the code you're working on. You simply don't notice how much time you're wasting by building the entire project, figuring out how to get the data into a state where you can check a specific scenario, and then running through that scenario, over and over, until some of the spaghetti you're throwing at the wall finally sticks. And I can't tell you how many times I've been on a team where something has caused the full system not to be able to run and I'm still plugging along in my tests--because I don't need the full system to run. The site I'm working on actually shuts down for 2 hours every afternoon, and if I'm working on something where I can't develop in tests, I actually am extremely limited in what I can do.

--

--

Amy Blankenship
Amy Blankenship

Written by Amy Blankenship

Full Stack developer at fintech company. I mainly write about React, Javascript, Typescript, and testing.

No responses yet