Entries from December 2005 ↓

When You Can’t Sleep, Blog

I’ve been playing recently with Corel Painter, which lets you fake the look of natural media (like paintbrushes, watercolors) on a computer. It’s a lot of fun, and whilst it’s clearly fake, it sure impresses those who haven’t seen it before.

I’ve also been wasting my youth enjoying my holidays with the latest incarnation of the game Civilization. Gameplay and balance works quite well in Civ 4, although I’m still not convinced on the change from 2D to 3D graphics. I think that Civ 1 had the most usable graphics – even if they weren’t pretty, you could easily tell different units and different terrain apart. Civ 4 looks more subtly blended/integrated and “realistic” (although either I have very tall people or very small buildings), but it’s harder to distinguish between a temple and a cathedral, for example. Wesnoth is 2D, and I quite like it’s distinctive visual style (is the 1990s sufficiently old to be “retro”?) in the current climate of games-must-be-3D think. As a bonus, some guy made “ye olde mappe” style Wesnoth maps.

And, with 3D, you sometimes get images like these, as spotted on the Civ forums.

Have Your Extension and Eat It Too

When showing file names, one theory is that you show the “.txt” and “.png” extensions, since they are the true file name, and another theory says that you should hide them, since they are ‘scary technical details’ that Joe User shouldn’t have to deal with.

What if we combined both ideas rather than either one or the other? Nautilus already makes the distinction when renaming a file (it selects only the “foo” of “foo.txt”), so should we also make the same distinction when showing a file’s name?

Demotivation

I recently came across this set of satirical demotivation posters, and rigged my computer to set a random one as my desktop background every time that I log in (yeah, the novelty will surely fade with time). Here’s how.

Just save all the JPEGs (manually or with wget) into one folder, strip the captions if you want (with ImageMagick or PIL – crop the bottom 14 pixels off), save the script below as random_background.py and from System → Preferences → Sessions, go to the Startup Programs tab and add your script.

#!/usr/bin/env python

import gconf, glob, random

all_pics = glob.glob ('/home/yourname/pics/wallpapers/despair/*.jpeg')
pic = random.choice (all_pics)
gconf.client_get_default ().set_string ("/desktop/gnome/background/picture_filename", pic)

Update (2006-02-06): Yeah, the novelty wore off, after a little over a month.

We Put the .6 in 0.8.6

Version 0.8.6 is out. My favorite bit is Raphael’s new Tango-ized, shiny SVG icons.

Standing on the Shoulders of Open Formats

I’ve been doing a bit of work for economist Andrew Leigh, who’s looking at geographical features (in particular, distance from the city, and distance from the coast). I got hold of map data from the Australian Bureau of Statistics (whose website usability could be the subject of a whole separate rant).

The program that comes with the dataset lets you do things like calculate average income per region (where regions come in such acronymic flavors as SD, SSD, SLA and CD), or even average income for those regions within 10km of the city, but it wouldn’t give me just the distance to the city or beach. Luckily, the data is in text format, and so having recently read about using the cairo graphics library in python, I got to work. First, a check that I can read the data properly – here is Canberra, and the highlighted region contains Parliament House.

Next, coastline data comes from the state boundaries, but it’s far too detailed for nearest-point calculations. Since the co-ordinates were in plain text files, I could re-interpret them as standard SVG (Scalable Vector Graphics) files – hooray for open formats! Inkscape‘s mighty Simplify command whittled the boundaries from 220,000 nodes to a more managable 1000, whilst preserving the general shape.

Overlay the calculated distances onto the image for a quick visual error-check, and I think I’m all done. Adelaide: distance to the coast on the left, and distance to the city on the right (zoomed out 2x relative to the left).

World Domination, One Day at a Time (Again)

I’m just bragging, but the deskbar applet is well inside GnomeFiles‘ top ten best rated apps, at least for today. Ah, warm fuzzies.

Update (2005-12-10): make that “well inside the top one”. No, I didn’t vote for myself. Yes, it’s pure vanity. :)

I Have a Cunning Plan, M’lord

What do you do when your e-mail is taken away from you, but you still want to send a message to fellow developers? File a bugzilla comment. Mikkel has had some pretty heavy experiences lately. I hope that it all ends well for him.