## Wednesday, June 25, 2014

1. All you can eat sushi places should not exist. Why do they?
The point of this post: Economic reasoning can be used to "prove" things that are patently false, like the non-existence of all-you-can-eat sushi. And sometimes "inefficient" choices are actually reasoned responses to something missing from the economist's model.
2. Issac Newton: Man, Myth, and Mathematics (pdf link)
In roughly a year, without benefit of instruction, he mastered the entire achievement of seventeenth century analysis, and began to break new ground.

3. Simpson's and Fermat's Last Theorem (via Ontario Math Links)

$3987^{12} + 4365^{12} = 4472^{12}$

## Wednesday, June 18, 2014

### Proof Without Words

I was trying to explain the meaning and greater logic of integration by parts (beyond the mechanics) to someone today, and found this beautiful "proof without words" (PDF file).

Wikipedia reproduces this beautiful visual argument in its article on integration by parts. I like it, because the argument is more than a proof, it provides deep insight which a "normal" mathematical proof may not provide.

Upon googling, I found this nice related thread on Math Overflow, and this pdf (senior project?) document.

## Monday, June 16, 2014

### Text Editors

When I began coding in earnest as an undergraduate student, we had a few servers which had to be accessed using non-graphical "dumb" terminals. The only thing they could handle was text; even web-browsing was powered a non-graphical program called "lynx".

Boy, what fun it was!

Those times seem as old as dinosaurs.

Of course, in the technology world obsolescence always lurks around the bend; even the original iPhone looks somewhat clunky today.

During those good old days, the text-editor of choice for most programmers was either pico/nano or vi/vim. Since there were no "mice", one had to perform gymnastics with ones fingers on the keyboard to invoke commands. There are many key-bindings that are still deeply etched into residual muscle memory.

While these editors are still capable and retain large fan-bases (vim was the most popular editor among Linux Journal readers in 2006), after I moved to graduate school, I jumped over to the Emacs camp.

Emacs was awesome and I loved it.

It opened up whole new ways of doing standard tasks. It was very extensible, configurable, and greatly facilitated code development. Syntax highlighting, auto-indentation, regex search and replace - you name it! You could open multiple files in the same window, and have access to the command-line from within the program.

There were many instances in which entire days were spent in the confines of a single Emacs window.

I've used Emacs for almost a decade now. I've resisted the urge to "upgrade" to a full-scale IDE like Eclipse, because a subset of the primary languages in which I program (C++, Fortran 90 and GNU Octave)  tend to be poorly supported. Yes, there is a lot of support for C++ because of its use in traditional software development (as opposed to Scientific Computing where Fortran's influence is very persistent), but would like to develop all my code using the same editor.

Earlier this year, I decided to give Geany a try. It supports C++ and Fortran quite competently, and inherits most of the advantages of Emacs. Unlike Emacs, many of the keyboard shortcuts are more mainstream (Ctrl-C, Ctrl-V), which given my increasing propensity to forget things is convenient.

It makes moving around code a lot easier, auto-completes variable names, and allows code to be "folded", which I never imagined would be so useful. It also has a lot of plugins, and despite it capabilities does not feel "heavy" like Eclipse.

Overall, I find that my coding productivity has clearly gone up.

## Thursday, June 12, 2014

### Logarithm of Sum of Exponentials: Compendium

This post is just to collect a few recent entries on this topic under one umbrella.

1. This post set up the general problem

Numerically compute the following sum, for arbitrary $x_i$ ,$F = \log \left(e^{x_1} + e^{x_2} + ... + e^{x_N} \right).$ It also briefly discussed the major problem with doing this by brute force (overflow/underflow).

2.  We then made the problem specific, whose answer could be analytically computed. $F = \log \left(e^{-1000} + e^{-1001} + ... + e^{-1100} \right) = -999.54.$
3. We briefly looked at numerically evaluating  an even simpler model problem $f(y) = \log(1 + e^y).$ While much simpler, this problem reflects all of the complexity in the original problem.

4. Equipped with the solution, we went back and solved our specific problem.

## Tuesday, June 10, 2014

1. Should laptops be banned from classes? I struggle with similar issues.
Over time, a wealth of studies on students’ use of computers in the classroom has accumulated to support this intuition. Among the most famous is a landmark Cornell University study from 2003 called “The Laptop and the Lecture,” wherein half of a class was allowed unfettered access to their computers during a lecture while the other half was asked to keep their laptops closed.
The experiment showed that, regardless of the kind or duration of the computer use, the disconnected students performed better on a post-lecture quiz. The message of the study aligns pretty well with the evidence that multitasking degrades task performance across the board.
I like the suggestion that the author makes:
I had one small suggestion, which I will implement the next time I teach (and for that class, I will generally continue to have the laptops closed): I will require my students to read some of the studies I’ve alluded to in this post, to help them understand why I’m doing what I’m doing and to get them to think critically about the use of technology in their lives and their education.
2. Why have female hurricanes more deadly? Or perhaps, why you should never accept easy explanations without adequate skepticism, even if they appear in PNAS.
For a start, they analysed hurricane data from 1950, but hurricanes all had female names at first. They only started getting male names on alternate years in 1979. This matters because hurricanes have also, on average, been getting less deadly over time.
The authors have rebuttal (not very convincing to me), but there are other holes. On the whole, the theory has a "compelling" narrative, but hangs on less compelling or ambiguous data.

## Monday, June 9, 2014

### Wisdom from Stoics

A wise thought from Mr. Money Moustache as he discusses making one's own wine:
I also resist, as is the nature of the ancient Stoics, becoming a connoisseur of material goods. Becoming the kind of person who can only enjoy the very finest and most expensive of anything, be it wine, automobile or speaker cable, is doubly wasteful.
First, you are foolishly using your educational time while you become an expert and second, you’ll have to spend the rest of your life incurring expenses as the price of having achieved such expertise.
Couldn't agree more!

## Friday, June 6, 2014

### Intelligence Squared Debate on Nature of Death

I'm a regular listener of the Intelligence Squared podcast, and its American counterpart, Intelligence Squared US. The podcast is heavily edited, so sometimes it is worthwhile to look up the unabridged video version of the debate on their website.

Recently, they debated the proposition: "Death is Not Final". On the against team (arguing that death is final) were Sean Carroll, and Steven Novella. You can find the full video on YouTube here.

I was against the proposition to begin with, and ended on the same side, with a stronger level of conviction. Here is Carroll's take on the debate, and here is Steve Novella's.

Overall, the debate was somewhat one-sided (that is my bias speaking, perhaps), and the against side articulated their case much more clearly.

There were two salient light-hearted moments.

When Dr. Alexander confronted Dr. Carroll with the potential link between consciousness and quantum mechanics, and the attraction of some of the fathers of quantum mechanics with mysticism, Dr. Carroll quoted Scott Aronson:
“Quantum mechanics is confusing and consciousness is confusing, so maybe they’re the same.”
The other moment was when Dr. Alexander suggested that Carl Sagan thought that the evidence for reincarnation was overwhelming, and even asked him to look up page 302 of Sagan's book "Demon Haunted World".

Within seconds, the Twitter world exploded.

The skeptical community, when stripped of its predominantly atheistic clothes, treats Carl Sagan as God.

Here's Steve Novella's response on his blog:
Alexander specifically referenced Demon Haunted World page 302. The relevant section has already been posted by many others, including in the comments here, but here it is:
“Perhaps one percent of the time, someone who has an idea that smells, feels, and looks indistinguishable from the usual run of pseudoscience will turn out to be right. Maybe some undiscovered reptile left over from the Cretaceous period will indeed be found in Loch Ness or the Congo Republic; or we will find artifacts of an advanced, non-human species elsewhere in the Solar System. At the time of writing there are three claims in the ESP field which, in my opinion, deserve serious study:
(1) that by thought alone humans can (barely) affect random number generators in computers;
(2) that young children sometimes report the details of a previous life, which upon checking turn out to be accurate and which they could not have known about in any other way than reincarnation;
(3) that people under mild sensory deprivation can receive thoughts or images “projected” at them.
I pick these claims not because I think they’re likely to be valid (I don’t), but as examples of contentions that might be true. The last three have at least some, although still dubious, experimental support. Of course, I could be wrong.”
To put this in context, Sagan is arguing that we have to be open to even unlikely possibilities, and sometimes it is not unreasonable to gamble on low-probability ideas. I tend to agree, within the limits of practicality and resources. But if someone wants to spend their time researching very unlikely ideas, more power to them. Just expect to be held to a very high standard of scientific rigor.
In the full quote Sagan clearly states that he does not think these propositions are likely to be valid, and the evidence so far for them is “dubious.” But – further research might be interesting. That’s pretty thin gruel on which Alexander is hanging his hat.

## Sunday, June 1, 2014

### Puzzle: Certainty amid Uncertainty

In a recent Michael Mauboussin talk that I linked to here, he raises an interesting puzzle, which may be paraphrased as:

"Person A (male), who is married, is looking at person B (female). In turn, person B is looking at person C (male), who is unmarried.  Is a married person looking at an unmarried person?"

There is uncertainty in the set up. We don't know if person B is married or not. If we knew, then the question would be trivial.

However, the question being asked of us, does not require complete information. In fact, we can answer the question, with certainty, without knowing the marital status of person B.

The answer is yes, there is a married person looking at an unmarried person.

We recognize that person B is either married or unmarried.
• if she is married, then she is looking at person C, who is unmarried.
• if she is unmarried, then person A, who is married, is looking at her.
In either case, there is someone who is married looking at someone who is not!