O'Reilly logo

New Programmer's Survival Manual by Joshua D. Carter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tip 7Improve Legacy Code
White Belt[​​White Belt] Maintaining and improving legacy code is a day-one reality.

Your job would (seemingly) be a lot easier if you could simply take all the crappy old code floating around, trash it, and start over. But that’s not going to happen, so what do you do about it?

The typical Godzilla legacy code base looks something like this:

  • Functions spanning thousands of lines, with a near-infinite number of possible code paths.

  • Classes or modules with dependencies on twenty (or more) other classes.

  • A comment somewhere reads, “Don’t touch this or everything will break!”

  • Another comment reads, “Ask Bob before changing this code,” ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required