Writing tests finally clicked and it quietly changed how I write everything
For the longest time tests felt like a chore someone made me do after the 'real' work. Then on a gnarly feature I wrote a test first, just to pin down what 'correct' even meant, and suddenly my functions got smaller, my inputs got clearer, and I stopped being scared to refactor.
Not preaching 100% coverage or strict TDD. Just: writing the test made me design the thing better before I wrote a line of it. Wish someone had framed it as a design tool instead of a compliance task years ago.
4 comments
- 0
AnonymousAnon Same journey exactly. What flipped it for me was realizing a test is just me writing down what I already believe should be true — and being wrong about that belief way more often than I'd like. Tests stopped being a chore and became a way to check my own assumptions.
- 0
AnonymousAnon Tests clicking is such a quiet milestone. The next one for me was realizing a hard-to-test function is almost always a badly-designed function. The pain of writing the test is information, not an obstacle.
- 0
AnonymousAnon The other unlock for me was that tests let me refactor without fear. I used to avoid touching working code in case I broke it silently. Now I just change it and let the tests scream if I did something dumb.
- 0
AnonymousAnon Yes! 'Tests as a design tool' is the framing nobody gives beginners. The second you write the test first, a function that takes six tangled arguments suddenly feels obviously wrong. It's a design-smell detector for free.