Embracing Legacy Code: A Conversation with Joe Eames
As a developer with nearly three decades of experience, Joe Eames has seen code go through many changes. Along the way, he’s gained a unique perspective on the value of legacy code and what it takes to keep legacy code relevant in a world where standards change by the day.
On our latest episode of the Decoded podcast, Eames shared his journey from developer to educator, along with advice for newer developers when it comes to working on legacy code projects.
Looking to the Future
Today, Eames wears many hats. In addition to his role as VP at XLTS.dev, a software support consultancy, he is also the founder of Thinkster, which provides developer education for a variety of frameworks. Not only that, he is also the organizer of ng-conf, which is dedicated to Angular, and is a panelist on the JavaScript Jabber podcast.
His inspiration to educate comes from the first days of his career, as he explained:
“I think back to what it was like as a developer at that first job and how little I knew. I didn’t even know how little I knew.”
As he continued to progress through his career, Eames says that he found significant value in attending conferences, going to meetups, and speaking with other developers. It was here that Eames realized the best developers aren’t just the ones who can get into the flow state and crank out clean code. They’re the developers who are able to become part of a community that empowers all to learn and grow. Eames said:
“Development is seen as a very solo job. It attracts people who seem like they don’t want a lot of interaction; they like the opportunity to sit down and work through problems themselves. But after you do development, you realize products aren’t developed by one person in a dark room. They have to change and switch over time, which requires communication. By building a community, it helps push us forward as individuals to see what’s on the horizon.”
Keeping an Eye on the Past
Eames believes that legacy code has gotten a bad rap, with many developers choosing to only work on greenfield projects.
“It’s possible to organize your career to avoid it, but I think you miss out on a lot of things. Sometimes that’s community, sometimes it's being part of something big. Sometimes it’s fixing a really important problem.”
For Eames, the challenge of legacy code is part of the allure. He prefers to look at legacy code not as old or outdated, but as “the code that I’m afraid to touch.” Often, the reason someone is afraid to touch legacy code isn’t because it’s poorly written, but because so much is riding on the line for it to keep working.
Eames says that the key to working successfully with legacy code isn’t skill or code knowledge; it’s attitude. As a developer, you must be empathetic to the developers who came before you instead of judging their code in hindsight.
“There’s a saying that the worst programmer in the world is whoever wrote the code you’re supporting. But we weren’t there. We didn’t walk through the problems, the pressures they were dealing with, or the changing requirements.”
By being conscious of your attitude, Eames says that it can allow you to see the challenge for what it is:
“The opportunity to take something and make it beautiful again or for the first time. One of the greatest feelings you can have as an engineer is to take that 2,500 line file that nobody has been willing to touch and improve it bit by bit, incrementally, until you finally master and tame that dragon.”
Eames has seen several epochs in development where best-in-class standards became outdated almost overnight. Each time, developers realized that the greenfield code they had been working on for the past five years is now legacy code that will need to adapt.
“Between 1995 and 2000, developers were suddenly waking up and saying, ‘Oh my gosh, what have I been building? We have to start throwing it away because we have to be on the internet.’”
He said. Around 2010, Eames remembers how the JavaScript revolution impacted server-side development. Now he sees a world where anything non-cloud will soon be considered legacy.
Not only that, but code is going from flavor-of-the-month to out-to-pasture even faster than ever.
“In 2015, if you built a web application there was an 85% chance you built it in AngularJS. Now Google is announcing they are going to end-of-life it after only five years.”
He said. As innovations in development occur faster and faster, all developers are going to need to embrace education and legacy code in order to keep up.
Hear the full conversation with Joe Eames, and subscribe to the Decoded podcast.