Earlier I posted about Python.  Since then I’ve worked a Python project that interacted with a SQL database using SQL Alchemy and got an opportunity to do quite a bit in the way of data transformation and data integration, leveraging Python’s remarkably flexible capabilities and rich libraries for use with analytics, machine learning and deep learning, and more.  It’s a great language.  I love Java but I can certainly see why Python has the momentum right now.  It’s an easy language to pick up.  Whereas a typical Java program requires quite a bit to reach the simple “Hello, World” test program, Python gets you there much more quickly.

print("Hello, world");

That’s it! Crazy easy. Compare this to Java:

public class demonstrateHelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World");

Now – to be fair – there’s a reason this Java example is more involved, its due to Java’s requirement that code be structured in the form of a class. Python doesn’t require that but offers the same option. If you’ve seen this sort of Python code:

if __name__ == "__main__":
  print('Hello, world')

… then you know what I’m talking about.

A side-by-side comparison of the two languages is more involved that I intend to do here, my only point is that Python is very easy to start with and get productive with quickly.

For example, interacting with local text files can be involved with other languages. With Python, its simple:

file = open('output.txt', 'w')
file.write('Hello World')

That’s it. Stupid simple.

My last project this year involved middleware servers, REST services, data tranformations of all sorts, multiple databases and data stores leveraging SQL and JSON, abstracted environment configurations to support dev ops in the larger environment, and more. Easy to manage in Python.

It’s a great language. Java is still number one, and the last I checked I think even C++ still dominates over Python on the list of world’s most in-use software languages.

But Python is the one to watch.

Larry Ellison, and “cloud computing” vs. “utility computing”

“Everyone doesn’t have their own well at their house … we tap into the water network, we tap into the electricity network … we get better service at a lower price by having our water come from a utility … we’ll experience the same economic advantages … as we get our data from an information utility.” – Larry Ellison, Oracle Open World, September 18, 2016, spoken during his keynote presentation: “The Cloud: A New Era of Utility Computing”

Don’t be misled.   Larry Ellison is not late to the Cloud Party.  Consider this quote from 1998:

… Larry Ellison, the founder and CEO of the Oracle Corporation, has frequently mused at what life would be like if common household appliances had the same complexity of maintenance as a PC … “Sorry, I can’t go out tonight, I’m staying home so I can upgrade my TV to version 7.0.” … Ellison’s argument … the PC must become as easy to use as any common household appliance.

In a recent presentation … Ellison was asked … if the network will be stable enough—won’t it crash from time to time? … Ellison’s response … what is the last thing that crashed on you: your telephone, or Windows … ? The audience roared with laughter, making the answer obvious …

The number of networks we already depend on is impressive: plumbing, electricity, highways, television, radio—all networks professionally run by others … Why should a computer user experience anything different?

— Excerpted from Chapter 27, “Oracle Web Application Server”, in the book “Oracle8 Server Unleashed” published by Macmillan Computer Publishing.

That’s a brilliant quote, isn’t it?  You better say ‘yes’ because I wrote that – all the way back in 1998.

And I wrote it because of Larry Ellison’s leadership.  Ellison, way ahead of his time, had already seen the potential of the World Wide Web and its underlying protocol, HTTP, all of which had been invented barely five years prior.  Ellison had already seen the vision and was leading the charge towards “utility computing”.

So I was thrilled to see Ellison keeping that phrase alive yesterday at OOW.  To me, “utility” computing is significantly more descriptive than the phrase “cloud” computing.  Clouds paint images of vague, nebulous, fragmented things somewhere far away, without specificity or form or shape.  But utility computing is much more descriptive of what is really intended: a ubiquitous workhorse that is simultaneously both specific and dependable, scientifically complex at it core, cutting edge in its usefulness, yet easy for everyone to access and use for common purposes.

Cloud computing is not just a “computer somewhere else”, as I’ve heard it described – that’s a funny one-liner and I’ve been guilty of laughing at it myself.  But cloud computing – utility computing – is significantly much more than that.  It is a series of complex hardware, network, and software components, brought together in an easy-to-configure, easy-to-access, ever-present simple interface through which an end-user can quickly set up (provision) whatever resources he or she needs quickly to meet whatever business requirement is currently demanding attention, in a more cost-effective manner than ever before, by compartmentalizing the various desired components and optimizing their deployment.

It is true that Amazon Web Services has much of the market momentum at the moment, and has captured a lot of the headlines in the tech industry.

But the truth is that Oracle is still, to this moment, the unquestioned leader in all forms of serious professional business software applications, and he has been actively and purposely working for years to leverage the power of the network in support of business objectives.  The multi-year re architecture of most of the world’s leading enterprise resource planning (ERP) applications is just one example of what they’ve done toward this goal.

This week’s Oracle Open World should be very eventful.

For Larry Ellison’s keynote last night, see this link, but recognize this link might not survive much longer than OOW 2016:

For an OOW YouTube channel highlight that might survive the link above, see here:


Rio Mid-Games: Gold Medals Per Capita So Far

Four years ago I blogged about the fact that medal counts are often reported on a per-country basis without regard for the population of any country. I’ve always thought that approach to be silly. The per-capita medal count is much more interesting to me.

So this morning I used Bing to get the latest count by country of gold medals at the ongoing Rio Olympics.  I included only those nations that have won two or more gold medals.

I then visited Wikipedia to get recent population counts for those nations.

I used all this data to determine the per-capita win per nation and ranked them.  The results are below.

Ranking Country Per Capita Ratio
(Descending Order)
Gold Medal Count Population Date Population Reported
1 Jamaica 7.34418E-07 2 2,723,246 31-Dec-14
2 New Zealand 6.37423E-07 3 4,706,450 16-Aug-16
3 Hungary 6.10811E-07 6 9,823,000 1-Jan-16
4 Croatia 4.77251E-07 2 4,190,669 31-Dec-15
5 Netherlands 3.52389E-07 6 17,026,640 16-Aug-16
6 Australia 2.48343E-07 6 24,160,100 16-Aug-16
7 United Kingdom 2.45738E-07 16 65,110,000 30-Jun-15
8 Switzerland 2.39762E-07 2 8,341,600 31-Mar-16
9 Greece 1.84196E-07 2 10,858,018 1-Jan-15
10 Cuba 1.77952E-07 2 11,239,004 31-Dec-15
11 Belgium 1.76637E-07 2 11,322,674 1-Jun-16
12 Italy 1.31871E-07 8 60,665,551 1-Jan-16
13 South Korea 1.18107E-07 6 50,801,405 1-Jul-16
14 Kazakhstan 1.12656E-07 2 17,753,200 1-May-16
15 Germany 1.10064E-07 9 81,770,900 30-Sep-15
16 France 1.04891E-07 7 66,736,000 1-Jul-16
17 Spain 8.61356E-08 4 46,438,422 1-Jan-16
18 United States 8.01855E-08 26 324,248,000 16-Aug-16
19 North Korea 7.91108E-08 2 25,281,000 1-Jul-16
20 Russia 7.50345E-08 11 146,599,183 1-May-16
21 Uzbekistan 6.33406E-08 2 31,575,300 1-Jan-16
22 Canada 5.53166E-08 2 36,155,487 1-Apr-16
23 Japan 5.51225E-08 7 126,990,000 1-Jul-16
24 Poland 5.20329E-08 2 38,437,239 31-Dec-15
25 Kenya 4.52934E-08 2 44,156,577 1-Jul-15
26 Colombia 4.09887E-08 2 48,793,900 16-Aug-16
27 Thailand 3.04279E-08 2 65,729,098 31-Dec-15
28 Iran 2.51689E-08 2 79,463,100 16-Aug-16
29 China 1.08836E-08 15 1,378,220,000 16-Aug-16
30 Brazil 9.68457E-09 2 206,514,000 16-Aug-16

You could argue that some country populations and/or medal counts are too small to prove anything other than an interesting anomaly.  Or not.  But there’s no question that Hungary and the Netherlands are very impressive, each with six gold medals for an overall per-capita rate that’s dramatically higher than, for example, Great Britain, the United States, and especially China, who – in spite of their very high medal count, is actually very far behind the other nations on a per capita basis.

These are the results presented graphically, which I created using Microsoft Excel, captured with the built-in “snipping” tool in Microsoft Windows: :

The Pareto Line seems to curve most significantly above Hungary and the Netherlands, which have the most striking performance in terms of size of population and count of gold medals.  Also – note how far back China ranks.  They might have a lot of medals, but they also have the largest population in the world.

To me, this sort of analysis is much more interesting than the simple medal count that doesn’t account for population.


  • Gold Medal Count as of 8/16/2016:
  • Country Population Data:

MySQL Migration: from Drupal to WordPress

I just migrated this Skere9 blog from a Drupal implementation at SiteGround to a WordPress instance at Amazon Web Services.  I’ve been a customer of AWS for three years and finally decided to move this blog to the same platform where I’ve been doing other work.  It’s cost-effective and AWS provides significantly greater control over numerous aspects of the deployment.

Note:  I have one author – myself – and I did not migrate any comments with this move.  I will add those later.

The Drupal version is 7.4.1.  The WordPress version is 4.5.3.

To migrate the blog posts, I took the following steps.

  • I temporarily installed phpMyAdmin at the Drupal site to export the “node” and “field_data_body” tables from Drupal.  (Note: this could have also been done using MySQL directly.)
  • I installed phpMyAdmin at the WordPress site to import the Drupal tables.  (Note: this could have also been done using MySQL directly.) I edited the phpMyAdmin config file to restrict access to phpMyAdmin to my own IP address.
  • I executed the script below via phpMyAdmin at the WordPress site to pull data from the imported Drupal tables and insert that data into the WordPress database.
INSERT INTO wp_posts
(       id
      , post_author
      , post_date
      , post_date_gmt
      , post_content
      , post_title
      , post_status
      , comment_status
      , ping_status
      , post_name
      , post_modified
      , post_modified_gmt
      , post_parent
      , guid
      , menu_order
      , post_type
      , 1
      , FROM_UNIXTIME(a.created)
      , FROM_UNIXTIME(a.created)
      , b.body_value
      , a.title
      , 'publish'
      , 'open'
      , 'open'
      , CONCAT('dr-', a.nid+100)
      , FROM_UNIXTIME(a.changed)
      , FROM_UNIXTIME(a.changed)
      , 0
      , CONCAT('', a.nid+100)
      , 0
      , 'post'
FROM     node a LEFT JOIN (field_data_body b)
            ON (a.nid = b.entity_id)
WHERE    type = 'blog'
ORDER BY a.nid

A few important notes about the above code:

  • I had fewer than 100 existing posts in the WordPress instance- it was a brand new installation.  This is why I only added 100 to the ID, to create unique identifiers.
  • I transformed the data formats from UNIX to plain text, as required by the source and target tables.
  • I chose to enter each value into the WordPress “postname” field with a “dr-” prefix – for “Drupal”.  But of course that could have been anything, or nothing at all – no prefix is required here.
  • The “_gmt” fields in the target database are being treated by my WordPress implementation as the same as the local time.  Presumably GMT refers to Greenwich Mean Time, comparable to UTC.  I’m in the USA eastern time zone (New York City zone – I’m in Washington, DC), so presumably the offset should be 5 hours but the existing WordPress implementation I have isn’t treating the times differently.  Therefore I didn’t treat them differently either – I made the “created” timestamp the same for the local and GMT entry, and did the same for the “changed” timestamp.

It all worked like a charm.

From Sept 25, 2013: KTVU featured me speaking for OOW

On September 25, 2013, the American racing team led by Larry Ellison retook the America’s Cup in spectacular fashion, after several days and dramatic events.  Nobody could have predicted that the grand finish would end up happening in San Francisco Bay, within walking distance of Oracle Open World / JavaOne, and on the climactic “customer appreciation night” of that year’s conference.  It was an amazing once-in-a-lifetime event.

KTVU’s Jana Katsuyama featured me in a soundbite speaking on behalf of the very proud attendees of Oracle Open World, see below.

2013_09_25_Americas_Cup_OHearn_KTVU from Steve OHearn on Vimeo.

At first, Jana asked me a series of questions about whether attendees were upset that Larry’s attention was divided between the conference and the race, and that he’d missed a keynote earlier in the day to go celebrate the victory.

I said – no way! The conference is great, everything is well organized and continuing as planned, and who could possibly predict such a stunning situation – good for Larry!

And Jana, to her credit, let the spirit of my comments convey in the edited version that broadcast that evening on the leading Bay area news channel KTVU.

See above!