Program conversion
Feb. 10th, 2005 04:19 pmAfter my sabbatical, I am back to working half-time.
First on my plate, I am working on upgrading, converting, and cleaning up some old geographic code. The project is going pretty well. I have noticed two things doing this:
1) Supporting undeclared variables still really sucks (I have written about this in LJ before). In going through code today I found mis-spelling of a variable name that compiled OK since the language supports undeclared variables. This can cause a bug in a corner case depending on the state of memory. The code has been in use for years. Oops. I think it often "works by chance".
2) Code conversion is a good place for automation if you go for the 80-20 rule. Part of the work has been converting ancient PL/1 code to an object oriented 4GL. I have written some regex heavy Perl that I figure that does about 80% of the skunk work of the conversion automatically. There is a lot of code so this is a big win. The trick is accepting that you cannot automate the whole conversion without a big effort. My Perl program took less than a week to write. Chasing the remaining 20% with automation might add a lifetime to the project.
First on my plate, I am working on upgrading, converting, and cleaning up some old geographic code. The project is going pretty well. I have noticed two things doing this:
1) Supporting undeclared variables still really sucks (I have written about this in LJ before). In going through code today I found mis-spelling of a variable name that compiled OK since the language supports undeclared variables. This can cause a bug in a corner case depending on the state of memory. The code has been in use for years. Oops. I think it often "works by chance".
2) Code conversion is a good place for automation if you go for the 80-20 rule. Part of the work has been converting ancient PL/1 code to an object oriented 4GL. I have written some regex heavy Perl that I figure that does about 80% of the skunk work of the conversion automatically. There is a lot of code so this is a big win. The trick is accepting that you cannot automate the whole conversion without a big effort. My Perl program took less than a week to write. Chasing the remaining 20% with automation might add a lifetime to the project.