The Dark Knight Rises

A quick note on spoilers – I have linked to Batman stories which the plot borrows from.  If you want to remain completely spoiler free, don’t click the links.  You have been warned.

So it’s finally here: The Dark Knight Rises – the final part of Christopher Nolan’s Batman trilogy. I will admit I’ve been looking forward to this and I am a huge Batman fan, so my opinion may be biased.

The story itself is a mishmash of new elements as well as liberally borrowing from Knightfall (with the classic scene intact) and No Man’s Land.  It works well and the pace is such that you don’t really feel the 164 minutes it takes to tell.  There’s no lulls and everything has it’s place.  That’s all I say about the plot as to do otherwise would stray into spoiler territory.

The film tended to be all serious business, but there are moments of humour (although I’m sure one of them has been used in a previous film).  They didn’t feel shoe horned in or put in as after thought which is why I thought they worked so well.

There are a serval of large set pieces through the film to remind you firmly that this is an action film and not just some police corruption drama.   Nolan handles these with his usual deft hand and shows you just where all the money spent on the film went.

Christian Bale could have done without his 60 Major a day voice when he has the cowl on but otherwise puts in as good a performance as he always does.  Bane is restored to his proper menace by Tom Hardy (after the terrible version in Batman & Robin from 1997) but had a very odd accent which I still can’t place.  Even with it supposedly re-dubbed, I found him hard to understand at times as he was drowned out by the soundtrack.

Anne Hathaway steals the show from both of them, flipping from meek vulnerability to stoney faced confidence in an instant.  She carried off Catwoman (not Batgirl as an unobservant friend thought) with an air of world weary ease.  The impractical looking costume did have a reason for every part and wasn’t just to show off her bum (although it did that as well).

The geek in me was kept very happy and the more dispassionate adult was entertained so a huge thumbs up from me

Poster by Jock for Mondo

A version of the post also appeared on Broadsheet.ie

Clickable Skin on a Website

I was asked the other day how Broadsheet.ie does the horrible clickable ad skins so I may as well document it here as well. I can’t remember how I exactly figured it all out but I’m sure posts on stackoverflow.com helped as well as looking at the source of the likes of entertainment.ie to see what they did. As always, this works for me and your mileage may vary.

First we set up the css for the background image:

body {
       background-image: url(/images/some_image.jpg);
       background-attachment: fixed;
       background-repeat: no-repeat;
       background-position: center top;
       cursor: pointer;
}

#page {
       cursor: auto;
}

This pins background image to the center of the page so if the user resizes the window it doesn’t move. It does mean that a user may not see it if their browser window is narrower than the background image.

To make the pointer turn into a hand when the user is hovering over it, you need the ‘cursor: pointer;’ line. However this makes the cursor a pointer everywhere, so for the actual content of the page ‘cursor: auto;’ needs to be set so it will use the correct default when hovering over content that is not a hyperlink.

Next we need to capture clicks made on the background. This is done using some JQuery:

function recordOutboundLink(link, category, action) 
{
   _gat._getTrackerByName()._trackEvent(category, action);
   setTimeout('window.open("' + link + '")', 100);
}

jQuery(document).ready(function() {
       jQuery("body").click(function(e) {
               var target = jQuery(e.target);
               if (target.attr('id') == 'body_id')
               {
                       recordOutboundLink('http://www.karlmonaghan.com','outbound', 'karlmonaghan')
               }
       });
});

Last, but not least, we need to change the body tag:

<body id="body_id">

What the javascript in the document ready block does is capture click on the page. The id of the element clicked on is retrieved and if it was the id we’ve assigned to the body itself we call the recordOutboundLink function. This function takes 3 parameters – the URL the user should be brought to, the event category and event action. We use this function so we can record the click in Google Analytics for our own information. If you’re not interesting in the stats (but really, you should be) you can replace this line with a just a document.open call.

Personally I’m neither fond of this sort of advertising nor convienced that it’s particularly effective (although it will very effectively annoy your users) but if someone is willing to hand over a ball of money for it so be it.

Auto-Versioning and Auto-uploading to TestFlight/HockeyApp When Archiving in Xcode

I’ve been playing with TestFlight this week with some of my apps.  The main aim of my experimentation was to have the version numbers of my apps incremented and the IPA automatically uploaded when I archive a project.

There’s a lot of posts already on various parts of the process, but I’d thought I’d document the whole process I went through as there were a few tweaks to be made on the snippets of code I found.

I’ve projects both in local SVN repos and on GitHub so I need to be able to create version numbers from both. Another wrinkle is that I sometimes use HockeyApp as well, so I decided I may as well be prepared for those occasions and include it in the script.

The first step was to increment the version number. A post from Stackoverflow gave me the starting point and with a few minor tweaks I ended up with this:

This script needs to be run before Xcode does a build. To do this, it should be added as a ‘Pre-action’ to the build function. Edit you scheme, click the down arrow beside ‘Build’, select ‘Pre-actions’ and then on the + at the bottom left of the box on the right. You’ll be given two options and you’ll want to select ‘New Run Script Action’.  Select your target in the drop down beside ‘Provide build settings from’ and paste the script from above into the box below that.

Now when you archive your project the Bundle Version will be updated.

For git, we just adjust the REV line:

We could have used something like ‘git describe –dirty’ here instead, which would produce something like 1.2.1-1-ge03a85c-dirty as the version number. But when you submit the app to Apple if the version number isn’t all digits your app will fail validation so you’ll have to manually change it beforehand. Since this is something I’m prone to forget so I’d rather just have the digits.

After the version number has been updated, Xcode creates the archive and then we need to create the IPA upload it.  This is done by adding a script to the ‘Post-actions’ of the ‘Archive’ action.

Justin Miller’s post ‘Automating Development Uploads to TestFlight from Xcode‘ got me most of the way creating and uploading the IPA to TestFlight. There’s been a few forks of the original gist, and I ended up extending one by c0diq to include uploading to HockeyApp. I also added a couple of extra flags to make the script less chatty when you know you want to upload the IPA on archive and when you know the code signing identity to always use.

Something to note is that HockeyApp is less tolerant of duplicate bundle versions than TestFlight so if you’ve not made any commits since the previous version, the upload will fail. You’ll be able to see the error returned by HockeyApp in the error dialog and more details in the log.

That’s pretty much it. It seems to be working fine at the moment but I’m sure I’ll end up with a few more refinements as time goes on.

For the day that’s in it

I never got around to doing a post on this when I actually finished and what more appropriate day than today to share it?

This was done over a period of 6 weeks, spending an hour here and there on it.  I ended up with nearly 500 images which I imported into iMovie to create the video.

The setup was simple – my Nikon D40 on a tripod over the table and shots taken using a remote.  I had big plans (as you can tell from the start) for being adventurous with the pieces – having them dance around the place and all that, but I got a bit bored after a while and felt it was taking too long.

It wasn’t until I put it all together that I realised that the lighting in the room changes so much over the few weeks I did it.  If I were to do one again, I would try and block off more time to do it over a day or two as well as having a few more lamps around.

All said though, an enjoyable little project that kept me amused in the evenings.

GAA Scoreboard from DubMatchTracker

After a ridiculously long gestation, the latest app I’ve developed is available on the Apple App Store – GAA Scoreboard from DubMatchTracker.  As the name suggests, this app lets you track the score of a GAA match and tweet the current score.

Way back at the end of May 2011, a GAA obsessed friend of mine Ronan Gahan (one of the guys behind DubMatchTracker) approached me about developing an iPhone app so he could quickly tweet out the score of match. After a couple of to-ing and fro-ing emails, I told him it wouldn’t take long and I’d have time in a few weeks.

Roll on 6 months later and I finally had some time and threw together a prototype. Ronan and the DubMatchTracker lads field tested this over a couple of weekends. David Whelan in particular was a monster of a tester for us.

The first prototype

The first version started the user off in landscape mode and had tapable scoreboards. While I thought this was a great idea, no one realised the scoreboards were tapable. Using the app in portrait mode required two hands which proved awkward, especially in cold weather.

The final product

Armed with the feedback (and a request to use the Dublin colours), I rejigged it to work in portrait mode.   The tapable scoreboard was ditched and replaced with a simple LED font.  A few more weekend test runs shook out all the inevitable bugs and it was finally ready for the App Store.

One of the interesting parts of this app for me is that I’ve included the Heatma.ps library to track user interaction with the scoreboard screen.  The library was trival to add and gave back results pretty much instantly.

Heatmap of the scoreboard

At the moment, the preview button is getting a lot more love that the quick tweet but that’s because of working around issues during the field test.

I’d love to hear any feedback and comments people have about the app.

Not quite the Wild West

For the last week or so, the rather tiresome old versus new media has resurfaced.  It all kicked off with the proposed public broadcast charge and the with Alan Crosbie’s speech which devolved into luddite complaining about new media destroying civil society.  It continued with on-message articles in two of the Sundays.

First off, we have a column in today’s Irish Mail on Sunday where John Waters rants and raves about the lack of accountability on the internet.

Waters seems to be under a misapprehension that the internet is not covered by the current Defamation Act. Both he and the Independent seem to think that Minister Pat Rabitte’s recent speech on media diversity is looking to change the law to do this. What he actually is proposing is to bring parts of the Irish online media under the Press Council of Ireland which could actually afford a small amount of protection against vexatious litigation.

His annoyance with the internet seems to be around his Wikipedia page and a charge of hypocrisy (it also could be over a joke about his losing Eurovision entry).  He doesn’t go into detail what advice he exactly got but I’ll let David Cochrane of Politics.ie address his conclusion about dealing with being libeled on the internet:

What’s more likely is that he was told he’d have to sue Wikipedia in the U.S. and he’d just be wasting his money.  If the existing law didn’t cover the internet, then Broadsheet.ie wouldn’t have gotten double digit worth of legal threats in the last 18 months, MCD wouldn’t have tried to sue Boards.ie, and a €100K judgement wouldn’t have been made against a blogger.

He then goes on to talk about the shutdown of www.rate-your-solicitor.com. Fergal Crehan sums it up beautifully:

It is possibly the fact that it was an Irish owned site than meant the site owners could be brought before an Irish court but that’s far too obvious for Waters to see.

Then there is an opinion piece in the Sunday Independent by Eamon Delaney.  He covers much of the same ground as Water’s column – both mention Alan Crosbie and his speech, Pat Rabitte’s speech, Ruairi Quinn calling the internet “a playground for anonymous backstabbers” and those on Politics.ie as typical examples of internet commentators.

It concludes with the same assertion that the internet is not covered by the current laws governing libel.  Where this misapprehension stems from is not clear – either a lack of understanding of the law or a willful misinterpretation would be my guesses.

It’s all very tiresome to see the same ill-informed calls for regulation by people who obviously have little understanding of the internet, its mechanics and how it is currently regulated.

Where the law does need to be changed is to differentiate between content a site might create and that generated by users.  At the moment, a site is responsible for any comments left by a user rather than the user themselves.  While a site should respond to legitimate complaints about this user content, it should not be ultimately held responsible.

Still John Waters has to be given credit for the phrase ‘underpants commentariat’.

Edit:

Oh god my eyes:

Anything the Americans can do, we can do better – the Irish SOPA

Last week there was an online protest over a piece of American legislation called the Stop Online Piracy Act (SOPA).  It’s a particularly draconian piece of legislation and it’s been thankfully shelved.  Broadsheet.ie also took part in the blackout.  A lot of people thought this was just bandwagoning, but there was actually an Irish slant.

Due to pressure from the music industry, Sean Sherlock, Minister of State for Research and Innovation, will be signing a statutory instrument which will bring in an Irish equivalent of SOPA.  TJ McIntyre has an excellent FAQ on why this is really bad and isn’t just something that a few internet nerds are getting riled up about.

I’m not hugely politically, but this is something that won’t just disappear of its own accord.  I encourage anyone who has an interest in not being put under the kosh by vindictive music corporations contact Sean Sherlock (via his website or at sean.sherlock@oireachtas.ie) as I have and register you displeasure.  You could also email your local TD.  there is a full list of email address available on www.oireachtas.ie.

If you do contact any TDs about this, please be polite and not a rabid internet monkey.  That never does anyone any good.  I’ve included what I sent as an example.

Dear Mr. Sherlock,

I wish to register my disappointment as a life long labour voter at
the implementation of a biased, poorly thought out and harmful piece
of legislation via a statutory instrument which would allow Irish
courts to block access to websites accused of infringing copyright.

This will do nothing to prevent piracy and everything to stifle the
internet and all the business that go along with it – especially ones
the music industry finds particularly disruptive.

Have you consulted anyone at all from the Irish (or international)
technology industry about this? Has it been explained to you how easy
this sort of thing is to circumvent? How the media industry has used
similar laws in the US as blunt instruments to silence critics?

What protections will be put in place to stop vexatious takedown
attempts? What compensation will unjustly accused and shut down sites
receive? What is the level of proof that will be required?

It’s an utter disgrace that a Minister of State for Research and
Innovation will be ruining the best chance this country has for
building its economy back up again. The government talks enough about
the knowledge economy – maybe it should take heed from those who
actually understand the internet and its working than protectionist,
luddite, control freak corporations.

Mr McIntyre lays out exactly what is wrong with the law as proposed in
a recent blog post:
http://www.tjmcintyre.com/2012/01/irelands-sopa-faq.html

Yours sincerely,

Update 12/3/2012:
A canned response from Seán Sherlock hit my inbox a few minutes ago:

A Chara,

I would like to update you regarding the enactment of the European Union (Copyright and Related Rights) Regulations 2012.

I fully acknowledge the concerns that have been expressed by you regarding the introduction of the European Union (Copyright and Related Rights) Regulations 2012 which were signed into law on 29th February, 2012. I wish to re-emphasise that it has been necessary to introduce this legislative measure to restate the position that was thought to exist in the Copyright and Related Rights Act, 2000 regarding injunctions against intermediaries prior to the High Court Judgement of Justice Charleton in the case of EMI & others –v- UPC and to ensure that Ireland is compliant with our obligations under EU law.

I am satisfied that the High Court now has significant guidance in the implementation of this legislative measure arising from the underpinning EU Directives, as interpreted by the recent Court of Justice of the European Union case law, to ensure that any remedy provided will uphold the following principles:

• Freedom to conduct a business enjoyed by operators such as ISPs;
• The absolute requirement that an ISP cannot be required to carry out general monitoring on the information it carries on its network;
• Any measures must be fair and proportionate and not be unnecessarily complicated or costly;
• The fundamental rights of an ISPs’ customers must be respected, namely their right to protection of their personal data and their freedom to receive or impart information.

I am determined to ensure that Ireland will be a premier location where innovation can flourish and where innovation is facilitated by our copyright laws and data protection regime. In this regard, I am committed to reviewing and updating the Copyright legislation currently in place in order to strike the right balance between encouraging innovation and protecting creativity.

In this context, I am particularly anxious that the Consultation Paper of the Copyright Review Committee, which was launched on 29th February, 2012, is carefully studied by all interested parties to stimulate a constructive and well informed debate on these issues. This is a wide-ranging Consultation Paper which examines the current copyright legislative framework to identify any areas of the legislation that might be deemed to create barriers to innovation. The Consultation Paper is available to download at the following link: http://www.djei.ie/science/ipr/crc_statement.htm.

I would like to encourage the deepest engagement by all interested parties in the consultation process which has been launched in order to stimulate a constructive and well informed debate on all of the issues raised in this rapidly evolving area.

I am confident that the work being carried out by the Copyright Review Committee together with the interaction and input of all of the interested parties will result in establishing Irish copyright law on a firm footing to encourage innovation, foster creativity and meet the challenges of the future with confidence.

Yours sincerely,

Seán Sherlock TD
Minister for Research and Innovation

Another Six Months of iPhone App Stats

It’s been six months since my last post on download stats for my apps, so it’s time for an update. Again, this is as much to have the stats somewhere for when I want them as talking about them. The following are the downloads and updates from the 4th of July 2011 to the 1st of January 2012 with some commentary on the apps.

TaxCalc.ie
Downloads: 713 (up 19 on previous 26 weeks)
Updates: 2,424 (3 updates released)
I’ve already posted about the performance of the app in and around budget week. Apart from that week, it trundles along with a few downloads every day. I’m expecting a slight uptick in downloads for January since people will want to check their pay slips. The app still has an edge over its paid competitors as it is the only one that handles the 2012 tax year.

Broadsheet.ie
Downloads: 5,014 (up 684 on previous 26 weeks)
Updates: 90 (no updates released)
This app has been holding its own with it being my most downloaded app pretty much every day (only beaten once by Taxcalc.ie and once by Pint of Plain). There’s been a few surges in popularity, for example when adverts were first introduced to the desktop site and another over Christmas when people got iPhones as presents. Its popularity though is all down to the content rather than it being a particular good app.

It does need a refresh and a couple of bug fixes, but finding the time to do them and test it properly is problematic. Maybe I’ll get a chance to breath this year and get around to it.

Pint of Plain
Downloads: 1,928 (down 661 on previous 26 weeks)
Updates: 1,975 (1 update released)
The main reason for the single update made to the app in the last 6 months was to switch from just serving ads from iAd to using the MoPub service. It’s not worked out great for me as I just don’t serve the volume of ads needed to make anything from them. The ads are a bit annoying so I may just take them out again completely.

Like Broadsheet, the app saw a noticeable jump in downloads on Christmas Day and St. Stephen’s Day.

Visionary.ie
Downloads: 571 (down 719 on previous 26 weeks)
Updates: 29 (no updates released)
This app really doesn’t get the love it deserves. However, it’s still getting a bit of interest with a handful of downloads each day. You can always tell when Darren’s just done a wedding as there’s a small spike in the downloads. With a relaunch of the website planned soon, there will probably be a refresh of the app to match.

My main disappointment with the app though is that no one has actually used it to buy a print. Whether this is a problem with how the purchase system works or just that people rather ringing up and talking directly to Darren about them I don’t really know. Still, I do really like how the frame selection works.

I didn’t get to release anything new in the last six months, but I have a couple of ideas percolating that might actually see the light of day soon. It’d be nice to talk about something other than the same four apps.

Apple released their auto-injest tool over the summer and since the 1st of September, I’ve been recording the app download stats locally. This will make posts like this a bit easier since my tool scrapes both of my accounts and presents the lot at once.

Science fiction books to read in 2012

The Irish Times published a list of books to read in 2012 but like many of these sort of things, left out my preferred genre science fiction.  So here I present (in no particular order) some of the books I’m looking forward to in the next year.

The Apocalypse Codex by Charles Stross
The fourth book in the Laundry series sees Stross returning his occult version of MI5. The mix of James Bond spy antics with Cthulhu mind-bending horrors always works for me.

Railsea by China Miéville
A riff on Moby Dick set on a train traveling across a sea of rails. His books are always full of superb ideas that would be justified being spun out to stories themselves.

Blue Remembered Earth (Hardback|Kindle) by Alastair Reynolds
While I’d normally avoid buying parts of trilogy (this is the first book of Poseidon’s Children), I’ll probably make an exception here as it looks like the books are only loosely interlinked.  There’s one of those odd video trailers for it if you like that sort of thing.

Update: this was released on the 19th of January.

The Drowned Cities by Paolo Bacigalupi
A story of child soldiers in a dystopian civil war wracked America.  Bacigalupi is still relatively new on the scene, but he’s been producing consistently good work from the off.

Intrusion (Hardback|Kindle) by Ken MacLeod
Another near-future dystopia story.  While I’d like to see another singularity type story from him, his 20 minutes in the future stuff is well worth a read.

Update: this was released on the 1st of March

Any other suggestions?

Budget Week and TaxCalc.ie

With the budget (well, the half I was interested in) being announced last Tuesday, this was the big week for TaxCalc.ie – both the site and the app.  It is the natural time for people to be interested in their tax affairs (the other is in the New Year when people actually see the changes to their pay packets).

The Budget

The budget itself contained no surprises, especially after the Taoiseach’s speech on Sunday night.  Considering the various stories circulating of a possible 3rd rate of tax or more USC bands it was a very easy budget in terms of code changes needed in my app.  The tweak to USC does seem badly thought out to me since someone on €10,035 pays nothing but another person on €10,036 ends up paying €200.72 in USC.  Hopefully someone in the Department of Finance will see sense and have the 2% USC rate eliminated altogether.

The App

I was a bit more prepared this year and created an update which posted user’s details to an endpoint on the TaxCalc site and returned the resulting breakdown as a lump of JSON.  This way I wouldn’t have the usual bad reviews because the apps wasn’t updated instantly.  Apple even approved my request for an expedited review for the update since the budget was so close and the update was available from the Sunday before the budget.  There were 390 downloads of the updated app by the end of budget day.

I was rather pleased with the number of new purchases of the app.  It reached a high of #8 in the top 25 paid apps on Tuesday before falling out of the top 25 on Thursday evening.  This was all based on 56 sales on Tuesday and rapidly dropping off to 7 on Friday.  The app is now back to selling between 2 and 6  units a day, which is still enough to get it to #1 Finance app in the Irish app store.

The Site

The site didn’t do as well as last year.  Apart from some tweets I made myself, the only place it got a mention was Broadsheet.ie which gave a boost on Budget day.  Traffic collapsed on Wednesday to the normal trickle.  This is very different to last year, where mentions on Boards.ie and TheJournal.ie meant that traffic was maintained for a couple of days after the budget.

The Competition

The only real competing app for this years budget was a free one from PricewaterhouseCoopers which got heavy advertising in the Irish Times and made it into the top 25 free apps.  This was a rather poor app that really should have sunk without a trace.  The first version had the bottom button partially off the screen.  My guess is that it was not supposed to have the status bar at the top and so the screen is 20px too big.  Then when the calculator is actually used the summary screen shows 0 for all values and you need to ‘View Details’ to see anything.  Even then, the view details screen doesn’t fit and you need to scroll sideways to see everything.  All in all, a very amateurish effort from one of the big accounting companies.

The other two apps – Irish Tax Calculator and the Irish Taxation Institute – haven’t been updated yet and I suspect the former has been abandoned by its developer.

Lessons Learned

Next year, I really should make more of an effort to get the app and site mentioned again on the likes of Boards.ie on the run up to and during the budget.  The site traffic to the site was certainly affected and the SEO tweaks I’ve been doing didn’t make up the numbers.

Having the endpoint ready to go well before the budget meant that I could roll out changes announced very quickly.  I could also take a bit more time with an update and run more tests.  Next year I should aim to have a version ready for developer release well before the actual budget so I’m not rushing to get everything changed at once.  Most of this year’s work should help that along.

Overall I’m happy enough but I think I can do better next year.  I’ll definitely be better prepared.