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

Favorite Weapons

by RhetTbull (Curate)
on May 30, 2002 at 02:34 UTC ( #170285=perlmeditation: print w/replies, xml ) Need Help??

A meditation for today. I ran across this quote in some reading and it made me ponder. Applicable to us monks as well as 17th century Japanese warriors I think.

You should not have a favorite weapon. To become overfamiliar with one weapon is as much a fault as not knowing it sufficiently well...It is bad for have likes and dislikes.
--Miyamoto Musashi, 17th century Japanese warrior in the Book of Five Rings

Or perhaps

You should not have a favorite (language|tool|paradigm)...
Discuss amongst yourselves...

Replies are listed 'Best First'.
Re: Favorite Weapons
by Rex(Wrecks) (Curate) on May 30, 2002 at 03:24 UTC
    While this is true, there is also a line in "The Art of War" (sorry, I can't seem to find the passage for a quote), that learning to many weapons makes you flexible but weak.

    There has to be a balance. My "style" is to learn many tools, and discard the ones I don't find a great deal use for, even if they are a little easier for one or two tasks than another tool that has many more uses. The tools that are left in my toolbox, I learn well, very well. I learn to like all of them, some more than others, but I try to remain unbiased when I select a tools for the problem at hand.

    I have seen this as fairly prevalent here in the Monastary as many of the people here also have the "lazy" mantra working :) Lazy, in this sense, usually means having many tools at your disposal, and knowing which one will work the most efficientlly with the least amount of effort.

    So in a sense I have several favorites, and I temper these with and open mind and a natural curiousity for new tools that may fit into my toolbox.

    Great node btw, and a very interesting read (The book, I mean :) ++

    "Nothing is sure but death and taxes" I say combine the two and its death to all taxes!
Re: Favorite Weapons
by tadman (Prior) on May 30, 2002 at 04:13 UTC
    I'm not sure that remark is meant to be taken entirely as it appears at first glance. There are layers of complexity in it that should probably be considered.

    Where "weapon" could be construed as "technique", or "tactic", then in terms of the organic whole, specialization is a weakness that can be exploited. Thus, if an adversary presents a challenge that brings out your weakness, either deliberately or accidentally, then your "weapon" will be useless. An army of swordsmen, no matter how well trained, could fall easily to an army of equally skilled riflemen, but an army with both well trained archers and swordsmen would fare much better, perhaps even win.

    In terms of programming, someone who relies too much on a particular technique will be vulnerable to problems not easily solved by it. This is to say that one must be versatile and adaptable in order to be truly effective. This is a variation on the "if all you know how to use is a hammer, everything looks like a nail" theory.

    The other side of this is that over-generalization is a weakness as well, the classic "Jack of All Trades, Master of None."

    Balance between the two extremes, of course, is the key. A variety of specialists, with some degree of overlapping capability to allow for clear communication and understanding, is what makes a strong team.
Re: Favorite Weapons
by frankus (Priest) on May 30, 2002 at 12:31 UTC
Re: Favorite Weapons
by FoxtrotUniform (Prior) on May 30, 2002 at 03:47 UTC

    IMHO, overgeneralization will tend to give you just enough competence to shoot yourself in the foot in every way you try. I'd much rather have three or four favourite (languages|tools|paradigms|foobars) that I know very well than a dozen that I kinda-sorta know.

    The hell with paco, vote for Erudil!

Re: Favorite Weapons
by ignatz (Vicar) on May 30, 2002 at 18:19 UTC
    > To become overfamiliar with one weapon is as much a
    > fault as not knowing it sufficiently well

    I disagree with this (I may be disagreeing with the translation of the concepts expressed).

    Speaking as much from my years as a professional musician as programming, I feel that it is important for a person's growth that they obtain a level of mastery in something. There is something that comes from taking the journey to complete command over a tool, even if you rarely end up using directly the skills that you aquire.

    However, I do agree that it is dangerous to become trapped in a skillset. Flexibility and creativity with one's skills is essential.

    ADDED: This is a very zen approach to things.

Re: Favorite Weapons
by Steve_p (Priest) on May 30, 2002 at 18:47 UTC
    Working in an environment where I need to support programs written in COBOL, C, C++, PL/SQL, Perl, and Java, I've found it very hard to have a favorite (although it wouldn't be COBOL). Working with PHP, Python, and Scheme outside of work makes it even harder.

    For those who seek to follow only a single path, be it Perl or anything else, I wish you well. I tried to follow the PL/SQL path for a long time. I even had a few nuggets to share with the masters there. The problem, I found, is that it takes a (pardon the pun) monastic devotion to follow a single path, assuming you'd like to hold down a job, or ever get a new one. If not, then your as expendable as the next guy if the technologies change. Look at all the COBOL programmers that lost jobs after Y2K. It wasn't because there isn't a need for programmers. Its just that many of these single weapon warriors had little to distinguish the from the other COBOL programmers out there.

    So my advice to the single sword programmers out there is to become a master in your language of choice. You need to be on top of the leading (preferably bleeding) edge in that language. Then, you need to teach others. Nothing teaches like teaching. Give a talk at a user group. Sign up for a Lightning Talk at YAPC. Hold a "Brown Bag" with people you work with. You will learn a lot more than you did know from the preparation. You'll learn the most, however, from the questions you're asked.

      "...I believe that neither type of language is properly equipped to handle sophisticated application projects satisfactorily on its own, and I hope to make the case for Perl and C/C++ as the two-language combination mentioned earlier..."

      —श्रीराम श्रीनिवासन

Re: Favorite Weapons
by mstone (Deacon) on May 31, 2002 at 02:40 UTC

    Erm, let's look at that statement in its original context..

    Musashi was a swordsman -- a warrior. His job was to kill other people before they killed him. And like any decent military strategist, he knew he'd have a much better chance of doing that if his opponents couldn't predict his moves well enough to put a sword right where he was about to duck.

    (And speaking of ducks, we fossils who grew up with Daffy Duck cartoons will remember Daffy's immortal performance as Robin Hood: "Ho! Haha! Guard! Turn! Parry! Dodge! Spin! Thrust!", and what happened when Porky caught him at "Spin!" the second time around)

    But since when is programming a mutually-antagonistic field?

    Sure, there are some good, direct corollaries to Musashi's admonition in areas like cryptography: don't use a Linear-Congruential Random Number Generator for hard encryption, because the numbers it generates have a tendency to clump when graphed in multiple dimensions.. in other words, the LCRNG has a 'favorite' set of lattice points from which it likes to choose numbers. That makes it more predictable, and thus weak in an antagonistic setting.

    Most software development isn't antagonistic, though. We tend to cooperate with each other, to the benefit of all. The whole point of the open source movement is to lay things out so everyone can see what we're doing, and the strong growth of open source development suggests that the idea has legs.

    In a cooperative environment, predictability can be a Good Thing. We call it 'standardization', and it keeps us from having to solve every problem from the ground up every time. Heck, even in cryptography, the experts prefer to use a known algorithm over a new one, because they've seen the old one stand up to more types of attack.

    Now, I realize that getting too perky about standards can lead to stagnation, and I'm a big fan of reinventing the wheel just to be sure that you can. I appreciate the value of diversity, and dislike seeing people work themselves into a religious fervor over the glory of a monoculture.

    That ain't what Musashi was talking about, though.. he was talking about how to fillet others before they kebab you.

    So let me return an aphorism for an aphorism:

    Be sure of your objective before planning your strategy.
    Be sure of your strategy before choosing your tactics.
      But since when is programming a mutually-antagonistic field?

      When a tight labor market dictates flexibility and a broader range of skills. You might need to brush up on your ASP/VB skills in order to get your next contract.


        You are saying, then, that things could be so desperate that one needs to learn BASIC to get a job? Then it truly is the end of days.

        To be more serious, though, Java is probably a better investment of time than VB. At least Java is a programming language.
Re: Favorite Weapons
by webfiend (Vicar) on May 30, 2002 at 20:26 UTC

    I have no idea if specialization leads to a form of weakness. Many of the programmers I've met have been highly specialized - not just in language, but in the type of problems they solve with that language. Within that specialization, they do things that are stunning, and possibly a little annoying (smug so-and-so's).

    I'll probably never know, though. A short story from Robert Heinlein had a profound impact on me when I was growing up, especially a single line:

    Specialization is for insects.

    Every time I wonder "why should I learn tool/trick/thingy Y, when X already does the job nicely?", that line pops into my head. So here I am, stuck knowing nothing about everything. Maybe it's better than knowing everything about nothing, though.

    "All you need is ignorance and confidence; then success is sure."-- Mark Twain

      "If we all reacted the same way, we'd be predictable, and there's always more than one way to view a situation. What's true for the group is also true for the individual. It's simple: Overspecialize, and you breed in weakness. It's slow death."


Re: Favorite Weapons
by tmiklas (Hermit) on May 31, 2002 at 06:23 UTC

    Warriors: To be a good warrior is to operate every weapon you know in the same way. Probably you will not use the knife against somebody with a some shooting-type weapon... even if knife is what you like the best :-)

    Programmers: Never stick to your guns! First is the problem, then it's the technology and knowledge to solve it. Even if you have a supreme technology but don't have enough knowledge, you won't win this fight (as you should).

    I prefer Perl over all, but i know, that sometimes i'll have to use something else - to chenge my handy-heavy-artillery to something like a long wooden rod, where what we mean as 'sharp' is only abstraction :-)
    I suppose that everybody here have their own candidate to this role :-)

    Greetz, Tom.
Re: Favorite Weapons
by arhuman (Vicar) on May 31, 2002 at 13:49 UTC
    It's interesting to note that whereas Musashi has tried to learn different weapons (staff, hallebard...) it was mainly to integrate their techics in his (double) sword(s) mastery.
    The moral is FOR ME :
    • Learn different technics to enhance your ability, don't hesitate to adapt them
      to your favourite way of acting...
      As a programmer I take idioms/techniques from other language
      (self-modifying code, closure, mixins...) and use them with my favourite language.

    • If you have no other choice you'd better stick to the weapon you know better
      (especially if you're more efficient with it than with the "said" adequate one...)
      Don't get me wrong you SHOULD learn to use the adequate tool WHENEVER POSSIBLE...

    "Only Bad Coders Code Badly In Perl" (OBC2BIP)

      "...However, most 侍 did not use their sword as a primary weapon; they used a bow first, a spear next, and only then the sword. Drawing the sword was like letting the soul blaze free when down to the last straw. To have fought until nothing but a surrender is possible was described as 「剣折れ、矢も尽き」 (lit. 'with swords broken and without an arrow'), used as a proverb."


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://170285]
Approved by dws
Front-paged by moodster
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2023-12-08 03:05 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (35 votes). Check out past polls.