Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Scriptome and Perl One-Liners

by dbwiz (Curate)
on Oct 23, 2005 at 07:59 UTC ( [id://502301]=note: print w/replies, xml ) Need Help??


in reply to Scriptome and Perl One-Liners

Apart from the dubious educational value of one-liners, I don't like this collection at all, for two reasons:

  • It encourages cargo cult programming
  • A great deal of these exampels could be made much easier using a database instead of plain text files. Even a minimalist database such as SQLite would greatly simplify tasks such as "Calculate sum of the nth column of tabular data" or "Calculate sum of a set of columns for each row". I mean, if you need to sum up some values, you need to read all the text anyway, so while you are reading it, it makes sense to export the data into a database, and then get the stats in no time.

Since they are ready-to-use recipes, it would have been more useful to save each case into a well written Perl script, with properly named variables, and using a database when needed.

The way it is now, it will just spread the rumor of Perl being a write-only language.

Replies are listed 'Best First'.
Re^2: Scriptome and Perl One-Liners
by BrowserUk (Patriarch) on Oct 23, 2005 at 12:00 UTC

    Have you ever heard the expression "If you have a hammer, everything looks like a nail"? Or maybe in your case, "If you have a a dirty great big wrench, every nail, screw, thumb-tack and piece of blu-tac looks like it should be replaced with a dirty great big nut'n'bolt :)

    Do you really import flat files into your DB for one-off column sums? You must have an awful lot of once-used, ever-to-be-forgotten junk lying around in DB(s).


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-19 10:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found