UPDATE: The details of this article are now moot, as the latest Google Maps application on the Android Market includes navigation on the G1.
OF COURSE when I saw that someone on the Interwebz managed to get the new Google Maps with navigation running on a G1, I almost wet myself with excitement. Normally this app only runs on the new Android 2.0 phones (namely, Droid from Verizon) and even rooted G1 are still only running Android 1.6. The instructions call for basically replacing the entire build properties on your phone with the Droid ones.
Read more »
At work we use this tool called NiftyCube to round corners of elements (it even works with divs that have gradients in them). The problem, however, is that on Internet Explorer 8, 100% width divs are shrunk to the contents of the div.
Read more »
Over various pints of beer, emails, and late-night twitter tweets, I’ve alone and with others wondered about whether a smart, well-adjusted programmer would use Pylons or CherryPy for all his web programming needs (and whether such a programmer would take the time to convert from CherryPy to Pylons). Pylons is newish to me, but I’ve been using CherryPy (on and off) for years now. What troubles me about CherryPy is that despite all those years of experience, there are still parts of CherryPy I struggle with (and not just this horrible while-true-except-pass loop). Here are my partially collected thoughts. I’ll start with what bugs me enough about CherryPy for me to seek alternatives.
Read more »
I really like meld as a visual diff tool, but I wanted to have have it show multiple comparisons at once from the commandline. In the GUI, you can create multiple tabs for multiple comparisons, but there is (was) no way to do it directly from the command line. So, I wrote a patch that lets you use it like this:
meld spam.orig spam.mine - eggs.orig eggs.mine - pants.orig pants.mine
The usage is the same as it was before, but now you can specify multiple comparisons, separated by “-”. We’ll see if the patch is accepted; I posted it to the mailing list. In the meantime, you can download it here.
No such module existed, so I wrote one. Using it is pretty simple:
Read more »
As opposed to having it print to stdout. Here’s how…
Read more »
Courtesy of CherryPy:
while True:
try:
lockfd = os.open(path, os.O_CREAT|os.O_WRONLY|os.O_EXCL)
except OSError:
time.sleep(0.1)
else:
os.close(lockfd)
break
self.locked = True
Really people, really? We silently loop until an error goes away? Really?
In the unplanned spirit of Thanksgiving, I recently finished Sarah Vowell’s The Wordy Shipmates. Written as a cross between a history book and a mémoire on the Massachusetts Bay, it’s so-named as a commentary on the Pilgrams’ verbose writing style. Vowell has a bookish snarkiness that makes the book worthwhile. Read it.
You can read about Python Decorators in the PEP like I had to, or you can just skip to the good stuff.
Python decorators are a way of modifying a function, of quickly wrapping it. They’re sort of like aspect-oriented programming, in that they let you define logic that cross-cuts methods all over your program. Here’s an example that takes a method that returns a list, and converts that list to a CSV file.
Read more »