Keep these obsolete patterns out of your code

Image for post
Image for post
Courtesy of Icons8

Recently, I wrote about my new labor of love — replacing old JavaScript code with more modern practices for the tech publisher O’Reilly. The job involves staring down some dust-collecting scripts from five or ten years ago. In a short amount of time, I’ve seen plenty of old routines that still work, but don’t reflect today’s best approaches.

Which raises a good question. When is it time to intervene? If you’re dealing with proof-of-concept examples and company standards, you want the best possible solution every time. But if you’re looking a complex and established codebase, there’s a good case to be made for stepping carefully. Make changes when you need to touch the code for another reason (for example, to add an enhancement). …


Matthew MacDonald

Teacher, coder, long-ago Microsoft MVP. Author of heavy books. Join Young Coder for a creative take on science and technology. Queries:

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store