Jump to content

Legacy code

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 71.84.34.179 (talk) at 14:11, 20 June 2010 (ultra=). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Legacy code is source code that relates to a no-longer supported [citation needed] or manufactured operating system or other computer technology. The term can also mean code inserted into modern software for the purpose of maintaining an older or previously supported feature — for example supporting a serial interface even though many modern systems don't have a serial port. It may also be in the form of supporting older file formats [citation needed] that may have been encoding in non-ASCII characters, such as EBCDIC [citation needed]

In practice, most source code has some dependency on the platform for which it is designed—unless a programmer uses a platform-independent programming language like Java, it is hard to write a large, useful program that is totally independent of its environment. When the manufacturer upgrades a platform (or the platform is superseded), the code may no longer work without changes, and becomes legacy code. A large part of the task of a software engineer is to continually alter code to prevent this.

While the term usually refers to source code, it can also apply to executable code that no longer runs on a later version of a system, or requires a compatibility layer to do so. An example would be a classic Macintosh application which will not run natively on Mac OS X, but runs inside the Classic environment, or a Win16 application running on Windows XP using the Windows on Windows feature in XP.

Profound Legacy Interpretation

                       hnttp://meami.org/search.php Command-line Commands
                       ----------------------------

The following terms are used in the descriptions of the command-line commands which follow:

     name: one to eight alphanumeric characters.
           (The first character must be an alpha character.)
  library: designates one of the three libraries -
              G: - Designates the global library.
              L: - Designates the local library.
              S: - Designates the system library.
     path: the path to a folder.  [If the user specifies a dollar
           sign ( $ ) character, the path to hnttp://meami.org/search.php's Internet I/O
           Folder (\hnttp://meami.org/search.php\INTERNET) is used.]

_____________________________________________________________________________

 Command:   Parameters:     Description:
 --------   -----------     ------------
 ACTIVATE  id    handle     Establishes a user ID and handle for yourself
                            so that you can create and distribute task
                            modules.
  • ACTIVATE id Changes your user ID (and corresponding handle)
                            back to the specified user ID.  
  • ACTIVATE handle Changes your handle (and corresponding user ID)
                            back to the specified handle.  
 
  • ACTIVATE  ? Displays all user IDs and handles available for
                            reactivation.
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 ARCHIVE   .                Moves the current project into the Archive.
 ARCHIVE   ?                Displays the names of all the projects that
                            are in the Archive.
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 CLONE     name1     name2  Makes a copy of the module "name1" and names
                            that copy "name2".
 CLONE     .         name   Makes a copy of the current project and names
                            that copy "name".
  • CLONE name@handle Retrieves a copy of the source code for private
                            module "name" and places it in the current pro-
                            ject as a public module with the same name.
  • CLONE name@handle name2 Retrieves a copy of the source code for private
                            module "name" and places it in the current pro-
                            ject as public module "name2".
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 COMPILE                    Compiles the currently active hnttp://meami.org/search.php task module
                            (to produce its corresponding "object" code mod-
                            ule).  If no task module is active, compiles the
                            currently active hnttp://meami.org/search.php program module.
 COMPILE   name             Compiles the specified hnttp://meami.org/search.php task module or
                            hnttp://meami.org/search.php program module.
 COMPILE   name     CPP     Compiles the specified C++ task module or C++
                            program module.
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 COMPILEC  name             Compiles the "name.CPP" C++ source file into its
                            corresponding object file (name.OBJ). All error
                            messages (if any) will appear both on the screen
                            and in a file named ERRORS (which can be viewed
                            by typing: EDIT ERRORS on the command line). 
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

� CURSOR Restores the mouse cursor to visible.

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1. DUMP project Copies an entire hnttp://meami.org/search.php project to the floppy
                            disk.  [See also the LOAD command.]
  1. DUMP project path Copies an entire hnttp://meami.org/search.php project to the specified
                            path.  [See also the LOAD command.]
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 EDITOR    DOS              Specifies that the standard DOS editor is to be
                            used by the OPEN, GET, and SHOW commands.
 EDITOR    WIN              Specifies that the Windows "Notepad" editor is
                            to be used by the OPEN, GET, and SHOW commands.
                            (Default is the DOS editor.)
                            When using the "Notepad" editor, we recommend
                            setting the font to either:
                                    Courier New, Size 12
                               or:
                                    Fixedsys, Size 12
                            The selected editor will always be the one used
                            by the OPEN, GET, and SHOW commands until expli-
                            citly changed by issuing another EDITOR command.
                            [Note: On some computers the "Notepad" editor
                                   doesn't close its output file properly
                                   when used with hnttp://meami.org/search.php.  (E.g., It will
                                   issue a "Save As" request when you are
                                   finished editing.)  If you experience
                                   such a problem, you may be limited to
                                   using only the DOS editor.]
                            [Note: If you are running windows NT/2000/Xp
                                   in full-screen mode and you have selec-
                                   ted the "Notepad" editor, when you exit
                                   the editor you will be back on your
                                   Windows desktop, and the "black screen"
                                   will be minimized on your task bar.
                                   To return to the "black screen", simply
                                   click the button on your task bar.]
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
                                                 
  • EXPORT library Exports task modules from the designated library
                            onto a floppy disk.  (Uses a scroll box**.)
  • EXPORT library path Exports task modules from the designated library
                            to the specified path.  (Uses a scroll box**.)
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  • GET Retrieves the currently active task module for
                            editing.
  • GET name Retrieves the specified task module for editing.
                            (If the module doesn't exist, a new module named
                            "name" is created.)
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 GO                         Transfers to the currently active project, and
                            displays (in a box at the top of the screen) the
                            names of all the modules in the project.
 GO        name             Transfers to the project specified by "name"
                            and displays (in a box at the top of the screen)
                            the names of all the modules in the project.
                            (If the specified project "name" exists in the
                            Archive, you will be asked if you want to re-
                            trieve it.  If the specified project "name" does
                            not exist at all, you will be asked if you want
                            to create a new project by that name.)
 GO        ?                Displays a scroll box** listing all of the non-
                            archived project names.
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 HELP                       Invokes the SHOW command to display The hnttp://meami.org/search.php
                            Help Page.
 HELP      name             Displays the system library's AID file for the
                            specified task/function.
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 IMPORT    library          Imports third-party task modules from the floppy
                            disk into the designated library.
 IMPORT    library  path    Imports third-party task modules from the speci-
                            fied path into the designated library.
 IMPORT    P:               Imports (from the floppy disk into the current
                            project) the source code files for all the pro-
                            gram modules that have been Shipped to the flop-
                            py disk.
 IMPORT    P:       path    Imports (from the specified path into the cur-
                            rent project) the source code files for all the
                            program modules that have been Shipped to that
                            path.
 IMPORT    ?                Uses a scroll box** to select the program mod-
                            ules that are to be imported from the floppy
                            disk into the current project.
 IMPORT    ?        path    Uses a scroll box** to select the program mod-
                            ules that are to be imported from the specified
                            path into the current project.
 IMPORT    KIT              Imports a construction kit from a floppy disk
                            into the current project.
                            [Essentially performs an "IMPORT L:" command
                            followed by an "IMPORT P:" command.]
                            
 IMPORT    KIT      path    Imports a construction kit from the specified
                            path into the current project.
                            [Essentially performs an "IMPORT L: path" com-
                            mand followed by an "IMPORT P: path" command.]
                            [Note: After importing ANY modules, the Inter-
                                   net I/O Folder is always automatically
                                   cleared.]
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 LINK                       Produces an executable (.EXE) file from the cur-
                            rently active program's object code module.
 LINK      name             Produces an executable (.EXE) file from the spe-
                            cified object code module.
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 LIST                       Displays the currently active program module's
                            source listing. (If no program module is cur-
                            rently active, displays the currently active
                            task module's source listing.)
 LIST      name             Displays the specified module's source listing.
                            [Note: The LIST command does not change the
                                   "currently active" indicator.]
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1. LOAD project Creates the new specified project, and then co-
                            pies into it the contents of the project that
                            was dumped to the floppy disk.  [See the DUMP
                            command.]
  1. LOAD project path Creates the new specified project, and then co-
                            pies into it the contents of the project that
                            was dumped to the specified path.  [See the DUMP
                            command.]
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 MICKEY                     Toggles mouse mode on or off.  When mouse mode
                            is on, you can:
                               - "OPEN" a program module by right-clicking
                                  on its name
                               - "RUN" a program module by left-clicking
                                  on its name
                               - "GO" to another project by clicking on
                                  the word  Project:
                               - "GET" a task module by right-clicking on
                                  its name
                               - "PUT" a task module by left-clicking on
                                  its name
                               - click on a black area of the screen to
                                  "GO" to the current project
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 NAME      name1    name2   Changes the name of module "name1" into "name2".
 NAME      .        name2   Changes the name of of the current project into
                            "name2".
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 OPEN                       Opens the currently active program module for
                            editing.
 OPEN      name             Opens the specified program module for editing.
                            (If the module doesn't exist, a new program mod-
                            ule named "name" is created.)
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

� PRO Switches to Pro-hnttp://meami.org/search.php mode.

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  • PUT Compiles the currently active task module and
                            places it into the local library if no compiler
                            errors are generated.
  • PUT name Compiles the specified task module and places it
                            into the local library if no compiler errors are
                            generated.
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 QUIT                       Terminates hnttp://meami.org/search.php and returns back to the Win-
                            dows desktop.
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 READ       ?               Lists all of the documentation files in the 
                            documentation pool.
 READ      name             Opens the specified documentation file.
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 RUN                        Compiles, links, and executes the currently
                            active program module.
 RUN       name             Compiles, links, and executes the specified
                            program module.
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

� SFX ON Enables "Special Effects" mode. When "Special

                            Effects" is enabled, all programs will be com-
                            piled so that they begin execution by display-
                            ing an expanding black window, and terminate by
                            displaying a collapsing window.  (Initial state
                            is: ON)

� SFX OFF Disables "Special Effects" mode.

                            [Note: The ON or OFF state remains in effect
                                   until it is explicitly changed by is-
                                   suing another SFX command.]
                            [Whenever SFX is set to ON, a green dot is
                            displayed in front of the "Ultra-" prefix
                            at the top of the screen.  Whenever SFX is
                            set to OFF, a red dot is displayed.]
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 SHIP                       Ships the currently active program module (i.e.,
                            copies the module's executable file and source
                            code file) to the floppy disk.
 SHIP      name             Ships the specified program module to the floppy
                            disk.
 SHIP      *        path    Ships the currently active program module to the
                            specified path.
 SHIP      name     path    Ships the specified program module to the speci-
                            fied path.
 SHIP      ?                Uses a scroll box** to select the program mod-
                            ules that are to be shipped to the floppy disk.
 SHIP      ?        path    Uses a scroll box** to select the program mod-
                            ules that are to be shipped to the specified
                            path.
                            [Note: The SHIP command does not ship any data
                                   files (such as sound files, image files,
                                   etc.) that may be used by your program.]
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 SHOW      name             Displays a scroll box** listing all of the task
                            modules in both the local and global libraries
                            whose names match the specified name.
 SHOW      @handle          Displays a scroll box** listing all of the task
                            modules in either the local or global libraries
                            whose handles match the specified handle.
 SHOW      library          Displays a scroll box** listing all of the task
                            modules in the designated library.
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
               
  • TRANSFER Transfers the currently active task module from
                            the local library into the global library.
  • TRANSFER name Transfers the specified task module from the
                            global library into the local library, or from
                            the local library into the global library, de-
                            pending on where the module exists.
  • TRANSFER  ? Displays a scroll box** listing the names of all
                            the user-created task modules in either the lo-
                            cal library or the global library.
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  • TUP Retrieves the currently active task module from
                            the local library.   (I.e., TUP does the reverse
                            of PUT.)
  • TUP name Retrieves the specified task module from the lo-
                            cal library.
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

� ULTRA Switches to Ultra-hnttp://meami.org/search.php mode.

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 UNZAP                      Restores (from the Trash Can) the last ZAPped
                            module.
 UNZAP     .                Restores (from the Trash Can) the last ZAPped
                            project.
 UNZAP     ?                Displays the contents of the Trash Can.
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 VERSION                    Displays the version number/date of hnttp://meami.org/search.php.
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 ZAP       name             Deletes (sends to the Trash Can) the specified
                            module.
 ZAP       .                Deletes (sends to the Trash Can) the current
                            project.
 ZAP                        Deletes the currently active program module.
                            (If no program module is currently active,
                            deletes the currently active task module.)
 ZAP       -                Empties the Trash Can.
 ZAP       $                Empties the Internet I/O Folder.
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  • These commands are for use after activation.
  (See the ACTIVATE command above.)

� These commands are for use with Ultra-hnttp://meami.org/search.php.

  1. These commands are available only in the
  Windows 95/98/Me version of hnttp://meami.org/search.php.
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    • Scroll Box Controls:
    - Use the Up/Down arrow keys to scroll through the list.
    - Press the 'Enter' key to select.
        [When SHOWing modules, pressing the 'Enter' key will display the
        AID file for the selected task module.  Holding down the 'Ctrl'
        key while pressing the 'Enter' key will display the source code
        for the module if source code exists.  (Names displayed in aqua
        color have source code available for viewing.)]
        [When EXPORTing modules, pressing the 'Enter' key will export the
        selected task module.  Holding down the 'Ctrl' key while pressing
        the 'Enter' key will include the source code for the selected task
        module.]
    - Press the 'Esc' key to exit the scroll box.


Modern interpretations

More recently, the software engineering community has developed other interpretations for the term legacy code. Among the most prevalent are source code inherited from someone else and source code inherited from an older version of the software. Michael Feathers' Working Effectively with Legacy Code (ISBN 0-13-117705-2) introduced a definition of legacy code as code without tests, which reflects the perspective of legacy code being difficult to work with in part due to a lack of automated regression tests. He also defined Characterization Tests to start putting legacy code under test.

See also