E-Mail on Android with K-9 Mail

I found a new email client called K-9 Mail the other day, following a little Googling – and it’s great.

My HTC Magic came with an email client installed. It ticked all the style boxes, but over the past couple of months I’ve learned that it ticks none of the usability boxes.

It has trouble keeping synchronized with my email accounts.
There’s no easy access to next or previous emails.
There’s no one-touch delete.

So, I had a look around and found a couple of endorsements of K-9 Mail, and I looked it up in the Market.

Compared to the pre-installed client, it’s the mutt’s nuts – a much more pleasant experience – so if you’re struggling with email on Android, give it a whirl.



Feed Troubles

I’ve been having some problems with my feeds, in that the news items were getting truncated after only a few words with […]

I’ve sorted this out today, but either my upgrade or my faffing with the feeds has reset the feed on my reader, so that the posts I’d already read appeared as unread again.

Not sure why that happened, and sorrysorrysorry if it’s caused anyone any inconvenience.


Apache Axis 1.4 NoClassDefFoundError Woes

This one took me a while to figure out.

I’m a beginner with the Apache Axis web services platform on the Apache Tomcat 5.5.x container and I’m using version 1.4, so I was delighted when I found it to be so easy to get into. I used this tutorial – the second page is a step-by-step deployment for a simple service.

All was going well, even when I made updates to the classes behind the service. Redeploying the service behaved perfectly. Until… I deployed an update and everything broke.

I mean everything broke. I couldn’t even list the available services, nor view a WSDL.  Proper broken. Everything. In the Tomcat logs, all I could see was a NoClassDefFoundError (which means that the class you’re trying to use in your code isn’t available to the JVM).

Which made absolutely no sense. All the classes making up the service were clearly present. I had made a change to the internal logic of one of the classes, but nothing that introduced anything outside the classes present in any JRE.

So I reverted to the previous version and everything was fine again. Which was nice, but less than ideal.

So I went back to basics – what had I changed, as that must be the cause of the problem. In fact, I’d made a socket port number configurable… and in the process, I was trying open a connection to a port north of 65535, which would naturally cause an IllegalArgumentException to be thrown, and a large but silent explosion in my code. So I’m an idiot – I still deserve a half-decent exception. It was only a prototype anyway…

Anyway, having spotted that, I fixed the problem, redeployed and everything was peachy.

The moral of the story… if you’re getting a problem that looks like this, it might just be that your code isn’t able to start up properly – which is very much hidden by a NoClassDefFoundError.

I guess you get this kind of error because Axis relies on reflection for a lot of its magic, but I didn’t find it particularly helpful, and the zillion-call-deep stacktrace didn’t help much either. I still don’t know where the real root cause exception got squirrelled away to, if anywhere.

That said, I’m liking Axis in the main, so I’ll be persevering – as well and trying out other platforms for this brand of magic.

Unsheffield 2009 Briefing…

unsheffield 2009

I’m volunteering live blogging and photography services at unsheffield 2009, an ‘unconference’ themed Future Users of Cool Technology over the coming weekend.

Unfortunately, the briefing tonight didn’t finish until late, and I’ve been downloading and editing my photos under Linux for the first time – which explains the late hour, and my heavy eyelids. There’ll be more to come…

There’ll be plenty of blogging going on from the event, and my half decent photos from tonight are on my flickr page if anyone wants to have a look.

If you’re coming to unsheffield, I’ll probably see you there! If not, there will be loads of news and info on the site as the event progresses.


Faster Java – Strings

If you’re building a long String in Java, don’t stick String objects together using ‘+’, for example:

String str = "Hello";
str = str + world;
str = str + "!";

Why not?

It’s really slow when you do it a lot!

What should you do instead?

Use the append(String) method in StringBuffer (Java 1.4.2 on), or StringBuilder (Java 5 on). StringBuilder is slightly faster than StringBuffer, but is not thread safe. Both are much faster than concatenating String objects – by orders of magnitude. For example:

StringBuffer str = new StringBuffer("Hello");

Continue reading “Faster Java – Strings”

Semantic Web@Geekup Sheffield

For anyone curious about this Semantic Web thing, you could check out Ian Ibbo’s introductory slideshow…

It’s the first part of series he’s doing at the Sheffield Geekups over the next few months, so there’s more if your appetite is whetted. There were rave reviews from the introductory talk…Next one will be at Sheffield’s Showroom cinema on the first Wednesday of February.Cheers!

BarCamp Sheffield 2.1

For anyone out there who feels like a little social hacking and can get there, Sheffield BarCamp 2.1 is coming up.

Hosted at Sheffield’s Showroom Cinema 28th -30th November 2008, it’s ‘A melting pot of community, conversation and technology’. I’m expecting presentations, hacking sessions and more than a little eating, drinking and entertainment. I reckon the attendee list looks pretty respectable (except for me, of course) so might be well worth checking it out.

There’s a load of info, and an opportunity to have a say on the content here.

Hope to see you there!

Give Me Just A Little More Time…

Time is short at the moment. I’m working through the maths I need to start my first MSc module on 12th November and I’m already suffering from a chronic lack of time, although that’s largely because I’m working like crazy to wrap up as much stuff as I can before the course actually starts. Continue reading “Give Me Just A Little More Time…”