Its definitely a bad idea writing new code that builds up on your old code, that has not been tested properly, because you quickly have to start debugging multiple layer is code at once.
Its definitely a bad idea writing new code that builds up on your old code, that has not been tested properly, because you quickly have to start debugging multiple layer is code at once.
Writing the tests first, or at least in tandem with your code, is the only way to fly. It’s like publishing a proof along with your code.
it sounds trite: make the tests fit the code. Yes, it’s a little more work to accomplish. The key here is that refactors of any scale become trivial to implement when you have unit-test coverage greater than 80%. This lets you extend your code with ease since that usually requires some refactor on some level.
This! Also, it’s a solid base to stand on when you want to optimize your code. Performing optimizations becomes much easier, quicker and fraught with errors once you have a unit test suite that will instantly tell you whether your change is working or not.