i’ve been writing some code lately. well, scripting really, mostly to get data into a useful format and then do something with it — nothing really complicated. i wish i was faster at it, but the path i chose as an undergrad did not give me a lot of programming practice. my basic problem is that it takes me a while to learn new tools and programming languages, and i am always feeling behind so i only learn how to do what i need to do *right now*, rather than trying to gain some real expertise.
for example, i needed to learn a bit of perl in order to download and parse log data from a learning management system, and data from del.icio.us. i understand what these perl scripts do, i can adapt and extend them fairly easily to other similar kinds of tasks, but i wouldn’t really say that i *know* perl. for my dissertation experiment, the data collection system was written using ruby on rails, and because of this there is a really useful API for getting information out of the database. so, i learned a little bit of ruby, to save myself some time writing scripts to process and analyze the data. but like perl, i wouldn’t say that i *know* ruby. i also know just enough about scripting in R to write simple functions to get data from a database, manipulate it, and do stats or plot things. i know just enough python to get data from a database (sensing a pattern here?), munge it, and spit out some SVG graphics. but all this dabbling has not made me a better (faster) programmer.
my inspiration for this post was a post on bioinformatics zen, a blog that i sometimes read. i find that a lot of the coding i do is fairly similar to what the author of that blog says bioinformaticians do: “a set of flat files, Perl scripts to parse out required rows, with R scripts to plot the results”. i document my scripts like crazy, but not out of some desire to write good software — i am just not good enough to instantly remember what i was doing and why i did it that way when i revisit a particular script i wrote two years ago. i sometimes fret about how slow i am, and how crappy my software is. i also fret about bugs that might cause embarrassing errors and affect the outcome of the analysis — in a sense, your results are only as good as the software you write (a point raised in another blog, biotext.org.uk).
i guess i wish i had learned more and become better at doing this kind of work earlier in life, so by now i would be more of an expert. but the fact remains, it is doing the analyses and uncovering the results that keep me excited and engaged until 4am — not the writing and debugging of the scripts. writing code is a means to an end — it’s not something i *love* enough to spend what little free time i have learning how to be better at it. so, the question is, is there a more systematic way for me to approach this so i can pick up programming skills that will help me be more efficient? or is my haphazard plunking away as the need arises the best course of action, because at least then i am truly motivated to do the work?