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


in reply to Re: Being helpful to a fault?
in thread Being helpful to a fault?

I think it's usually obvious when someone hasn't thought things through. In your example, if the poster says "I'm writing up this bubble sort just for learning", then its clear that its not going to be used in practice and we can all safely answer the question as stated without the ingrained engineer's response of saying "That shouldn't be that way!"

However, 9 times out of 10 (I got that statistic from the same place you did), someone implementing a bubble sort is mearly naive.

A better example, which actually comes up a lot, is someone with a buggy CGI parser. The automatic (and correct, IMNHO) response is to point them to CGI.pm.

(Side point: I must wonder how many people using hand-coded CGI parsers actually understand the code they put in. Even buggy ones are a rather complex series of regular expressions and relatively deep Perl-isms. I certainly didn't understand them when I was doing it.)

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

: () { :|:& };:

Note: All code is untested, unless otherwise stated