Category Archives: Blog

General thoughts on life, the universe and everything. Stuff that doesn’t fit in the other categories!

Reading 2016

Coming into the beginning of last year I decided I would try to read more books. I do most of my reading on my commute and the previous couple of years I had not had to regularly go to an office, so I managed few books and no novels at all.

While my total of twelve books may not set the world on fire, I managed to read some interesting ones so I thought it might be worth writing a few words on each one.

How to Fail at Almost Everything and Still Win Big: Kind of the Story of My Life,” Scott Adams

It’s a good thing that I have the ability to compartmentalise things. Some of his recent writing about Trump has not been to my taste but this book is interesting. I’m not big on “self help” books but this one espouses a philosophy I can vaguely get behind. And Adams’ writing is always engaging.

The Simpsons and Their Mathematical Secrets,” Simon Singh

Not one of Singh’s best but still interesting. As a bunch of short mathematical stories tied together by episodes of the Simpsons (and a few from Futurama), it may be better as a hook to get people interested in science and maths than as a structure. I don’t regret reading it but I will concede that it took me a while to get through (with a few pauses while I read other books).

I, Partridge: We Need to Talk About Alan,” Alan Partridge

Most books that are TV or movie tie-ins are terrible. I only got this one because it was on sale for £1 and, even then, it took me over a year to get around to reading. I’m happy to report that I was wrong. It’s surprisingly well written, you absolutely get the “voice” of The Alan, and there are some real laugh out loud moments. The sound-track is also spot-on.

The Kingdom by the Sea,” Paul Theroux

Theroux toured the UK in 1982 when it was the “sick man of Europe,” Margaret Thatcher was just starting out and the Falklands conflict was on-going. It made an interesting contrast with 2016. As ever, it was surprising how much had changed and how much stays the same.

I Think You’ll Find it’s a Bit More Complicated Than That,” Ben Goldacre

Like Singh’s, this is not Goldacre’s best book but, as a collection of essays, there’s still a lot of good stuff.

The Language Instinct: The New Science of Language and Mind,” Steven Pinker

Where language comes from, whether it’s biology or nurture or both, is clearly far from a solved problem but this is a fascinating discussion. Accessible for a layman (like me) but quite detailed.

It’s especially interesting right now as my two year old gets increasingly expressive.

And Another Thing…,” Eoin Colfer

I wrote a full blog about this. In short: it’s really hard to follow Douglas Adams. It’s not that Colfer did a bad job, more that Adams was an impossible act to follow.

Ready Player One,” Ernest Cline

I heard lots of good things about this and then I learned they were making a movie. I knew a had to read it before I saw the film.

I didn’t get into gaming culture as much as some, so I may have missed some of the references, but what’s there brings back some nostalgia and it’s mixed with a decent story and mostly believable characters.

How to win friends and influence people,” Dale Carnegie

I spent a lot of time ridiculing this book, mostly for the title if I’m honest – it sounds smarmy.

Then I read it. And, maybe I was wrong.

Like the Pinker book, it’s also fascinating to watch my kids and see the bits they understand purely instinctively. My son, at five, is already better at this stuff than I’ve ever been.

The Girl with the Dragon Tattoo,” Stieg Larsson

I finished another book, got stranded on the Tube and, lacking anything else to read, started this. I’d seen the movie (both versions) and still couldn’t remember the end.

The writing is not great but it’s still a bit of a page-turner.

The Bug,” Ellen Ullman

Not as good as I wanted it to be. I think, perhaps, I’d have enjoyed it more if I weren’t a programmer. (I can’t really say much more without giving away some of the plot. And I’m not saying you shouldn’t read it.)

Having said that, it did encourage me to write my first Apple TV app so it wasn’t for nothing.

Inside the Machine,” Jon Stokes

I remember enjoying the articles about CPU design on Ars Technica that this book is based on. I added it to my Amazon wish list ages ago… and then it went out of print. Last year I found it on Safari Books Online.

The processors it talks about are pretty dated now – the newest are Intel’s Core and IBMs PPC 970 – but what’s important in many ways is the progression from early chips, so it stands up well. At times it feels that Stokes is trying a little too hard to write an academic text book, but I’ve not seen any books that are quite so accessible and detailed.

Brexit: What the Hell Happens Now?” Ian Dunt

What a depressing year 2016 has been, and Brexit has been a big part of that. If it’s going to be a fixture in our lives for the next few years I figured it was probably a good thing to understand it.

What he writes is pretty convincing, well structured and approachable. Kind of like the exact opposite of the current governments approach to it.

Write to your MP about Brexit!

I’m sick of last years referendum on our membership of the EU being used to justify… pretty much anything. And any criticism is met with “you have to respect the will of the people.”

Well, I’m a person and I don’t think my will is being respected by many politicians and much of the media. The result of the referendum doesn’t say that people are happy with a so-called Hard Brexit, dismantling the NHS or using EU citizens as negotiation pawns.

I don’t write to my MP very often but, especially because of our current lack of an effective opposition, this is the ideal time. My MP said “Now we need to influence best Brexit we can.” I agree, but uncritically voting for Article 50 and the governments haphazard approach isn’t it.

My wife has put together the above graphic. Please feel free to share on Facebook, Twitter, MySpace, Friendster, whatever social media you use. And if you’re willing to mail an actual postcard, please let me know — we have some that we’re willing to share.

February 12: contact form removed due to spam. Feel free to contact me on Twitter

Apple AirPods first thoughts

I got some Bluetooth headphones about a year ago as an experiment. They were cheap but more than lived up to expectations. The lack of wires really is a game changer, albeit a totally #firstworldproblems one.

But they had flaws. When Apple announced their AirPods I was intrigued. Would they fix the problems while keeping the benefits? At ten times more than my old headphones I hoped so.

They arrived only a few hours ago so this isn’t a thorough review but here are my initial thoughts.

Out of the tiny box, first impression is that they case has a surprising heft. Maybe the size makes you expect it to weigh the same as some dental floss but the reality is batteries are heavier than that!

The lid smoothly flips up and the headphones themselves don’t just fall out. Instead they’re held in by magnets and require a gentle tug to extract. Overall the hardware design is understated and thoughtful.

Open the lid and hold next to an iPhone and it pretty much immediately pairs. No pin codes, no janky on-off buttons, no confusing flashing lights or mystery buttons. Even better, the details sync between your devices. It appeared on my iPad and even my pre-Bluetooth 4 MacBook Pro (which doesn’t automatically “see” the AirPods but does connect just by clicking “Connect” in the menu).

The sound from my iPhone is fine. I’m no audiophile — I don’t even play one on TV — but it’s loud and clear. They don’t fall out of your ears, even if you try.

The one area I was skeptical about — Siri rather than real buttons — is still an area for concern. It took me a few attempts to activate it. It seems to require quite a decent jab to activate, which does eliminate the possibility of accidental usage. “Volume up,” “Volume down,” “Pause” and “Resume” all do what you’d expect. Siri even activates correctly on the Mac.

How well it works in practice will have to wait for “real world” testing. What I will say is that the “pause when you take one out of your ear” functionality works as advertised. I love it.

I’ve not reached the end of day one yet but impressions are good. They feel good and Just Work, which sounds like damning with faint praise unless you’ve used other Bluetooth devices.

But it’s going to take a while longer to determine whether they’re worth ten times the price of my old headphones.

This post originally appeared on Medium.

And another another thing…

I can’t make up my mind about “And Another Thing…,” Eoin Colfer’s book, which is the sixth Hitchhikers novel, the first not written by Douglas Adams.

On the one hand I wanted to give it a fair chance, try to judge it on its merits rather than simply as a H2G2 book not by Adams. On the other, it’s clearly not by Douglas Adams. It has the same characters. It’s clearly by someone who is a Hitchhiker fan and some things — like the names of places and things — feel spot on.

But the story itself doesn’t quite work for me. It feels like… just a story. Which is a weird criticism, but bear with me.

Especially later in his career, Adams liked to combine his interest in technology, science and religion in his writing and that is what I think is lacking from “And Another Thing…” It’s not that it’s bad, just that it’s ordinary.

With the caveat that I’ve never written a novel and that there’s a long way from a simple idea to a complete manuscript, I hubristically like to think that I would have taken a different approach.

There could be some fun to be had around the “infinity” of Earths that the Vogons destroyed at the end of “Mostly Harmless.” Because, if an infinite number of Earths have been vaporised, there are still an infinite number left. The concept of “infinity” is bizarre enough to have both truth and humour. There’s definitely some potential playing with Hilbert’s hotel. Can you imagine an infinitely large hotel where all the guests have an ego the size of Zaphod Beeblebrox’s? Or Arthur trying to find a room in a full hotel? Marvin would probably be quite depressed about the whole thing.

Anyway, it’s not a fully baked idea, and it’s certainly not a complete story, but the concept feels more Adamsian than what actually happens in the book. The rest is left as an exercise for the reader…

This post originally appeared on Medium.

Double Trouble

One of the great things about WordPress is the community and the number of great plugins that can do amazing things with little effort.

But all that code, as any good developer will tell you, is a liability. How do you pick a plugin that not only meets your requirements now, but will both continue to do so? WordPress advances. APIs change. Plugins need love too.

Many moons ago I settled upon Flickr Gallery, a plugin that allows you to import Flickr images just by adding a short-code to posts. I thought there was value in keeping all my public photos in one place and, at that time, WordPress had poor media management facilities. The plugin seemed popular and well supported.

Flash forward to 2015 and, well, it doesn’t work. It hasn’t been updated for nearly five years and where I should see pictures I only see blanks.

But I’m a developer. How hard can it be to fix?

Groan! Have I ever said how much I hate web development?

Anyway… two hours later I find that there are not one but two problems. I find this after fixing the first problem in a server running on my local machine but find that it still doesn’t work here.

The first problem is that Flickr now requires SSL access to its API. In code terms, open phpFlickr.php and change the following lines:

 var $rest_endpoint = 'http://api.flickr.com/services/rest/';
 var $upload_endpoint = 'http://api.flickr.com/services/upload/';
 var $replace_endpoint = 'http://api.flickr.com/services/replace/';

To:

 var $rest_endpoint = 'https://api.flickr.com/services/rest/';
 var $upload_endpoint = 'https://api.flickr.com/services/upload/';
 var $replace_endpoint = 'https://api.flickr.com/services/replace/';

I found the cause of the second problem when I realised that none of the flickr code was getting called. It turns out that I have the Jetpack plugin and that also uses the “flickr” shortcode, though the syntax for using it is slightly different.

(I find it odd that there’s no error or warning flagging the conflict. This took far longer to track down than it needed to.)

I tried disabling that option in the Jetpack plugin but that didn’t work. In the end, I added the following code to flickr-gallery.php, just before the “add_shortcode(‘flickr’…” line:

if (shortcode_exists('flickr')) {
    remove_shortcode('flickr');
}

Very much cheating… but it does work.

I’m trying to figure out if there’s a way of distributing the change in a more user-friendly format.

2014

It’s important to have a Top 10 list. I know this as every other site has one. I don’t want to miss out. So here are the top ten most read posts here this year, with the year they were originally published in parenthesis:

  1. QA Mindf**k
  2. Do Apple take 40% in the EU? (2011)
  3. Learning Swift
  4. iOS Developer Program: from individual to company (2011)
  5. How do I do “X” in Swift?
  6. AQGridView to UICollectionView (2013)
  7. iPhone Dev: Saving State (2010)
  8. NSFetchedResultsController and iCloud
  9. Why you need a crash reporter (2011)
  10. Sophia Smith (2006)

If there’s a lesson here in increasing readership it’s simple: get retweeted by people with lots of followers.

Honourable mentions go to the following as they were written this year but didn’t make it into the “most read” list:

14. Recruitment Tests
15. Two Years
16. Java and Yosemite
21. Starting Coding
23. Swift Hate
31. Lucky number two

I started with the intention of writing at least one blog a week. You’ll note that I utterly failed. I didn’t even get to the end of January with that!

The biggest surprises — since they were both written over a decade ago — were:

17. Italy, 2001
19. Oracle 8i for Linux Installation HOWTO (last edit was 2003)

I’m not going to make any promises or predictions about next year, other than I’ll be moving the site to a new web host (the old one closing down). But whatever happens, here’s to a great 2015.