4 ms·
>You can test conditional logic, state mutation, and any function without side effects. It takes very little time and definitely improves the codebase. Testing
by rhapsodic 8y ago
>You can test conditional logic, state mutation, and any function without side effects. It takes very little time and definitely improves the codebase. Testing is very dependent on the culture of your team and company though.
For sure. We have a team of people dedicated to testing. Compared to developers, they're easier and cheaper to hire. Our developers, who are very brilliant and very expensive, mainly write code for production, and leave testing to the testers. They write code designed to run efficiently and be maintainable, not to be more amenable to unit-testing.
This has proven to work extremely well for us. If you need unit testing to ship robust code in a short timeframe, it would be foolish for you to not write the unit tests. But our team culture is such that we don't do things that we don't need to do to be productive and successful, and unit testing is one of those things.
- tracker1 8y agofunctional code is VERY maintainable... If you built it to be thrown away, or replaced, that tends to make it more maintainable. Making something testable, even if you don't write tests, leads to better code.
- rhapsodic 8y ago>Making something testable, even if you don't write tests, leads to better code. That's strictly your opinion, which I do not happen to share.