Eerily, Horribly Familiar

Though only 24 years and without an ‘elite education’, it was with a distressing sense of familiarity I read the first paragraph of The Disadvantages of an Elite Education:

It didn’t dawn on me that there might be a few holes in my education until I was about 35. I’d just bought a house, the pipes needed fixing, and the plumber was standing in my kitchen. There he was, a short, beefy guy with a goatee and a Red Sox cap and a thick Boston accent, and I suddenly learned that I didn’t have the slightest idea what to say to someone like him. So alien was his experience to me, so unguessable his values, so mysterious his very language, that I couldn’t succeed in engaging him in a few minutes of small talk before he got down to work. Fourteen years of higher education and a handful of Ivy League dees, and there I was, stiff and stupid, struck dumb by my own dumbness. “Ivy retardation,” a friend of mine calls this. I could carry on conversations with people from other countries [...] but I couldn’t talk to the man who was standing in my own house.

The article makes sobering reading, and is so well written I must recommend you read it all.

Problems with God (, RubyInline and Rails)

I started to use the god process monitoring tool to lighten the load of managing some tiny Ruby on Rails services I’ve written at work. Prior to this rebooting a server or, god forbid, an application error would result in a downtime until I manually checked each service, invariably being several hours post error. God has proved a solution to this problem, aside from a small problem I had involving RubyInline.

The setup: a small service which associates files with a string for retrieval. You pass the service a string and a file, and it will save them; pass back the string and get your file back. A remote key-value service, really.

The problem first exposed itself as a loading error:

LoadError in SomeResourcesController#index

Expected /home/redacted/deploy/20080629152441/app/models/redacted.rb to define Redacted

This was strange, as the rb file contained the class required. I restarted the mongrels and tried again. I was now greeted by a different hairy specimen:

SystemExit (exit):
    /usr/lib/ruby/gems/1.8/gems/RubyInline-3.6.7/lib/inline.rb:73:in `exit'
    /usr/lib/ruby/gems/1.8/gems/RubyInline-3.6.7/lib/inline.rb:73:in `rootdir'
    /usr/lib/ruby/gems/1.8/gems/RubyInline-3.6.7/lib/inline.rb:87:in `directory'
    /usr/lib/ruby/gems/1.8/gems/RubyInline-3.6.7/lib/inline.rb:257:in `so_name'
    /usr/lib/ruby/gems/1.8/gems/RubyInline-3.6.7/lib/inline.rb:297:in `load_cache'
    /usr/lib/ruby/gems/1.8/gems/RubyInline-3.6.7/lib/inline.rb:708:in `inline'
    /usr/lib/ruby/gems/1.8/gems/image_science-1.1.3/lib/image_science.rb:84
    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
    [... loads o'lines ...]

The culprit is obviously RubyInline, but beyond this the error is bereft of useful information.

I used attachment_fu (good tutorial) to manage the uploaded file, which in turn uses ImageScience, which, finally, uses RubyInline. RubyInline allows C code to be included in Ruby code, which is then compiled into a temporary .so file and can be used from Ruby. ImageScience uses RubyInline to generate interface code to the C image libraries it uses.

Further, RubyInline uses a temporary folder to store its generated .so files; it requires this folder be read/write/execute for the user it is running under, and not-writable by anyone else. This restriction is security-driven, to prevent malicious code being switched in. I digress.

The salient fact is this temporary folder is configured by setting ENV[‘INLINEDIR’] in your Rails configuration. If this setting isn’t found, the location falls back to ENV[‘HOME’]/.ruby_inline.

When running my service from the command line, it was inheriting the environment variables from the shell, specifically the HOME variable. With the service under god’s command the HOME environment variable is not set for whatever reason, meaning RubyInline freaks out when it can’t find its temporary folder.

After all this fuss, the solution is simple: modify your config/environments/production.rb to add the environment variable RubyInline is expecting. Like this:

ENV['INLINEDIR'] = '/home/redacted/.ruby_inline'

More help and info here and here.

Some Critique of The Long Tail

I came across an interesting article in the Harvard Business Review. It refutes some aspects of the Long Tail theory, providing some good data to support the author’s view. I found it interesting in view of the unquestioning acceptance I’ve witnessed about the Long Tail theory.

Should You Invest in the Long Tail?

It was a compelling idea: In the digitized world, there’s more money to be made in niche offerings than in blockbusters. The data tell a different story.

Chris Anderson, the author of ‘The Long Tail’, responds in a blog entry:

Let me start by saying that the paper looks rock solid and I’m sure her analysis is accurate. But there is a subtle difference in the way we define the Long Tail, especially in the definitions of “head” and “tail”, that leads to very different results.

A note from an opinion piece in the WSJ which talks about the articles:

A book from 2006, “The Long Tail,” was one of those that appear periodically and demand that we rethink everything we presume to know about how society works. In this case, the Web and its nearly unlimited choices were said to be remaking the economy and culture. Now, a new Harvard Business Review article pushes back, and says any change occurring may be of an entirely different sort.

I would strongly suggest reading both the Harvard Business Review article and the ‘reply’ blog entry.

I read the WSJ article first, and found it gave a good framing for the Harvard Business Review article, so I’d suggest reading that first if you have time. It’s all very interesting information, and good to see some research data on the Long Tail idea.

How the Internet is Shaping our Thoughts

In a thought-provoking article in the Atlantic, Nicholas Carr argues the information consumption patterns pervading the Internet are altering our brains. He notes that long-form articles are rare online, and are becoming rarer in print. Citing several pieces of anecdotal evidence, he makes a case that we are becoming accustomed to short-form content and are, in fact, becoming unable to read long pieces without giving up and moving on. One person quoted says he finds it difficult to get beyond three or four paragraphs, another that they find it impossible to read books any more.

Late in the article Carr makes an especially insightful remark when he notes that

“The idea that our minds should operate as high-speed data-processing machines is not only built into the workings of the Internet, it is the network’s reigning business model as well. The faster we surf across the Web—the more links we click and pages we view—the more opportunities Google and other companies gain to collect information about us and to feed us advertisements. Most of the proprietors of the commercial Internet have a financial stake in collecting the crumbs of data we leave behind as we flit from link to link—the more crumbs, the better. The last thing these companies want is to encourage leisurely reading or slow, concentrated thought. It’s in their economic interest to drive us to distraction.”

We have an interesting case on two fronts. Firstly, there is Carr’s direct point that the Internet is paid for by encouraging page-views and swift jumps from page to page. Secondly, the Internet was created by computer scientists, a group notorious for their short attention spans and hyperactive, jumpy mental processes. Google is powered by such people, and, increasingly, surfers find their information through Google, Yahoo! and other similarly information-snippet driven portals. We search for specific pieces of information and spend less time browsing the Internet as we would a newspaper or magazine.

That the Internet is created and maintained by those with a short attention span, and large parts of it funded by a page-view-driven business model, means the short information-bite is becoming a common entity; comment, especially in blog entries, is often reduced to short accompanying sentences one would hardly call an article. A notable exception to this is newspapers, who are beginning to see comment as one of their value-adding features.

From the minds of computer scientists spill ever more ways to consume more information in a shorter period of time. Automatic summaries squash an article into a few lines, leading one’s attention hither and thither as one scans them, encouraging a staccato pattern of thought. We ignore that others may have different desires for their learning than a purely information-consumption approach; digesting streams of data in bite sized portions as they parade past in a never ending torrent.

Longer prose forces one to lay points out in a logical manner, leading the reader through a complex argument or constructing evocative prose to excite the readers interest. This interest leads to the time to make connections between information, construct our own opinions on a piece before moving on and increases the likeliness we will remember what we have read.

Perhaps, in light of this, we should be concentrating not on getting a sheer volume of information across, but more on focusing our attention; rather than having a hundred feeds in our feed readers having but ten carefully chosen ones which bring other thought-provoking articles to prevent the decaying of the ability of deep thought to produce original ideas, to de-acclimatise our minds’ fixation upon short bursts of thought.

Pervading business models work against this, as does the tendency for computer scientists to see the world in terms of quantities of data pushed through machines. We talk about available bandwidth in our attentions, making the implicit assumption that increasing bandwidth is as desirable for attention as it is for pushing YouTube videos through the cables under the Atlantic. YouTube’s old ten minute limit on uploads was obstinately for bandwidth and copyright purposes, yet reinforces the snippet-based attention span.

What can we learn from this? That it is important to take qualitative measures into account rather than merely quantitative. To think more deeply about what we create and to break from the march towards an information glut. To slow down a little and take time to think. As computer scientists, to stop thinking of information purely in the mathematical sense and to take a more human view of the benefits and costs of the bite-size economy of thought we are encouraging.

Seattle Trip Photos

I finally completed uploading my favourites from the photos I took in Seattle. Expect more cats, art, flowers and an otter. There’s even a couple depicting yours truly hidden amongst them.

Click either of the photos for the full set.

Ferris and Needle

Plump Fish