It's that I start writing how I intend to "use" the function/method, and thinking about how I'm going to make it testable (i.e. dependencies, etc) before even writing any of the code itself.
Then I can immediately start refactoring as soon as I finish writing the code, cleaning it up a bit before committing.
But the "test-first" approach has saved me countless times from unintentionally coding my way into a quagmire of dependencies, etc.