I have to convert an application with about 100k lines of code from one programming language to another (java to c++).
I'm looking for a solution to track my progress and make sure that nothing falls through the cracks.
So far I've thought about two approaches, but neither seems to be optimal:
copy the old code as comments into the new source files, and delete the portions that are converted (this gets messy)
print out the old code, and use a highlighter to mark converted code (not efficient)
Probably the best solution would be some text editor where I could keep the old code base and digitally highlight/mark up the code that's already converted. Does a utility like this exist? Or is there a better solution for managing code conversion?
You can check your old code into a VCS (e.g. Git, SVN, etc.), then start deleting the parts which you've already converted. The VCS diff tool will tell you clearly what parts have been deleted, acting like this "digital highlighting" approach but simpler (because the old code base will shrink as you convert it).
The most pragmatic approach would be to convert the tests first (if you have any tests...). Then you can write the new code against the tests. If you don't have tests, strongly consider making some. Converting 100KLOC without tests is a recipe for subtle bugs months later.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With