About Time


“A computer would deserve to be called intelligent if it could deceive a human into believing that it was human.” -- ????? (answer below)

"In ancient times, hundreds of years before the dawn of history, an ancient race of people... the Druids. No one knows who they were or what they were doing..." -- Nigel Tuftnel

One of the really fortunate things I had the ability to do during my career is a lot of business in the UK. Over the years I've made more than a dozen trips there, and save for horrid, inedible breakfast food I've always had great trips over there.

The UK isn't a trivial get from Denver, and from the Bay Area the jet lag is even more lagging. So, having made the investment in getting there, I'd often delay my return into the following weekend to see some of the legacy of humanity with my own eyes. (Note: the clip that follows is, at best, a very different part of that legacy).

I've always loved Stonehenge (even before the Spinal Tap reduced the monoliths to 18" scale) and a few years back I drove out to the Salisbury Plain to see the monument. It is a beautiful and remarkable thing to see -- the monoliths are an elegant monument to the wonder and mystery of human learning. My belief has always been that these were ancient computing devices -- part calendar, part star-tracker. Their utility is lost to us, but had to have been remarkable to people of that age.

Stonehenge, though, isn't the only remarkable architecture I visited on a trip to Britain:

Bletchley Park

You might not recognize the monument above unless you've been there. Bletchley Park is to architecture what blood pudding is to food, but I made a trip up there two years ago, and it is the Stonehenge of our era. Some of the most remarkable work in modern history was performed there during World War II -- work so important and so secret that it was kept secret until the 1970s.

Not anymore, though. This week, in a remarkable turn of events, British Prime Minister Gordon Brown apologized to Alan Turing -- the issuer of the leading quotation above, and the father of modern computer science.

"It is no exaggeration to say that, without his outstanding contribution, the history of World War Two could well have been very different. He truly was one of those individuals we can point to whose unique contribution helped to turn the tide of war. The debt of gratitude he is owed makes it all the more horrifying, therefore, that he was treated so inhumanely."

In his work at Bletchley, Turing basically created the first modern working computer, and wrote the first working computer program -- all as part of a codebreaking effort that turned the tide of the war:

Turing's most important contribution, I think, was of part of the design of the bombe, the cryptanalytic machine. He had the idea that you could use, in effect, a theorem in logic which sounds to the untrained ear rather absurd; namely that from a contradiction, you can deduce everything.

Alan Turing -- Computer Scientist, War Hero.

About time...

Alan Turing Memorial Statue



I found three terrific articles on simplicity this weekend. I like the idea of simplicity and elegance generally, but it's particularly worth paying attention to as we plan Bamboo.

EVERYBODY knows there's a lot of value in the union of POS, Reservation, OMO, Loyalty, and other restaurant data pools. NOBODY believes we can make a solution simple and elegant enough to capture the value of the data.

SO -- Steve Jobs time:

"When you start looking at a problem and it seems really simple, you don't really understand the complexity of the problem. Then you get into the problem, and you see that it's really complicated, and you come up with all these convoluted solutions. That's sort of the middle, and that's where most people stop ... But the really great person will keep on going and find the key, the underlying principle of the problem -- and come up with an elegant, really beautiful solution that works. That's what we wanted to do with Bamboo."

Steve Jobs [quoted in "Subject to Change":, p. 10]

The first article is The curse of plenty: what El Mariachi tells us about writing software. El Mariachi is a 1992 film that Robert Rodriguez spent all of $7,000 filming. He had nothing, but nothing was a blessing, not a curse. Rodriguez had to be creative to get a film shot for $7K. A similar tale is told in Stephen Spielberg's 1975 archtypal summer epic Jaws. What had Spielberg done before Jaws? "Duel" - a nice made-for-TV movie with Dennis Weaver, but otherwise... NOTHING. He had almost no money - if he'd had more $$$, we have seen more fake-shark in a much worse movie.

The second article in this theme comes from Wired: The Good Enough Revolution: When Cheap and Simple Is Just Fine. The basic idea here is that we're in the midst of a revolution of just-good-enough technologies:

  • mp3,
  • skype,
  • the military "predator" aircraft,
  • and medical mini-clinics

are just 4 examples of technologies that should have been too simplistic to be widely adopted, but were adopted anyway. I might make the case that Open Table is another example -- a primitive reservation system tied to a lot of other crap - where people put up with the primitiveness and the crap to get to the essence: online reservations.

The final variation on this theme is pure software from Stefan Tilkov's blog: The Web in the Enterprise.

The basic argument here is that most enterprise software sucks (Coming from Oracle, I'd refute this if I could ... I can't). Web software is, by contrast, oversimplified and primitive, but IS elemental and (in it's best cases) DOES NOT SUCK. Tilkov notes:

Your users probably don’t care much about the things you think they do. They basically want to find information, enter some data, hit a button, enter some more data, and be done with it. They don’t care about being able to use the right mouse button, don’t care for dragging and dropping things, and entirely happy with a pretty basic design.

The elegance here is the characteristic of leading web apps to restrict themselves to just what a user wants to do. That leads us back to Antoine de Saint-Exupery, who stated:

Perfection is achieved, not when there is nothing left to add, but when there is nothing left to remove.


Early Warning Signs for Critical Transitions

I haven't written to the blog in a while -- time to get active again.

I found a GREAT article tonight in Nature Magazine, entitled Early Warning Signs for Critical Transitions. I just bought it and haven't fully read it yet, but it figures to be widely referenced.

It has one of the most fascinating topics I've seen in some time -- we're probably all familiar with Malcolm Gladwell's Tipping Points -- but Gladwell gives NO INFORMATION (zero, zip, nada) about how to tell mathematically when a dynamic system is reaching that Magic Moment.

This article offers at least clues in that direction -- I'll have to read it to see how many. More on this to follow -- in the meantime you can see a bit more at Kedrosky and on Yahoo News


Weekend Reading

Weekend Reading

Barbara and I went down to the Tattered Cover on Sunday for some reading time. It was a beautiful day, and I like the TC for a couple of reasons:

  1. Big bookstores ("Tattered Cover", "Powell's" in Portland, the "Harvard Coop" in Cambridge) have a charm all their own
  2. Chain bookstores (modern Barnes and Nobel, the almost-extinct Borders) all seem to carry the same books at all locations. What's the chance of finding something new and different?

Anyway, the TC didn't disappoint, and I came away with three books, each with a neat angle on modern computing

The Annotated Turing

First up is The Annotated Turing, but Charles Petzold. This is one of the most remarkable books I've ever read, in that it takes one of the crowning intellectual efforts of the 20th Century, Alan Turing's "On Computable Numbers, with an Application to the Entscheidungsproblem", and highlights it with mathematical historical and cultural annotations.

You have to admire any book that tries, in its first two chapters, to explain number theory to its readers. Talk about a "thankless task" but Petzold does a nice job of it.

By the time you get to page 33's "and at some point the Heisenberg Uncertainty Principle kicks in, and then we really can't be sure of anything any more", you're hooked. Awesome and fun tell-all of the founding document of computer science.

Viral Spiral

Next up is Viral Spiral, by David Bollier. Tim Berners-Lee originally created what would become the Internet as a sharing platform for academic researches. Some sharing -- by 2003 the Internet was being used by 600 million people worldwide, and Viral Spiral describes the general creative commons and open source worlds -- focused around what Bollier calls the "Great Value Shift" in how valuable things are created for commerce and culture.

In commercial software development this cultural shift is still taking place; the ability to scale at almost zero marginal cost is probably the core driver behind what's been called "Web 2.0." Hard to do better than R. Buckminster Fuller, who said:

You never change things by fighting the existing reality. To change something, build a new model that makes the existing model obsolete.

Developing Facebook Platform Applications with Rails

Facebook matters, and even more than Google and Amazon, Facebook memes dominate 21st century software development thinking right now:

  • 400,000 registered developers?
  • 24,000 applications?
  • 140 new applications per day?

Numbers like that talk, and Michael Mangino's book DFPAwR goes under the hood of this technology phenomenon and describes the building of applications on Facebook's platform.

Facebook is something remarkable; successful, global Level-3 computing platforms generally only come up every couple of decades (IBM 360, Microsoft Windows and the Internet are probably the only other 3 in the last 50 years), so for Facebook to have made the progress they've made since 2007 is mindbending.

My interest here is pragmatic -- how could it be possible to build such a widespread platform in so little time?, and my reading is also with the hope of figuring out how much Level 2 / Level 3 platform-ness we can build into Magellan.

Platform birth is rare, but it's compelling when it happens. I'm open to ideas, and as we come up with things I'll keep you posted...


Adventures in Code: the Google Analytics API

Google Analytics

Google is huge and well-known, and they swallowed the old Urchin code and company to provide web analytics. You can't beat the introductory cost (free, as in beer), and they offer nice graphs and a pretty analytical interface. What's not to like? Well, it's possible that Google doesn't offer every form of analytics you need -- then you need an API, to do your own analytics-synthesis. You need a Google Analytics API...


What API? It's easy to be glib and say No Google Analytics API? Not Problem!, but that's really not a good enough answer. The problem here is that analytics is kind of a sensitive area for Google -- they like to determine just-how-much you know about your website (not more). I'd love a rich interface with REST access, but that's not Google.

Google doesn't even hesitate -- their own web site proclaims their nothingness, API-wise

How We Get There -- First Try: Rugalytics

The best thing I've found so far to break the barrier is Rugalytics, which appears to give a nice Ruby interface to Google Analytics. Ruby is a bit funky as a language, but it is elegant and is terrific for scripting -- I'll have more on the Ruby language in a later post.

I installed it on my Mac, and proceeded to put it through its paces. Here's what I found out...

OK -- code / session time

First lets get get libraries and get started.

JKR-MBP:rugalytics johnrepko$ irb

>> require 'rubygems'; require 'rugalytics'
=> true

Now we log in -- through Rugalytics to Google

>> Rugalytics.login 'jkrepko', '????????'

=> #<Google::Base:0x18503bc @sid="DQAAAHAAAAAd0EaDrxbSRKo6EjFbdUSltb2I1gjSlvDCfQvHVVVIlBJmRui-
MD-pCYOADKRl18aRbxzJAIUnfXpKSaUIUh-gqWdz", @email="jkrepko", @password="?????????">

Let's link to the site info for my techblog:

>> profile = Rugalytics.find_profile('')

=> #<Rugalytics::Profile:0x17dbaa8 @profile_id=15171077, @account_id=7527070, @name="">

... and make a quick grab of pageview information:

>> profile.pageviews :from=>'2009-02-17', :to=>'2009-02-18'

=> 43

43 pageviews? Not so many. Let's look by date:

>> report = profile.pageviews_report :from=>'2009-02-17', :to=>'2009-02-18'

=> #<Rugalytics::Report:0x17921dc @base_url="", @pageviews_graph=#<Rugalytics::Graph:0x178dc04 
@points_by_day=[[Tue, 17 Feb 2009, 15], [Wed, 18 Feb 2009, 
28]], @name="Pageviews", @to=Wed, 18 Feb 2009, @from=Tue, 
17 Feb 2009, @points=[15, 28]>, name"Pageviews for all 
visitors", end_dateWed, 18 Feb 2009, start_dateTue, 17 Feb 2009

>> report.pageviews_by_day

=> [[Tue, 17 Feb 2009, 15], [Wed, 18 Feb 2009, 28]]

Not a bad start -- let's see what canned reports are available:

>> profile.report_names

=> ["ad_versions_report", "adwords_report", "all_sources_report", "average_pageviews_report",
"bounce_rate_report", "browsers_report", "campaigns_report", "colors_report", 
"content_by_title_report", "content_drilldown_report", "content_report", "dashboard_report", 
"depth_of_visit_report", "direct_sources_report", "entrances_report", "exits_report", "flash_report", 
"geo_map_report", "hostnames_report", "java_report", "keyword_position_report", "keywords_report", 
"languages_report", "length_of_visit_report", "loyalty_report", "networks_report", "os_browsers_report",
 "pageviews_report", "platforms_report", "recency_report", "referring_sources_report", "resolutions_report",
 "search_engines_report", "speeds_report", "time_on_site_report", "top_content_detail_keywords_report", 
"top_content_detail_path_report", "top_content_detail_sources_report", "top_content_report",
 "traffic_sources_report", "unique_visitors_report", "visitor_types_report", "visitors_overview_report", 

Terrific -- let's see what browsers have been used on the blog site

>> report = profile.browsers_report :from => '2009-02-17', :to=>'2009-02-20'
>> for r in report.items
>> print r.visits, ' ', r.browser, '\n'
>> end

17 Safari
7 Internet Explorer
4 Mozilla
3 Firefox

Great - not a bad set -- now let's dig into a report:

>> report = profile.top_content_detail_keywords_report(:url=>'')

=> #<Rugalytics::Report:0x18756e4 @base_url="", @pageviews_graph=#
<Rugalytics::Graph:0x1863ae8 @points_by_day=[[Mon, 19 Jan 2009, 0], [Tue, 20 Jan 2009, 0], [Wed, 21 Jan 2009, 0], 
[Thu, 22 Jan 2009, 0], [Fri, 23 Jan 2009, 0], [Sat, 24 Jan 2009, 0], [Sun, 25 Jan 2009, 0], [Mon, 26 Jan 2009, 0], 
[Tue, 27 Jan 2009, 0], [Wed, 28 Jan 2009, 0], [Thu, 29 Jan 2009, 0], [Fri, 30 Jan 2009, 0], [Sat, 31 Jan 2009, 0], 
[Sun, 01 Feb 2009, 0], [Mon, 02 Feb 2009, 0], [Tue, 03 Feb 2009, 0], [Wed, 04 Feb 2009, 0], [Thu, 05 Feb 2009, 0], 
[Fri, 06 Feb 2009, 0], [Sat, 07 Feb 2009, 0], [Sun, 08 Feb 2009, 0], [Mon, 09 Feb 2009, 0], [Tue, 10 Feb 2009, 0], 
[Wed, 11 Feb 2009, 0], [Thu, 12 Feb 2009, 0], [Fri, 13 Feb 2009, 0], [Sat, 14 Feb 2009, 0], [Sun, 15 Feb 2009, 0], 
[Mon, 16 Feb 2009, 0], [Tue, 17 Feb 2009, 0], [Wed, 18 Feb 2009, 0], [Thu, 19 Feb 2009, 0]], @name="Pageviews", 
@to=Thu, 19 Feb 2009, @from=Mon, 19 Jan 2009, @points=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]>, name"Entrance Keywords:", end_dateThu, 19 Feb 2009, items[], 
start_dateMon, 19 Jan 2009

Let's see what the top items this week are:

>> top_items_over_week = report.items.sort_by{|i| i.unique_pageviews.to_i}.reverse

=> [#<Rugalytics::Item:0x16343f8 @path="/", @dollar_index="0.0", @bounce_rate="0.3125", 
@unique_pageviews="16", @pageviews="38", @percentage_exit="0.42105263157894735", 
@avg_time_on_page="186.95454545454547", @url="", @page="/">, #<Rugalytics::Item:0x1632940 
@path="/past/2008/12/16/welcome_to_simplelog_this_is/", @dollar_index="0.0", @bounce_rate="0.0", 
@unique_pageviews="4", @pageviews="4", @percentage_exit="0.0", @avg_time_on_page="8.5", 
/welcome_to_simplelog_this_is/", @page="/past/2008/12/16/welcome_to_simplelog_this_is/">, 
#<Rugalytics::Item:0x1630f00 @path="/past/tags/AWS", @dollar_index="0.0", @bounce_rate="0.0", 
@unique_pageviews="1", @pageviews="1", @percentage_exit="0.0", @avg_time_on_page="617.0", 
@url="", @page="/past/tags/AWS">]

Enough for now -- let me run with a bit more data, and I'll dig deeper into the reports and check on performance and data transfer / transformation options.

dynamic language scripting Google analytics Ruby API Rugalytics