Migrating a code base from one language to another

During 2012 I migrated a Xpand and Xtend1 code base to its successor Xtend2, today simply called Xtend. During the project I made the folllowing experiences.

  • First try to clean up the old code base a little before starting to migrate! Small stuff will help already.
    • Talk to the developers involved in the project and ask for stuff that isnt used or needed anymore. There will be planty. And wasting time on this is just nonsense.
    • Try to find duplicated code.
    • Try to reduce the dependencies between classes, modules etc.
  • Always have a running system while migrating. Use an adapter for example to iterativly replace the old system step by step with the new one until the migration is 100% completed.
  • Do small noninvasive changes. Migrate the smallest file with smallest possible impact first.
  • Write many tests to prove that the behavior of the migrated code is the same.
  • Don't do any refactorings on your way!!! Don't do it! First successfully complete the migration and write lots of tests. Only afterwards do refactor the migrated code.

Date published:
Date modified: 2013-06-12
Keywords: Linux, Java, JDK, SLES, Suse