Perl: the Markov chain saw | |
PerlMonks |
Re: What is your Perl dialect?by Anonymous Monk |
on Feb 16, 2003 at 21:51 UTC ( [id://235808]=note: print w/replies, xml ) | Need Help?? |
I write code for physics research, and since my programs often have run times of months I find myself developing an incredibly strict style. If I know an idiom that turns a task into a oneliner, I use it; if I don't I try to find or reason one out that I can add to my "dialect" and further cut my code. The goal is brevity. I want to be able to read my code as a few lines of colloquial instructions, all of which are familiar. I always use warnings; use strict; use diagnostics in every script. I write the script, debug it, and then write either a commented header or a POD document telling what it does and how to use it. I never actually comment my code, since it's all in my dialect. grep, map, and such don't see the light of day that often in my code just because I have little use for them. sort occasionally comes up. My data is usually in files being operated on my FORTRAN programs, or is in piddles under PDL. I got to use sort yesterday to arrange the frequencies of emitted photons in n=3 to n=2 transitions in hydrogen with fine structure corrections yesterday, but that was more for aesthetic reasons than need. Physics seems to be order independent...
In Section
Meditations
|
|