Language module management and ARRGHHHHH
Why are module managers in languages still making me build stuff???
So yesterday, I was trying to do a simple MySQL query and realised that the value I wanted was of type text and the field I wanted was actually in the middle of the string and not always consistently there. So I decided to write up a script for myself which would do the DB query and then parse the string returned. As I had not done python for sometime, I decided to write it in python.
First things first, all I did was import MySQLdb
. Nothing! Wasn’t installed. Fair enough. I had never had to previously install a python module, so I went to sourceforge and obtained the source, built it and it ran. That got me thinking, why do I have to do this myself?
I tried using go and even with the same import (mysql;)
, I needed to download the mysql module from google code and build it with the 8g and 8l binaries and then have a crack at it. Why am I still building these ???
If I wanted to do this in Ruby, I could use the gem installer and simply do a gem list -r mysql
to find out which one was available and then do a simple gem install mysql-X.Y
. No need to build. Installed and ready for use.
I like python and go a lot, but I believe for simplicity of use and for mimicking the behaviour of apt-get, ruby wins this one.