Wiki

After years ((Google Analytics stats go back to 2013, AWStats has data going back to 2005!)) of running a Mediawiki instance effectively read-only ((with user registration disabled and a registered user required to edit content)), I’ve ported the content across to a static Jekyll site.
Although I didn’t bother measuring it, performance feels much better ((makes sense: each page should be a bit smaller and there’s no database involved in generating the pages)).

There wasn’t a lot of content, so it didn’t take long to copy and paste and turn into Markdown. The plus side of being Markdown-based is that if I decided to use another static site generator ((I briefly played with using Hugo – neither Jekyll or Hugo really lend themselves very well to non-blog content)) it wouldn’t be difficult to drop the content in.

The permalinks for each page are set to match the path for the old Mediawiki pages, so any old links should still work. Google Analytics is also no more.

However, the content is very outdated (some was incomplete to begin with; I also started using Ansible to do config management so some is just done differently now) so it might be time to do away with the whole lot. I’ve been playing with the idea of replacing/supplementing this blog with a Jekyll one, so it wasn’t a total waste of time anyway.

Uninstalling the IBM Bluemix CLI on Mac OSX

This weekend I was playing around with the IBM Bluemix platform at the SpaceApps Challenge in Glasgow.

The tools provided made deploying the team’s Node.js application fairly simple but now it’s time to clean up — I don’t want to have a bunch of stuff I don’t have a use for kicking around on my Mac.

Getting shot of the Cloud Foundry CLI application was easy (not least because they provide instructions but also because it’s easy to put the cf binary somewhere useful and just bin it when you’re done) but the BlueMix CLI itself was more tricky (they use an installer .pkg; there didn’t seem to be any clear uninstallation instructions). So here’s what I’ve worked out from extracting the installer .pkg and poking around in the postinstall script:

Delete the bluemix binary by running:
sudo rm -rvf /usr/local/Bluemix/
sudo rm -v /usr/local/bin/bluemix
sudo rm -v /usr/local/bin/bx

From /etc/profile, remove:
### Added by the Bluemix CLI
source /usr/local/Bluemix/bx/bash_autocomplete

From ~/.bashrc, remove:
### Added by the Bluemix CLI
source /usr/local/Bluemix/bx/bash_autocomplete

From ~/.zshrc, remove:
### Added by the Bluemix CLI
source /usr/local/Bluemix/bx/zsh_autocomplete

Some of these may not exist — the installer script does at least check whether they do before appending to them.

Both cf and bluemix store config data in the home directory (in ~/.cf and ~/.bluemix respectively) — if you don’t care about keeping that, it should be safe to delete too.

RIAT 2014

The 2014 Royal International Air Tattoo was last July; I intended to post this rather less than 4 months after the fact ((I might even have settled for doing it before tickets for 2015 went on sale)) but it got stuck in my procrastination pile.

I had a three day ticket (Friday to Monday) which included, on the Friday, access to the pit area where the display teams ((Frecce Tricolori, Red Arrows, Breitling Jet Team, Patrouille de France and Patrouille Suisse)) parked their aircraft when they weren’t on display.

The photos I’ve gotten ((Out of around 4500 images — every time I dig through the pile I find another few worth bothering with)) around to processing and uploading to Flickr:

The weather was very good, which is always a plus when you’re wandering around a field all day. Saturday was scorching hot and Sunday was cloudy with a little rain. However on Friday, it was cloudy but still more than sunny enough for me to get quite sunburned ((Protip: sun cream needs to be used to be effective…)):

By the time I got home I was peeling lots.

Happy Homes

Last weekend (Friday 21st-Sunday 23rd Mar 2014) I went to the second Open Glasgow hackathon, which was based on the theme of Energy. Every one of the four events carries a £20,000 prize for the winning team to develop their idea to commercial application.
I have a fair bit of past experience of working in the subject so was particularly interested to see what ideas came out of it but a five-figure grant to implement an idea definitely helped!

The structure was a bit different from what I was expecting; the organisers seem to be going through a process to find a structure that works best.
On Friday evening, everyone was expected to turn up having thought of an idea and go through a process of “speed dating” it: explaining your idea to another person in a fixed amount of time, listening to them explain their idea and negotiating to assign points to the two ideas up to a combined maximum of seven points. After five iterations of this, if your idea had at least twenty points you had the chance to pitch your idea to the crowd and they had the option of joining a team to work on your idea. Ideas which recruited a team smaller than four were culled.

This filtered out some of the poorly considered ideas but the surviving concepts seemed a bit homogeneous — of the nine surviving concepts the majority were variations on a theme of using the provided data ((there were significant volumes of data provided and a strong suggestion that the winning idea had to use some of it)) on electricity consumption and applying some analysis, which was a bit disappointing — I’d heard more different ideas pitched but they hadn’t survived the process. Speaking to some of the other participants, they agreed with this also.

The idea I pitched, titled Happy Homes (or Happy Buildings), fitted into the common theme too: trying to put a face ((if I got £1 every time I said that, I’d have more than the £20,000 prize)) to energy consumption with the theory being that this might be more accessible than the standard graphs and numbers.
After working out “normal” electricity usage for Glasgow City Council buildings this could be compared to current use, with “abnormal” usage represented with either a sad (above normal) or happy (below normal) face. From that point it would be trivial to replace the provided data with input data from a Current Cost or smart meter, for a more domestic application.

It survived both stages of the pitching process and five of us built a working prototype, plotting a map of the locations available, simulating the current power consumption and doing the comparison to “normality” to decide which face to show.
This was done using Node.js to construct an API, backed by MySQL, and a web front-end (using the Hackathon Starter) which plotted the locations on a map. One of the team members built an Android app which showed a similar visualisation.

We didn’t win but it was still a good weekend. The winning concept appeared broadly similar but focussed more on the idea of encouraging action — notifications would be sent out to responsible parties (caretakers, etc.) if consumption fell outside “normal” so that they could check that, for example, lights hadn’t been left on.

As far as future development goes, one  significant functional requirement would be getting automated data ingestion working. I’d experimented with adding D3.js-based graphs on the Sunday afternoon but didn’t have enough time to get them integrated with the Jade templates the front end used.
I’m also inclined to re-implement the server-side components in Rails — Node.js was good enough for getting a working prototype built in the short time available but I want to experiment with Resque or delayed_job.

Published
Categorised as Ramblings

3: no ID check to disable a SIM?

Last week I ordered an iPhone 5. It uses a nano-SIM rather than the micro-SIM the 4S does so, on the advice of 3’s customer service people:

I went into a 3 shop to get one.

My date of birth and postcode were taken and I was handed a new nano-SIM. The packet includes a URL to have the SIM activated (with the proviso that when the new one is activated, the old one will stop working) but since I wouldn’t get the new phone till (at least) Friday, there shouldn’t be any rush to activate it…

This morning, my phone was showing “No Service” and switching it on and off again didn’t fix it. When I got to the office, I tried logging into 3’s attempt at a portal but my login was rejected because I apparently had the wrong SIM number.
When I got home tonight I put the nano-SIM (in the included micro-SIM adapter) into my 4S and lo and behold it works, with my old number.

So it seems that 3 cancelled my old SIM and activated a new one, identifying me only by my date of birth and postcode. It shouldn’t be hard to see how that neither uniquely identifies me nor does knowing those two pieces of information prove that I am who I say I am!

Untitled

Looking at my Flickr stats, I discovered that this photo had been pinched by some cycling blog:

At least they’ve linked back to the photo on Flickr. What gets me is, I think it’s a pretty shit photo!

Second photo-related thing today. According to Shutterstock, this is a trademarked artwork and I need to get a release:

It’s a robin Christmas tree decoration. Trademark, really?

Published
Categorised as Ramblings

VP2

After my (now out of warranty) OS WMR100 crapping out one too many times:

  • loads of signal issues, mainly affecting the anemometer but occasionally also the rain gauge and external temperature sensor. The console is currently balanced at an angle on a glass because it was the only way to get a reliable signal and the pole is in a less than ideal location (but at the edge of the usable range) so the anemometer’s readings suck.
  • the console would, on average every 3 months, stop streaming data on the USB port and the only way to get it going again was a reset. The console doesn’t store archive data so while nothing is being streamed nothing is being logged.
  • general accuracy: the radiation shield on the temperature sensor is awful so there is a large (and unpredictable) over-reading in strong sunshine.

I finally gave in and bought a Davis Vantage Pro2. Since it’s cheaper (by about £300!) to buy the UV and solar radiation sensors with the station than separately, I went for the Plus model, the only difference being that they’re included.
The whole thing costs an arm and a leg but Davis do seem to have an excellent reputation and it is a very nice piece of kit ((If I had to make a relatively minor criticism about the “sensor suite” the rain gauge’s “debris screen” could be better (in fact, it’s one of the things that OS might possibly have got right): it just sits at the bottom of the rain collector and will quite likely get lost; it also doesn’t do a particularly good job of keeping small leaves out)).

Since the whole point was to get at the data from the console I needed some way of getting the console connected to a computer. The console has an “expansion” port, which is serial with a rearranged pin configuration and the official answer is that you need WeatherLink, which connects to the expansion port and gives a serial/USB/IP connection ((With some software that looks like it escaped from the 80s thrown in)), which feels like a colossal scam: the USB and serial versions are “only” (!) £75 if bought with a station ((I just bought a weather station costing in the high-£££ and you want another £75 for a cable with a rewired serial port on one end and a USB port on the other?)) and the IP version is £316; bought separately those prices go up to £210 and £372 respectively!
Other than the obvious financial reason, it’s beyond me why the expansion port can’t just be serial (better still, USB; it is 2012 after all) by default.

The next step is getting something useful from the serial interface. Davis are very open about the serial protocol, which is nice considering the deficiencies in WeatherLink, and there are a load of different implementations of more or less the same thing such as VProWeather and VantagePro. WView can deal with a VP2 as well.

Fruit machine

Partly out of my own curiosity and partly because a friend is planning to buy herself/be bought one as a birthday present, I’ve been playing around with the idea of an Apple laptop.

Along the way, I’ve noticed a few interesting things.

Macbook – bit old?

Firstly, the MacBook seems ridiculously underpowered low-spec compared to its 13″ Pro cousin and, at least with Higher Education discount, doesn’t seem to be as much cheaper as it is lower-specced. The differences:

[table id=1 /]

There’s also a collection of other bits missing from the MacBook:

  • Thunderbolt and Firewire 800 (no real loss in most cases, I’d suggest)
  • SDXC slot (useful if you have a camera that uses SD cards)
  • FaceTime HD camera (I’ve never used the webcam on any of my laptops, someone probably does).

Before someone goes all [citation-needed] on those claimed differences between the CPUs and GPUs, Geekbench source and forum post with NotebookCheck graphics benchmark.

Now fair enough, there’s a difference of £130-150 between the two and the weight and thickness differences are arguably minute, but you’re still getting a slower CPU, less memory and a smaller hard drive (you could argue that either CPU is more than powerful enough for most people but it’s been claimed OSX Lion wants at least 2GB, you don’t really want to be at the minimum; just about everyone seems to be able to fill disk space with video, music and crap).

Adding the missing 2GB of RAM and getting a bigger hard disk in a Macbook costs a total of £121 (£80 for the RAM alone ((yes, you could get RAM cheaper elsewhere; that’s beside the point))) retail and £103.20 (£68.40/£34.80) in the HE store, bringing the Macbook price up to £808.40 or £988 retail. That’s still including the other differences I’ve already mentioned.

Given all of this, it’s probably no surprise that they’ve been listed as “Don’t Buy! – Updates Soon” for a while now.

HE Software – huh?

After that, the really strange thing:

Tweet about iWork Price

At the non-discount prices, iWork is £72 whether you buy it separately or as a build option.

Similarly for MS Office Home and Student 2011,

How does that make any sense?

Published
Categorised as Ramblings

I did what?!

The weekend before last I did the unthinkable and bought one of those fruity tablet things – for what it matters, the 16 GB WiFi model ((I didn’t see much point paying the extra for 3G; I have a phone that will work as a wifi hotspot and a tablet’s not something I can see me taking out of the house *that* often anyway)).

It bought it from the store in Glasgow and it has to be said that the “experience” ((Not the best term; I’m exchanging money for a product not getting married)) was remarkably good. I’d reserved one online to collect on a Saturday and it was obviously going to be pretty busy but despite being warned I might need to wait it took a few minutes at most to find someone who was free. The person I got was partcularly helpful and all told I spent around an hour in there.

The actual collection process was a faff about. She needed to find a free computer and go to some webpage ((I hope it was internal, not that I can recall the address either way)) to get one of their stockroom imps to bring it out before we go and wait for them at the location specified then finally it’s to be paid for ((What happened to the combined iPhone/card reader devices? This was a standard PIN pad)).

She went through setting up email, a quick demo of some of the features (things like the multitasking bar weren’t immediately obvious if I hadn’t RTFM) and a few suggestions (things like http://ipad.tvcatchup.com/ and saving a bookmark of the user guide to the home screen). All basic stuff, but it was nice to get that introduction rather than “here it is, give us your money, go away”. Vertical integration FTW, I suppose.

On to the device itself – in general I’m surprised to say I actually quite like it! Beforehand, I’d been researching the return policy and, at least subconsciously, expecting I’d hate it and want to get rid.

If I had to change one thing it would be the screen – a higher resolution would make text a lot nicer to read. On the other hand, no other device does any better (for example, the Motorola Xoom: near enough the same pixel density albeit at a different aspect ratio).
I still don’t get why you’d want to watch videos on it (besides the sort of casual YouTube browsing that works on a phone). The screen’s AR is just wrong and although it doesn’t eat up battery power quite like I expected it to, it just seems like a bad idea. I know some people do it, though.

One real surprise, having used (and written apps for) an Android phone, is the size of apps. The storage space appears to be contiguous (rather than internal/external but built in/SD like on Android) so it seems less of an issue for iOS apps to be much bigger. For example, I’ve got Angry Birds installed on both devices: on Android, the app is <20MB (dropping to ~2MB if the "move to SD" option is used) whereas the iOS version is ~50MB. There are video cookbook apps which are coming on for 1GB! The title's partly inspired by the reaction I've had from some people -- someone described it as a "dirty little secret" , another seems to have gone running ((To her mother of all people...long story!)) saying I'd "abandoned my principles" (?!). One last thing – 670MB software update, for a point release (4.3.2), what the hell?

Published
Categorised as Ramblings

Gunk Dunc

Every other year, Duncan Smeed holds “Gunk Dunc” — having water, wet sponges and the titular “gunk” chucked at him — to raise money for Comic Relief.

Some photos were taken ((500, circa 6GB’s worth!)):

IMG_4152 IMG_4153 IMG_4180-Edit IMG_4280 IMG_4476 IMG_4311-Edit IMG_4504-Edit

Although after tipping this ((gelatine, Irn Bru, custard powder, Bovril, food colouring, cornflour, golden syrup)):

IMG_4394-Edit

some payback was had:

IMG_4419 IMG_4431 IMG_4434 IMG_4436

…and £770 was raised. All very good fun!

Published
Categorised as Ramblings