4 ms·
a statement like this doesn't make much sense. if they are not writing good unit tests and integration tests then may be the statement : "X% of bugs airbnb co
by je42 8y ago
a statement like this doesn't make much sense.
if they are not writing good unit tests and integration tests then may be the statement :
"X% of bugs airbnb could have been prevented by writing better unit tests and integration tests".
is true as well...
- singron 8y agoI think the significant difference between those two statements is that static typing is concretely achievable for relatively cheap effort (i.e. use a language with static typing), but "better tests" is something you will never finish doing. Even if you have 100% code branch coverage, your tests don't necessarily cover all the combinatorial cases that could cause bugs, so you could continue to write "better tests" to prevent further bugs. If the code is non-trivial, the combinatorial explosion is so big that you could probably write 100 times as much test code as implementation code, and you will still have bugs that could be solved by "better tests".
- je42 8y agolike tests - types come with a cost. they are not free and the category of errors they catch are quite simply. also, in my experience, people that depend on types usually skip writing automated tests go directly to manual testing skipping the rest of the testing pyramid.
- je42 8y agoyou battle combinatorial explosion by making a risk analysis on the code. you split your code in pieces and unit test those. with unit-tests usually you can get full line + branch coverage, easily and quickly. then you go one level up with the integration tests which these you test highly critical paths where the unittests work together. and finally a black-box e2e test to make sure the pieces work regardless of the implementation details.