The Dovetail Blog

iPad auto-rotating some images

We recently came across an issue on a customer website where a photo appeared correctly on most browsers, but was rotated ninety degrees when viewed on the iPad. The photo even showed up correctly on the Windows version of Safari.

This was puzzling us; why would one browser decide to rotate a photo when all others displayed the same photo correctly?

On further investigation, we discovered that this was because of the EXIF metadata stored in the photo. The camera, when taking the photo, saved its rotate setting for the photo in the EXIF metadata, and the iPad browser was just applying this rotate.

So the simple solution is to remove the EXIF metadata from the photo. This can be done using an application such as IfranView, or an image compression website such as PunyPNG. We used PunyPNG, and the reduced image now displays perfectly on the iPad.

Multiple Screen Sizes in Android

One of the big differences we found between iOS and Android development, is handling the multitude of screen sizes that come with Android devices.

The Android solution to this has changed in Android 3.2. Prior to this, different screen layouts could be specified for small (~<4 inch), normal (~4 inch), large(~6 inch) and xlarge (~10 inch) screens. In Android 3.2, you can specify layouts based on dp (density-independent pixel) units.

What we like most is that layouts can be specified for different available screen widths, meaning that layouts can be specified for different screen orientations. The YouTube app on the GalaxyTab does this very well; in the portrait orientation, the related videos section appears at the bottom, but when switched to the landscape orientation, this section appears on the right, making maximum use of the space available.

The android documentation contains detailed information on screen support, including how to handle screens of differing pixel densities.

Listening to users and finding the problem.

Listening to users considered harmful?. A really great post with lessons from another industry, but ones that can be applied to any industry.

This doesn't mean that you don't listen to users--because the truth is embedded in what they say ... but you have to look for the deeper meaning behind what they ask for [...]

I've droned on about this topic for many years to anyone who would listen. Since "becoming" a software developer in 2004 I have been given a lot of contradicting advice on how to treat customers/users regarding internal systems, software and general support enquries.

The general consensus is the that the client is always right, they are experts in their field and we should make software that they ask for and move on.

Experience tells me otherwise. Clients may request specific features be added to a piece of software, because they are trying to solve a specific problem. This problem, however, may have many solutions with differing results. Diving deeper will help tease a better solution out.

Lee Munroe has a nice post about diving deeper into the problem by asking "why". Ask your client "why" 5 times.

[...] make sure you understand the root of the problem and explore all possible solutions before time and effort is wasted.

The customer (read: user) doesn't always know what they want and the developers first instinct should be to understand the underlying problem, rather than getting started on the "solution".

I have always found spending time with the users as they use the system can be very useful for seeing how they use a system, which can be vastly different from how they should be using the system. By learning users habits and techniques for accomplishing tasks, we can really understand how to develop simple and intuitive tools to help them solve real problems.

Always ask why. It can't hurt.

The cause of and solution to all of life's problems

The Cause

There is a theory doing the rounds about the global financial meltdown and it goes like this: the western economic model requires growth but there has been no "real" economic growth for the last ten to twenty years.

And, ten or twenty years ago, government, staring impotently at an unstoppable but gradually emerging recession, looked in desperation to the financial sector and wondered if that could help stimulate the economy. The financial sector eagerly responded and started speculating with savings in the way it used to gamble only with investments.

As "real" growth further tapered off, western governments leaned heavier upon the financial sector which in turn asked for leeway so it might devise ever more complex money-creation schemes.

Competitive deregulation resulted and soon the economic system transformed from its historic reliance on traditional "real" productivity to its new dependence on very cheap credit created by banks. This mutation is sometimes referred to as "the financialisation of capitalism".

The arcane financial instruments that were created by the banks to generate all this growth became farcical: In the US, subprime mortgage loans were split up into bits and pieces that were strewn in with fragments of better assets. The contaminated bundles were then passed off by the banks as low-risk collateral. As the poor quality components were ignored, these securities obtained greater leverage than they should have, propounding the original exposure. [1] 

And that was just the start of it: sub-prime has been estimated as a $1.5 trillion bubble.  In 2008 an organisation known as the Asymmetric Threats Contingency Alliance estimated the total size of all the credit bubble devices to be $1 quadrillion.  

Money was magicked into existence with no regard to the underlying risk. Cheap credit flooded everywhere. Attitudes were engineered: consumption of pap for debt was positively enforced by media. And over and over this went. 

In 2007, gradually at first then all at once, US subprime mortgages defaulted and their backup securitised collateral was realised as the junk it was. When the securities were called for the edifice cracked apart. As Warren Buffet might say, the tide went out to reveal Lehmans, Iceland and Ireland swimming naked.

The system never recovered. Doubtful confidence wavered then withdrew.

The same tide has ebbed out and flowed in several times but it has taken several sudden outward heaves and has generally receded, revealing in its wake a banking or sovereign debt disaster in every European nation. [5]

What looked to us like growth was actually the financial system creating debt - and lots of it. The entities that own that debt are other banks  (i.e deposit holders) and pension funds (i.e anybody) and private holders (e.g. Roman Abramovich/Apple) and other countries (e.g. Japanese NTMA-equivalents) and so on. These entities have "wealth". All the money in the world, really. And they want that money instantiated. And they, as they have "wealth", have influence.

So these organisations will be paid and if European sovereigns are subjugated in order to achieve that, then so be it.  

We are now faced with a triple crisis: First, the credit bubble has burst. The west had gotten very used to easy credit. Some people leveraged assets bought with borrowed money for more borrowed money, inflating secondary property bubbles, creating employment and government revenue all round. Now with all the credit dried up, and the bubbles popped, we are left with a huge gap between government spending and tax revenues. So a reduction of structural deficits through austerity, while probably wrongheaded, appears to be the norm.

Second, the debt created by the bubble is still owed - and policy appears to dictate that the citizens have to pay back all the money the banks lost when they securitised all that new debt on flimsy collateral and swapped it around between themselves  [2].

And third, we're about to find out what life would have been like without the fake growth.

So why did we need to turn to the banks to preserve western living standards in the first place? All those years ago?

Capitalism's innate flaw, oil prices and globalisation have all been loudly accused and they may well be guilty.  But did they act alone? There have been murmurs about another culprit, said to be the real brains behind the operation: Technology.

It is now being commonly discussed that we have eliminated millions of jobs by implementing massively centralised production systems [3], factory automation, IT systems, and billion dollar companies with relatively few employees.

This is, of course, not a new angle: in the Great Depression of the 1930s, technology was also considered a contributor (even by Keynes himself).

Financialised capitalism may well provoke a major reaction as it wrings all the value it can out of us, but if or when that reset occurs is impossible to say.  In the meantime...

The Solution

There is no stopping progress. If you can't beat it join it. To ensure Ireland doesn't face another Hungry Thirties, we must seize the opportunities presented by the current technological transition.

We should have the manoeuvrability: as John Mauldin recently wrote on his visit here, "First off, even though we think of Ireland as a country, it is in reality a nice-sized city. Ireland is a little under 4.5 million in population (with another 1.8 million in Northern Ireland)". Ireland is an "open economy", we are told.

But we have vastly inappropriate skills: from the established cadre of generalists in the Department of Finance who helped steer the country onto the rocks, to the last misdirected decade of unemployed (but talented) new architects and non-specialist (but well-educated) arts graduates.

The EU education report published on April 19 this year shows:

..that 49% of 30-34 year olds in Ireland have a third level qualification - well exceeding the 'Europe 2020' target of 40% set two years ago. However, Ireland was the worst performer for increasing numbers of maths, science and technology graduates, with a boost of only 1% between 2000 and 2008. The numbers of women science graduates actually fell in that period.


And according to last year's OECD report,

On reading levels among 15-year-olds, Ireland slipped from fifth place in 2000 to 17th place, while in maths Ireland fell from 16th to 26th.


No wonder companies like Google, Intel and Ericsson must cast their nets wide to find suitable candidates to fill Irish vacancies. Our schools don't provide the people. For the coming reality, third-level should be looked upon not as "education" in the Victorian sense but as "training". And Science, Engineering and Technology ("SET") are skills we need for the future.

The Education Minister is right in his attention to second-level maths, but he should broaden his scope to all sciences and he should bring a new IT subject into both primary and secondary curricula. The UK - our closest trading partner and greatest competitor -  has realised this and just last week the BBC announced that "Coding is the new Latin" while The Telegraph wrote "Children to be taught to create software".  

The Irish government should adopt similar policies with urgency. The Broadcasting Act should be updated to ensure that Science and Technology is considered a funding topic that falls under the public service mandate so that these subjects, through exposure, become demystified and even ingrained as part of the fibre of Irish life.  

And it is not just programming: Ireland has aimed high to become a centre of R&D in the nanotech, biotech, medical and security fields.  Biology, chemistry, physics and computer sciences are converging in incredibly interesting ways[4].

Ireland has the range, the machinery, we have the thirst. And we have the opportunity.

In the meantime, if you have kids they can get a headstart. There are several technology courses in Ireland specifically aimed at children. Here are some courses for you to check out (the first two come recommended, I don't know anyone who's been on the third):


[1] And that's not to mention Credit Default Swaps, the extent of which we have yet to experience. See footnote 2

[2] Not just Ireland. By one estimate 10% to 20% of Western banks will be wiped out in the next year. 

[3]  Food production is a sector that appears to be beginning to reverse from its current state of massively-centralised production. This is another opportunity for Ireland.  For a start we should reopen that sugar factory!

[4] MIT on convergence 2011 - PDF WARNING 

[5] Details omitted. See Kevin O'Rourke's presentation which describes how badly the Euro was made.


I might have your password

Here's some interesting research. Mark Burnett is a security researcher who harvests passwords from the Internet using a variety of methods. He has the passwords of over 6 million users.

His analysis shows that Internet users still tend to choose their passwords from a very small list of options.

  • 14% of passwords people use come from the top 10 most common passwords.
  • 40% come from the top 100 passwords
  • 91% come from the top 1,000 passwords

This tag cloud shows the top 500 passwords, where the size represents frequency of use.


It's amazing that people are so lax with their online security!

The most important aspect of your passwords is their length.  You can learn more here and here.

Be safe out there!

Facebook privacy

I got into conversation last night with one of the founders of the Electronic Frontier Foundation who was in Dublin after attending Kilkenomics. This chance meeting prompted me to do a little surfing about the EFF and I found a browser fingerprint profiler that they have written which told me that my browser is unique amongst all the browsers it had tested.

Browser fingerprinting is a technique that web advertising and marketing companies use to identify individual people across many sites so that they can assemble a fuller profile of an individual from their browsing habits.

This type of privacy-compromise has been in the Irish news lately: Since last week, Billy Hawkes, the Irish Data Protection Commissioner, has been investigating Facebook for potential privacy breaches. The Irish Data Protection Commissioner is tasked with this Europe-wide investigation because Facebook's European HQ is in Dublin.

One of the complaints registered against Facebook is that it is using "third-party cookies" to follow people around on the web, reporting back to Facebook exactly who has visited what site. Indeed, it has previously been found that "Like" buttons on sites were sending user information back to Facebook even when you were logged out. At the time the behaviour was reported, Facebook called it an accident. Yesterday it was discovered that this tracking cookie has been re-enabled by Facebook.

So today a couple of us had a look around to see how to disrupt these tracking cookies and we found a browser add-on called "Ghostery" which also claims to block other tracking mechanisms, such as invisible web-bugs.

It's interesting to look at who's looking at you. Here's Ghostery running on

RTE Ghostery

In RTE's case the sites that were blocked do not collect any data on you as an individual. They do collect what Ghostery calls "pseudonymous" information - i.e. your IP address, which in some circumstances may be enough to identify you specifically. But the agencies that monitor the RTE site are unlikely to try to figure out who you are from your IP address, so these tracking devices are far less disagreeable than Facebook - which knows exactly who you are.

Ghostery also blocks Facebook, so it will stop Mark Zuckerberg from spying on you (see him sweat about privacy here) as will a more lightweight plug-in called

By the way, Billy Hawkes the Data Commissioner doesn't seem to have a Facebook account :-/

Dublin city data on the web

Dublin local authorities, in collaboration with NUI Maynooth, have made public sector data available on the internet. The aim is that the public can use this data to create innovative products and services.

We encourage projects similar to this, which open up data stored previously in information silos.

For more information, see

Some things I like this week

Here are some things I like this week. Broad category here: Designs, Art, Libraries. I know I'm just linking here, but a lot of interesting things came past my inbox/reader this week.

Cuban Council Portfolio. Found this site today. Very unique design and typography. The blog has a nice collection of photos and design related things. Their portfolio is also very impressive and presented in an unusual yet very usable fashion. They designed the Facebook logo!! Very Cool.

Dublin Contemporary 2011. I highly recommend visiting one of the exhibitions for this. It ends this weekend, so get out quick and snap up some alternative inspiration.

The Role Of Design In The Kingdom Of Content. It's true now more than ever - Content is King. This article goes a great job explaining why great content needs to be supported by great design. Let your designs support your content, rather than dilute it.

Regardless of what your content actually says, the design around it controls what the users see first and how their eyes move across the sections of the page.

Notificon. A gmail-like favicon notfication library, and all done with JavaScript too. Very Nice.

And finally, because it seems the world cannot have enough lightwieght single use JavaScript libraries: money.js

Designed to work seamlessly with data from the Open Source Exchange Rates API project - but can be set up to use any data source and base currency in just a few lines. And it works as a NodeJS/CJS and RequireJS/AMD module, too. Yay!