Maintenance

This will be the most obvious thing I recently rediscovered while thinking about one of my buggy deployments. When you work with code you have two supporting forces that will help you with maintenance — automation and your own effort.

You can have many unit tests, integration tests, that you run frequently, code analysers and linters, test coverage guards, mutants etc. that will help you prevent introducing trivial bugs (non-trivial are design related).

Or you have to trust your own debugging skills, jump through many lines of code, grep all found method names, manually test how change affects code etc. But then you have to worry about so many things that it is hard to focus on the actual change.

The hardest part of this puzzle is discovering how much manual effort you have to put into code totally new to you. Can I trust that some test will fail after this buggy change? Should I spend more time discovering all related objects and ways this piece of code could fail?