Revisiting Code

Back in graduate school, I wrote tens of thousands of lines of Delphi code in support of research projects I worked on. Well, it is several years later, and my colleagues and I are getting back to the job of writing things up from those projects. And with manuscripts, one also has figures. A fairly urgent task for my spare time currently is working up requested revisions of figures that were originally produced almost a decade ago. I’ve pulled a couple of things into Python and used Matplotlib for figures, but many things I did with heavy tweaking of the Delphi TChart component, and the simplest path to revised figures for those still lies within Delphi.

While it isn’t exactly simple, the thing is that I can figure out where I was getting various things done. There is something to be said for Delphi’s Object Pascal language, where even with some years intervening and a distinct dearth of comments (yeah, mea culpa), I’m getting the gist of things in fairly short order. For one scatterplot, the original had a color progression that went with the time of each click being plotted, so each click was represented by a dot of a hue indicating its position in time in the click train. Well, that wasn’t wanted for print, so the request is for the same plot, but using a grayscale. The color progression doesn’t simply translate, so it was back to the code to re-do the thing in grayscale. I just finished that one up this evening. The Delphi 5 IDE holds up as a usable development tool, but I’ve gotten used to later-generation tools like Apple’s Xcode and Microsoft’ Visual Studio 2010, and it does look dated compared to those.

I do want to eventually have a library of Python classes that will work with the dataset, and I’ve made some progress on that score. I’ve used the ‘struct’ module to parse various files composed of binary Delphi records and used SQLite to stuff the contents into a database. I have a partially-completed Python signal processing script to tackle going through all the original signal data I have and apply various techniques that I simply didn’t have the compute-power before to try. Again, the sticking point is more that the time I can apply to any of these things is limited, given that so much remains to fix up in our fixer-upper of a domicile.

Wesley R. Elsberry

Falconer. Interdisciplinary researcher: biology and computer science. Data scientist in real estate and econometrics. Blogger. Speaker. Photographer. Husband. Christian. Activist.