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.
Questions tagged [legacy-code]
480 questions
0
votes
0 answers
How to use a typedef from (legacy) C source file in a unit test source file?
I have a legacy C source file which defines an enum.
//source.c
typedef enum
{
ENUM_0,
ENUM_1,
ENUM_2
} my_enum;
How can I use this enum inside my unit test's source code?
I can think of 2 options:
1. Copy paste the typedef into my…

noti
- 887
- 7
- 25
0
votes
1 answer
How to test legacy C code and check which branches where hit
I have a DLL which contains many large (1000+ line) functions. This code has lots of complex logic which I want to ensure doesn't get broken when its maintained so I created a test harness which dynamically loads this DLL and calls its API.
I would…

paulm
- 5,629
- 7
- 47
- 70
0
votes
1 answer
advice on note keeping and navigating legacy code
I"m having to work with legacy code (mostly CFML) with very little or no documentation, no domain model of any sort to follow either.
To start building some sense out of it, I though 'start keeping notes', then wondered if plain old journal and…

vector
- 7,334
- 8
- 52
- 80
0
votes
2 answers
Find redundant pages, files, stored procedures in legacy applications
I have several horrors of old ASP web applications. Does anyone have any easy ways to find what scripts, pages, and stored procedures are no longer needed? (besides the stuff in "old___code", "delete_this", etc ;-)

GC.
- 1,214
- 1
- 10
- 26
0
votes
2 answers
Unit testing legacy PHP class with heavy DB dependency
I am trying to implement some unit tests into a legacy PHP application.
There have been a number of challenges with this, but in particular for this question, I am currently looking at a small class that manages the app config.
The class interface…

SDC
- 14,192
- 2
- 35
- 48
0
votes
1 answer
How do I render JS in Rails 1.2.6
I have the following code as a controller action:
def create
render :js => "alert('hello')"
end
But when I go to this view, I get a missing template error – 'create.rhtml'. What is the correct way to render a javascript response in Rails 1.2.6?

Nerian
- 15,901
- 13
- 66
- 96
0
votes
0 answers
Maven for deployement for a client/server app?
We're currently moving from a quite old Perl + Ant build system to maven.
The software itself is a client/server app using RMI as main communication system and the build produces a (large) number of jars.
This piece of software existed long before…

devlearn
- 1,725
- 2
- 17
- 30
0
votes
1 answer
Advice on refactoring large JavaScript methods
In this case, the site is an internal website that is only able to be viewed on IE6. The goal is get it viewable in IE9. There are several IE only propriety scripting such as using xml data islands, accessing document elements by dot notation, i.e.,…

Metro Smurf
- 37,266
- 20
- 108
- 140
0
votes
1 answer
How to cancel this Queued BackGroundworker
I have this bit of legacy code that's been sitting in the code-base and being used for the last couple of years, recently we found that its method StopImmediately() doesn't stop it at all. I cant make head nor tail of how it works as I've done very…

snark
- 27
- 1
- 6
0
votes
1 answer
Rails: create system needed records if they don't exist
I'm working on an app that must integrate with an existing database and other legacy apps. Throughout the legacy apps, implicit assumptions are made that certain records in certain tables exist.
For instance, legacy code assumes that a record with…

giorgian
- 3,795
- 1
- 30
- 48
0
votes
1 answer
spring 3.1: out of memory when loading beans.
i have the following xml.
legacy: xml (can't change because it is externalize).

Chun ping Wang
- 3,879
- 12
- 42
- 53
0
votes
1 answer
Concerns with WCF Data Services and outdated references
I am looking for information on how well WCF Data Services handle being called when they're referenced by an application with an out dated service reference..
If all new added fields are allowed to be null and we're not breaking any existing links…

Seph
- 8,472
- 10
- 63
- 94
0
votes
2 answers
CDO Corrupt PDF Attachment
What is the main problem that causes corrupt PDF attachments using Classic ASP CDO?
This is the error message when trying to open the document:
There was an error processing a page. There was a problem reading this document (109).

Marc Uberstein
- 12,501
- 3
- 44
- 72
-1
votes
1 answer
Maintain and Release Ionic Framework v1 in 2023
I have an Ionic Framework v1 app that we just can't upgrade for complex reasons yet. With the latest API Level and SDK targets from Android and iOS, how can I get this app into the app stores in 2023?
I have tried updating the platforms to the…

Yemi Tula
- 29
- 6
-1
votes
1 answer
Rebuilt My .ASPX Website But How to Easily Redirect to .NET Core Pages [on Shared Hosting]?
I know this has been asked before but I haven't seen any simple explanations and I should also add I'm on shared hosting (Plesk). I don't see the URLRewriter utility installed on the server.
Anyway, I rebuilt my 2013 website that did use ASP.NET web…

BrettB
- 104
- 4