>>106386636
How does this fix anon's Walkman?
>>106387813
You need tests. There are different strategies, one is writing tests only for the stuff you are about to touch.
Another is to only write tests for the high level consumers of the libraries, so if a consumer breaks, you know that your recent change to the library is directly responsible without having to actually write unit tests for the library you're changing.
No matter the strategy, writing unit tests makes it extremely obvious where you need to refactor – if you're finding it very difficult to write tests for all the possible paths in a function, then it needs refactoring.
Pic related is good reading.