Feb 062013
 

A couple of months ago I managed to get myself a new job as a programmer. It was a pretty great feeling achieving what I had been working towards for the past three years. I’m a couple of months in and I’m starting to get the hang of things and feel more comfortable. However, it’s quite a shock to the system going from the nice, well thought out examples of code seen in textbooks and blog posts to a giant code base  filled with fixes, patches and rushed code.

The culprit that made me write this post was a real corker. Whenever anyone checks in code changes all of the tests are run automatically so everyone can see if the changes broke anything. If a test fails after you’ve changed something then you generally know that you’ve done something wrong. I say generally because today I checked in some changes and was faced with a failing test in a completely unrelated project. It’s a horrible feeling seeing your name next to a bright red test failure.

So I went to investigate the test. It didn’t look like it used anything I changed but you never know. The test was checking some date validation. A date is valid if it’s between 90 days old and 90 days in the future. The test expected the result to be valid however it was using a hard coded date as input. The input date was valid yesterday but today was over 90 days on. This meant that the test would fail at least every 180 days unless someone changed the hardcoded date. It also meant that the sap who happened to check in code the day the test date was suddenly invalid was blamed for the test failure!

I did what any self respecting programmer would and fixed the test to use the current date as a seed and then wrote more tests to check 90 days before and after the seed date as well as the other boundary values.

So today I learnt that wild code is very different from textbook code.

Sep 012012
 

I think I may have decided upon a use for my Raspberry Pi. It’s now running raspbmc - a optimised port of the media centre software XBMC. For such a teeny and low powered device it runs it beautifully. Performance is a bit more sluggish than my Acer Revo R3700 running XBMCbuntu but some of the added extras in raspbmc make up for it.

It’s so good that I’ve actually decided to sell the Revo and use the Raspberry Pi as my main XBMC machine. OK the Pi isn’t powerful enough to emulate old consoles like the Revo did but I never really played them anyway. I don’t even get enough time to play my PS3 and XBox nowadays.

Where the Pi really succeeds is video playback. 1080p videos play smoothly due to hardware decoding of the h.264 video codec. Old non-HD avi files play well too. That tends to sum up my entire video library so it works for me. 5.1 audio decoding works out of the box. I had the Revo for two years and I still had problems getting surround sound (or in fact any sound through HDMI) whenever I installed a new version of XBMC or Ubuntu back when I was using Boxee. Whilst fiddling to get something working can be fun sometimes, I don’t particularly want to be fixing something when I actually want to watch a film.

Thanks to the newly released HDMI CEC functionality I can even control XBMC with my TV’s remote control so I don’t have to buy a separate remote. You can of course use the iOS or Android remote apps which are great in some ways but awful for navigating menus as you have to look down to see where your finger is on the touch screen.

Whilst being able to use my TV remote is great some of the buttons were mapped to strange functions. I had accepted this as one of the very few drawbacks. What I didn’t realise was that you can map the buttons to whatever the hell you want. All you need to do is edit the remote.xml file. The command below creates one in your home directory from the default XBMC one.

cp /opt/xbmc-bcm/xbmc-bin/share/xbmc/system/keymaps/remote.xml /home/pi/.xbmc/userdata/keymaps/remote.xml

I then opened the newly created remote.xml in my home directory and added these lines to the <FullScreenVideo> section.

<red>Pause</red>
<green>Stop</green>
<yellow>ShowSubtitles</yellow>

<select>OSD</select>

The 3 are fairly easy to work out. The <select> section means you can now click the select button to bring up the video controls rather than changing the aspect ratio like it does by default.

YOu can find all the commands on the XBMC wiki.

I’ve recorded a video to show using my Philips TV remote and what to expect from the Pi. The Inception video at the start is 1080p although it doesn’t really look like it on camera. The TED video app is a bit slow to list content and start videos but performance is fine once playing the video.

Aug 052012
 

My Raspberry Pi turned up last week. I actually had to leave it untouched for a few days because it came so quickly (about 4 weeks earlier than I expected) that I hadn’t got round to buying an SD card. I picked up an 8GB SD card for £3.50 from Amazon which was a bit of a shock after only ever buying overpriced Sony Memory Sticks before.

I downloaded and cloned the Raspbian image to the SD card. After hooking everything up I booted into Raspbian and manually started an X session to see how it performs on the Raspberry Pi’s modest hardware. I must say that I’m pretty impressed. Performance is pretty snappy even when web browsing… well, snappy for 700MHz ARM processor coupled with 256MB RAM.

However I’m not really interested in using the Pi as an every day computer. I’ve got a fairly beefy laptop for that. Instead I’m interested in seeing what it can do and what pieces of hardware I can replace with it.

Due to the Pi’s size and low power usage it would make a really good Airplay receiver. I’ve written about Airplay before. Personally I think it’s Apple’s killer feature that is one of the main advantages of keeping an all Apple setup. I used this blog post to quickly install Shairport (an Open Source implementation of Airplay) on to the Pi. The connection seems pretty solid but audio quality from the headphone jack is pretty awful. I have a spare HDMI port on my surround sound receiver so hopefully bypassing the Pi’s DA convertor will help.

I’ve also installed a VPN server on it. When I’m out of the house I can connect and get access to my network and browse the web through an encrypted link which is nice for unsecured wifi. My iPhone doesn’t seem to want to connect but my Macbook Pro and work Windows 7 PC seem happy to connect.

Another project I’ve got my eye on is raspbmc - the XBMC media software ported to the Pi. Apparently performance is pretty nice when watching h.264 encoded video.

So far it’s a pretty impressive bit of kit. The fact it costs £30 is quite amazing.

 Posted by at 11:28 am
Nov 242011
 

*Wordpress lost the first version of this post so this is the hastily rewritten version*

Last November I got involved with Openreach’s FTTP (Fibre to the premises) trial in Milton Keynes. It’s been a great year testing a ridiculously fast internet connection but it’s now sadly come to an end. BT have started offering a commercial product based on the technology so I assume the trial was a success.

The trial wasn’t handled directly by BT or Openreach. Instead I had to get connected by one of the smaller ISPs involved in the trial. It was through them that I learnt the trial was ending. They supplied me with prices for if I wished to keep the connection and stay with them.

I’ll focus on the lower scale of the pricing. The products based on the product I was trialling (100Mb down and 30Mb up) are going to be too high for most people (it starts at 78 + VAT a month). The consumer focussed product is 115 down and 14 up and comes in at £60 (it’s unknown whether this will require a phone line as yet so you might need to add £10 on to it). The same product from BT costs £35 but does require a phone line so its basically £45.

This is too much to pay. We’re looking at possibly £70 a month from a smaller ISP and £45 a month if you sell your soul to BT. Most people aren’t going to be able to afford paying that much for broadband. What’s the point in spending billions of pounds hooking everyone up to a fibre network and then pricing the majority of people out? This is why we shouldn’t leave developing the country’s infrastructure to private companies. Incidentally it would be interesting to find out why the discrepancy between BTs price and the price from the small ISP is so large. Are small ISPs being screwed by wholesale prices or are BT using their clout to sell the product at a loss?

I’m actually moving out of the area next year so this speed won’t be available to be me but the same problem is there for the slower FTTC (fibre to the cabinet) technology that covers most of the country. BT offer it for £28 a month which isn’t too bad but if you want to avoid BT you pay more than double for a limited service.

And who doesn’t want to avoid BT?

Jun 142011
 

On Friday evening I saw this post on Reddit. The poster had an Apple developer account but no use for the 30 activations of iOS betas you get with it. I replied and within the hour I was installing iOS 5 legitimately with no jailbreak. Hurrah!

I won’t go into detail about all the changes and updates as they’ve been covered in more detail elsewhere. I just wanted to go over a couple of my favourite changes quickly.

Notifications

Pre iOS 5 notifications in iOS were horrible. A big blue screen popped up and stopped you from doing whatever you were doing until you cancelled it or flipped over to that app. Now you just get a non intrusive band at the top of the screen and once it’s gone (after a few seconds) the notification ends up in Notification Center.

Activated by swiping down from the menu bar (where have I seen that before?) it lists all outstanding notifications. As you can see in the screenshot it also shows stocks and weather. I’m not sure why Apple think everyone cares about stocks… especially enough to need it there every time you want to check which apps need your attention. I couldn’t find an obvious way to turn it off in the two days I ran the OS.

 

 

Easy Access Camera
Another feature added that I think many people will appreciate is the ability to start the camera app from the lock screen. This makes is much easier to quickly take a photo or video without having to type in your passcode and open camera.app.

Because you don’t have to type your passcode you can’t see any photos that have already been taken.

You can also now use the volume up button to take pictures (Hooray!).

 

 

 

 

Whilst all of the new things to play with are fun, the software is still very much beta level. Battery life is atrocious. My iPhone 4 died half way through Saturday after fairly light usage. This isn’t really surprising as I’m sure this is the last thing to be optimised. Apps behave rather erratically as well as they haven’t been updated to run on the new OS.

I’m glad I got to have a play. I’ll probably have another go when they release beta 2 but until then I’m happy with 4.3.3.

Apr 272011
 

I used a few hours of this past long weekend to have a play with the recently released program Shairport (original post and Github repository). What the program does is emulate Apple’s Airport Express. As well as being an fairly over priced wireless router and print server, the Airport Express allows you to stream music from iTunes or an iOS device wirelessly to a stereo.

If you have an Airport Express connected to every stereo in your house you can play music to them all at once, in sync, and have a relatively cheap multiroom music system.

As I have a Linux PC connected to my TV and stereo in the living room I thought I’d give it a go. Installing is very easy – you need to download a few Perl modules (perl -MCPAN -e ‘install Module::Name::Here’)

  • HTTP::Request
  • HTTP::Message
  • Crypt::OpenSSL::RSA
  • IO::Socket::INET6

Then just fire up Terminal and type

apt-get install libssl-dev libcrypt-openssl-rsa-perl libao2 libao-dev libio-socket-inet6-perl libwww-perl avahi-utils make perl shairport.pl

Easy! I’d recommend actually looking at the installation doc when you download as the code is changing everyday and the instructions above are probably already out of date. There are also instructions for installing on OS X and Windows.

So does it work? Yes it does… and surprisingly well. I’ve even created a bash script that runs on start up so I don’t lose it after reboot. I can also connect fine after waking up from hibernation so I don;’t have to have the computer running all the time.

Overall, I’m really happy as it has saved me the £90 I was considering spending on an AppleTV (which can also act as an Airport Express for streaming) just for this feature. I already have Boxee and XBMC installed on the PC and all my music on a NAS but iTunes is really my go to application for music. It doesn’t suck nearly as much on a Mac as on Windows and all my playlists and podcasts are in it. I’ll still probably pick up an Express for the bedroom as having to plug a phone or iPod in feels a bit cumbersome.

Lets just hope Apple don’t attempt to change the key and up security so this stops working. Fingers crossed!

Apr 132011
 

After being a Lovefilm member on and off for about 4 years I’ve decided that I’m not really taking full advantage of the service and it’s not really fitting in with my life. It’s a bit sad because it’s actually a really good idea and I’ve managed to watch some films that I probably wouldn’t have without the service.

The problems really started when I bought a Blu Ray player and moved as many of the films in my queue to BR as I could. From my experience it looks like Lovefilm don’t stock as many BRs as they should. Even with 10 or so discs on my list at high priority I would still be sent a random film from my medium priority list. This wouldn’t be so bad but I usually have a lot of crap on medium priority that I added on a whim and have forgotten to take off. In the worse case I had watched the film on TV a few weeks before and forgotten to take it off so was sent a film I had seen. I know this has a lot to do with my disorganisation but when you have 10 films on high priority you expect one of them to be sent.

Another part of the Lovefilm service that I think hasn’t really reached its potential is the Lovefilm Player. Quality is really quite awful on a 42″ 1080p TV and performance on my Atom/ION HTPC is pretty terrible. 1080p YouTube videos play perfectly but the 360pish Lovefilm videos stutter horribly.

To replace Lovefilm (because we can’t do without our movies) we’ve just upgraded our Sky package to HD. We already had the movie package but with an ancient box with a tiny 40GB hard drive. Upgrading to HD means a shiny new HD box with a 320GB  hard drive (120GB reserved for Anytime) which leaves lots of room to keep recorded films. It’s also nice that every film is in HD.

So far we’ve actually managed to record a few films that we’ve had on the Lovefilm list for a while. It’s more of an effort  to catch good films when you have to trawl through pages of TV listings on the Sky website but features like Remote Record make the process a lot easier.

I’m a little sad that I’m giving more money to Sky rather than a nice company like Lovefilm but at the moment I’m just happier with the service.

Mar 082011
 

Shortly after my last post where I was having trouble selling my Macbook Pro I actually managed to find a sane buyer. I had to deliver it which required driving half an hour there and back but I didn’t mind as it gave me the cash needed to put towards the 2011 Macbook. As I’m lucky enough to qualify for higher education discount it only required me put £75 towards the new laptop. Seeing as it’s going to take me around five years to finish this Open University course, I can’t see why I can’t just upgrade each year and have the latest and greatest for next to nothing.

Overall it’s pretty similar to last year’s model. The only cosmetic difference is the Thunderbolt logo taking the place of the display icon next to the mini DisplayPort. (edit. I’ve just realised that it would make sense to mention that Thunderbolt is a new interface with a transfer speed to 10 Gbps.)

 

The real changes are internal. Apple have finally dumped the ageing and positively (by computer standards) ancient Core 2 Duo in favour of Core i5s and i7s. I only picked up the low end 13″ Macbook Pro which is powered by an i5. Accordingly to early benchmarks the low end 13″ is as fast as last year’s top end 17″ in terms of processing. This is all thanks to Intel’s new Sandy Bridge processors that were only released a week or so ago.

As with last year my main complaint is with the GPU. Last year Apple used an Nvidia integrated graphics chip that wasn’t spectacular but it got the job done. Due to the increasingly annoying licensing issues between Nvidia and Intel, this year we don’t even get an Nvidia GPU. We’re stuck with the GPU integrated into the processor. I need to fire up Portal and see how things run but I’m not really expecting much and I wouldn’t even be surprised if graphics performance was worse than last year.

Really that’s all there is to say. Everything from last year’s post still stands as overall the laptop hasn’t really changed very much. The design is still great and the build quality is superb. The multitouch trackpad is still a joy to use and made even better with BetterTouchTool. £75 well spent I’d say!

Mar 022011
 

After Apple released the new Macbook Pros last week I thought I’d see if I could sell my last generation Macbook Pro and pay the difference to upgrade. This turned out to be a lot harder than I originally thought.

I’m fairly happy with my laptop but the fact that the new low end 13″ Macbook Pro is now as fast as the last generation’s high end. I think that’s probably a fair bit more future proof than the 2010′s already a little outdated Core 2 Duo.

Anyway, so I placed an advert on the Milton Keynes Gumtree. After a load of attempted scams and no real offers I decided to post on the London Gumtree and just accept that I might have to jump on a train down there to meet. Even with the extra traffic I still only really got scammers and people offering ridiculously low prices. The few people that actually seemed interested still tried to screw me out of money or kept changing the plan on meeting until I just gave up. I could go with eBay but the commission taken by eBay and Paypal really start to eat into any money you make.

In the end it just ended up being a lot more hassle than I was prepared to put up with. I still might put it up again in a month or so and see if I get any interest. The i5 in the new Macbook sounds a lot more fun than a Core 2 Duo.

So instead upgrading the laptop I just decided to pick up a stupidly fast hard drive to give me my tech fix. I installed my new Seagate Momentus XT yesterday and things seem to be a good amount faster.

Now to spend a few minutes lusting over the new iPad 2…

Feb 012011
 

I’ve been using my Kindle as my primary reading device for over a month now. I got it for Christmas but I was actually using it a couple of weeks before (I’m not very good at the whole surprise thing). I thought that this was enough time for me to form a few opinions on it and know whether ebooks were right for me.

I’ve very much enjoyed using the Kindle for reading novels. I’ve probably bought and read more books over the last month than I have done in the proceeding six or twelve months. There are several reasons for this.

Firstly the screen is amazing. When opening the box it looks like there’s a sticker over the screen telling you to plug the Kindle into a computer or power socket. But it’s not a sticker. It’s the screen. e-ink doesn’t consume any power so leaving it on in transit uses minimal battery power. If you’re apprehensive about replacing paper with an electronic device, you should have a look at the Kindle – you’ll be surprised at the clarity of the screen and how easy it is on the eyes. I’ve read using the Kindle for a few hours in a row and actually find it nicer than paper due to the choice of larger fonts and line spacing.

The second reason for buying more books is just how damn easy it is. As soon as I finish a book I can navigate to the Kindle Store in a few clicks. Browsing is relatively easy and downloading takes a second or two. I’ve made myself a separate Amazon wishlist for Kindle books so I can refer to that if I can’t think what to read next. Overall, it’s an incredibly easy way to buy books – much easier than a book shop or ordering a paper book from a website.

The store is, however, also one of the downsides of the Kindle and ebooks in general. This isn’t Amazon’s fault really but it should be mentioned. The combination of books unavailable in electronic format (on any website), high prices and restrictive DRM do put a slight downer on an otherwise excellent experience.

Certain books haven’t been released electronically and some publishers haven’t signed contracts with Amazon so certain titles are completely absent from any ebook shop. There are also discrepancies between what is available in the US and the UK due to various licensing issues. It’s unavoidable but it’s also detrimental to the customer and the adoption of ebooks.

DRM on the Kindle is an annoyance but not a massive problem. The ebook management software Calibre has a array of plugins for many ebook formats that strip away that pesky DRM. So DRM is a negative but not a deal breaker.

Now we come to price. This is a bit of an issue and has caused a lot of soreness all over the web. There are many books that are priced reasonably. So far I haven’t spent over £5 on a Kindle book and I’m fairly happy to pay that for most non new releases. There are, however, some really awful pricing decisions that are making me, and I’m sure others, shy away from certain books. Ian M. Banks’ Consider Phlebas is £7.99 whereas the paperback is £5.39. If I really enjoy it and want to read the rest of the Culture novels I’m going to have to spend hundred of pounds. Considering the complete lack of distribution, printing and storage cost I expect ebooks to be cheaper than the paper copy. I’d even be happy with parity between ebook and paper copy but paying much more is outrageous and needs to rectified. These prices are set by the publishers so Amazon isn’t really to be blamed. It also doesn’t help that ebooks are subject to VAT whereas paper books aren’t. This is another problem that needs to be sorted out as soon as possible.

This covers the main points I’ve thought about whilst using the Kindle. I’m more than happy with other areas such as build quality and battery life. I’ve charged only twice in over a month and it’s not fallen apart yet so all is good on that front. PDF support is a bit ropey. The A4 documents I’ve tried are unreadable and converting to a Kindle friendly format like .mobi can lead to varied results. It’s not really an issue for me. I don’t read many PDFs but I could imagine it annoying someone that does. This post is getting a little long so I’ll save talking about great services like Instapaper for another time.

Overall I’ve enjoyed reading much more in the past month than I have in years. It’ll be interesting to see if it carries on or dies down in six months or so.