Setting up Kindlefire HDX for Development under Ubuntu 12.04

amazon_kindle_fire_hdx1

I wanted to get a Kindlefire HDX running under Ubuntu 12.04 with adb.

First I needed to setup the udev rules:

1. Edit /etc/udev/rules.d/51-android.rules as root, and add the following line (create this file if it does not exist):

SUBSYSTEM=="usb", ATTRS{idVendor}=="1949", MODE="0666"

2. Change the permission of this file by executing the following command as root:

chmod a+r /etc/udev/rules.d/51-android.rules

3. Reload the rules by executing the following command as root:

udevadm control --reload-rules

4. Run these commands to restart adb:

adb kill-server
adb start-server

5. Now when I run

lsusb

I can see the device listed.

6. Next I needed to enable adb access on the Kindlefire HDX device itself by going to Settings -> Device -> Enable ADB.

7. Finally I could run:

adb devices

within Ubuntu and have it recognise the Kindlefire HDX.

My Aeron Chair

A good ergonomic chair is a wise investment if you’re going to spend a lot of time at your computer. One of the better known ergonomic models is the Herman Miller Aeron Task Chair.

Picture of Aeron Chair

What Other People Say About the Aeron

Jeff Atwood (from Coding Horror) says:

In fact, after browsing chairs for the last few years of my career, I’ve come to one conclusion: you can’t expect to get a decent chair for less than $500. If you are spending less than that on seating – unless you are getting the deal of the century on dot-bomb bankruptcy auctions – you’re probably making a mistake.

I still believe this to be true, and I urge any programmers reading this to seriously consider the value of what you’re sitting in while you’re on the job. In our profession, seating matters:

Chairs are a primary part of the programming experience. Eight hours a day, every day, for the rest of your working life – you’re sitting in one. Like it or not, whatever you’re sitting in has a measurable impact on your work experience.

Cheap chairs suck. Maybe I’ve become spoiled, but I have yet to sit in a single good, cheap chair. In my experience, the difference between the really great chairs and the cheap stuff is enormous. A quality chair is so comfortable and accommodating it effortlessly melts into the background, so you can focus on your work. A cheesy, cheap chair constantly reminds you how many hours of work you have left.

Chairs last. As I write this, I’m still sitting my original Aeron chair, which I purchased in 1998. I can’t think of any other piece of equipment I use in my job that has lasted me ten full years and beyond. While the initial sticker shock of a quality chair may turn you off, try to mentally amortize that cost across the next ten years or more.

Joel Spolsky (from Joel On Software) says:

Let me, for a moment, talk about the famous Aeron chair, made by Herman Miller. They cost about $900. This is about $800 more than a cheap office chair from OfficeDepot or Staples.

They are much more comfortable than cheap chairs. If you get the right size and adjust it properly, most people can sit in them all day long without feeling uncomfortable. The back and seat are made out of a kind of mesh that lets air flow so you don’t get sweaty. The ergonomics, especially of the newer models with lumbar support, are excellent.

They last longer than cheap chairs. We’ve been in business for six years and every Aeron is literally in mint condition: I challenge anyone to see the difference between the chairs we bought in 2000 and the chairs we bought three months ago. They easily last for ten years. The cheap chairs literally start falling apart after a matter of months. You’ll need at least four $100 chairs to last as long as an Aeron.

There was a post with a large set of comments on Hacker News about chairs and cheap alternatives to Aeron Chairs, with a lot of people saying that there is no cheap alternative to a good chair.

What I Say About the Aeron

I just got a refurbished Aeron chair for Christmas. I am really pleased with it. It comes in three base sizes, being larger than normal I went for the Size C. Once it arrived it was a good fit, but it was easily configurable to make it into an excellent fit. I prefer my chair not to recline, so I can’t comment on whether it is not a good chair for reclining, as Jeff Atwood says, but I will say it felt comfortable and stable reclining.

The real benefit so far has been on my posture; I did not know how much back pain I was having before with my really cheap office chair. Only when I got up from a 4 hour session on my Aeron chair did I notice how much better my back was feeling. It moulds your back into a good position, and I have noticed my back clicking and popping into its proper shape, after using the chair for a couple of days.

I ordered my chair from simplyaeron.co.uk, who I am very happy with, as they provided an MK2 Size C chair with lumbar support for less than £400, which is an absolute bargain compared to the retail price of a new chair. This also included delivery! It seems like new – there are no scuff marks and everything works perfectly.

I highly recommend getting an Aeron chair or an equivalent ergonomic chair recommended in the above resources, as I have really noticed a significant difference.

2013 Career Retrospective

This year has been quite a busy and eventful one for me.

Connected Red Button
At the start of the year, I was working on the Connected Red Button team within the BBC. Connected Red Button is a major ongoing project in the Television and Mobile Platforms department at BBC North. Its aim is to replace the classic Red Button text service (which itself is the successor to Ceefax) with a new updated all-singing all-dancing interactive portal to internet content, available on Smart TVs and modern set top boxes. Currently Connected Red Button is live and accessible by pressing the Red Button on the new Virgin Media TiVo boxes. You can access the latest version of iPlayer, and the BBC News and BBC Sport smart TV apps from within one easy portal.

On CRB, I was working on the Java/Spring services layer, which connects to the various APIs of services like iPlayer that we have at the BBC, and gets all the content ready for the frontend. This data then gets passed to the very nice looking AS2 frontend to display, and that’s how it appears on your TV that is connected to your Virgin TiVo box in your living room.

The next version of CRB is being developed for Smart TVs with HTML browsers (so the frontend is in HTML5/JS instead of AS2). This type of Smart TV includes most of the new smart TVs that have come out recently, and will continue to be released in the future. The BBC (and the wider industry) is really anticipating that most TVs will be smart TVs in 5-10 years, and so the reach of Connected Red Button HTML will increase substantially so that most of the audience can be served by new applications that run on smart TVs.

Smartbridge

Smartbridge is the transitional frontend that is displayed to both 1) users that have smart TVs and internet connected STB (Set Top Boxes) capable of running our latest BBC applications such as Connected Red Button and the latest versions of iPlayer, and also 2) our traditional users that still have normal (un-smart) TVs that can only receive Broadcast Red Button (the service you get by pressing the red button on any BBC channel). Smartbridge is not a branded BBC product, it is the behind the scenes magic that helps ensure that we maintain the availability of traditional Red Button services as we simultaneously launch and develop Connected Red Button.

For several months this year I was working on Smarbridge. On Smartbridge, I was working to get the project released and out the door, which meant Java/Spring/Hibernate work, with MySQL database tinkering and some broadcast work configuring and testing the TVs that worked with Smartbridge. It was successfully released in October.

Device Hive

Device Hive is the working name for an BBC system that is an Android and iOS emulator and physical device testing platform. A server will run the Device Hive software, and mobile developers will be able to plug in their Android mobile or tablet or iPhone or iPad to the server via a USB cable, and choose an application to run on it, such as BBC iPlayer or BBC Radio Player. This application will then automatically be downloaded onto the device, and the automated Cucumber/Calabash test suite will be executed, which will step through every screen of the mobile application, triggering buttons, scrolling up and down and generally exercising every aspect of the mobile application. There will also be an option to run install and run applications on Android or iOS emulators, so we could have 10 emulators running at once, each running different segments of the automated test suite, and uploading the test results to a logging server.

Device Hive will mean, in particular, that we can test BBC mobile applications on the plethora of Android devices available, every make and model that we own of the different OS/hardware combinations can be plugged into a device hive server, and so we can see test runs for BBC iPlayer Android across all the different variations. This will mean we can help target a wider range of Android devices for new BBC iPlayer features, which will help ease the anger that some of our audience members feel because their specific Android iPlayer experience is not as good as the later models.

In October I moved departments from Television and Mobile Platforms to POD Test, and joined the new Device Hive team as lead developer. I am working in Ruby/Rails/Rspec/Cucumber and using Ubuntu Linux VMs and lots of Android and iOS devices to build up the system.

University Engagement

I have been continuing to work with Manchester University’s Ultimate Programming Society to organise and present talks to the students about working practices in software development that the BBC use. We have covered Behaviour Driven Development, Test Driven Development, Editors and IDEs and Agile Development Practices so far.

Generally I feel that I have worked on some pretty challenging projects this year, and I am very happy with being the lead developer on Device Hive, and look forward to making this project as useful and as powerful as I think it can be.

Android Debug Bridge failing to detect emulators under OSX

Android

I’ve been working on a project at the BBC where we are using the Android command-line tools from the Android Developer Tools, to spin up and terminate series of emulators. I noticed a big problem under OSX where ‘adb devices’ was failing to register emulators occasionally when we started them up, without any error message, even though they were loaded and quite clearly running in a window on OSX. This was a real problem for our project because we needed absolute parity between emulator process being launched and subsequently being detected by adb.

We switched to using adb with emulators in an Ubuntu 12.04 VM running under OSX, and we had no further problems with our setup. Emulators will now be programatically launched and torn down by our monitoring application. We now have an array of emulators which we can deploy to at will, which is very useful.

I don’t know what has caused this problem, my only hunch is that the Android toolkit was probably developed in a very Linux-heavy environment, and so adb on Linux was probably their first testing platform. All I can say is that Linux is much more stable than OSX, even as a VM, for Android emulation.

The Haiku Machine

550px-Write-a-Haiku-Poem-Intro

I found this awesome cut-up poetry generator, which takes the text of famous poets and builds structured poetry out of it. The guy that made it even developed the underlying algorithm as a research project. I have put a version of a free Amazon EC2 instance, wrote a little twitter bot in node.js, and wired the poetry generator with the twitter bot, and now I have this: https://twitter.com/haikumachine – a twitter bot that posts a haiku every five minutes, derived from Dylan Thomas’s poetry.

It could be improved, and there are sometimes erroneous tweets where the syllables aren’t counted quite right, or some of the punctuation doesn’t make sense once cut up, but damnit, it’s a bot that writes Haikus.

Go to top