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.

learn more… | top users | synonyms

5
votes
2answers
107 views

When designing a replacement application, how can I compare its performance to the original, if there are no existing statistics?

I don't believe there are any performance statistics kept for the application I'm being asked to replace, and don't want to ask the individuals doing the work to manually record things like how long ...
-3
votes
2answers
96 views

how to make legacy/rescue projects more fun? [closed]

I'm starting to get bored with fixing bugs and fixing code that was poorly written in the last year. Is there a way to make this more fun? I have a new project and some new code to write in the next ...
6
votes
4answers
206 views

Best way to analyse a large class before refactoring it into smaller classes?

Foreword I'm not looking for a way to refactor a large spaghetti code class, that topic has been covered in other questions. Question I'm looking for techniques to begin to understand a class file ...
5
votes
3answers
364 views

How to solve the Lava flow anti-pattern?

In this blog post, the author describes an anti-pattern called the "lava flow" In a nutshell, the lava flow anti-pattern happens when many programmers lead the development of an application, each of ...
0
votes
2answers
62 views

How to add cases to large legacy code base project? [duplicate]

There is a legacy project full of C++ code. As a MFC GUI project, it contains lots of businesses logic out of control and beyond average level programmer to understand. To work on such GUI project, is ...
1
vote
0answers
67 views

Is this pattern of optional dependency injection sound? [duplicate]

A lot of the time when working on legacy code bases, I find it hard to move manually created dependencies to the constructor parameters, because of a variety of reasons. Sometimes it's because the ...
1
vote
1answer
161 views

Help Improve DB model/strategy, for use in refactoring SQL-ridden legacy code

Question: Which design pattern do I use to help me refactor legacy SQL code into separate classes? Goal Bring in concepts of data separation and database separation and also latest modern ...
2
votes
3answers
237 views

Refactoring web pages with user controls

Is it good design to use many user controls to help refactor a web application? In my case, it's a VB.NET Webforms ASP.NET website. All our pages are organized into sections that, while related and ...
2
votes
4answers
238 views

How to refactor a myriad of similar classes

I'm faced with similar classes A1, A2, ..., A100. Believe it or not but yeah, there are roughly hundred classes that almost look the same. None of these classes are unit tested (of course ;-) ). Each ...
1
vote
3answers
126 views

Can I refactor “safely” without specs? [duplicate]

I have inherited a legacy web application many years which: Does not make use of Object Oriented principles, even though the language would permit it Has no unit tests, nor any sort of test suite, ...
27
votes
4answers
3k views

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 ...
4
votes
4answers
501 views

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 ...
9
votes
5answers
1k views

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 ...
24
votes
2answers
2k views

Is there an anti pattern for historically grown software? [closed]

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 ...
64
votes
10answers
5k views

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 ...
0
votes
0answers
386 views

How to integrate unit testing process into legacy software development process? [duplicate]

I'd like you to share your insights of how have you successfully turned the direction of rotting legacy code base to modular application design where it's easy and useful to add unit tests? What I'm ...
3
votes
3answers
523 views

Effective way to estimate dead code removal?

I've been working in an application with about 100k LOCs and basically We have been reworking features to comply with a new architecture based on a new technology stack. This work is almost finished ...
2
votes
1answer
252 views

How to find classes that use certain DB tables

Problem: I'm asked to prepare a document where all our DB tables are listed and I'm supposed to list all Controllers that uses these DB tables for read and another list for Controllers that do write ...
17
votes
6answers
1k views

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

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 ...
6
votes
4answers
612 views

I have 200k lines of poorly designed code, will units tests or integration tests be more valuable? [duplicate]

I've inherited a lot of poorly designed code; the code has no tests. I am putting tests in place before I attempt a major refactor, but I have run into a problem with my unit tests. The problem is, I ...
6
votes
6answers
638 views

Painfully Stupid Method Names in Legacy Code: Fix or Leave as Warning? [duplicate]

For this case let's assume something like... "removedNonPriceChangingConfermations" that is in no way relating to things that happened in the past tense, nor does it return a list of removed items ...
3
votes
0answers
43 views

How to document legacy code (shell scripts)? [duplicate]

I got involved into a project where we are taking over a bunch of legacy code. Code is basically shell scripts and PL/SQL packages/procedures/functions. There is no documentation how the code works ...
1
vote
4answers
200 views

How Much Of A (Broken) Legacy Framework To Keep [duplicate]

I've inherited a hosted system (system "A") which can be used to manage products, inventory, and orders, and can send those products to various third-parties. Quite simply, system "A" doesn't work. ...
13
votes
5answers
1k views

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? [closed]

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 ...
3
votes
1answer
677 views

How much poor quality code should a junior put up with? [duplicate]

I am a junior developer who has been working at a new job for a few weeks. I am working with a large framework for scientific desktop software, adding pieces of functionality. While there are general ...
284
votes
20answers
64k views

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 ...
4
votes
4answers
876 views

What can I do to maintain respect for a poorly written codebase? [duplicate]

In my job I have to maintain a poorly written codebase which is both hard to understand, has tons of comments that are just plain wrong, has a bunch of weird decisionmaking going on in it and a whole ...
4
votes
5answers
415 views

Keep coding the wrong way to remain consistent? [duplicate]

Possible Duplicate: Code maintenance: keeping a bad pattern when extending new code for being consistent, or not? To keep things simple let's say I am responsible for maintaining two ...
5
votes
4answers
261 views

Version control implementation advice on legacy websites?

Assuming no experience with version control systems, just local to live web development. I've been dropped in on a few legacy website projects, and want an easier and more robust way to be able to ...
15
votes
11answers
6k views

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 ...
5
votes
9answers
575 views

Have you worked with poorly designed application? [closed]

I have been asked to work in a Java web application that is very very poorly designed. In the name of "making this easy", they have come up with their own "framework" to make things extremely ...
6
votes
1answer
441 views

Can Test-Driven development work in legacy projects?

So here is a question for you, having read some great answers to questions such as Test-Driven Development - Convince Me. So my question is: "Can Test-Driven Development be used effectively on ...