Firefox Offline broken

For some time now it seems that Firefox offline mode is broken or borked in some way.

I notice this on the train when I need to refer to Android documentation. Documentation can be downloaded as part of the Android developer kit. This used to work just fine in Firefox on my netbook when offline. Recently though, perhaps two releases of Firefox ago, it utterly fails.

Firefox displays nothing other than a blank white page whilst trying to connect to google.com or googleapis.com. Yesterday/today it has been particularly frustrating as I’ve been trying to work on stuff that I’ve not done before. Documentation was essential.

A search of the internet suggests that it might be add-on related. Some suggest restarting Firefox in safe mode. Disabling add-ons, safe mode make no difference. It is core Firefox that is at fault.

I have now installed Epiphany. It can open the local files, though the search function doesn’t seem to work. Better than nothing.

It looks like Mozilla broke something in Firefox 27?

Handy Layouts

When developing Android applications the interface layout is usually defined in XML files. Commonly the file main.xml is the definition for the first interface that the application presents to the user.

Android also allows for different layouts to be defined in XML files in different folders. The names of the folders define when the layout should be used. So, for instance, the layout-land folder holds the layouts for the application when running on a device in landscape mode. This method allows design and function to be neatly separated.

It occurred to me on the train this evening, whilst working on an app, that it might be handy to have folders for left and right handedness. This would allow for asymmetric designs, especially in portrait mode, where the device – typically a phone – is being held in one hand. So if an application has multiple buttons on the display for instance, then the more important buttons could be sized/positioned to make them easier to reach.

I don’t know if this already exists, but I wanted to get it out there so that there is prior art, hopefully preventing the likes of Apple, Microsoft and RIM from claiming it as a novel invention and patenting it.

Snapshot

Back in July I stumbled across some photos of jewellery on Facebook. They were, I’m afraid, not terribly good. I sent a message to the group that had posted them and offered to go and take some better ones, free of charge.

I was pleased that they didn’t take my criticism the wrong way and I ended up falling into a conversation with them. I never got to take photos for them; those taking part in the jewellery class took their items home. We did though talk about the possibility of my running a photography class for them.

Skip forward three months and that is now going to happen!

The sessions will be on Tuesday evenings, 7pm to 9pm, from 26 November to 17 December, at Cup Cakes Coffee House in Sowerby Bridge. There is a £25 one off charge for those wishing to take part. Call 07762 884 135 if you’re interested. They are being run by the Phoenix Heights Community Group. They have a website, Facebook page and Twitter account.

Speed

One of Imogen’s friends, who is also doing photography in sixth form, posted that she is saving for a camera. Specifically a Canon 5D. In keeping with the tradition of Canon/Nikon rivalry I considered posted that auto correct had changed ‘Nikon xxx’ to ‘Canon 5D’.

I set about researching equivalent models in the Nikon range. The nearest I found is the D800. The criteria I used to judge ‘similar’ were sensor size and price. But the more I read, the more I think that at this price point, Canon has the better camera.

The Nikon is cheaper and has a higher resolution (36Mp) sensor, so surely it’s the better camera? Well, maybe for some uses, but I feel it fails in two respects, both a direct result of going for a high pixel density.

Because the sensor elements are smaller they are less sensitive. The ISO equivalent range is therefore shorter than the Canon and at the high end noise becomes an issue. Second, because there are more pixels, the processing engine has to work with more data. This reduces the frame rate to 4 frames per second.

I then did some reading around the current Nikon DSLR range. I have a D300, the current incarnation of which is the D300S. It’s the only DX model (ACP size sensor) that Nikon have in their “professional” range. Professional seems to equate to similar electronics to the base FX model, but with a smaller sensor.

I continue to be very pleased with this camera. It’s capable of 6 frames per second, 8 with the external battery pack. Reading through the technical specifications of the current range the only camera that I’d consider replacing it with is the D4. This is unlikely to happen any time soon as it’s Nikon’s flagship model and costs around £4,300!

Android Timer Fault

Android Jelly Bean suffers a weird problem when setting a timer that is not on a ten minute interval.

I first noticed it when setting a timer for frozen pizza. They take 12 minutes, but I found that the alarm didn’t sound until much later. With some experimentation it seems that asking for a timer to be set over 10 minutes, but not at a ten minute interval, breaks things. It adds 90 minutes to the time.

Timer fault on Android

Illustration of Android timer fault

In this example I said “set a timer for 12 minutes”. As you can see from the time in the top right corner it was just after 10pm. The timer should have been set for 10.14pm but has been set for 11.44pm. If a request is made to “set a timer for 20 minutes” it seems to work.

I see this fault on both my phone (HTC One S running 4.1.1) and my Nexus 7 (4.2.2).

This issue seems to be fixed by recent updates.

Laptops and Linux

I’m looking for a laptop and it’s proving very difficult! This will be my main machine, used for programming and general web stuff. It must run Linux, preferably Fedora. This is what I’m after:

  • 14 or 15 inch display with better than 1366 by 768 resolution
  • Graphics card that is supported under Linux. Needs to be good enough to run Gnome 3 but it won’t be used for games, so integrated graphics are fine
  • DVD re-writer, not bothered about Blu-Ray
  • 256Gb SSD drive (128Gb would do)
  • Intel Core i5 or better
  • Decent battery life
  • Backlit keyboard
  • USB 3 port(s)

I’m working up a table of manufacturers/models which I’ll publish here soon. In the mean time, any pointers would be very welcome. Thanks!

Update 1: Dell Latitude are looking like the favourite at the moment. Only missing USB 3.

Update 2: After much deliberation I have gone for a Dell Vostro 3550. The other factor that I didn’t include above is now much I’m willing to pay for a laptop. The Latitude looks great, but at nearly £1,500 it’s way too expensive. (It also doesn’t have USB 3 ports.) The Vostro doesn’t match on a few of the requirements; resolution is 1366 by 768 and the hard drive is a 320Gb SATA, though spinning at 7,200 RPM. Given that my current laptop is an Asus A6000 the new machine should be a joy to use!

Libraries, bookshops and e-readers

Recently I nipped out of the office at lunchtime to get some air. I called into WHSmith, not for any particular reason, just to browse I suppose, and saw the book to the right: The Most Human Human

The cover is delightful, the title intriguing; I picked it up and began to read. It was fascinating! I wanted it. Whilst Amazon do their best to feed me adverts for stuff I might want, bookshops offer the opportunity to easily discover books quite by accident. However, I have found that WHSmith always have higher prices than any other shop. I checked Amazon, found it on Kindle and within minutes had it on my phone at half the price.

I have also been visiting the library every week recently to get books for Wendy (my partner). She broke her ankle and was in plaster. She reads crime novels, lots of crime novels, more so whilst she was off sick. These events lead me to consider libraries, bookshops and e-readers.

I’m opposed to Kindle for a number of reasons:

  • Kindle uses a DRM format
  • Users can’t easily share or pass on content
  • The format doesn’t allow for easy navigation
  • You can’t borrow Kindle books from the library

The first of two of these are obvious, the third and forth perhaps less so. I find that because an e-book has no physical form it’s not so easy to comprehend where I am in the book. With a physical book "about half way" has a meaning, it feels like half-way. It’s also fast and easy to flip between pages, useful when reading technical matter. Page numbers are also rather meaningless. For example, a quick check of the book I’m currently reading (Bravo Two Zero) gives my position as 847 of 7340. Is that 7,340 pages? If I had a Kindle, with it’s larger display, would I have fewer pages? It doesn’t make sense.

The restrictions make it difficult to borrow books from a library, but not impossible. But it’s not how Amazon anticipate users will use the books. They want users to buy the book, even if they only read it once. This is how Wendy reads crime novels; once. I keep a list of books that I have borrowed for her, to avoid duplicates. If she had purchased these on Kindle, at an estimate of £5 each, it would have cost her over £100. That’s a lot of money for books that she won’t read again and can’t pass on to friends/charity shops.

On the other hand though I find Kindle (on my phone) useful:

  • I always have a book to hand if I’m bored
  • I can carry many books and I don’t even realise it
  • I can read at night in the dark
  • If I see a book I like I can get it immediately at a reasonable price

So as you can see, I’m torn. What are your thoughts about e-books?

Android Testing

The Art of Agile Development, by James Shore and Shane Warden is an excellent book. I recently read it and found it inspiring. Whilst many of the practices don’t work for a lone developer, test driven development seems like it will.

So now I’m trying to set up unit testing for when I’m developing Android appications. However, I found the guidance on the Android developer website unclear. Having spent some time getting frustrated at my apparent inability to follow simple instructions I made it past the first step. I share that first step in the hope that I can help others.

The developer notes give examples using relative paths. I found that this didn’t work. Here is the relevant folder structure for my application, which is called Aoide.

~\
  Android\
          aoide\
                AndroidManifest.xml
                build.properties
                build.xml
                default.properties
                local.properties
                proguard.cfg
                bin\
                gen\
                libs\
                res\
                src\

The Testing Fundamentals page shows that I want to create a tests folder in the aoide folder. I found this command, run from the Android directory, worked for me:

tools/android create test-project -m ~/Android/aoide \
    -n AoideTest -p ~/Android/aoide/tests

Now to figure unit tests…

Internet Explorer #fail #hate

I was asked if I could create a page on the intranet that had navigation something like this:

Page navigation with heading left and two rows of four buttons

This is the Firefox rendered version, I don’t have the original Word document. The requested design had top right corners clipped, but Sharepoint messes with CSS. I created it with HTML/CSS as a list, so that it would degrade nicely. I just sat there, design on one display editing on the other. After a while you understand the language. You know what to alter in the code to make it look right. A few iterations and I was happy with it, so I published it.

Now, I’m lucky enough to be allowed to use Firefox in the office. Everyone else uses Internet Explorer. I have IE8 installed on my machine. I didn’t test it in IE (yeah, I know!) I just assumed that it would look ok.

I rang the requester. They weren’t happy with the result:

broken rendering in Internet Explorer

Well, I can see why! So I checked it in Chrome:

Page navigation rendered by Chrome, heading top left, two rows of four buttons

Chrome and Firefox agree on what it should look like.

And this is why I hate Internet Explorer! It takes my thoughts, my translation of them into HTML/CSS, and completely mangles them! It’s not the first time I’ve seen this either. Previously I have had minutes render as I invisaged in Firefox, Opera, Safari and Chrome but fail in IE.

Gingerbread [part 2]

A follow up to my last past.

Don’t Bother!

If you have an HTC Desire and you’re considering installing the developer update then don’t bother. HTC still include lots of crap that you don’t want and hide/replace the Google goodness that you do want.

I have been asked about battery life. It might be a little better, I have no hard figures, but after a few weeks of general use I have to say that I am underwhelmed. WiFi notification is annoying, but probably a result of improvements to aid power conservation. I got to the point where I tried to root the phone so I could clear stuff off it. I can’t do this now as the software is too new.

I have also noticed that synchronisation fails when storage falls below the threshold; 15MB on the Desire. Is this and Gingerbread feature?

Apps

It would also be really good is developers made their applications installable to the SD card. None of the Twitter clients that I’ve tried (Tweetdeck, Seesmic, Twitter) will do this. Google+ won’t either, and at 8MB it’s pretty big. I know that there are limiting factors. Applications that run as a service, for example, must be installed on the phone. But I also believe that this is easy to work around, perhaps by spliting the application into two parts. (The Ebay application provides notifications but can be moved to the SD card.)