Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

— Martin Golding

In a political climate in which all sides do not share a basic trust in science, scientific evidence no longer is viewed as a politically neutral factor in judging whether a public policy is good or bad.

MSNBC - Study tracks how conservatives lost their faith in science

Introducing the BOOK. Or re-introducing it, I suppose, for those of us who will have grown up with the originals. (By leerestademoda).

A Testing Joke

A program manager, a software engineer, and a software tester were on their way to a meeting. They were driving down a steep mountain road when suddenly the brakes on their car failed. The car careened almost out of control down the road, bouncing off the crash barriers, until it miraculously ground to a halt scraping along the mountainside. The car's occupants, shaken but unhurt, now had a problem: they were stuck halfway down a mountain in a car with no brakes. What were they to do?

"I know," said the program manager, "Let's have a meeting, propose a Vision, formulate a Mission Statement, define some Goals, and by a process of Continuous Improvement find a solution to the Critical Problems, and we can be on our way."

"No, no," said the software engineer, "That will take far too long, and besides, that method has never worked before. I've got my Swiss Army knife with me, and in no time at all I can strip down the car's braking system, isolate the fault, fix it, and we can be on our way."

"Well," said the software tester, "Before we do anything, I think we should push the car back up the road and see if it happens again."

Levenshtein Distance

I spent the weekend working on implementing a few string comparison algorithms for mailcheck and decided to share one of the easiest ones to implement, the Levenshtein distance algorithm.

The Levenshtein distance is calculated as the fewest number of deletions, insertions, or substitutions required to transform one string into another (If you add the transposition operation, you get the Damerau–Levenshtein distance, and if you allow only substitution you get the Hammng distance.) Turns out implementation is a simple dynamic programming exercise because the Levenshtein distance can easily be calculated for various length substrings of each of the two strings being compared.

Take a look at the data structure containing the substring edit distance in action with strings of your choosing here.

The javascript implementation I came up with is as follows for your your perusing pleasure: