Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Swords, Sorcery, and the Spoon

by dooberwah (Pilgrim)
on Nov 01, 2001 at 01:33 UTC ( [id://122440]=perlmeditation: print w/replies, xml ) Need Help??

Yesterday, while I was working on a project, I noticed a few bugs in my code. They weren't big bugs, the files just needed to be updated a bit because other things in the project had changed. I quickly grabbed a piece of paper and my favorite pen and started jotting down notes about what the code was supposed to do and how I should go about writing it (I do this for almost everything but the most trivial problems, it helps me think.). After a few minutes I had designed a method of fixing my problem that looked like it would work well. Quickly scanning over my notes I realized that there was going to be a bit of repetition in my code. "Oh no," I thought, "repetition! thing of the devil! Because I am a Perl hacker this must not stand!" I grabbed another piece of paper and started scribbling away some more, trying to find a way of fixing my problem without having any repetition. After half an hour or so I can up with a truly wizardly solution. Scanning over my notes again I realized that even though all the repetition was erased my code was longer, uglier, and horribly complicated. "Fine," thought I, "I'll go about the brute force method if my magic isn't going to serve me well." I began to reach for a third piece of paper, but instead I sat back and thought. "Wait," I thought, "this really isn't a very complicated problem. I don't need magic or monstrous strength to overcome it. All I really need is a well placed skill, without trying to out-do myself." Keeping this in mind I quickly wrote a small, but efficient, piece of code. It did have a few lines of repetition, but I didn't let that bother me.

There you have it: the sword, the sorcery, and the spoon (I used the word spoon partly because it sounds nice with swords and sorcery and partly because with some carful placing you can do a lot with the leverage of one spoon.). I think the moral is pretty obvious, but I'll repeat it here: use what works best, and don't overestimate the problem.

If the title brings odd pictures into your mind, you're not alone. When I read over this I get a picture of a Warrior of Perl skillfully beating back Aragorn and Gandalf as they attack him with all their might. Hope this helps somebody, TMTOWTDI!

-Ben Jacobs (dooberwah)
"one thing i can tell you is you got to be free"

Replies are listed 'Best First'.
Re: Swords, Sorcery, and the Spoon
by ralphie (Friar) on Nov 01, 2001 at 03:45 UTC
    hey, those were the good guys. we're all good guys here (mostly).
      Yes, I know they are the good guys. I would have put the names of bad guys but I couldn't think of many sword-wielding bad guys, and my copy of the Lord of the Rings wasn't anywhere to be found.

      -Ben Jacobs (dooberwah)
      "one thing i can tell you is you got to be free"

Re: Swords, Sorcery, and the Spoon
by BMaximus (Chaplain) on Nov 01, 2001 at 17:10 UTC
    Of course in order to move forward and control the world around you, you must think .... "There is no spoon".

    BMaximus
      Except, of course, while you're eating your breakfast cereal..

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2024-04-26 03:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found