Sunday, September 25, 2011

Build your own (killer) Drone

Droning On Towards A Date With Destiny? is a thought-provoking post that "connects the dots" with a number of stories I've seen recently, pointing out that Drone technology is quickly becoming a commodity.

DIY Drones gives you step-by-step instructions for building your own drone.

Can't easily acquire a part? Then use one of those new 3D printers to print your own drone. (It is going to be a real issue in the near future for governments and law enforcement to prevent people from "printing" all sort of dangerous or illegal things.)

Friday, September 16, 2011

The Ultimate Base Class

An interesting proof-of-concept ruby library called Base (source) was released last week - at least I hope it is not a serious project!.

The author describes it like this:

People love Base classes! They have tons of methods waiting to be used. Just check out ActiveRecord::Base's method list:

>> ActiveRecord::Base.methods.length
=> 530

But why stop there? Why not have even more methods? In fact, let's put every method on one Base class!

Yep, I've got to agree that many developers I've worked with love making beefy base classes.

So how does Base work? First, you create a class that inherits from Base like so:

class Utility < Base

and through the magic of ruby's method_missing it will effectively attach every method of every Module in its runtime environment (which will be quite a few if running under Rails, for example) to your class.

And what happens if two or more modules have the same method name? You'll get the first one that was loaded!

I like it! Now we need one database table to rule them all!

Now he is no longer CEO of Apple, what does a typical day for Steve Jobs look like?

Courtesy of The Joy of Tech :

Thursday, August 18, 2011

Installing the Sun (Oracle) JDK on Ubuntu

Update: Due to changes by Oracle in licensing for the JDK all Java packages in the Ubuntu Partner archive to be removed on 2012-02-16. Bummer. It looks like you will have to manually download and install a TAR or RPM version of the JDK from the Oracle download site.

I've had to do this a lot lately, so it's worth writing a post to remind myself of the steps.

By default Ubuntu packages that depend on Java (JRE or JDK) usually depend on OpenJDK. OpenJDK seems 98% compatible with the Sun (now Oracle) JDK, but chances are you'll hit an edge case that works only on the Sun JDK.

So let's install the Sun JDK!

The following steps will work with Ubuntu 9.10 (Karmic Koala) or newer.

Install wget

I personally prefer wget over curl for the simple stuff.

sudo apt-get install -y wget

Install python-software-properties

The python-software-properties includes a handy command-line utility called add-apt-repository, which adds packages repositories to you apt sources.list file. Instead of using this utility you can hand edit /etc/apt/sources.list if you prefer.

sudo apt-get install -y python-software-properties

Add the 'Canonical partners' package repository to the package sources list

sudo add-apt-repository "deb $(lsb_release -s -c) partner"

or manually add the corresponding entry to your /etc/apt/sources.list file. e.g.

deb natty partner

Rebuild the package index

sudo apt-get update

Avoid the annoying prompt to accept the license

When you install the Sun JDK you will be prompted to read and accept a license. I personally like stuff to install without requiring manual interaction, so do the following to bypass the license prompt (of course we accept the license!):

echo sun-java6-jdk shared/accepted-sun-dlj-v1-1 select true | sudo /usr/bin/debconf-set-selections
echo sun-java6-jre shared/accepted-sun-dlj-v1-1 select true | sudo /usr/bin/debconf-set-selections

Install Sun JDK 6

sudo apt-get install -y sun-java6-jdk sun-java6-plugin

Update the Java system default to the Sun version

Ubuntu allows multiple JVMs to be installed at any one time. To switch the "default" to the Sun JVM do the following:

sudo update-java-alternatives -v -s java-6-sun

And that's it! Phew!

The future is OpenJDK

Oracle are currently saying the official JDK reference implementation from Java 7 onwards will be OpenJDK, so assuming OpenJDK gets fully functional then you won't have to go through all of the steps in this blog post!

Monday, May 25, 2009

Stop the short URL rot - use HugeURL!

URL shortening services such as tinyurl and have been gaining a new life recently because of Twitter's 140 character per "tweet" limit.

For those with a rye sense of humour you can fight back by turning all your links into really, really long ones with HugeURL.

R.I.P. 2007-2009

I was disappointed to learn a couple of weeks ago about the demise of Portfolio magazine and its companion website I was part of the team that built the original version of, so I would like to honour the gutsy efforts of those that tried to build a new magazine in such trying times with some memories, thoughts and questions.

Built From Scratch In Just 6 Weeks

Even though Portfolio magazine had been in the planning stages for a couple of years and CondeNast allegedly spent $150+ million on the launch, itself was built almost from scratch in just 6 weeks by a team of about 15 techies - and of course the rest of the staff that provided the content.

There were some concept screen shots (good ol Photoshop) and the base infrastructure was a standard CondeNast webapp infrastrcuture (Akamai web cache + Java application server + CMS + Spring + Hibernate + Oracle), but everything else had to be built from scratch.

Building the website was very tight, but we had a lot of very talented people working on it, and none of us doubted we would hit the deadline. To celebrate the launch of the website management gave everybody involved a branded bottle of wine, featuring a rocket taking off! (The wine itself was a pretty cheap German riesling, but the branding was a nice touch.)

Probably the most interesting technical challenge building the website was integrating data feeds from 10+ sources. Some feeds were semi-realtime - e.g. recent news updated every 5 minutes, market indicies updated every 15 minutes - while others were updated once a week. The feeds were in a variety of formats, everything from NewsML to CSV, pulled via FTP, web services, etc. To handle the workflow required to publish this data - pull the feed, transform the data, pushing the data through the CMS, invalidate the Akamai web cache - a batch processor similiar to (but pre-dates) Spring Batch was created. This was a pretty useful framework and I suspect it still lives on somewhere inside CondeNast.

Who were the target market for Portfolio?

I never got a clear and consistent answer to the questions: What is the editorial direction for Portfolio? Who were the target market?

If you google for stories about the closing of Portfolio you will get a whole bunch of opinions on who the target market for the magazine were. I suspect the editorial theme was something that kept evolving.

At the time of the magazine launch the best answers to this question I got were:
  • Target market: CEOs and wannabe CEOs.
  • Editorial direction: If you can interview the CEO of a Fortune 500 company or an interview with a 6 foot tall supermodel-like CEO of a startup go with the supermodel!
  • Editorial direction: Choose stories that other business magazines are likely to ignore and that have a "shelf life" of a few weeks. (Business Magazines tend to publish stories that will have an interest of a few days, maybe a week or two.)
So it was aimed at the those interested in the excesses of life on Wall St and the extreme wealth at the time? Was it trying to create a genre that other business magazines hadn't figured out? Maybe.

One journalists opinion:

They thought there was a hole in Conde Nast's portfolio (sorry) of magazines, which primarily targeted upscale women. They believed that a business magazine--when added to fashion titles GQ and Details and its smaller golf magazines--would significantly bulk up its audience of upscale men.

One of the bloggers, Jeff Bercovici, offers his insight:

"Conde Nast, as successful a company as it is, it's not in the business of publishing business news. It's in the business of aggregating high-end readers and selling them to luxury advertisers," Bercovici told me by phone this morning. He was, for the record, drinking a beer at his desk, upholding a sacred layoffs tradition begun at Portfolio in late October, during its first round of sweeping layoffs at the magazine and web site.

I'm still confused :)

Money, Money, Money

Was money being splashed around for the launch? Maybe on the print magazine. I didn't see too much excess at, although I'm sure the late start proved expensive with the number of consultants they had to hire. Many of the deals with 3rd content providers would have cost a lot. Then there was the manager lured from Yahoo! Finance that bragged about his new $5,000 suit :)

Why did the magazine fail?

Again many opinions. Some blame it on the collapse of the Wall St excesses Portfolio may have been trying to target. Others blame it on lack of forsight and direction from the chief editor. was slowly gaining more and more readers, but the print magazine was failing to meet its readership targets.

A website with a life of its own?

All of the CondeNast websites are really just extra marketing for the published magazines. Most of their content is dervied from the print magazines. None of this is surprising since CondeNast gets the great majority of its revenus from magazine subscriptions and print advertising.

At the launch of the staffers were very confident the website would be closely tied to the magazine (they had agreement from editorial that the content of the magazine would be available in full on the website), but have a life of its own, offering more and different content to keep websurfers coming back regularly.

How was this vision going to be realised? Like editorial direction I don't think the strategy was well defined. Various reports say the magazine editor did not support's independence.

So what additonal compelling content did strive to offer?

First it offered the same stuff other financial websites had so that you didn't need to go elsewhere - e.g. market news, market data, "blogs", reader comments and information on companies and executives.

Beyond the same stuff I didn't see much else that had to offer.

In more recent times they produced a lot of Flash-based info-graphics and "zany viral videos".

At launch they were looking at using a number of other technologies such as a product that did voice recognition to produce a transcript for videos - which made the videos more search-engine friendly.

And then there was the Hype Report. Disclaimer: this was something I implemented for the website launch and I was disappointed it didn't survive for too long. The idea behind the Hype Report was this: the "blogosphere" (i.e. many of the hosted blog sites across the internet) were crawled and indexed daily. From the raw data it could be calculated how frequentely a term was used (e.g. a company or executive name) and it could also be calculated how the frequency of these terms changed from day to day. So the hype report gave you a table of companies and executives with a frequency change of how often they were mentioned in the blogosphere twice a day. Someone from was supposed to provide some editorial around the "movers" in the hype report, but the reasons for the move were sometimes obvious (e.g. an annual report or takeover), sometimes accidental (e.g. Michael Jordan, the CEO of Westinghouse Electric, appeared to get a lot of hype because Michael Jordan the basketball player was going through a bitter divorce at the time :)) and often unknown. I was disappointed they didn't take the Hype Report to the next level, such as linking to the blogs that provided the raw data for the Hype Report.

So what type of content would have kept me coming back to Here are a few suggestions:
  • Instead of the occasional article it would be nice to have a searchable database of exclusive stuff. e.g. details of all of the exclusive country clubs, golf courses, etc including location, satellite views, how much you have to earn before they are likely to accept your application.
  • Randomised home page. Lots of good stuff is buried deep inside the website, so instead of relying on users to randomly find it why not bring some of it to the homepage?
  • Mashups! There is already a large database of stuff that might be easily exposed via an API. e.g. the "Executive Profiles" could be rendered in a more friendly chart like Forbes OrgChart Wiki.
  • Try random stuff. A common thing I see with "corporate" websites is a push-back from operations people when others want to experiment with site. Operations of course prefer to have a stable, controlled existance; it can be embarrassing when your website goes down. On the other hand too tight a control can stifle creativity. I have long championed experimentation of ideas, letting them live or die via split testing. If stability is a great concern then deploy the experimental stuff on seperate servers, making the functionality available as includeable widgets (and grecefully handling the failures of the widgets).
  • The Hype Report v2.0 :)
Survival of Print Publications

I wish I had a magic answer for how print publications can survive. It would be a shame to see them die.

Some people think newspapers need to offer most of their content instantaneously on line, paying journalists on a "micro-publishing" basis. Others talk about Google subsidising publications on an AdWord basis. Mr Murdoch is beginning to charge more and more for his content. Glossy magazines like the CondeNast magazines could in theory be replaced by tablet devices if they have decent resolution. Maybe e-paper technology will mature in the coming years.

It is more likely a new equilibrium will be reached. In decades past many small newspapers were gobbled up by larger newspapers. Now the reverse is happening, with many small news websites slowly gaining at the expense of the larger newspapers.

And Then There Was Gawker

One of the favourite topics of conversation amongst the Portfolio staff was how the publishing industry gossip site Gawker talked about the magazine. Gawker definately had it in for Portfolio from the start and reveled in the apparent turmoil amongst the editors and lower than hoped circulation numbers. Why did they give Portfolio such a hard time?

Monday, May 11, 2009

Should hand shaking be phased out?

The "power" shake

Hand Shaking Is So Medieval. Let’s End It is an interesting blog post that got me thinking about hand shaking and its place in society. According to Wikipedia it's been around at least since the 2nd Century and originated as a peace gesture, showing the other person you are not holding a weapon. In the age of Swine Flu and other highly contagous diseases should we continue to shake?

The blog posts some interesting alternatives to hand shaking, such as the "elbow bump" or the Vulcan salute.

The Vulcan Salute

However, there are also plenty of cultural grettings that more easily lend themselves to spreading disease.

Hawaiian lei greeting

Maori nose rub greeting

And of course there are more culturally exotic greetings...

Hawaiian three-fingers-folded wave