Marco's Blog

All content personal opinions or work.
en eo

Weight Table - Perl

2005-03-15 2 min read Uncategorised marco

The Perl Version

I really liked the Tcl version, but at some point I didn’t want to stick to an application any more. A web interface would have been much better for my needs.

This change by itself would not have prompted a new implementation, but I realized that there would be no GUI interface, and that hence the tables and graphs would have to be built on the fly. Tcl’s sluggish response and the need for external software made me wonder whether that was the right approach.

I saw the GD package, and was surprised how easy it actually was to create graphs given knowledge of the data. Further along, I found GD::Graph, which actually went all the way to displaying a graph from data input. I had to do without comments, but as soon as I get hotspots to work, they’ll be there again.

As a result of the conversion, the code went down from 20k for the Tcl version to 8.5k for Perl. Of course, the Tcl version could be optimized considerably (especially the computation of coordinate transformation, which is not centralized), there is no GUI in the Perl version, and the latter benefits from a sizeable library. All in all, though, I think I’ll stick with Perl for future programming tasks, and will switch to PyQT for GUIs.

All the Perl that’s Practical to Extract and Report