This will, according to WordPress, be my 1000th post published on this site.

Woo!

Woo!

The first article was published way back on 8th September 2007 – making the site nearly five and a half years old. Since then I’ve written about a chaotic collection of topics, and the only consistency is in the fact that I, at some point, wrote it.

It’s been through countless WordPress versions and several more themes (some more stylish than others, but it was always fun!) and grown and shrunk with how much I’ve used it.

If you want to dig into my past, the Archive is a good place to start.

Here’s to the next 1000 / 5 years :-)

I often make comedy of the thousands of StackOverflow questions along the lines of “How do I add to an array with jQuery?” and so on. Well, I was working with some Chrome Apps I’m putting together and needed some random numbers. So obviously I wrote a jQuery plugin to do it.

Obviously I am well aware of Math.random(), but you can use the API on random.org to get random numbers generated through atmospheric noise measurements. So to build a bit of a proof-of-concept of adapting features for offline and online use, I built a jQuery plugin that uses the random.org API when online, and falls back to Math.random() when offline.

The plugin is hosted over on github, you can view the readme for all of the documentation.

js

Github is a critical metric when we’re hiring developers. If you have a Github account and contribute to open source projects, we’re much more likely to look closely at your application. It gives us a good idea of how you interact with other developers, lets us know that you are willing to work on open source code in your spare time (so you love doing it), and we can take a look at your code to get an idea of how you work.

droidtocat

Driodtocat

I have spent today clearing out my Github account a little. Deleting forks I don’t maintain (or have a reason to), transferring a few repos to our work Github org (we <3 open source), and creating an entirely new org for ARNIE software.

ARNIE was my third-year group project at Uni and I open-sourced a lot of the code as I wrote it. This was causing quite a lot of projects to hang around on my personal account, so I transferred them all to the arnie-robot org. If you’re interested in digging up my old code, there’s where you want to go!

Oh dear, EA.

Their decision to make the latest SimCity game tied to their servers was a dubious one at best. But when the game won’t function because you can’t handle the load of everyone trying to play it, then you have really screwed up. It’s now got to the point where over 700 of 800+ reviews of the game on Amazon are 1 star, and Amazon even stopped selling the download version because nobody could connect.

Somewhere under there are EA's servers...

Somewhere under there are EA’s servers…

Perhaps the most concerning points about EA’s statement is that they will ease load by bringing online more servers in “the next 2 days”, and they are being hampered by “server architecture issues”.

This sounds like two very very serious problems for thousands of clients who are dependent on the system. Architecture issues could be quite a few different things but it sounds like the application servers or something they rely on just doesn’t scale properly – this could go all the way back to the design stage of the software. And 2 days to bring online more servers?!

At import.io we have worked very hard to make our architecture reliable, resilient and scalable. We’re by no means there yet – but our young startup can not only start and stop servers with a couple of clicks (just about anyone can through the AWS console, let’s be honest), but we have multiple applications automatically forming clusters based on the resources that are allocated to them, and the clusters also manage load by scaling up and down the number of machines they are run on depending on key load metrics.

Perhaps EA should look into scaling out with AWS (and doing their application design properly) next time?

Much like last year, I have created a calendar to keep track of the BBC TV coverage of the F1. When combined with the F1 calendar, you can find out when the cars are on the track and when you can catch up with it on BBC TV (and when to avoid the news!).

How to view the calendar:

Knockout is probably my favourite JavaScript library. It saves me a huge amount of time in virtually every project I do, and is a perfect blend of flexibility and size.

ko-logo

I also love building Chrome Apps. Since I’ve got the Chromebook, even more so. However, security restrictions prevent the execution of the JavaScript eval() function, which prohibits Knockout from functioning in its default state.

Fortunately, you can provide your own custom bindings provider for Knockout, which mean you can work around this. One of the guys at work built one of these to improve efficiency in our client app, and helpfully we can do the same to enable Knockout support in Chrome Apps.

Well, that, or we can get someone else to do it for us. Ryan Niemeyer from Adobe has kindly done it for us already. You can grab his code from Github, and be on your way to using Knockout in your Chrome App in no time.

Last Friday David and I went to “An Audience with Joe”, an event run by F1 journalist Joe Saward. The format of the evening was question and answer (with a break for nibbles) and was hugely entertaining.

One of the topics that came up was Lewis Hamilton – and just why he decided to jump ship to Mercedes. Personally I’m interested to see how much patience he has – I give him 3 years there before he gets fed up and moves again.

Lewis Hamilton Mercedes

May be Hamilton or Rosberg, can’t tell their yellow helmets apart…

There were a few other recurring topics, one of which was Bernie (of course). There were some interesting theories about what would happen when he retires – none of which were my first choice, which would be Ms Tamara taking over.

Taking over?

Taking over?

There is no button to delete items from the Chrome Webstore developer dashboard. This is for good reason – if you accidentally use the same GUID again, a lot of things will break according to Googlers. However, I have been testing deploying a Chrome packaged app there (which is experimental at the moment) and it broke quite a few times. Thus I ended up with a lot of dead items. While when they are unpublished they don’t count towards your 20 app limit, it is still the case that they get in the way somewhat and it’s difficult to tell what is what.

It is possible to delete them, but please really be sure you know what you are doing. If you’re not confident you understand the possible implications of doing this then please don’t do it!

To do the delete, open the dashboard, and open the Chrome developer tools (Ctrl + Shift + J). Your app ID is the string that is on the end of the URL that you get when you click “Edit” next to it. Type in the console:

cxDeleteItem('id')

Where you replace id with the ID of the app you want to delete. You’ll get a confirm box to make sure you know what you’re doing, then your app will be finally removed. 

Microsoft’s new Modern.IE is labelled as: “Today it can take a lot of time to make your web experiences look great (or just work) across various browsers and devices. This tool detects common coding practices that may cause compatibility problems or prevent your users from getting the best possible experience on a webpage.”

However, if you actually run a report, first of all you get a list of problems that make your site incompatible with IE (see the report for my site here).

Then they go ahead and label as warnings two Internet Explorer-specific features such as touch compatibility and start screen icons – these are part of Windows 8 and use a -ms prefix CSS header and the other uses Microsoft meta tags.

Smooth.

Update: Had to remove the app from the store. For some reason, they are having some pretty bad bugs with regards to publishing new versions. I couldn’t do this successfully so have removed it for now.

Since I was given a Chromebook last week, and it’s the only laptop I brought home with me for Christmas, I thought I’d get myself coding a few Chrome extensions on it.

Unfortunately, this was not as easy as it seems. While you can load unpacked extensions for development from the local disk – much like “regular” Chrome – it is quite tricky to actually edit the file on your disk. Make every change on Drive then download the new file? No thanks.

To get started I used the “mini editor” example application for Chrome to edit files, and I used this to start work on Applicator.

I just released Applicator 0.2 on to the Chrome Web Store. It now supports Web Intents for editing and viewing JSON, HTML, CSS and JavaScript, as well as some slightly tweaked features. It also reports its version so it makes it much simpler to check if it actually upgraded or not.

Please check it out, use it to build your own extensions, or maybe even give it a review!