2013-03-19

Gristle Slicer - of Architects, Chairs and Unix Utilities


There's an old story about two senior architects that were friends in college, and met again thirty years later.   After a few minutes they started talking about their favorite achievements.   The first described office towers, airports, and universities he was quite proud of.   The second didn't have any monuments to talk about, but shared that he thought he may have designed the perfect chair.t chair.    Clearly trumped, his friend congratulated him, and asked to hear more - since the perfect chair is far more significant than yet another monument.

Sometimes, I feel that small unix utilities are to a programmer what a chair is to an architect:  they continue to be essential, and are typically small, spare, do just a single thing and can clearly show elegance.

I've written quite a number of them, and have recently started packaging those related to data analysis into a project called DataGristle.   My favorite utility of the set is gristle_slicer - a tool similar to the Unix program cut.   While cut allows the user to select columns out of a file, gristle_slicer selects columns and rows - and uses the more functional Python string slicing syntax to do it.  

It's no perfect chair but it might be a good utility.  

2013-03-03

Installing Python with Pythonbrew

This is the third in a series about installing and managing multiple versions of Pythion on a linux host. The main article which describes why this is necessary for development and testing, or to upgrade back-level os-provided versions is here.


Pythonbrew makes installation and management of multiple Python versions within the local user account easy.   It has a few issues:
  • I've found that it can fail to build some versions of Python.   Working around this involves giving it more specific Python version names, or by going back and making sure all the host libraries are properly installed.
  • It requires at least Python 2.6 to use - so if you're stuck with an older version (say, 2.4 on RHEL 5) to start you'll need to first install something more current using another method.  This results in two different python install methods which is confusing.
Nonetheless, this is probably the best solution if you're running a modern python version for your OS, and can't install the versions you need via the Package Manager.

Installing Python with a package manager


This is the second part in a series about installing multiple versions of Python.   The main article which describes why this is necessary for development and testing, or to upgrade back-level os-provided versions is here.