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
end

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 http://archive.canonical.com/ubuntu $(lsb_release -s -c) partner"


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


deb http://archive.canonical.com/ubuntu 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 bit.ly 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. Portfolio.com 2007-2009


I was disappointed to learn a couple of weeks ago about the demise of Portfolio magazine and its companion website portfolio.com. I was part of the team that built the original version of portfolio.com, 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, portfolio.com 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 Portoflio.com 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 portfolio.com 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 portfolio.com, 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 portfolio.com 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.

portfolio.com 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 portfolio.com 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 portfolio.com's independence.

So what additonal compelling content did portfolio.com 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 portfolio.com 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 portfolio.com 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 portfolio.com? 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

Thursday, May 07, 2009

Will Code For Hope - My Obama-like poster

Courtesy of Obamicon.ME

Get your own bailout package from the Bank Of Obama


Feel like you're missing out on all of the cash currently being splashed around? Well now you can get your share from the Bank Of Obama!

Pairing as part of a job interview

A small company gets candidates to "pair" during their job interview process in order to test their ability to do things the XP way (more details here).

I don't know how effective such a short test would be in identifying Agile individuals, but it doesn't sound any more arbitrary than other things I've done in job interviews (brain teasers, code a small project, whiteboarding software architectures, etc) :)

An interesting quote from the interview that rings very true:

Sheridan: The traditional interviewing process is two people pleasantly lying to one another for an hour or two and then making a really big decision that they will live with for years to come. Harkening back to Thomas Edison's interview process: Try as hard as you can to simulate the work environment in the interview process.

Have your business cards printed on meat!

Do you want a way to differentiate your business cards from the rest? You could get them printed with transparent sections or sparkly bits.

But for a truly unique card have a look at MEAT CARDS, who have come up with a creative way of combining beef jerky and a 150 Watt CO2 laser :)

Mmmmm, yummy business cards.

Wednesday, April 15, 2009

The CSS coffee mug

If I have to explain why this mug is funny then you haven't used CSS enough :)

(Might make a good interview question...)

Tuesday, October 28, 2008

Microsoft joins AMQP enterprise messaging effort

Surprising news that Microsoft have joined the AMQP working group, whose aim is to standardize a wire-level messaging protocol, allowing financial firms large and small to break free of the near monopoly IBM (Websphere MQ) and Tibco (RV and EMS) have with enterprise messaging.

The news is surprising to me because Microsoft have their own proprietary messaging protocols that they have been pushing (which I have yet to see deployed on a large scale), and supporting AMQP will in many cases mean Microsoft on the client side and something else on the server side.

I've personally never had major issues with MQ, RV or EMS (except for the occasional trade message RV loses:)), but I always wecome choice. So go Redmond!!!

Monday, October 13, 2008

$1 trillion in subprime == a $62 trillion financial crisis? wtf?

My wife and I have been puzzled about the actual size of the current financial crisis. The huge sums of money being set aside to bail out failed banks seemed to be so much larger than could be possible for a country of 300 million to rack up in mortgage debt.

Here are a few sums, if I can believe Wikipedia:
  • The U.S. mortgage market is estimated at $12 trillion
  • Approximately 9.2% of loans either delinquent or in foreclosure through August 2008
  • Subprime ARMs only represent 6.8% of the loans outstanding
So even if we double the current deliquent loses to 20% that would equate to 20% x $12 trillion = $2.4 trillion. While that is a very large number, the amount of money being throw at the problem world wide is much larger. Something is not right and smells of a Chewbacca Defence to me.

Our suspicions may be confirmed by this article talking about how the Wall St quants and traders built a pyramid of debt on top of relatively few assets (ABS, CDO), and then used the speed and power of computers to disguise the true value of the assets:

Somehow the genius quants — the best and brightest geeks Wall Street firms could buy — fed $1 trillion in subprime mortgage debt into their supercomputers, added some derivatives, massaged the arrangements with computer algorithms and — poof! — created $62 trillion in imaginary wealth. It’s not much of a stretch to imagine that all of that imaginary wealth is locked up somewhere inside the computers, and that we humans, led by the silverback males of the financial world, Ben Bernanke and Henry Paulson, are frantically beseeching the monolith for answers.

Tuesday, September 30, 2008

Eight reasons CIOs think developers are clueless

I usually blog about things from a developer's perspective, so to give some balance here are some thoughts about how, according to some CIO's, developers need to gain the bigger-picture view of their organisations:

1. Developers Don't Think Practically

Developers often look for an elegant or slick solution to a problem, but they don't always look for the practical one.

2. Developers Still Don't See the End-User Perspective

"A development team can create an application that does everything from balance your checkbook to burning your toast, but if the user interface sucks, no one will use it-period. No amount of training or re-training will make users sign on to an application with a difficult UI. That simple concept seems to be a struggle for developers to understand."

3. Developers Can't Get Away from the "Wow" Factor

Developers love the "cool" or "wow" factor of applications. CIOs seek stability and standardization.

4. Developers Don't Think About ROI, TCO, and Other Business Priorities

"The developers have a limited number of tasks to do and can pretty much concentrate on one item. Many have spent their career focusing on the development of simple working units, not running a business."

5. Developers Don't Get the Underlying IT Value Proposition

The executives that CIOs have as customers are trying to get an answer, perform some function and get their jobs done. "IT to them is like electricity: they need it, but they don't appreciate it."

6. Developers Don't Have (or Want) Corporate Skillsets

"I think a survey would show that 80 percent of the CIOs that came up through IT to be a CIO came through the operations side."

7. Developers Aren't Into "Group Think"

"Each technical person is different and when asked individually you will find that they do not all share the group opinion, thus solving for the group's suggestions won't bring about all of the desired results."

8. Developers Don't Understand Staffing

One CIO says that developers think that profitable companies shouldn't have layoffs, which the CIO feels is clueless. "That's like saying as long as the flowers are growing, you shouldn't prune," the CIO says. "Efficient companies need prune back in areas they grow out of to preserve the strength of the overall company."

I don't agree with many of the above generalisations (are you surprised by that? :) ).

Some developers take a deep interest in a business, others may consider the work as just another job. That is not particular to developers.

It is in the interest of management to
facilitate getting developers and end-users working closely togther as it usually results in better outcomes. However, in many highly hierarchical and/or highly political work environments it is common practice for managers to keep developers and end-users apart so that all issues and decisions must flow through the manager; the manager often has an incentive (bonus, promotion, etc) to be seen as the driving force of an initiative.

I wasn't surprised by the suggestion that 80% of CIOs come up through the operations side of the businesses.

It's often useful to consider the other point of view :)

Tsunami Invisibility Cloak

An invisibility cloak for water waves

A really exciting invention is the above water "invisibility cloak". Based on research with bending waves of light around an object to make the object invisible, the same principles have been applied to bending waves of water around an object.

This technology could be applied on a medium scale to protect things like oil rigs from Tsunamis, and I wonder if a large variation of this could protect small islands?

The US government is behind the Nigerian email scam!

I had a suspicion the people behind the scam are not the poor Nigerians...

From: Henry Paulson
Date: 9/23/2008
Subject: Urgent transaction - need your help

Bright Greetings Dear American:

I need to ask you to support an urgent and important business relationship with a transfer of funds of great magnitude.

I am Ministry of Treasury of the Republic of America. My country has had a crisis that has caused the need for a large transfer of funds of 700 billion dollars US. If you would assist me in this transfer, it would be most profitable to you.

I am working with renowned Mr. Phil Gram, lobbyist for UBS, who will be my replacement as Ministry of Treasury in January. As a Senator, you may know him as the leader of the American banking deregulation movement in the 1990s. This transaction is 100% safe.

This is a matter of great urgency. We need a blank check. We need the funds as quickly as possible. We cannot directly transfer these funds in the names of our close friends because we are constantly under surveillance. My family lawyer advised me that I should look for reliable and trustworthy person who will act as a next of kin so the funds can be transferred.

Please reply with all of your bank account, IRA and college fund account numbers and those of your children and grandchildren towallstreetbailout@treasury.gov so that we transfer your commission for this transaction. After I receive you’re information, I will respond with detailed information about safeguards that will be used to protect the funds.

Wonderful salutations to you cherish friend from Republic of America.

Yours Faithfully,
Minister of Treasury Paulson

Tuesday, September 16, 2008

Using your mobile phone to automate proximity computer actions

A really interesting idea with lots of potential: using the Bluetooth device in your mobile phone your computer detects when you leave your desk or arrive back at your desk and takes pre-programmed actions, such as locking/unlocking the screen, performing backups, etc.

Integrating it with a clock and calender could lead to other possible applications such as auto-emailing people when you are headed to a meeting, emailing/IMing the wife when you are heading home, etc.

Anti-Theft Lunch Bag Deters Sandwich Thieves

Here is a simple but clever idea to keep people in the office from pinching your food (although they may instead throw it out!).

It reminds me of people I've met in the past who write disgusting things all over their favourite basketball or make their bikes ugly to deter people from stealing them.

I wonder if there are benefits to uglifying code? Hhhmmm...

Saturday, September 13, 2008

US election hots up: Palin in a bikini, Battlestar Galactica stars enter the race

The US presidential election continues to serve up all sorts of surprises.

Last year it looked like Bush and Cheney would ignore the constitution and make run for a third term.

Recently McCain made a bold choice in selecting a young-ish, female, gun-toting outsider as his Vice Presidential running mate.


And now inspired by McCain's Vietnam war experiences and hard line on terrorism a couple of the characters from Battlestar Galactica have thrown their hat into the ring.