4 ms·
I've personally found tests to be invaluable. Yes, they take longer to write than just writing the initial code, but they help save time on testing bugs in the
by msclrhd 7y ago
I've personally found tests to be invaluable. Yes, they take longer to write than just writing the initial code, but they help save time on testing bugs in the future and ensuring that the code you have written does not regress, especially when refactoring the code.
I've not necesserily always used test driven development, but something close to it, especially for non-UI code where I try and aim for high test coverage.
Tests also help when writing code that implements specifications (JSON parser, XML parser, JavaScript engine, etc.) as you can have tests for each part of the specification and the various error cases.