Mathematicians

As a mathematician, I take care not to be caught doing philosophy. When I buy my copy of Philosophy Now, I ask the newsagent to wrap it up in a brown paper bag in the hope that it will be mistaken for a girly-mag.

Mike Alder, Newton’s Flaming Laser Sword

Gell-Mann Amnesia Effect

The Gell-Mann Amnesia Effect is, simply put,

I believe everything the media tells me except for anything for which I have direct personal knowledge, which they always get wrong.  source

Formulated by Michael Crichton, is named after Murray Gell-Mann, an astrophysicist.  (said Mr. Crichton, “I refer to it by this name because I once discussed it with Murray Gell-Mann, and by dropping a famous name I imply greater importance to myself, and to the effect, than it would otherwise have.”)

Mr. Crichton explained it further in a 2002 speech, “Why Speculate?

Briefly stated, the Gell-Mann Amnesia effect is as follows. You open the newspaper to an article on some subject you know well. In Murray’s case, physics. In mine, show business. You read the article and see the journalist has absolutely no understanding of either the facts or the issues. Often, the article is so wrong it actually presents the story backward – reversing cause and effect. I call these the “wet streets cause rain” stories. Paper’s full of them.

In any case, you read with exasperation or amusement the multiple errors in a story, and then turn the page to national or international affairs, and read as if the rest of the newspaper was somehow more accurate about Palestine than the baloney you just read. You turn the page, and forget what you know.

That is the Gell-Mann Amnesia effect. I’d point out it does not operate in other arenas of life. In ordinary life, if somebody consistently exaggerates or lies to you, you soon discount everything they say. In court, there is the legal doctrine of falsus in uno, falsus in omnibus, which means untruthful in one part, untruthful in all. But when it comes to the media, we believe against evidence that it is probably worth our time to read other parts of the paper. When, in fact, it almost certainly isn’t. The only possible explanation for our behavior is amnesia.

RIP, Mr. Crichton.

 

Beautiful Code

The mark of a master programmer is someone who writes code that a novice can debug.
— attribution unknown

I read this quote, or something very similar to it, a long time time ago when I was just starting out.

I take the idea behind that quote to mean that master programmers have the experience to find the simplest solutions, which are easier to understand, but they also make their code easier to read so errors stand out.

It came back to me while reading a novice’s request for help in debugging something.  The example was a mess, with lots of extra activity, but it was also dense and poorly formatted.  The very simple bug was hard to see because of the sheer amount of code and the inconsistent formatting.

I strive to find simple solutions to the code I write, but I also strive to make my code neatly formatted and well-spaced.  I generally limit my lines to ~78 characters; I vertically align related operators; I leave space around operators.  This goes hand-in-hand with simple code: short functions that only do one thing; effective naming of things; do the least possible.  Together these generally make code that is both robust and easy to maintain.

I think of formatting to be like engineering a bridge.  Dense code is like big thick columns, steel plates, and stone architecture — it gets the job done, but it looks so heavy.  The best bridges are light and airy, full of empty space, yet they are stronger and more resilient.

PS: if you know this quote, and know who said it first, please drop me a line so that I can attribute it properly!