Its slime mould, Jim !

Well I had any number of “useful” suggestions as to what the heck is growing on my lawn including: star jelly, my growing clone (on my front lawn??) and to “dry it, smoke it and if nothing happens send an email to MAf biosecurity”.

I decided to take up the last suggestion (the emailing part, not the drying and smoking part) and I received this slightly comforting reply:

Yes it is a type of fungus called a slime mould. It will disappear in a few days. They grow in very moist conditions. They are not harmful and not uncommon.<br /> Regards Olwyn Green<br /> Entomology Lab.<br /> MAF Biosecurity NZ

Not sure why the Entomology lab has anything to do with fungus but hey I now know what the blobs are.

Turns out slime molds are rather interesting things:

They are a biological and taxonomic enigma because they are neither typical fungi nor typical protozoa. During one of their growth stages, they are protozoa-like because they lack cell walls, have amoeboid movement (WTF?), and ingest particulate nutrients. During their propagative stage they form fruiting bodies and sporangia, which bear walled spores like typical fungi.

There are over 500 species and they appear in all sorts of shapes, colours and sizes. To be honest I didn’t see any pictures that looked like my slime, the closest that I found was the aptly named Dog Vomit slime mould. Maybe I should give my mould a name, something like pocus stickus blobus.

What was rather disturbing were the number of odd experiments that people have used slime mould in, such as Slime mould solves maze and Robot piloted by a slime mould, which appear to take advantage of the amoeboid nature of the mould.

I for one, welcome our slime mould overlords…

Update: A gardening-type acquaintance of a friend of mine suggested that I throw lime (calcium carbonate) on the blobs to kill em. I might just give that a go.

Help ! Something weird is growing on my lawn

Any Botonists, UFOlogists or Ghostbusters out there ?

I have 3 big piles of transparent goop on my lawn! They are about 15 to 20cm in diameter, are quite transparent and have been there for a couple of weeks (I’m too freaked out to touch them but I did poke one with a stick).

I’m hoping (really hoping) that they are just some sap fallen from the tree that sits in the center of the lawn.

Anyone have any ideas ?

Blob Number 1

Blob Number 1

Blob Number 2

Blob Number 2

Blob Number 3

Blob Number 3

_[Update] Apparently they are slime mould…._

Bubbles! now uses Google App Engine

Just for kicks I decided to port the backend services for my Google Android app, Bubbles!,  to use the Google App Engine.

For those of you who don’t know Googles App Engine is a “free” application hosting environment. It promises to be able to scale Google style (as long as you pay of course).

The free account gives you 500Mb of persistent storage and bandwidth and CPU for around 5million pages views a month which is not bad for free.

Python

For some strange reason Python is the language of choice for app engine. I’ve never really taken to Python and I don’t really like languages where indentation is syntactically meaningful but it wasn’t too painful after skimming some tutorials on the web and running through the tutorial.

SDK

The SDK is only a couple of megabytes to download (you need Python 2.5 installed) and ran fine on my Windows XP desktop and Ubuntu laptop. Having said that the SDK doesn’t give you very much in the way of an IDE, it just gives you a dev web server and a tool to upload your application to the hosting platform. So I just used gedit and Notepad++ (which both have Python syntax highlighting) as my editors.

Platform Features

App Engine provides a pretty easy to use framework for building web applications in Python. The engine is WSGI compliant so you can plugin in any of the common Python frameworks such as Django, CherryPy, Pylons and web.py. Django seems to be the web app framework of choice.

Apart from a web application framework, the engine also provides APIs for email, image manipulation, URL fetching, users and datastorage.

The Users API is pretty cool as it hooks into Google’s user accounts so anyone with a Google account can log into your application (if you want them too).

The datastore is an object based transaction engine with a SQL like syntax. On the face of it is very clean and easy to use but its here that I had the biggest headaches when porting the Bubbles! services.

**

Porting the services**

Bubbles! uses 3 very simple services: popin, popout and getpops (where a POP is a point of presence). These services take input parameters from the query string and return JSON response strings.

Creating a class to represent a Pop in the datastore was very simple; as was creating and deleting Pops in the datastore. The biggest issue I had here was coming up with an elegant way of validating the input parameters.

But when I came to getting things back out of the datastore things went a little pear shaped…

In my Pop class I was storing the latitude and longitude of the POP as floating point numbers. To retrieve the nearby POPs (in the getpops service) I was using a typical SQL like query as follows:

SELECT * FROM POP<br /> WHERE lat >= :1 AND lat < :2 AND lng >= :3 AND lng < :4<br /> ORDER BY lastdatemodified

Where :1, :2, :3 and :4 were set to currentLat-0.001, currentLat+0.001, currentLng-0.001 and currentLng+0.001._

_

This raised the first issue: Only one “property” can have an inequality clause in a query. Turns out that the datastore has some pretty weird and wonderful restrictions, of course this particular one put a major spanner in the works.

Geohash to the rescue

What I needed was a quick way of calculating if a point in space was close to another one and to be honest the approach I was never happy with the approach I used above because it found points in rectangular area not a circular one.

After a little bit of research (I love the web), I came across this concept: the Geohash.

This cool (public domain) algorithm takes a decimal lat/long and turns it into a string. For instance

-36.843480 174.767138

Becomes:

rckq2uve1mx3

Not only does this give you something that you can stick on a #aliases: http://geohash.org/rckq2uve1mx3 but more importantly for points near to each other the first few characters of the hash are the same !

-36.843480 174.767138  =  rckq2uve1mx3<br /> -36.844381 174.765611  =  rckq2usmvvsd<br /> -36.848508 174.765451  =  rckq2gumfhjr<br /> -36.848457 174.748261  =  rckq27zy1tg8

So the solution to my problem turns out to be remarkably easy:

  1. When creating or updating a POP I calculate the Geohash for the longitude and latitude of the POP. I take only the first 6 characters and store them with the POP
  2. When processing getpops, I calculate the Geohash for the current latitude/location, grab the first 6 characters and find any pops in the datastore that have the same stored Geohash.

My select statement is now a simple equals and runs far faster then my original implementation.

Summary

Overall Google App Engine is an interesting platform and baring some quirks it does appear to be a viable platform for building web applications on.

OMG Wargames is 25 Years old !

Ok now that is just a bit upsetting. One of my favourite films gowing up, Wargames was released twenty-five years ago !

Wired has an interesting article on the film that “That Turned Geeks and Phreaks Into Stars”

Here is the orginal trailer for the movie:

YouTube Preview Image

And of course because Hollywood cannot leave the classics alone, the new Wargames: The Dead Code trailer. Which is released this year sometime:

YouTube Preview Image

Feeling really old now, so I’m off to get some coffee to jumpstart my creaking bones….

Does Virgin get the iPhone? Maybe…

I was just sent a link to an article about Virgin Australia’s new iPhone plans. To quote:

“What we hear from our customers is that they really want the iPhone not just because it’s a cool device but they want to do stuff with it, and I don’t think that’s been catered for in the market so far,” said Virgin Mobile Australia chief executive Peter Bithos.

__Their top end plan is $100/month for a 16Gb iPhone, 5GB of traffic, the phone for free and a 24 month minimum sign up period.

That’s still $2400 over two years but if you use the Sydney Morning Herald’s price comparator the next closest pricing plan that offers the same features is from Vodafone at $12150 !

Apparently Telstra (which has had the worst plans to date in Australia) are changing their plans to be more competitive.

If only we had some competition in NZ !

Web 2.0 Political Party

One of the things that bugs me most about NZ politics is that there isn’t a political party that I actually like.

Every election I basically sift through all the FUD to try and identify the parties that seems less likely to screw things up. I then cast my votes and hope that for the next 3 years the winners don’t go off on some tangent and introduce a law or bill that I don’t want and I don’t have any input into.

So today I was rather intrigued to see a Google ad at the top of my Gmail account that read: “Wanted: Six Members of Parliament” with a link to www.icount.co.nz.

Turns out icount is a new political party that was established last month, that has very interesting twist: Basically members of the party to get to vote (via the icount website) on issues before Parliament. The icount MPs then present and vote in Parliament in accordance with these polls.

This allows everyone to have input into the government all the time!

I very much like this idea. For years I have been saying that this is they way a government should be run. I was thinking publicly accessible electronic voting booths, that anyone can vote at on any issues that they wanted to provide input on, but using the web is a good start.

Of course for my electronic voting booths to work you would have to issue everyone with a nice unique and secure form of identification and this would freak out the tin-foil hat wearers. Not to mention that we have all read about the electronic voting fiascos in the USA.

Which raises questions about security for icount, I did some digging around on their site but they did not seem to have any obvious information on questions such as how they avoid vote rigging, what security policies and procedures they have, how do they know that their members are real etc.

Still icount is an intriguing idea and is likely to attract people like me who would like to have more input into what goes on in our government, not to mention the “social networking” generation for who using the web is as natural as breathing.

Upgrading to 2.6

About to start upgrading my blog to use version 2.6 of WordPress.

May be some disruption :)

Update: Well that didn’t go too badly.

_I did seem to lose all my category titles so I had to edit each category and reenter the categorie’s title. However the edit links didn’t work (since they use the category names as the hyperlink) so I had to spoof the edit URL by setting the catID for each category to bring up it’s edit page.

_The other big problem was that the permalinks stopped working. I eventually found this a post in the support forums that explained how to fix the issue._

iPhone 2.0 – First Impressions

I received a little present yesterday, a shiny new iPhone to play with (but unfortunately not too keep).

Here is what I have discovered so far:

Moving Contacts

Since I’m planning on using the phone for a few days I figured I’d stick in my own sim card and turn off my trusty Nokia N73.

So I copied my contacts to my sim card and stuck my sim card into the iPhone . You just need a paperclip to pop out the little tray that holds the sim card, the process is dead easy.

Then under the settings menu I was able to import contacts from my sim. Unfortunately this didn’t work the first time round with only some contact getting imported for some reason.

So I put the sim card back in my N73, deleted all the contacts on the sim and then copied the N73 contacts to the sim again.

I then put the sim back into the iPhone and imported the contacts again. This time it worked like a charm.

My first phone call

Showing off, I called my wife. To be honest the sound quality didn’t seem as good as my N73 and the iPhone seemed a little block-like in my hand.

Vodafone sux

Next I tried to fire up the maps and web browser but received a rude error message:

“Could not activate cellular data network. PDP authentication failure”

So I gave Vodafone a call and asked them what was up. The very helpful lady informed me that to use the iPhone I needed an iPhone data plan and I need to sign up for 24 months.

WTF ? I’m happily able to use my N73 to surf the web with the data plan I have, why do I need a different plan to use the iPhone and why do I need to sign up for 24 months ? This just confirms my previous rants about Vodafone just not getting it.

Currently the iPhone reports that it has been used for 3 hours and 4 minutes and sent 1.2MB of data and received 13.2MB on the cellular network

So I’ve put the original sim back into the iPhone and for the next few days will have to carry two phones around.

_Update: A little birdie has sent me this site: http://www.unlockit.co.nz/ which lets you download a new 3G config if you visit it with your iPhone. It appears to change the APN for the 3G network to the one that everyone normally uses. This should allow you to use the iPhone without a “special” iPhone plan. Haven’t tried it so I don’t know if it works. Makes me wonder if the default APN for the iPhone has a better quality of services or if this is just a way for Vodafone to lock you in. Would the commerce commision be interested in this ?_

Wifi to the rescue

A very, very nice feature of the iPhone is that it will use a WiFi network in preference to the 3G network if it can find one. Since I have WiFi at work and home this sure helps cut down on those data charges.

General usage

As with most Apple products the iPhone is a pleasure to use. The touch based user interface feels very natural and the form factor makes it fantastic mobile internet device.

Occasionally I did struggle with the interface, where options are a bit hidden and some interactions are not obvious.

For instance I still haven’t quite figured out how to select a word in the predictive text dropdowns.

Update: All you need to do is press “space” when the predictive text dropdown appears. Doh.

Also the onscreen keyboard is very good but I keep clicking on M instead of N for some reason. The little magnifier that shows up when you drag to position the edit cursor in a text field is very cute.

Web Browsing

The web browser is very nice. It works with most sites and has some nice navigation features and animations when dealing with multiple open pages. The accelerometer that rotates the display when you rotate the device is also very cool.

You can also save your favorite website as an icon on your start pages which is useful.

GPS and maps

The GPS seems very responsive and integrates nicely with Google maps. Last night I tracked my journey home in the taxi and it tracked well even with the taxi’s erratic driving.

One thing that was odd is that the driving directions didn’t automatically scroll to the next instruction once you reached a “way point”.

Email

You get a choice of email services to connect your iPhone too. I wired the phone to my gmail account without any issue.

Outlook calendar sync & Bluetooth

Syncing my Outlook calendar was a breeze, just setting a checkbox or two in iTunes and then connecting the iPhone with the USB cable to the PC.

I also had no problems bonding the iPhone to my PC using Bluetooth but iTunes didn’t seem to detect the iPhone when it connected via Bluetooth.

Camera

The camera seems decent but it needs good lighting as most mobile cameras do. Maybe I have just been spoilt by my N73’s 3.2 megapixel camera.

Applications

Using the integrated (and via iTunes) app store, I was able to download several applications. Obviously this is a major feature of the iPhone. As it is early days, these apps vary greatly in their quality.

The Facebook application is an example of a good application. It is easy to use, is well thought out and integrates with features of the phone. For example it is hooked to the phone’s camera so you can take pics and upload them to straight to Facebook. When you pull up a friend’s profile, clicking on their phone number dials them, clicking on their email launches the email client. All very smooth.

Quite a few of the applications make use of the GPS feature of the phone. Some are pretty lame in that they simply redirect to a web site with the correct region pre-selected.

Others like the LocalPicks application from Tripadvisor pulls back a list of all the bars and restaurant nearby. Although the app is a little buggy (the scrolling is sluggish) it did bring back a useful list of bars and restaurants near my house with ratings, contact phone numbers and addresses. Unfortunately all the distances were in miles and it had no map integration but it is still a cool idea.

I think I will have to port Bubbles! to the iPhone when I get the chance.

Conclusion

The iPhone rocks, Vodafone sux. However I’d buy one if the data costs were more reasonable and I had a some cash to spare:)