Live data from Hacker News

You're not a senior engineer until you've worked on a legacy project (2023)

infobip.com

421–430 of 431 posts

Re: You're not a senior engineer until you've worked on a legacy project (2023)

#422
Legacy is when you have a shell script call an ant script that calls shell scripts that call make scripts that fire c precompile requests to a remote database. (Of course it's now packaged in docker because it runs on a version of linux that makes the infosec guys come visit you at your desk)

Oh and every subsystem shares dependency references that are only used by one subsystem.

Oh, and the C includes are wrong and overwritten by the shell scripts and make files.

GOOD LUCK

OH, and your team is too scared to use the simplified build because there are too many things they don't understand, even though you did hash comparisons for every built artifact.

Re: You're not a senior engineer until you've worked on a legacy project (2023)

#423

Earlier quoted context omitted.

I specifically mean code not covered by automated tests. And this almost always falls in the dislike/misunderstand pile for me, but not conversely.

I'd argue that even with automated tests it can be considered legacy. Easier to change things if the test coverage is comprehensive enough, but I've yet to find a project like that, even the ones I built myself.

I hope you find one one day. It makes such a difference to have a test suite which you trust, and which doesn't erupt in false failures at the drop of a hat. I completely agree, not all tests are created equal.

Re: You're not a senior engineer until you've worked on a legacy project (2023)

#424
post #200

Might be true, but as someone who worked on a few legacy projects, the opposite, i.e. "You're not a senior engineer until you've worked on a greenfield project" is also true. There are skills that you won't pickup by working on old piles of code. Knowing what technology to pick, how to design your system for high-availability and how to avoid needless complexity are just as important to a well-rounded senior. Perhaps…

I agree with you. But, I have found the middle out effect in online discourse means we get articles (such as this one) polarising viewpoints for attention. Sadly, it works.

Re: You're not a senior engineer until you've worked on a legacy project (2023)

#425

Hard to disagree. I can usually tell what type of type of experience devs have by the snarky, dismissive responses I've gotten on various internet forums over the last two decades. e.g. "Oh but you would never have this problem if you performed proper code review" - Random_Rockstar_Dev_254 However not all legacy projects are bad to work on. If they're decently developed, then often you'll find that most of the pain i…

I see that going through these three kinds of projects let me grow as a developer: 1. green field project 2. other people's legacy project 3. your green field project growing into legacy project. You can learn so much from each of these, but to me the most eye opening experience was our green field project growing into a project with more and more developers. You could learn so much about others, some were very arrog…

Wow this is a great formulation. I’ve started becoming senior more recently, for most code I’ve become pretty good now at making the tradeoff of how much refactoring to do versus a quick hack based on risk. Sometimes adding in an if statement makes more sense than a full upfront refactor.

The exception… is for any feature I added myself. If I spent a lot of energy releasing v1 with the “perfect” (to me) abstractions, etc. I get paranoid about more junior developers messing it up for new features. Re-reviewing code changes, insisting on all the upfront refactors and rare edge cases handled, etc. Something I need to overcome.

Re: You're not a senior engineer until you've worked on a legacy project (2023)

#426

There's no hurt feelings like the hurt feelings of a junior engineer, who has spent the last year kvetching about how much they hate working on legacy junk, hearing someone else refer to one of THEIR projects as "legacy junk". Any code that's old enough to have its first birthday party is "legacy", which means that "legacy" is a completely useless category. Anyone calling anything "legacy" is generally just showing t…

Legacy code is code without tests. Doesn't matter if it's new or old.

IMO legacy code is code that has lots of if statements and special cases sprinkled in over the years to enable new features quickly and get out immediate hotfixes for bugs without doing full refactors and/or data migrations to address the root causes. Even with 100% test coverage it’s a pain to build new features in because there are so many paths to think through, and instead of single sources of truth each part of the app assumes every other part is working in very specific ways.

An alternative definition, legacy code is any code where there’s no one left on the team who has been working on it for years and intuitively knows the pitfalls. Then everyone’s scared to touch it or make big refactors, which actually leads to those small special cases being added instead.

Re: You're not a senior engineer until you've worked on a legacy project (2023)

#427
post #54

It's funny because 90% of my experience has been legacy projects, and the greenfield projects for me were the hardest, because it's really hard to organize as a team to build something from ground up, not kill each other with shovels in the process, and not introduce technical debt early on that will be impossible to pay off down the road. When joining a legacy project, most of the hardest work has already been done…

Did those teams have lots of senior engineers? I’d assume when you have a single tech lead over each area the team won’t fight each other since junior engineers will just follow their lead.

Re: You're not a senior engineer until you've worked on a legacy project (2023)

#429

Earlier quoted context omitted.

> You should tell that to every old manager I had. They sound like boreful people. If you find you have become boreful, there's a good chance you may be experiencing burnout or depression, which are nasty diseases, but still ones that afflict the subject, not the object. Nothing is boring but for the person who perceives it that way.

you should be a production line manager.

Is this why I love Factorio so much?

Re: You're not a senior engineer until you've worked on a legacy project (2023)

#430

I once had a manager that was fond of saying: > Experience is what you get when you don’t have any. The only better experience than working on a legacy codebase is working on a greenfield project long enough to watch it become legacy and see the good and bad consequences of past decisions.

In particular, I appreciate that you assign value to the consequences and not the decision itself. Anytime junior engineers on my team would complain about "shitty code" I'd assure them that someone would be complaining about their code in a few years.

Having the context or, better yet, responsibility for the past decisions is great for developing a pragmatic approach to software design AND empathy for other software engineers.

Post reply on HN