Why less emphasis on private data?

Hendrik van Rooyen mail at microcorp.co.za
Tue Jan 9 09:27:56 CET 2007

"Steven D'Aprano" <steve at REMOVE.THIS.cybersource.com.au> wrote:

> On Mon, 08 Jan 2007 13:11:14 +0200, Hendrik van Rooyen wrote:
> > When you hear a programmer use the word "probability" -
> > then its time to fire him, as in programming even the lowest
> > probability is a certainty when you are doing millions of
> > things a second.
> That is total and utter nonsense and displays the most appalling
> misunderstanding of probability, not to mention a shocking lack of common
> sense.


Strong words.

If you don't understand you need merely ask, so let me elucidate:

If there is some small chance of something occurring at run time that can
cause code to fail - a "low probability" in all the accepted senses of the
word - and a programmer declaims - "There is such a low probability of
that occurring and its so difficult to cater for that I won't bother"
- then am I supposed to congratulate him on his wisdom and outstanding
common sense?

Hardly. - If anything can go wrong, it will. - to paraphrase Murphy's law.

To illustrate:
If there is one place in any piece of code that is critical and not protected,
even if its in a relatively rarely called routine, then because of the high
speed of operations, and the fact that time is essentially infinite, it WILL
fail, sooner or later, no matter how miniscule the apparent probability
of it occurring on any one iteration is.

How is this a misunderstanding of probability?  - probability applies to any one
trial, so in a series of trials, when the number of trials is large enough - in
order of the inverse of the probability, then ones expectation must be that the
rare occurrence should occur...

There is a very low probability that any one gas molecule will collide with any
other one in a container - and  "Surprise!  Surprise! " there is nevertheless
something like the mean free path...

That kind of covers the math, albeit in a non algebraic way, so as not to
confuse what Newton used to call "Little Smatterers"...

Now how does all this show a shocking lack of common sense?

- Hendrik

More information about the Python-list mailing list