4 ms·
One thing that this list of prescriptions would probably contain if this were written today is: write tests. This lets you make a lot of classes of change witho
by CamTin 8y ago
One thing that this list of prescriptions would probably contain if this were written today is: write tests. This lets you make a lot of classes of change without actually having to hold the whole thing in your head. You can make an educated guess as to what needs to change, write a test for it, and confirm that you made the right change. More importantly, if the tests you wrote months ago are complete enough, you can be confident that your recent changes didn't fuck up anything up that you didn't intend.
- cle 8y agoDepends on how you write the tests. If your tests are very low-level, making cross-cutting changes can be extremely painful, to the point that you'll avoid doing them b/c of the cost of fixing the tests. Unfortunately, such low-level tests are becoming increasingly common as managers and engineers focus on optimizing metrics like code coverage, and those kinds of tests are very easy to write to improve code coverage.
- alttab 8y agoAs a manager, I haven't bothered to look at code coverage for years. What I care about is functional coverage for the boundaries and exception cases of our use cases or APIs. Run them CD in your pipeline. Cover customer expectations at the highest level of reasonable abstraction (I also tend to avoid ui testing, and frontend JavaScript too). Low level tests or unit tests only matter insofar as they make it easier to trust your dependecies. Breaking abstraction or encapsulation to test is a hard stop NO.