Thursday, December 01, 2005

Confessions of a linguistic flirt

Father, forgive me, for I have sinned.

Yesterday, I just picked up a new language. My mood was bleak, and maybe I'd had a bit too much coffee to drink. R. Just R. We met in machine learning class, and at first I never imagined I'd be spending any time with R at all - I thought good old MATLAB would work just fine for whatever I needed. And you know how much I hate the "getting to know" part.

I didn't have a choice, Father. I was really in it to cash in on the inheritance. You see, R's predecessor, S had passed on a procedure that I desperately needed to validate some test cases and R and S were the only ones that had it. I chose R because you know I like the younger ones and besides, S is proprietary. However sinful I may be, you know I'd never pay for that kind of thing.

So I took her to my home directory and got started. I got to know R quite well in just one night. My deadline is due soon and I really needed some quick action. Its amazing how little you need to talk to R - something I've never experienced before. The way to speak to R is also primitive (and hedonistic), but it sure produces amazing results. One liners with R go like

reducedX<-X[1:dim(X)[1],A$which[(A$Cp==min(A$Cp[A$size==m+1])) & A$size==m+1,1:dim(X)[2]]]

but they actually incorporate five long and loopy statements that you'd have to make with any other language! I hear your disapproval, Father. I have also committed the sin of breaking the code law - I know this kind of code is not maintainable, reusable, extendible or readable. But it boosts my programmer's ego so much! And even you have to agree that the code sounds so much alike to words said in the Bibles (GNU Make Manual, 4.14).

Yes, Father, I accept. As penance, I will go and finish properly documenting my older code in C++. And I promise, R will not be more than a one project stand.