Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: There's a level in Hell reserved for ________

by grinder (Bishop)
on Feb 28, 2003 at 10:22 UTC ( #239385=note: print w/replies, xml ) Need Help??

in reply to There's a level in Hell reserved for ________

Let's see now

  • ... people who filter out special directories in File::Find wanted routines with return if /^\.\.?$/
  • ... people who use studlyCapsVariables
  • ... people who write programs that fail when run from a random current working directory.
  • ... people who use random amounts of whitespace and indentation
  • ... people who call routines with ampersand (&foo( $arg )).
  • ... people who write die $! without any other context to help you analyse the reason for failure.
  • ... people who fail to check whether open fails.
  • ... people who want to solve a problem yet refuse to install a module that would do the trick nicely.
  • ... people who scrape web pages with regexps.
  • ... people who continue to write templating systems, database mini-languages and CGI parameter parsers in this day and age.
  • and ... people who moan about Perl 6.

print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u'

Replies are listed 'Best First'.
Re: Re: There's a level in Hell reserved for ________
by Anonymous Monk on Feb 28, 2003 at 14:59 UTC

    You forgot a few:

    • ... people who use way_too_may_underscores_in_variables
    • ... people who limit themselves by only using modules and never rewriting the code to truly understand how it works.
    • ... people who have never tried to scrape web pages with regexps.
    • ... people who think that templating systems, parameter parsers, etc should not be written just because they're bored of them (and decent ones already exist). There's always room for improvement.

    As for my own, I have only one:

    • There is a special place in Los Angeles reserved for those who would sit back criticizing other programming languages without ever having used them.

      I'd rather see too many underscores than abiglongvariablenameallasoneword. But then again, my text editor tries to autocomplete words (and does a fairly good job), so long variables aren't a big deal to me...

      Should you write your own templating system for fun? Yes. Should you use it in a project for your company? No. Should you put it on CPAN? No.

      When I see people doing this kind of thing, I think "you must have a lot of time on your hands." Personally, I find that even after I use high-quality CPAN modules wherevere possible there is still plenty of coding to do, and the coding that's left is the part that is supplying actual value to my employer by solving their specific problem (as opposed to general problems like processing templates).

      And what if there really is no template system that does what you need? Take one that's close and hack it, and submit the patches back to the maintainer. When Template Toolkit was not fast enough for us to use at eToys, we hacked it to make it much faster and then gave the code to the author. He used the ideas in it as the basis for a later release that we eventually ended up using.

        A couple of times I have embedded extremely simple templating code into projects I have worked on (usually for code generation purposes). Is this wrong in general in your view? My own justification was that it was simpler to write the 15~20 lines of code to handle what I wanted than it was to use one of the pre-existing modules out there. Just getting aquainted with the API of the module would have taken longer than writing the code.

        To turn this into a question, assuming you need a no-frills, quick, light and easy templating system what would you use? A simple

        $tags=join "|",map {quotemeta $_} keys %tags; 1 while s/\b($tags)\b/$tags{$1}/g;

        or a templating module?


Re: Re: There's a level in Hell reserved for ________
by demerphq (Chancellor) on Mar 04, 2003 at 16:32 UTC

    ... people who filter out special directories in File::Find wanted routines with return if /^\.\.?$/

    Umm whats wrong with that?


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://239385]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (1)
As of 2018-05-23 01:44 GMT
Find Nodes?
    Voting Booth?