Subscribe by Email


Wednesday, April 18, 2012

What is meant by debugging legacy code?

Debugging of the legacy code is an extremely important concept in the field of the software systems development. But, before we discuss about debugging the legacy code, we will first discuss about the legacy code.

Legacy code is not different from a normal source. It is also a type of source code that can be related to the following:
1. No longer supported manufactured operating system or,
2. No longer supported computer technology etc.

What is meant by Legacy Code


- Legacy code is also used in the modern versions of the operating systems and software applications wherever old features of the corresponding software applications are required to be included and maintained.

- Legacy code is required for giving support to serial interface even though the serial port is absent in many of the modern computer systems.

- It may also be needed to provide support to the older formats of the files like EBCDIC that requires encoding in the non- ASCII characters.

- This is a known fact and almost each and every one is familiar with it that most of source codes are dependent up on the platforms for which they have been designed.

- This fact proves that even if an environment or platform independent language is used, it is difficult to design, develop and execute a program that works independently of its environment and platform.

- It is also observed in some of the cases that whenever the platform for a software system, application or a program is changed (such as moving to a new operating system), the code present in the program does not work well without making appropriate changes to it and this is the code that is called the “legacy code”.

- In such situations alteration of the code becomes necessary and it is also a hectic task for the programmer or developer since this is required to prevent the code becoming a legacy code.

- The term legacy code also holds good for the source code that is not able to execute on a modern version of a software system, application or program and thus calls for a need of a compatibility layer to run.

- The best example for this would be a classic Macintosh application that runs in the classic environment but not in the Mac OS X.

Debugging of Legacy Code


- So many researchers have put forward their thoughts regarding the debugging of the legacy code.

- Legacy code has been interpreted as a source code without tests and reflecting its perspective of facing difficulty due to an absence of the automated regression tests.

- Michael feather defined some characterization tests for testing the legacy codes.

- Macro definitions of C and C++ languages have been defined as evil since they introduce subtle bugs and thus make the maintenance of the program difficult.

- One can face many difficulties in detecting the legacy code before the program crashes several times.

- When the external conditions are changed, it is required that the changes are also made accordingly.

- Since the environment is ever changing, one cannot expect the code to remain static as ever.

- The code also has to be evolved and replaced.

- Debugging is required for the legacy codes that are in production since this is the only way that can assure you that the changes you made to one part of the program are not affecting the other parts of the program.

- It is another problem that you might not be having sufficient budget and time to provide 100 percent coverage to the legacy code.

- But debugging of the legacy code produces robust code and speeds up the development process and also helps with a reduction of the risk of failure of the system.


No comments:

Facebook activity