4 ms·
In my experience, tests help me refactor stuff and detect when I have broken some expected inplementation. For example, I was refactoring a SQL query builder a
by hu3 1y ago
In my experience, tests help me refactor stuff and detect when I have broken some expected inplementation.
For example, I was refactoring a SQL query builder and tests told me my JOINs where no longer containing ON clause. Might seem trivial but multiply this by a large codebase and benefits increase.
Another thing is that when I write functions with tests in mind, they tend to be more maintenable and simpler because it's hard to test functions that to a ton of things and have many side effects.
- hinkley 1y agoAbout three to five times a year the tests help me make a feature much more useful because I realize that there’s an interesting corner case that’s easy to check and easy to implement. Lots of times people don’t ask for things because they guess wrong about where the difficult parts will be and they learn from our pushing back to ask for less.