Monday, December 24, 2012

Taleb's Fragile Ego and Crusty Bed

I read Nicholas Nassim Taleb's bestseller "The Black Swan" nearly two years ago. You can see what I thought of that book here (some related thoughts here). Let's be charitable, and say I do not have a favorable impression of the book or the guy.

Call it confirmation bias, but I found Tom Barlett's "non-profile" of NNT in the wake of his new book "Antifragile" far more amusing.
Actually, Antifragile feels like a compendium of people and things Taleb doesn't like. He is, for instance, annoyed by editors who "overedit," when what they should really do is hunt for typos; unctuous, fawning travel assistants; "bourgeois bohemian bonus earners"; meetings of any kind; appointments of any kind; doctors; Paul Krugman; Thomas Friedman; nerds; bureaucrats; air conditioning; television; soccer moms; smooth surfaces; Harvard Business School; business schools in general; bankers at the Federal Reserve; bankers in general; economists; sissies; fakes; "bureaucrato-journalistic" talk; Robert Rubin; Google News; marketing; neckties; "the inexorable disloyalty of Mother Nature"; regular shoes.
While reading it, I also found an equally funny but older review of his previous book of mundane aphorisms called the Bed of Crusty.

Check them out.


Thursday, December 20, 2012

TeX: The Enumerate Package

The enumerate package provides a simple intuitive interface to control the appearance of enumeration counters.

You can adorn the usual enumerate environment with one of  A a I i or 1 to produce capital alphabet, small alphabet, capital roman, small roman, or numeric counters. You can also throw in some extra decorations such as "(a)", "a)", "N 1." etc.

From the documentation:
These letters may be surrounded by any strings involving any other TeX expressions, however the tokens A a I i 1 must be inside a { } group if they are not to be taken as special.
 Here is an example from the documentation:

\begin{enumerate}[EX i.] 
\item one one one one one one one
      one one one one\label{LA} 
\item two
    \begin{enumerate}[{example} a)]
    \item one of two one of two 
          one of two\label{LB}
    \item two of two
    \end{enumerate}
\end{enumerate}
 
\begin{enumerate}[{A}-1]
\item one\label{LC}
\item two
\end{enumerate}




Sunday, December 16, 2012

Alcohol, Proof, and Flammability

As this article explains, the concept of alcohol proof is simple: "Double the number listed as the alcohol by volume on the bottle. A spirit with 40 percent alcohol by volume, therefore, is 80 proof."

Thus, if you know the alcohol content on a volume basis, the "proof number" is really redundant.

The historical origins are interesting:
In the 18th century, proof was much more straightforward. Liquor was "proofed" at the distillery by adding gunpowder and lighting it on fire. If it didn't light, the alcohol content was too weak. If it burned yellow, too strong. If it burned blue, the proof was just right (that was around 57 percent, or 114 proof).
The flash point (the temperature at which a volatile material can form combustible vapors) of a 60% alcohol-water mixture is 22 C - which perhaps explains its historical antecedents. It also explains why some high proof spirits have flame retardants.


Friday, December 7, 2012

Links

1. Intel Xeon Phi: Will it upend the GPGPU market? A very bullish (read: overly optimistic, perhaps?) take "What will Intel Xeon Phi do to the GPGPU market?". Any way you dice it, this is exciting news for HPC developers and users.

2. GeoGebra: According to wikipedia, GeoGebra is "an interactive geometry, algebra, and calculus application, intended for teachers and students. Most parts of GeoGebra are free software." I gave it a spin recently, and thought it was a great tool for school kids to deal with the abstractness of math (until they begin to fall in love with it).

3. As someone who is acutely sensitive to "wait times" at grocery store lines and traffic lights, I read the article, "The Ups and Downs of Making Elevators Go", in the WSJ with interest.

Wednesday, December 5, 2012

World's got Talent: Devlin on MOOCs

I read a provocative piece called "The Darwinization of Higher Education" by Keith Devlin, in which he makes a persuasive case for the talent sniffing abilities of MOOCs (massively open online courses).

He contends that the putative goal of such courses (mass education) has less to do with their real benefits:
Forget all those MOOC images of streaming videos of canned lectures, coupled with multiple-choice quizzes. Those are just part of the technology platform. In of themselves, they are not revolutionizing higher education. We have, after all, had distance education in one form or another for over half a century, and online education since the Internet began in earnest over twenty-five years ago. But that familiar landscape corresponds only to the last two letters in MOOC ("online course"). The source of the tsunami lies in those first two letters, which stand for "massively open."
Rather than focus on 90% of the students who drop out, identifying the few dozen who survive and flourish gives one an easy way to scour for talent. Quoting (emphasis mine)
At the level of the individual student, MOOCs are, quite frankly, not that great, and not at all as good as a traditional university education. This is reflected (in part) in those huge dropout rates and the low level of performance of the majority that stick it out. But in every MOOC, a relatively small percentage of students manage to make the course work to their advantage, and do well. And when that initial letter M refers not to tens of thousands but to "millions," those successes become a lot of talented individuals.  
One crucial talent in particular that successful MOOC students possess is being highly self-motivated and persistent. Right now, innate talent, self-motivation, and persistence are not enough to guarantee an individual success, if she or he does not live in the right part of the word or have access to the right resources. But with MOOCs, anyone with access to a broadband connection gets an entry ticket. The playing field may still not be level, but it's suddenly a whole lot more level than before. Level enough, in fact.
I've already seen numerous anecdotal variants of this model of talent identification work in the realm of open-source software. In fact, the employer of one of my grad-school room-mates found him via his presence and contribution to the Linux ecosystem.

Monday, December 3, 2012

Howto: Convert EPS from Grace to PDF (for pdfLaTeX perhaps?)

I am a big fan of the 2D plotting program Grace, as attested by some of my previous posts.

It lets you create high-quality graphs, which can be exported to a variety of formats. One conspicuous export format missing from the list is PDF.

Even if you use pdfLaTeX for example, this is only a minor issue - worth a grumble, but probably not a rant, since you know that Linux has a whole slew of methods you can throw at the problem.

Like ps2pdf.

Let's work through an example. Say you have an EPS image (fig.eps) that looks like so:

You say ps2pdf fig.eps and get fig.pdf. You open it up and it looks like, yikes!!!
The bounding box has been obliterated! And no, the -dEPSCrop flag does you no good!

You open up fig.eps in a text editor, and the first two lines you see ("at end") tell you all that is going on.

%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: (atend)

The specs of the actual bounding box are hidden at the way end of the EPS file.

%%BoundingBox: 29 51 716 529

There are two ways to fix this. If this is just a one off file, then you can replace the second line (with the "atend") with the actual line containing the definition of the bounding box. Save the figure (say as fig1.eps) and say:

ps2pdf -dEPSCrop fig1.eps

And all your troubles are gone.

Another method which does the same thing, but may be more useful if you have to do this to 100 files is as follows:

1. Use the ps2eps tool to "convert" the image to EPS (this automatically bring the BoundingBox to the top)

ps2eps fig.eps fig1.eps

Note: This may result in a huge fig1.eps, but if your intention is to get a PDF you can delete fig1.eps soon enough.

2. Use ps2pdf tool

ps2pdf -dEPSCrop fig1.eps

And you get a nice cropped PDF image.