Devil advocate:<p>I made so many rewrites that it can be say is most of my job.<p>My first real project was move a FoxPro DOS app to Visual FoxPro. I probably not read any (old) code at all. The next, move torwards a N-Tier with SQL Server (that was circa 2000). Then move in other company a Fox desktop app to ASP.NET 1.<p>And that's is only counting my first years.<p>----<p>How I could tackle this WITHOUT READING THE OLD CODE?<p>TALKING TO THE OLD DEVELOPERS!<p>If is possible for you, let them talk about how the old app work. Even better, let them (or anyone in marketing, support, etc) explain the problems that this app solve, and the new ones this app have failed to solve.<p>I have the luxury to mostly work with apps with a RDBMS in the back, and rarely fancy (and NASTY) architectures like micro-services. Understanding a RDBMS is orders of magnitude easier than the codebase:<p><a href="https://quotes.yourdictionary.com/author/fred-brooks/31361" rel="nofollow">https://quotes.yourdictionary.com/author/fred-brooks/31361</a><p><pre><code> Show me your flowcharts and conceal your tables,
and I shall continue to be mystified.
Show me your tables, and I won’t usually need your flowcharts;
they’ll be obvious.</code></pre>
-- Fred Brooks<p>So, before get deep in code: MAKE A DATABASE, and PICTURE THE FLOW OF DATA.<p>Sometimes, is even possible to cut a massive amount of (legacy) code that is the result of a iterative development (under pressure and without planning) that result in a terrible "flow of data". Fix the flow, fix the schemas, and suddenly the code is short and easy!<p>Also:<p>Complicated software are infections of a complicated business requirements (ie: company). When something is a pile of mud, NOT FIX THE MUD.<p>Fix the business requirements until it get easier to handle. This also lead, most of time, to a massive reduction in messy code bases.<p>Also:<p>You have applied any of the sensible advice elsewhere. Instead of rewrite, you make testing and all that.<p>IF YOU FEEL IS STILL TERRIBLE AND YOU KNOW IN YOUR GUT YOU WILL GET STUCK HERE FOR ALL THE ETERNITY<p>cut that code without mercy. Not push along when you have, proved is a dead end. I made a mistake like this with a rewrite from a iOS App made by a consulting firm and lost 6 months(!!!!) trying to be reasonable.<p>This cost me the contract? You bet it. However, In the last 2 week I remove almost 60-70%(?) of the code and rewrite it to be more along the Apple guidelines. I still lost the contract but the next team? Finish it in a month.