4 ms·
> Just keeping in mind that you have to write a test for your code, changes how you write it. Which is often enough to ensure the code is testable. Generally,
by lowercased 7y ago
> Just keeping in mind that you have to write a test for your code, changes how you write it.
Which is often enough to ensure the code is testable.
Generally, I'll write some tests sort of alongside, or soon after (like, a couple hours or a day) to not lose the initial thought process. Going back to code days/weeks later and trying to 'test' it when it wasn't conceived of as testable is tough.