Converting Code v0.0.1
When taking on a project, we have to be prepared for the unthinkable. Sometimes, this comes as unrealistic expectations, and other times, it comes as unexpected spaghetti westerns (code bases). They truly are like the wild west, as anything can be happening, and people are just trying to live their best life.
This is what we experienced when we took over the Vend-Trak VMS project. Not only is it written in a language that has minimal support now, but the hosting associated with it is still relatively specialized.
The project codebase is written in ASP Classic, and the source was never kept under version control. This makes for an interesting challenge to maintain. The previous developer wasn’t really a developer at all. Which is surprising, due to the fact that much of the code is well written. The issue is that there are 6 versions of the same exact file in 6 different folders, due to the lack of knowledge in maintaining a codebase.
When we received the .zip file that contained the project source, we just sat and reviewed it for days. This allowed us to become familiar with the how the layout affected the operation of the project. After taking a few days to review and become familiar with the code, we did what we felt was the absolute most important thing to do. We ran a shell command in the folder. One simple command,
git init. It wasn’t enough for us to have the .zip file that we could always refer back to. What happens if the computer crashed, or we accidentally deleted the .zip file. This was unacceptable in our shop.
After committing the source to a git repository, we started to make changes. Slowly, committing every change we made, so we had a rollback point. This allowed us to prune the codebase down, and produce a maintainable setup.
We started with the
default.asp file, which is the launching point of our application, and slowly changed paths, again, committing after every small change, due to the fragility of the application. Pushing these changes to the server after testing, allowed us to know that we were slowly bringing the code to a smaller footprint, allowing for optimizations at a later date.
That’s where we are right now, maintaining a smaller version. It is just that though, maintenance, we have not really made any structural changes to the code as of yet.