Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Lazy not Sluggardly

by mkmcconn (Chaplain)
on Dec 22, 2000 at 09:22 UTC ( [id://48018]=perlmeditation: print w/replies, xml ) Need Help??

japhy cautions that we must Code Smarter. Being smart often requires patient work of one kind, in order to spare oneself the drudgery of another kind of work.

My work often involves parsing thousands of lines in hundreds of index files on several computers on a single LAN, looking for the magic keys that I use to direct a small set of complex file operations. I have discovered that Perl grants me the free moral agency to choose any number of sinful ways to do this.

I endanger the soul of my code, when the virtue of laziness is exchanged for the sin of sluggardliness. By laziness I pursue the solution that results in the least amount of work both for myself and for the computer and network. The larger the job, the more virtuous is the virtue of laziness. Sluggardly and foolish programming, however, will be punished with latency and delayed results.

I think it may be best that a foolish program should warn() verbosely, so that others may be alerted, or even that it should die(). I confess that I have even recently written a program that seemed at first quite humble, but in the eye of the Machine the code was crufty with unnecessary processes, and on account of my sins it was necessary for the Machine itself to be cut off. Indeed, my program was so self-absorbed, so greedy and covetous, that two nearby Windows machines were smitten with blue screens, and simply rebooted themselves.

Neither a surprise nor unjustly, failure to do work of the smart kind, results in more work of the drudge kind in the end. Thus I conclude, brethren, that Lazy and Smart are the same thing


<address>mkmcconn</address>

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-25 20:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found