So this week I've been trying to focus on the Buddhist concept of right intention. To summarize in a nutshell, it's the renunciation of worldly things and it's definitely worth reading a little more about if you are interested. I think wikipedia has a decent entry on this.
Anyway, part of wisdom is the realization of the impermenance of things. So today, I was sitting at work, reading through some code. By preference, i'm a perl girl. But I did use to write in other languages so I definitely have opinions. Anywho, I'm reading through this piece of code today that has the distinct feeling of being written by someone who really had limited experience with perl but was probably proficient in something else. Like fortran. And as usual, no disrespect to other language (kiss my ass python! Jokingjoking!) but it really helps if you take a moment to understand what a language is good at and intended for before you just write whatever it is you would've done in fortran, mainframe, c, whathaveyou instead of this thing that your boss is makng you use. To be more succinct: This code was crazy and not of the good.
And I just can't tell if I'm getting wiser, lazier, or just more beatdown about these kinds of things. Six years ago, I would've just laughed and re-written the whole damn thing better. But now, I just know that in a few years... Someone else will be looking at my stuff and thinking how crappy it is. So instead, I'm settling for understanding it (since it does actually work) and maybe planning a few improvements for later.
Am I a buddha yet?

Comments (1)
The code you mention is all too typical in perl, and I kinda think that is a problem. I found that as I got better at perl I just wrote more and more complex things - and that is not good. I would jam as much as possible on a single line of incomprehensible code and then think "wow, I did that whole wacky thing in like five lines".
I have been reading about and learning Python since November and I am not looking back.
The first thing perl people say when I mention this is "have fun with indentation". I don't see it as a bad thing that I have to properly indent. I always properly indented in perl or else I'd end up forgetting to close my curly braces.
Here is my "have fun with..." list for perl.
Have fun typing "my" in front of nearly every variable
Have fun typing a semi-colon at the end of every line - except for the last line of a loop which somehow you don't need to ;
Have fun scratching your head to figure out where you need to put the -> in your hash of anonymous arrays of hashes
Have fun using regular expressions for EVERYTHING even when they are not needed
Have fun never refactoring your code or creating unit tests because that is complex and complex = confusing in perl
Have fun trying to figure out which one of the 3 different ways a CPAN module decided to use object orientation - or even worse, try to figure it out yourself... bless you :)
------ author response ---------
Well that'll learn me to call out the python folk. But sure, your list is alright except that one about RE. Everything gets better with some of that. And I, personally, enjoy recursively installing CPAN modules.
Posted by Ryan | March 11, 2009 10:17 PM
Posted on March 11, 2009 22:17