Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Why I learn a language.

by FoxtrotUniform (Prior)
on Feb 24, 2003 at 16:17 UTC ( #238158=note: print w/ replies, xml ) Need Help??


in reply to Why I learn a language.

    What made YOU learn Perl?

Well, about halfway through my second year at uni, one of my profs mentioned that the software engineering assignment (a CGI backend) we'd just solved in no fewer than six hundred lines of C could be done in twenty lines of Perl, and that Perl was an excellent language for text processing. That little grain of opinion stayed in the back of my mind for a year and a half, when I had to magic up some content for a machine learning project. Two hours and a hundred lines or so of baby Perl later, three formats became one, and gnuplot was making lots of pretty graphs for my paper.

If that was all Perl was good for, I'd probably be hanging out at schemers.org right now. But over the last couple of years I've discovered the wonderful, "theoretical" side of Perl that really appeals to me as a computing scientist, not just as a programmer: starting with stuff like map and closures, moving through regex extensions that turn a text-matching tool into a general backtracking system, and going on to stuff like continuations, currying, and the like.

    When you code, do you attempt to achieve the objective as efficiently as possible (time-wise, etc). Or do you focus on the elegance (or "correctness") of your code.

It Depends(tm).

If I'm writing up a stats lab, which I mostly just want to get over with, I'll "optimise for programmer efficiency" -- the TA isn't even going to read my code, and I'll never have to touch it again, so I'm not going to be too concerned about keeping a clean namespace and making proper use of continuations. (Some habits are ingrained, though, and I find that even my hackish, off-the-cuff code tends to be fairly well decoupled.)

If I'm writing code to explore a problem rather than Get Something Done Right Away So I Can Go Play Guitar, I'll spend much more time on it.

--
F o x t r o t U n i f o r m
Found a typo in this node? /msg me
The hell with paco, vote for Erudil!


Comment on Re: Why I learn a language.
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://238158]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2014-07-30 01:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls