4 ms·
False sense of security sold by conference indsutrial complex is my biggest issues with unit testing. One time I've seen a junior dev wrote copious amount of un
by johndfsgdgdfg 5y ago
False sense of security sold by conference indsutrial complex is my biggest issues with unit testing. One time I've seen a junior dev wrote copious amount of unit tests to achieve near 100% code coverage. When this "perfect" code went into prod it almost took the whole system down. Because the junior dev was joining close to a dozen tables and each one of the tables has at least a million rows.
If the junior dev took the time to understand basic DB performance instead of writing dozens of unit tests, then it wouldn't have happened. I blame the gurus who don't write code for living, but peddle magic solutions like "clean code", unit testing etc. to sell more books and seminars.
- rat9988 5y agoI'm pretty sure if he didn't write the unit tests it would have equally failed. There is something to blame here, but not the unit tests.
- sharken 5y agoNo doubt the junior dev would benefit a lot more from only getting up to 60-70% code coverage. The extra time could then be used to learn basic Db performance, which is hugely important when tables have millions or billions of rows. Stuff like indexes and isolation levels should be taught to all junior devs, it's just too risky not to.