Don't rewrite everything immediately when taking over a legacy system.
I once took over a legacy order system and initially wanted to clean up the services and rewrite the interfaces. After an incident occurred in production, I realized that the most dangerous part of a legacy system isn't that the code is ugly, but that no one can clearly explain which edge cases are keeping the business running. When I encounter such projects now, the first thing I do isn't to…