suggestions for VIN parsing

Rick Johnson rantingrickjohnson at gmail.com
Mon Dec 29 16:03:29 EST 2014


On Monday, December 29, 2014 12:27:33 PM UTC-6, Rick Johnson wrote:
>
> [...]
>

[Addendum]

============================================================
 WHEN LOGICAL AND SUBJECTIVE CONSTRUCTS INTERSECT,
 "SEMANTIC WARS" ARE WAGED!
============================================================

I believe this thread has exposed the putrid entrails of the
unconscious "semantic wars" for which we are all
unwitting participants when reading and writing code. It is a
war for which there are no winners, and only losers. It is
a war propagated by us, and then waged against *US*! With
the goal of infecting our code bases with incomprehensible
constructs.

The interpretation of source code is far too subjective, as
evidenced by the ubiquitous spaghetti code in the wild, and
we must produce solutions that will more rigidity restrict
the use of our lexical constructs, in such a precise manner
as to reduce (or even remove) any loopholes for which
subjective constructs may enter.

Merely relying on "faith" that people will practice "safe
coding" is as wishful a fantasy as hoping that crack heads
or viral hosts will practice "safe sex". And don't get in a
hurry to pat yourself on the back just because you provided
a "candy bowl" filled with free prophylactics as some
"gesture" of your "altruistic nature", because:

  *SURPRISE*, THEY WON'T TO USE THEM!

Instead of living in a world of "wishful fantasies" and
"hoping" that people will do the "right thing", you need to
design your language in a manner that will prevent them from
doing the "wrong thing"! That will prevent them from
injecting subjective constructs into what should be a purely
logical process!

I think we can all agree that there is nothing "subjective"
about the *mechanics* of "iteration" (or can we?). Any
attempt to "re-interpret" the *mechanics* of iteration, or
understand it from a subjective perspective is fool-hearty.
Iteration *IS* by definition: "moving along a linear path
from one target to the next target until the targets are
exhausted (or the process is interrupted)" Note: "linear"
does not necessarily mean a "strait path" --neither in a
two-dimensional or three-dimensional Euclidean sense-- the
linear aspect of iteration is not in "relative terms" (as in
the directional vector from one target to another target),
but in "absolute terms" (as in the process of moving from a
predefined beginning to an predefined end).

   I am the alpha and the omega!

Iteration is a *truly* logical process, whereas, the
comprehension of free-form lexical constructs is highly
subjective (like: hash key->value pairs). So what do we do
when faced with such "semantically dichotomies"? Should we
give into our basic ritualized instincts? In some cases the
answer is not so clear. Consider the example "mappings" that
i posted earlier which could be defined in two distinct
manners -- both of which inject subjective constructs!


OPTION 1: Define the keys as ranges and the values as years.
    
  From the perspective of the mapping, the semantic order is
  flipped. The "range" has no semantical meaning UNLESS it
  is defined by a *year*. From this perspective, the "year"
  is all that gives *meaning* to the "range", not the
  inverse!
  
  However, from the perspective of the loop (which iterates
  over keys), the order is correct. The logic of the loop
  *demands* that "ranges" give meaning to "years", and NOT the
  inverse!
    
    
OPTION 2: Define the keys as years and the values as ranges.
         
  total inverse transformation of option 1



More information about the Python-list mailing list