pairs from a list

George Sakkis george.sakkis at gmail.com
Wed Jan 23 02:33:00 EST 2008


On Jan 23, 1:39 am, Steven D'Aprano
<ste... at REMOVE.THIS.cybersource.com.au> wrote:

> Given the human psychology displayed involved, in the absence of
> definitive evidence one way or another it is a far safer bet to assume
> that people are unnecessarily asking for "the fastest" out of a misguided
> and often ignorant belief that they need it, rather than the opposite.
> People who actually need a faster solution usually know enough to preface
> their comments with an explanation of why their existing solution is too
> slow rather than just a context-free demand for "the fastest" solution.

As I mentioned already, I consider the seeking of the most efficient
solution a legitimate question, regardless of whether a "dumb"
solution is fast enough for an application. Call it a "don't be
sloppy" principle if you wish. It's the same reason I always use
xrange() instead of range() for a loop, although in practice the
difference is rarely measurable.

> Fast code is like fast cars. There *are* people who really genuinely need
> to have the fastest car available, but that number is dwarfed by the vast
> legions of tossers trying to make up for their lack of self-esteem by
> buying a car with a spoiler. Yeah, you're going to be traveling SO FAST
> on the way to the mall that the car is at risk of getting airborne, sure,
> we believe you.
>
> (The above sarcasm naturally doesn't apply to those who actually do need
> to travel at 200mph in a school zone, like police, taxi drivers and stock
> brokers.)

Good example; it shows that there's more than the utilitarian point of
view. People don't buy these cars because of an actual need but rather
because of the brand, the (perceived) social value and other reasons.

And since you like metaphors, here's another one: caring about
efficient code only when you need it is like keeping notes for a
course only for the material to be included in the final exams,
skipping the more encyclopedic, general knowledge lectures. Sure, you
may pass the class, even with a good grade, but for some people a
class is more than a final grade.

George



More information about the Python-list mailing list