http://www.perlmonks.org?node_id=986862


in reply to Perl Elitist Code vs Functional Code

So I am going to pose a simple question please do not start a super flame war.

Gee, a question about code quality, that includes no code to examine , and a warning not to flame -- how juvenile

Replies are listed 'Best First'.
Re^2: Perl Elitist Code vs Functional Code
by morissette (Novice) on Aug 11, 2012 at 06:27 UTC
    There is no code examples for a reason. I was just curious the entire post relates to quick hacks nothing that would ever become a full fledged script.
      the entire post relates to quick hacks nothing that would ever become a full fledged script.

      That's kind of the point, though: some people say such a thing doesn't really exist. In their experience, "quick hacks" have a way of growing into larger, more complex programs and being maintained by larger groups of programmers. So it makes sense for them to design all their programs as if that will be the case, even if the need doesn't seem to be there at the start.

      On the other hand, some of us have written plenty of quick hacks that have never needed to be expanded, or used and maintained by anyone else -- many were even used once and discarded. That being the case, any amount of time spent making them more than simply "functional" would have been a waste.

      Where you fall on a range between those two extremes depends on your own programming style and your work situation -- how often is your code reused or shared with others? Based on those things, you have to make your own judgments about your own coding needs.

      Aaron B.
      Available for small or large Perl jobs; see my home node.

      Most of us have maintained plenty of “quick hacks” that the (long gone ...) original designers never imagined would become a full-fledged script.   Or, likewise, dozens of quick-hacks that became in the aggregate a completely-unmaintainable full fledged system.

      And that is why, if you were hoping for a flame-war, you are not too likely to be rewarded with one.   People around here understand implicitly what the consequences of hack-code are, because they have had to deal with it for a very long time.   This is why they work as they do.   Even if you intentionally put in words like “functional vs. elitist,” you simply are not going to see this group dividing itself into two camps and bickering.

      Early in my career, I tried to fix the plumbing in my house.   The corroded, galvanized fitting that my predecessor had attached to a copper piping system broke off in my hands.   “OMG!!” I thought to myself, “I’m screwed!!”   But the home improvement gods were smiling that day.   The first guy who I called showed up immediately, fixed the problem in less than ten minutes, gratuitously checked the piping in the rest of the house, charged me $50 and left a stack of business cards.   (I vividly remember his assistant innocently asking, “shall I turn the water on now to check for leaks?”   With a calm but withering stare, he replied, “My work does not leak.”   The assistant hurriedly found something else to do.)   I told that story and passed out business cards.   In fact, I am still telling that story right now.   What I desperately wanted, and could not do for myself, is what he very-professionally did.   What I feared most was to him unthinkable.   He could have charged me any price he named, and I would have paid it and never forgotten it.   Well, I did pay the price he named, and I have never forgotten it.

      Ever since, and with every client we’ve ever had or will have, I have simply tried to copy the ways of that wise plumber.

        The first guy who I called showed up immediately, fixed the problem in less than ten minutes, gratuitously checked the piping in the rest of the house, charged me $50 and left a stack of business cards.

        This!

        My plumber was the one who installed the fitting, but did a fix it week later in about 10 minutes at no charge -- luckily this was for water boiler which is an outside closet , and yes, it did leak gallons and gallons

      the entire post relates to quick hacks nothing that would ever become a full fledged script
      You probably should have mentioned this in the original post.