Archive for December, 2007

Never Buy a Nice Car

Sunday, December 9th, 2007

Ok, so in the 2.5 years I’ve owned my little toy, I’ve been keyed no less than 3 times, had my front AND rear emblems stolen, and now my window smashed and my radar detector stolen. This just isn’t worth the hassle.

poor z4

Python vs. Java

Thursday, December 6th, 2007

I’ve been doing a lot of python programming this last year {allurstuff, deseb, flyback, ogmaps}, and several people have asked me variations on the following:

Thought of you when I read this ;-)
http://www.xkcd.com/353/
So is python really all that??

Well the answer is: Good god no. While python’s the best “everything is a hash table” language I’ve used, it shares the same problems all such languages have: very little compile time checking of object types. Your function is expecting a list, but someone passes in a string? Opps! And it doesn’t even fail-fast – you iterate over every char in the string. Which means many possible runtime errors, which are infinitely harder to test for and debug. Plus python STILL doesn’t have multi-processor support, even though it has its own reasonably nice threading model.

But it is great for banging out stuff quickly. And the glade/GTK bindings are pretty sweet.

So I’m proposing “Derek’s PvJ Rule”:

For every minute saved typing “my_list = []” instead of “List<String> myList = new ArrayList<String>();“, one hour of debugging is lost, one customer is pissed off, and god kills a kitten.

=P

Take Google Maps Offline

Sunday, December 2nd, 2007

So I bought a Nokia N800, initially so I can work on a mobile version of allurstuff, but also I’m curious if I can get android working on it… But while I’m waiting for FedEx to deliver, I decided that it needed a way to access Google Maps even without an internet connection.

And so was born ogmaps. It’s a fairly simple python script that downloads all the HTML/Javascript/image files used by gmaps, and modifies them to run right off your hard drive. (or flash drive, whatever) It then looks up whatever location you give it, and caches all the surrounding map files. (within reason….grabs about 5-10mb of data for each location you give it)

You don’t need a handheld to use it either… It’ll work wherever you have python and firefox. (I haven’t tried it with IE yet, and likely won’t – get a better browser!)

Anyway, tell me what you think. :)

derek


<Kered.org>   © Copyright 2000-2005 by Derek Anderson
Get Firefox