legacy-code

How to start modification with big projects

Hi all, I have to do enhancements to an existing C++ project with above 100k lines of code. My question is How and where to start with such projects ? The problem increases further if the code is not well documented. Are there any automated tools for studying code flow with large projects? Thanx, ...

Global keyword in Visual Basic 2005?

I have to inherit some legacy code in company, which is written in Visual Basic.NET 7.0 (Visual Studio.NET 2002). I don't have much experiences in VB.NET, and this line of code gets me in trouble: Public Class Global : Inherits System.Web.HttpApplication Visual Studio gave this error: Error 31 Keyword is not valid as an identifier....

Recording interaction on an inflection point using mocking framework. Moq

Updated version of question Hi. My company has a few legacy code bases which I hope to get under test as soon as they migrate to .NET 3.5. I have selected Moq as my Mocking framework (I fell in love with the crisp syntax immediately). One common scenario, which I expect to see a lot of in the future, is where I see an object which i...

Installing native assembly into GAC

Hello, I have an assembly containing a mixture of Managed and unmanaged C++ code. I have signed it and installed into Global Assembly Cache. My program (.Net, C#) won't find it there, although it worked perfectly well when the assembly was in the program directory. The program uses DllImport and pinvoke to call the methods from the asse...

What code don't you test?

Possible Duplicate: How deep are your unit tests? Ok, so it's common wisdom that it's impractical (and maybe not even preferable) to get 100% test coverage. In my experience, there's some code that's simply more trouble to test than it is practical to do so. I've kind of developed an intuition about this. But my team is sort ...

How to go about organizing a unit test harness for legacy Visual C++ code?

I have a Visual Studio 2005 C++ project, it is a console application. I want to start getting bits of the code under a test harness but I've run into some issues that I don't know how to best handle. I don't want most of my testing code to end up in the normal .exe in production so I thought would be best to create a separate project f...

Redirect both cout and stdout to a string in C++ for Unit Testing

I'm working on getting some legacy code under unit tests and sometimes the only way to sense an existing program behavior is from the console output. I see lots of examples online for how to redirect stdout to another file in C++, but is there a way I can redirect it to an in-memory stream so my tests don't have to rely on the disk? I'...

Any good literature on join performance vs systematic denormalization ?

As a corollary to this question I was wondering if there was good comparative studies I could consult and pass along about the advantages of using the RDMBS do the join optimization vs systematically denormalizing in order to always access a single table at a time. Specifically I want information about : Performance or normalisation v...

Java: what are some steps to learn a project where you have a little or no experience

Hello, As a starting programmer with little industry-experience, I find it frustrating to learn a new project which is based on many technologies that I am not familiar with. The project I am working on has about 150 classes with 15000 lines of code, and with its extensive focus on socket and security programming which I have zero exper...

Who makes tools auto documenting/analysing legacy code and which is better?

Who else makes tools like Scitools Understand C++ and which is better? Looking for the most complete auto documentation tools for Ada, C, C++ and Fortran. For analysis of tool migration effort, to aid to in pruning dead code and identifying essential functionality. Pete ...

When do i need to stop using design patterns?

My colleagues are going crazy because i keep on wanting to rewrite code that already works because i would like to replace some legacy design with design pattern. Although i feel like it will help improve the existing code, I do feel like i am getting a little paranoid about it and try to use them everywhere and even replacing one design...

Removing tightly coupled code.

Forgive me if this is a dupe but I couldn't find anything that hit this exact question. I'm working with a legacy application that is very tightly coupled. We are pulling out some of the major functionality because we will be getting that functionality from an external service. What is the best way to begin removing the now unused cod...

Stategies for Rebuilding Legacy Applications

I have a new assignment coming up shortly where I have re-architect some legacy COM applications in .Net WPF. If possible I need to re-use functionality or existiing code however I suspect the scope for this is limited. I need to replicate existing functionality but need to achieve it using a modern and extensible architecture. Does a...

Retrofitting AppDomains into legacy systems

What are the guidelines to consider when "wrapping" portions of an existing / legacy system in AppDomains; we have a scenario where we essentially load plug-ins to the current AppDomain and therefore can't unload them (and also can't clean up their resource leaks), we'd like to load them in their own AppDomain to help with resource clean...

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 ;-) ...

Coding Katas for practicing the refactoring of legacy code

I've gotten quite interested in coding katas in recent months. I believe they are a great way to hone my programming skills and improve the quality of the code I write on the job. There are numerous places where Katas can be found. like.. http://codekata.pragprog.com/ http://schuchert.wikispaces.com/Katas http://www.codingdojo.org/cg...

Determine time added working in code because of a legacy application?

How would you go about determining how much time was added due to working in legacy code as opposed to tested code for cost analysis if we really don't have a benchmark of working in non-legacy code to compare it too. ...

MySQL schema to schema syncronization through triggers?

Quick note: I have 19 days to figure my client's problems out. Background: Client hired a contractor who boasted he could get a new App out the door in 3 months. Two months and some days later I'm brought in and the individual was let go; there is no complete code, no thought put into the schema, and an abomination for a UI. I hav...

Legacy-C C++ incorporation

Hi all. I'm currently working on a performance critical application which incorporates legacy c code (a SPICE variant). The problem is as follows: The creators of the legacy c code apparently believed that the use of argument passing is one of the great evils of the modern age. Thus about 90% of all the variables were declared globa...

Adding unit tests to legacy code

Have you ever added unit tests, after the fact, to legacy code? How complicated was code and how difficult to stub and mock everything? Was the end result worthwhile? ...