Questions tagged [legacy-code]

Originally legacy code meant code 'inherited' from authors or from a previous program/system version. Since Michael Feathers published his "Working Effectively with Legacy Code" book, new definition came to be, where code without tests is legacy code.

Originally legacy code meant code 'inherited' from authors or from a previous program/system version. Since Michael Feathers published his "Working Effectively with Legacy Code" book, new definition came to be, where code without tests is legacy code.

Source

77 questions
351
votes
20 answers

How should I behave as a developer in a project that's headed for failure?

I am a developer in a 5-member team and I believe our project is headed for disaster. I'll describe why in a moment, but my question is: how should I behave? The deadline is in 1.5 months, and I feel no matter what we do, this project will fail.…
Louis Rhys
  • 6,042
  • 11
  • 42
  • 59
97
votes
9 answers

Is it the correct practice to keep more than 10 years old spaghetti legacy code untouched without refactoring at all in big product development?

I have been in two software product houses for three years in a row. The first is a small company maintaining a fairly small management system with a monolithic legacy code base (almost twenty years). Tightly coupled code is everywhere without…
Rui
  • 1,569
  • 1
  • 11
  • 18
89
votes
10 answers

Estimating time costs in legacy codebase

Recently I started working on a project where a very old monolithic application is being migrated into microservice-based architecture. The legacy codebase is very messy ('spaghetti code') and often an apparently-simple function (e.g named as…
JuniorDev
  • 833
  • 1
  • 7
  • 8
74
votes
10 answers

Does it make sense to write tests for legacy code when there is no time for a complete refactoring?

I usually try to follow the advice of the book Working Effectively with Legacy Code. I break dependencies, move parts of the code to @VisibleForTesting public static methods and to new classes to make the code (or at least some part of it) testable.…
is4
  • 769
  • 5
  • 6
28
votes
8 answers

How to argue against lowering quality standards for legacy codebase?

We have here a large legacy code base with bad code you can't imagine. We defined now some quality standards and want to get those fulfilled in either completely new codebase, but also if you touch the legacy code. And we enforce those with Sonar…
keiki
  • 481
  • 6
  • 10
28
votes
4 answers

What is the origin of the negative term "legacy code"

Everyone talks about legacy code in software development and I have heard the term over the last ten years used to paint any codebase as being bad. Where did this term, which has such powerful connotations to programmers alike originate? I am sure…
stevebot
  • 2,003
  • 2
  • 16
  • 19
28
votes
2 answers

Is there a named anti pattern for historically grown software?

Is there an anti pattern that describes a historically grown software system where multiple developers just added new features to the system but no one really kept an eye on the overall architecture nor were refactorings ever done? I think this…
Jens
  • 391
  • 4
  • 8
23
votes
8 answers

How to deal with tremendous number of failing tests?

I'm working in the development of an old project written in Java. We have more than 10 million LOC and, even worse, more than 4000 functional tests. The tests, scheduled by Hudson, are failing like mad with every bigger code change. Verification of…
Hector Brosuli
  • 229
  • 2
  • 4
19
votes
5 answers

How to avoid excessive method overloading?

We have quite a lot of places in the source code of our application , where one class has many methods with same names and different parameters. Those methods always have all the parameters of a 'previous' method plus one more. It's a result of long…
Ytus
  • 301
  • 1
  • 2
  • 6
18
votes
6 answers

Does dealing with legacy code help one evolve as a programmer?

I'm a Java developer with a bit more than a year of experience which places me somewhere above a junior, but not among mid-level developers yet. Recently I was offered a long-term project which is about studying an existing banking application code…
svz
  • 307
  • 2
  • 8
15
votes
5 answers

Why write tests for code that I will refactor?

I am refactoring a huge legacy code class. Refactoring (I presume) advocates this: write tests for the legacy class refactor the heck out of the class Problem: once I refactor the class, my tests in step 1 will need to be changed. For example,…
Dennis
  • 8,157
  • 5
  • 36
  • 68
14
votes
11 answers

How to make Classic ASP interesting if you are stuck with it?

I used to work on a really small outsourcing company (4 programmers and the boss), then when the stress and the frequent long shifts made the situation unbearable I made the switch to a better paid job with a more relaxed schedule that allows me…
Saul Delgado
  • 351
  • 1
  • 2
  • 8
13
votes
5 answers

What to do as a Dev when for years their team has lacked product innovation, not used project mgmt methodologies, and kept bad Software Dev practices?

I am interested in knowing how to deal with a current software development process that has not been changed for years and will eventually lead to product and team failure. Yes, probably the easier way to solve this is changing jobs, but with this…
12
votes
6 answers

Is lack of functional requirements agile?

Nowadays everybody wants to be agile. In every team I worked with, the shape of agile was different. Some things are common - like daily stand-ups or planning, but other parts vary significantly. In my current team there's one detail which I find…
Arkadiusz Kałkus
  • 1,770
  • 2
  • 12
  • 15
11
votes
7 answers

How to deal with a large codebase with no requirements and the responsible person leaving the company soon

i am faced with the following scenario and i wonder if you guys have some tips for me on how to approach this. One of my colleagues is going to leave the company in a few month and i am ordered to do a rewrite of his application, since the…
Peter
  • 231
  • 2
  • 7
1
2 3 4 5 6