Astrid – Task Manager for Android

I’ve been using Astrid, a nice little free app on the Market that lets you set up tasks with deadlines and then notifies you when they’re due. I mentioned it on my HTC Magic review, but a few weeks on and I’m still using it. In fact, I’m really starting to appreciate it.

It’s a pretty simple idea that I’ve tried before using other platforms (desktop, Symbian phones) without much success. It’s working much better for me on my Magic, which I put down to the functionality beating other phones I’ve owned and the portability beating the desktop apps.

The keyboard and simple setup of tasks and repeats means that it’s really no problem for me to pop stuff I need to remember into there as-and-when I think of it. If it goes in the phone, I remember it. Simple. Just…got…to…be…disciplined…

It syncs up with rememberthemilk.com so you don’t lose all your stuff if you lose your phone, and you can get to your stuff from the web.

In use it’s transparent until it needs to tell me something, at which point I get a buzz and a little notification appearing in the notifications bar. Drag it down and I can see the tasks I need to do. Once there’s a few tasks in there, that notifications window fills up quick if you don’t stay on top of things – although that does kind of compel me either not to put things off, or to think about how long I’m putting something off for.

From a notification, you can open the task and complete it, snooze it or edit it. If you complete it and it’s due to repeat, it gets notified when it is next due.

Irritations: there isn’t a button to complete a task straight from the notification – which is what I do most often. It can also be a little slow, but that criticism could be levelled at most apps depending on how busy the phone is, so it’s probably not actually to do with Astrid. More annoying is the delay whilst it syncs up with rememberthemilk – it makes you wait, instead of just doing it in the background.

That said though, overall it’s a big plus. It’s a nice feeling to drop a task in there and know that you’ll get reminded when it’s due. It’s a really nice feeling when you get reminded of some silly little thing that there’s no way you would have remembered otherwise!

When a minus times a minus equals a plus

We all know from school that multiplying two negative numbers together gives a positive number, but can you think of a common-sense example of this rule in action that would convince someone who asked why?

I got asked why recently and I couldn’t.

Neither could anyone I asked. Plenty of examples involving mirrors and vectors etc. but nothing that didn’t sound rather like illusion and trickery. Nothing convincing.

So – after some thought, here’s an example that convinced the person who asked me. (Well, they say they’re convinced-ish, but I think that’s about as good as it’s going to get!)

This example is about getting two everyday, dependent variables that we can set a zero point on both and thus deal with the positive and negative values in both. Imagine I have a big bucket of sweets, and I have been giving you ten sweets a month for years.

How many more or less sweets do you have, six months from now?

Intuitively, you have 60 more sweets, and we can calculate that because you get +10 sweets/month and we want to know how many you have in 6 months;

10 x 6 = 60. (plus x plus = plus)

How about me? How many more or less sweets do I have, six months from now?

We know that I have 60 sweets less, because you have 60 sweets more. We can calculate this because I get -10 sweets/month;

-10 x 6 = -60. (minus x plus = minus)

That’s the easy ones done.

How many more or less sweets did you have, six months ago?

It should be easy to convince that if you have 60 sweets more in six months’ time, then you had 60 sweets less six months ago. We can calculate it using the same 10 sweets/month, but -6 months to go back in time.

10 x -6 = -60 (plus x minus = minus)

Finally, how many more or less sweets did I have, 6 months ago?

I still get -10 sweetsmonth. Just because we’re considering the past, you don’t start giving them to me or anything. In the case above, we used -6 to represent ‘six months ago’. So…

-10 x -6 = +60 (minus x minus = plus)

Which gives us the intuitively correct answer, that if I give you 10 sweets a month then I had 60 more sweets, six months ago.

It’s a tough one to argue with, because the answers are pretty obvious. Do you have a better way to explain why minus times minus equals a plus?

Eigenvalues and Eigenvectors

Yeah, exactly. Eigen-whats?

Welcome to the primer material for the Machine Learning module. It  looks pretty mathsy, specifically Linear Algebra (think matrix algebra and Eigen-dooflabs), Differentiation and Integration and some probability and information theory.

Yeah, it looks tough. But I’m intrigued, too. Studying the material, I can’t wait to find out how these things actually apply to machine learning. Something inside my head that romantically pursues elegance in this stuff is thinking of some analogy of resonance and harmonics – but applied to learning algorithms. Probably way off base, but hey. Soon I will be highly learned in these things.

The tutors actually have a dedicated website for the course here, which is where all the primer material, previous years’ notes and past exam papers can be found. It looks like a great resource for prospective sudents like myself, so hats off to the tutors on this one.

The Joy of Podcasts

Since I won an Apple iPod thing in a raffle last year, I’ve discovered the joy of podcasts.

It’s not the jump-up-and-down-singing kind of joy you might get if you thought you were out of beer and then found an ice-cold bottle of amber nectar behind a melon at the back of the fridge, but it’s not bad for free.

It’s good enough that these days I forgoe the tram in favour of enjoying a 50-minute walk to and then from work (much to my better half’s bewilderment at the apparent insanity of it) so that I can catch up with my listening.

Sharing what I listen to and why I like it’ll make good blog fodder, I figured – and make me have a look around and what’s new and out there that I’ve missed so far. Rather than write a loooong post on all the podcasts I listen to, I’m just going to give a quick review of the one that is probably the one I look forward to most right now, and follow up with others later.

So my pick of the day is… drum roll…

PRI’s The World: Technology

The WebsiteThe Feed

Clark Boyd produces a compelling weekly show clocking in around the 30-minute mark each week.

What’s Good

Mix leaning towards technology, but with regular diversions into other relevant subjects – last year there was a great story about the challenges in delivering AIDS drugs to where they’re needed in Africa.

The technology stories often consider political and social implications, making this a more rounded podcast than most I listen to.

Always great sound quality and clean production.

There are regular features, and Clark’s delivery reminds of a good radio show.

What’s Not So Good

Can’t fault it. Definitely one of my favourites.

Getting ready for 2009-10

According to Manchester’s online timetables, my MSc course starts again in the week commencing 28 September.

This year, I’m much better organised. There’s no messing about with my University application, I know where the online resources are, I’ve done the journey a dozen times now and I have a much better idea of what I’m up against.

I’m hoping to be heading over to Manchester on the 23rd and 24th September to attend the last couple of days of Induction Week. This is when the lecturers running the MSc courses present on their courses and when I need to decide what I’m going to study this year.

Right now, I’m looking seriously at:

Machine Learning

Patterns for e-Business Applications

Building Web Applications

I’m looking forward to getting started and this time round I’ve been saving up my holidays at work so that I can take a couple of weeks off whilst I get into Induction Week and the first module of the year.

I’ll show my age and quote Whitesnake – “Here I go again”

Getting Started with Web Services

You may not know this, but all you need to get started using web services is a web browser. You might have never heard of web services, or assumed it’s too complicated, or maybe you tried it before but had a painful experience – it’s always possible for poor design or implementation to make simple things difficult.

Well, consuming half-decent web services isn’t necessarily difficult. Bear with me for the next 30 seconds of your life and I’ll show you some examples of easy, useful web services APIs.

It’s also probably worth noting that different browsers can behave differently, and I’ve done this stuff in Firefox 3. If the links below don’t work, copy-pasting the link into your browser address bar and hitting return should do the trick.

The Google Maps API

You can use the Google Maps API to turn a postcode into a latitude and longitude. Try it with this link.

http://maps.google.com/maps/geo?q=S51AB+uk&output=csv

Output in your browser:

200,5,53.4332097,-1.4436139

The first and second numbers are related to the query, the second two are the latitude and longitude of the UK postcode ‘S5 1AB’. You can change the postcode and country in your browser address bar – hit return to submit the new address details.

It’s a neat example, because it’s a very simple query and response.

Yahoo Finance

Now, let’s check the stock portfolio.

http://quote.yahoo.com/d/quotes.csv?s=MSFT&f=sl

The output of this one comes back as a Comma Separated Values document, same as the Google Maps example, but it is set up to save the values into a file instead of displaying it on your browser. If you open the file:

"MSFT",23.692,"8/14/2009","4:00pm",+0.072,23.62,23.80,23.51,46331960

So the stock price for Microsoft Corporation was 23.692 at Friday’s close.

Twitter

Next up, twitter. If you’ve never heard of twitter, welcome to Earth. Let’s grab my public timeline.

http://twitter.com/statuses/user_timeline/brabster.xml

The output this time is a little more funky – because what we’ve just requested is much more complex than just a latitude and longitude. You’ll get an XML document back, which is a machine-friendly way of storing complex data. Not so nice for people to look at though, but hey.



  Tue Sep 01 19:07:07 +0000 2009
  3694475261
  @cazm: hate that - if I don't know how come something's fixed I worry about when it's gonna break next!
  <a href="http://sourceforge.net/projects/twitux" rel="nofollow">twitux</a>

  false

  ...

Summary

Mixing and matching the functionality this stuff exposes creates mashups.

Whilst a browser provides a really easy way for us to explore these services, the trick is that it’s easy to write software that invokes services like these and then uses the information in the response, in fact in many languages invoking a service like those above and capturing the response can be done in a single short line of code.

Often, traditional websites that produce nicely human-readable, formatted pages like this one are actually working with APIs like those above behind the scenes.

There’s a whole world of web services APIs out there to play with, for free – and more are coming along all the time.

(Note – these examples will almost certainly break, given enough time, as the services evolve. If you try one and it doesn’t work, please leave me a comment and I’ll get it fixed.)

Using Dropbox for Syncing Computers

I tried Dropbox when I was doing my first MSc module.

As the course involved writing code and documents, I would work during the day when I was onsite on my laptop, then switch to my desktop to continue working for the week.

Naturally, I would forget to copy something to my laptop ready for the following week, so I tried Google Docs and blogged about it here. Pretty good – just a little clunky and not quite up to the job with the maths symbolic stuff I needed to use.

In a comment to that post, Luke Maciak suggested Dropbox. (Incidentally, I can recommend his blog for entertaining reading too)

Using it, I get an online repository where I can put files, and I can download client software for my (Windows when I was running Windows) and Linux machines.

The client software gives me a ‘Dropbox’ folder. Placing any files in there synchronizes them with the online repository. Any files I’ve added or updated on other machines are synchronized down from the repository, and I can get to and share my files via the Dropbox website as well.

The main difference for me is that Dropbox is completely transparent. It’s just files in that folder. No messing.

So far*, it just works – in fact, I’ve started using to to share some of my Ubuntu desktop configuration. Everything behaves exactly as I expect it to, and there’s been no nasty surprises, so I’d tentatively recommend it if you have multiple computers that you want to keep files in sync across.

You get the first 2GB of space free. If you’re interested in giving it a go, you can get Dropbox here.

*of course, tomorrow it will probably break. That’s computers for you. I’d suggest taking your own, separate backups of that ol’ Dropbox folder now and again, just in case.

When Disabling DNS Caching Doesn’t

If you’re going to fiddle with networkaddress.cache.ttl, do it before you touch the network.

I was using the java.net.InetAddress class to resolve IP addresses from DNS names the other day.

I wanted to test my code by manipulating my local system’s ‘hosts’ file, to quickly simulate moving IP addresses around behind a DNS name, so I also set disabled caching the resolved addresses from one call to the next by programmatically setting the networkaddress.cache.ttl Security property to ‘0’. According to the javadocs,

The value [assigned to networkaddress.cache.ttl] is specified as as integer to indicate the number of seconds to cache the successful lookup.

which is true, and everything was peachy – my hosts file changes were immediately picked up.

At first.

I continued to build my code and all of a sudden, the caching came back and the changes I was making in my hosts file were ignored.

By backtracking my changes, I worked out that the breaking change happened when I executed a network call which involved name resolution BEFORE I disabled the cache.

I moved the setting of the property to happen before I touched the network et voila – everything peachy again.

This (feature|problem|bug) is documented in a couple of places when you know what you’re looking for, like here.

And here’s a simple code demo of it in action:

public static void main(String[] args) throws Exception {
  String name = "google.com";

  //lookup(name);

  Security.setProperty("networkaddress.cache.ttl", "0");
  while (true) {
    lookup("google.com");
    Thread.sleep(1000);
  }

  public static void lookup(String name) throws Exception {
    System.out.println(name + ":" + InetAddress.getByName(name).getHostAddress());
  }
}

Running the sample above as-is:
google.com:74.125.127.100
google.com:74.125.67.100
google.com:74.125.127.100
google.com:74.125.67.100
google.com:74.125.127.100

But uncomment the first call to lookup(), and
google.com:74.125.45.100
google.com:74.125.45.100
google.com:74.125.45.100
google.com:74.125.45.100
google.com:74.125.45.100

Cheers,

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.

Yuk.
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.

Cheers,

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.

Sorry!