|
|
|
|
|
by exclipy
1593 days ago
|
|
> That would mean that "making your code easier to test also improves its design" is wrong. I assume that quote is talking about unit tests, but it's becoming more and more accepted that integration tests are more important than unit tests. https://kentcdodds.com/blog/write-tests This shift away from unit tests is the corollary to Ousterhout's preference for deep modules. |
|
However, they're a good tool if for example you're working with a Big Data system, where an end to end integration test will necessarily take an extraordinary amount of time.
For my first job out of school in Apache Spark they were absolutely brilliant. For my current codebase? Not so much.
However, TDD just reduces the number of mistakes I make by an umpteenth amount.
Just because it breaks my code up into extremely short subroutines so I screw up less. Plus writing the unit test itself is a brilliant way to "measure twice, cut once."