Keith's Blog

Code Resurrection

This weekend I spent some hours resurrecting some old code I had written to present and modify a database of the various coins I had collected. I built it originally back in 2000, and made updates over the next few years. For some reason, I was inspired to dig it out and update it to run on my new hosting provider. I ran into a few snags though.

  • The original version used ODBC to connect to SQL Server via Win32::ODBC (Perl). My new hosting provider is Linux running MySql. I didn't want to rewrite all the database access, so I wrote a wrapper on top of DBI::MySql that looks just like Win32::ODBC. And it even works!
  • Originally, it ran in one directory, /coins, with the code in /coins/cgi-bin, and the images in /images/coins. Now it runs in /cgi-bin/coins, and /coins/images. This required a tedious search and replace
  • I only had an Access database containing the actual data. I had to export as CSV, and write a program to turn those files into SQL insert statements.
  • The data I have is not the latest version, but the code is the latest, so the code uses some fields that don't exist in the data, most notabely some of the auto price update stuff I wrote.
  • It's really a 2000 website, complete with frames, "pure" HTML (no CSS), and even a client side image map!
It's not quite ready yet, so it's not viewable to the general public.



0 Comments:

Post a Comment

<< Home