3 ms·
> Unit tests are not albatrosses around the neck of your code All code is a liability. The less code usually the better. KISS principle. > writing your code in
by kartan 10y ago
> Unit tests are not albatrosses around the neck of your code
All code is a liability. The less code usually the better. KISS principle.
> writing your code in a why that makes it easy to test generally also improves the API and design of the entire system
You can get the same result applying SOLID principles, without the cost of maintaining extra code. The presence of unit testing doesn't guarantees easy to test code either (and this is the worse case scenenario, bad designed code with a lot of test coverage that is broken in each refactor).
> is it possible that tests get in the way of completing a project in a timely manner?
Are you dismissing this as a point? Time is a resource and writing unit tests adds to that cost.
Unit testing needs to:
* Make you faster because there are less bugs in the long run.
and/or
* Prevent money loss caused by bugs compared to the money lost caused by the opportunity cost of writing unit tests instead of new features.
Also when writing unit tests developers are less prone to refactoring when requirements change as it will require to refactor also all the unit test affected.
You can agree or disagree with the points int he article, but it is NOT just "bullshit".