DEV Community

Cover image for Would You Rather Work on a Legacy Codebase or Brand-New Tech Stack?
Ben Halpern for CodeNewbie

Posted on

Would You Rather Work on a Legacy Codebase or Brand-New Tech Stack?

Working with legacy code can be challenging and frustrating, as it often requires extensive maintenance and debugging, but it may also have a stable user base, which can provide job security and professional growth opportunities. Starting a new project with a brand-new tech stack can be exciting, but also comes with challenges like steep learning curves, it can be risky, and it may take a while to get the project off the ground and gain traction.

Which would you choose and why?Or which have you chosen? And how’s it going?


Follow the CodeNewbie Org and #codenewbie for more awesome discussions and online camaraderie!

Top comments (10)

Collapse
 
abbeyperini profile image
Abbey Perini

It seems like most people prefer building something brand new, free from other people's choices. You can learn a lot about architecture and design that way, but you have to stick around for a while to see the long term consequences of those decisions. Plus, you can get stuck in your or your team's way of doing things.

All my professional experience has been working in legacy/brownfield projects, and the lessons learned have been invaluable. I wrote 8 Things I learned Working in a Legacy Codebase a while back. Now, I'd say the benefits are

  • Lots of reading other people's code. Good or bad, you learn a lot.
  • Learning how to build iteratively and pick your battles, because you can't fix everything at once.
  • Seeing how architecture decisions can make your life easier and harder.
  • A lack of documentation is an opportunity to create the documentation you want to see, and explaining it to someone else is a great way to learn it.
  • You get really good at troubleshooting/squashing bugs, because you're usually starting your investigation from scratch with no idea which part of the code it is and no assumptions about how that piece of code works.
Collapse
 
ben profile image
Ben Halpern

Thank you for this perspective!

Collapse
 
fnh profile image
Fabian Holzer

Well, I had the opportunity to start on a green field. And I did enjoy it, but I've stuck around long enough for this thing to become legacy. And I enjoy maintaining and enhancing the structures I built on it. I'd say, the real question is: are you willing to live with your decisions over a prolonged period of time? Anybody can jump ship every 18 month or so and leave the mess to somebody else to clean up (this also works without changing the company). In a complex environment, excluding ramp up, that's hardly enough to make a dent in the system.

Collapse
 
tiguchi profile image
Thomas Werner

My specialty is creating new legacy code

Collapse
 
pawandeore profile image
pawan deore

😂

Collapse
 
tqbit profile image
tq-bit

For technologies I have a firm grasp on, I'd always go for new tech stack. It's more fun, challenging and fulfilling altogether.

Wheras legacy codebases provide the essence of years of development. They give insights of how developers implemented features on an existing product. On the downside, if not documented or written as spagetti code, can really mess with your head.

Collapse
 
iamandrewluca profile image
Andrei Luca

Legacy, because you always have what to improve 😀

Collapse
 
eclecticcoding profile image
Chuck

How about both. As a Rails dev, I absolutely love the direction that the platform is moving. Love coding Turbo/Hotwire reactivity into a UI. However, for the last six months, I have been working on a contract upgrading legacy Rails application. I have upgraded two Rails 4 apps to Rails 7 and replaced legacy software with Stimulus/Hotwire. Do I love the new technology and it is my choice for personal projects, but I am appreciating the legacy technology and acquiring an appreciation for the future direction.

Collapse
 
theaccordance profile image
Joe Mainwaring • Edited

If I have to own the codebase and maintain it going forward, I prefer being free from as many historical decisions as possible to implement a solution my way.

But if I'm just there to deliver a specific outcome without needing to worry about maintaining things long term, send me that legacy codebase, I have an hourly rate that makes those efforts worthwhile.

Collapse
 
wwyeong profile image
Adrian Yeong

IMO, working on a legacy codebase(spagetti code) is challenging and is similar to playing Jenga because any change you make may cause the tower to collapse, and you may not know what you don't know. Personally, I prefer working on a new tech stack because it offers more support and resources such as documentation and tutorials, scalability, access to more modern tools and technologies, and many other benefits.