3 ms·
* I love unit tests for the freedom it give me later* I'm curious, what freedom is that? I'm not sure I've heard anyone else say that about unit-testing.
by omouse 17y ago
* I love unit tests for the freedom it give me later*
I'm curious, what freedom is that? I'm not sure I've heard anyone else say that about unit-testing.
- silentbicycle 17y agoIf you have through test coverage, you can cut out a sloppy-but-functional prototype and replace it with a cleaner (or carefully optimized, etc.) version, and be reasonably confident that your code will still work. It gives you more freedom to replace parts of a project, rather than getting stuck maintaining horrible legacy code. Of course, there are a few big ifs there. Writing very thorough test coverage is not a trivial undertaking, and may not be the best use of your time. Also, this says nothing whatsover about when you write the tests. This matches my experience (legacy code, ugh), and I watched a Google tech talk in which the main SQLite author, Dr. D. Richard Hipp, spoke at length about how SQLite's extensive automated tests (http://sqlite.org/testing.html http://sqlite.org/testing.html) have given them room to change the implementation of major internal systems several times.