Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The law of inconsistent assumptions (a pseudo-philosophical rant)There is a pervasive circumstance in human language (in general) and programming languages (in particular) where communication breaks down because people are using the same "words" but with subtly (or overtly) different understandings of the context. This circumstance is called "The law of inconsistent assumptions" (at least that's what I'm calling it here). I refer to it as "the law" partially to imply that this circumstance cannot be completely eradicated, (absent some 'telepathic' mode of communication); and also to imply that it is always there, behind the scenes, (like gravity). Just like gravity, "the law" can be useful if recognized (help explain planetary motion), or harmful if ignored (make you go "splat" when trying to fly like superman). Why this matters: from a perl point-of-youWhen you get a bunch of knowledgable people of good will and disposition together, you can notice some remarkable creativity. You can also notice that some discussions seem to drone on with people 'talking past one another'. When you realize it is not because of ill-will or ignorance of the participants, you realize this is one manifestation of "The law of inconsistent assumptions". When you recognize "the law" taking effect, you have acquired an opportunity over a cognitive stumbling block, and you are going to be a better programmer, teacher, and communicator because of it. Straightforward ExamplesHere are some examples of "the law" in perl programming terms. Throwaway Warning Messages
The previous example correctly sends a warning based on the assumption that the name main::fee should appear at least twice in a single script.
The previous example sends a spurious warning message because the former assumption breaks down ... incomplete assumptions about what constitutes a "single script". Language Comparision DebatesPerl guarantees that for virtually every time you access a variable, you will have to type at least one more character (and hit Shift!) than Python. ... and then went on to compare ..
... but left out the comparision ..
... the first comparison assumes a limited definition of 'accessing a variable' and ignores that the '$' symbol is actually a *command*, not just some throw-away extra keystroke that has no relevance whatsoever. Thus, a more complete comparison would be the $ command versus the "++" command. Vigorous AreeingA particularly good example of "the law" (in terms of human communication) can be found at this node where the participants (knowledgable people) nevertheless seem to be "disagreeing" but in actuality probably agree quite a bit, but the buzzwords GUI,CLI make communication difficult. The bottom lineThese examples are not even the tip of the iceburg, "The law of inconsistent assumptions" is everywhere. As you and I begin to notice it more and more, the benifits will follow. In reply to The Law of Inconsistent Assumptions by dimar
|
|