## Wednesday, December 17, 2014

### Peter Norvig's Spell Checker in Two Lines of Base R

Who does not need a spell checker?

Via Publishable Stuff:

sorted_words <- names(sort(table(strsplit(tolower(paste(readLines("http://www.norvig.com/big.txt"), collapse = " ")), "[^a-z]+")), decreasing = TRUE))
correct <- function(word) { c(sorted_words[ adist(word, sorted_words) <= min(adist(word, sorted_words), 2)], word)[1] }

### Correlations Matrix

A list of ways to create a correlation matrix:

Sketching Scatterplots to Demonstrate Different Correlations | OUseful.Info, the blog...:

Five ways to visualize your pairwise comparisons

https://stat.ethz.ch/R-manual/R-devel/library/graphics/html/pairs.html

http://www.cookbook-r.com/Graphs/Correlation_matrix/

And, of course, for everything, there is an R package:

## Thursday, November 20, 2014

### FAITH, Hope and Tragedy: Engineers Cope With SpaceShipTwo Loss

NBC News put a human face to engineers behind the machines. One of them is a reliability engineer

Will Robertson, 38, is engineering manager for reliability, maintainability and safety at The Spaceship Company. He analyzes and addresses engineering risks for SpaceShipTwo as well as the WhiteKnightTwo mothership. Will Robertson discusses how the crash relates to assessing the risks associated with flight testing:
"Part of my job is definitely thinking about this all the time, which I do a whole lot of. But in the absence of bad events, you just think about them, right? When one hits, you realize, wow, there are so many things you have to consider. ... There's always going to be second-guessing. I think it's human nature to do that. We're going to learn from it. I'm going to learn from this, and I'm going to make the systems more reliable, more fault-tolerant."
This is most reliability engineers have to deal with, in the absence of extreme events, you just "think" about it. Only when it hits, it hurts. Only when it hurts, one start to reexamine all those being taken for granted. It is hard to be a reliability engineer.

## Wednesday, November 19, 2014

### Surprise! Excel spreadsheets are hard to get right.

Via Win-Vector Blog:

• Excel has a lot of non-controllable data transforms including booleans, and dates. Some of these transforms are non-faithful or not reversible.
• Very few tools that claim to interoperate with Excel actually get the corner cases right. Even for simple well-documented data types like Excel CSV export. And definitely not for the native .xlsx format.
Because working with data that has passed through Excel is hard to get right, data that has passed through Excel is often wrong.
The author also recommended using other formats to exchange data:  SQL dumps, JSON and strong TSV.”

Good idea. I don't see it happen anytime soon though. A reliable and improved way to export to CSV or similar are more realistic.

## Wednesday, November 12, 2014

### Mach 1 Is Still the Worst Place to Be - IEEE Spectrum

“It’s a pretty nasty place to be,” says Stanley. The shockwave at the front disrupts the flow of the wing, and can lead to extreme instability that could cause structural problems.

Between Mach 0.9 and 1.2, “the force on the airplane just skyrockets up with even small changes in velocity,” says Mitchell Walker, an aerospace engineer at Georgia Tech. “It’s a very dynamic situation: the plane has to accelerate through this location, but at the same time the force is going up in a nonlinear fashion.”

Further investigation is still needed to determine the cause the SpaceShipTwo crash, but it is clear that March 1, or more generally, space exploration, is risky.

## Tuesday, October 14, 2014

### The Great Lightbulb Conspiracy - IEEE Spectrum

Via IEEE Spectrum:

The Phoebus cartel engineered a shorter-lived lightbulb and gave birth to planned obsolescence
From the related story:

Now a professor of media studies at the University of Basel, in Switzerland, Krajewski [he’s shown above at the Berlin archives] says at first he was “quite astonished that the cartel so meticulously tried to control everything connected to such an ordinary object like the lightbulb.” But when he considered the huge profits involved, it all made sense.
Still, he says, by reducing the lightbulb’s life span, the cartel was essentially working against progress. “William Meinhardt, the head of Osram, always argued that the cartel was for the benefit of the consumer,” Krajewski says. And that, he concluded, was the biggest fiction of all.