Python 3 regex?
Rick Johnson
rantingrickjohnson at gmail.com
Mon Jan 12 18:47:08 EST 2015
> 'Some people, when confronted with a problem, think "I
> know, I'll use regular expressions." Now they have two
> problems.' - Jamie Zawinski.
This statement is one of my favorite examples of "powerful
propaganda", which has scared more folks away from regexps
than even the "Upright Citizens Brigade" could manage with
their "Journey through the center of gas giant #7" and it's
resulting "aggravated assault" on American coinage!
I wonder if Jamie's conclusions are a result of careful
study, or merely, an attempt to resolve his own cognitive
dissonance? Of course, if the latter is true, then i give
him bonus points for his use of the third person to veil his
own inadequacies -- nice Jamie, *verrrrry* nice!
"Rick it sounds like you're accusing Jamie of cowardice
resulting in "sour grapes"?"
Indeed! The problem with statements like his is that, the
ironic humor near the end *fortifies* the argument so much
that the reader forgets the limits of the harm (quantified
as: "some people") and immediately accepts the consequences
as effecting "all people who choose to use regexps", or more
generally, accepts the argument as a "universal unbounded
truth". Besides, who would want to be a member of a group
for which the individuals are too stupid to know good
choices from bad choices?
HA, PEER PRESSURE, IT'S A POWERFUL THING!
But there is more going on here than just mere "slight of
forked tongue" my friends, because, even the most
accomplished propagandist cannot fool *most* of the people.
No, this type of "powerful propaganda" only succeeds when
the subject matter is both cryptic *AND* esoteric.
For instance, in the following example, i contrive a
similarly ironic statement to showcase the effects of such
propaganda, but one that covers a subject matter in which
laymen either: already understand, or, can easily attain
"enough knowledge" to appreciate the humor.
############################################################
# Ironic Twist #
############################################################
# Some diabetics, when confronted with hunger, think "I #
# know, I'll eat a box of sugar cookies." -- now they have #
# two problems!' #
############################################################
"Wait a minute Rick! After eating the cookies the
diabetic would not longer be hungry, so how could he
have two problems? Your logic is flawed!
Au Contraire! Read the statement carefully, I said:
"When *CONFRONTED* with hunger" -- the two problems
(and the eventual side effect) exist at the *MOMENT* the
diabetic considers eating the cookies.
PROBLEM1: Need to eat!
PROBLEM2: Cookies raise glucose too quickly
In this example, even a layman would understand that the
statement is meant to showcase the irony of resolving a
problem (hunger) with a solution (eating a box of cookies)
that results in the undesirable outcome of (hyperglycemia).
And while this statement, and the one about regexps, both
contain a "factual underlying truth" (basically that
negative side effects should be avoided) the layman will
lack the esoteric knowledge of regexps to confirm the
factual basis for himself, and will instead blindly adopt
the propagandist assertion as truth, based solely on the
humorous prowess of the propagandist.
The most effective propaganda utilizes the sub-conscience.
You see, the role of propaganda is to "modify behavior", and
it is a more prevalent and powerful tool than most people
realize! The propagandist will seek to control you; he'll
use your ignorance against you; but you didn't notice
because he made you laugh!
WHO'S LAUGHING NOW? -- YOU MINDLESS ROBOTS!
"But what's so evil about that Rick? He scared away a
few feeble minded folks. SO WHAT!
I argue that we are all "feeble minded" in any subject we
have not yet mastered. His propaganda (be it intentional or
not) is so powerful that it defeats the neophyte before they
can even begin. Because it gives them the false impression
that regexps are only used by foolish people.
Yes, i'll admit, regexps are very cryptic, but once you
grasp their intricacies, you appreciate the succinctness of
there syntax, because, what makes them so powerful is not
only the extents of their pattern matching abilities, but
their conciseness.
More information about the Python-list
mailing list