Blake (old posts, page 12)

Some ideas for the next version of Basie.

Yesterday I went to see a presentation by Kosta Zabashta about the work he did on Basie. The presentation went fairly well, but while listening to it, I had a few ideas that I thought I should write down.

First, since the configurations for Exim and Postfix are so complicated and so different, it would be nice if we had a program that could figure out which one you’re running, and generate the lines to add to your config files to get it all set up.

Second, I think we probably don’t need to add that many boolean or set operators to the search functionality. I seem to remember reading a paper a while ago where Google said that people only used 2 of the advanced search features, "s to make a phrase, and OR to choose between two different things. Sure, some people used all the wacky operators, but it was a vanishingly small percentage.

Third, do we update the search index when items change, or are we constantly rebuilding it? I would have thought that doing the dynamic updates would have run into many of the same issues as the Events app, but maybe there was a smarter way to do it that I’m overlooking.

Fourth, and finally, I wonder if there’s a way to use metadata about the objects we’re searching to influence rankings. To take the Google approach, add the number of mail messages/commit logs/wiki pages/tickets that refer to an item as a factor in determining the ranking. Or, push more recent things higher in the search results, since we know when things were added. Do we actually want to do either of those? Maybe, maybe not, but we’ve got a lot of data about each item, and it seems like using it might be, well, maybe more interesting than useful. :)

So, there are my thoughts on stuff we might want to do for the next version of Basie. I suppose the next step will be to get Greg to link to this, and get other people commenting. (And now that I’ve written it all out, I suppose it might have been cleverer to post this to the Basie blog. Ah well. Live and learn.)

More iPhone games…

Okay, one game in particular this time. One of my favourites from back in my Palm days.

Bike Or Die 2.
I can totally land this!

It’s awesome. It’s harder than I remember the Palm version being, but that's probably as much because I'm out of practice as anything else. After a couple of weeks of playing the beta version, I’m now at the point where I rarely hit the wrong button, even though they're on-screen instead of being hard buttons.

Not only is it a great game for what it is, but it’s got a ton of user-created levels, and an online high score board (which I’m nowhere near the top of). The re-playability of this game is stunning.

If you're still undecided, you can read the thread about it on TouchArcade. (Yeah, I’ve been answering a bunch of questions over there.) There’s also a video showing gameplay from the beta.

Finally, it only costs $2.99, but I hear it’s going up to $7 after the introductory period is over. (I suggested he sell it for $7.99-$9.99, but he’s apparently a nicer person than I am.)

(No, he’s not paying me for this. Heck, I didn’t even get an iTunes gift certificate for all my hard work finding bugs. I just really like the game.)

iTouch coolness…

What more could I say?

VNC

Yeah, it’s my Windows box, displaying my iTouch’s screen, over VNC.

Pure coolness.

(Oh, and the song it’s playing is Fancy Footwork by Chromeo.)

iPhone games…

A co-worker recently got a new iPhone, and I since he didn’t have many apps on it yet, I thought I’ld send him a list of the stuff I had bought/downloaded and enjoyed. So, without any further ado, here are a few of my favourites, all available on the AppStore.1

Toy Bot Diaries. (The link is to the free version, but I bought the full version.)
Wheeee!

Galcon. (The link is to the free version, but I bought the full version.)
Whoa!

Line Rider. ($2.99, but c’mon, it’s Line Rider. How can you not get it? ;)
Aaaaaah!

Twitterrific. (Free, but only useful if you’re on Twitter. Which I am. As bwinton.)
Chat!

TimmyMe. (Free, finds the closest Tim Hortons to you.)
Caffeine!

Tap Tap Revenge. (Free, like Dance Dance Revolution, but for your fingers. I actually don’t play this much, but it’s free.)
Ba dum dum dum!

PapiJump. (Free. By the guy who made the world’s most addictive Palm game, SFCave.)
Boing!

Labyrinth. (The link is to the free version. I didn’t buy the full version of this.)
Easy now!

Cube Runner. (Free. I got this after watching someone play it on the subway.)
Whoo-ha!

Enigmo. ($4.99, but really impressive. Really, really impressive.)
Ahhhh!

That’s about it…


  1. As opposed to Jailbreak apps, which I’ve got a few of. They tend to be more productivity/programming apps, which I didn’t think he’ld be interested in. 

Home alone

As Amy mentioned in the previous post, her father passed away. So she’s gone out to Saskatchewan to spend some time with her mother. This means that for the next seven days, I get to stay home and take care of the kids, making sure that they have food to eat, clothes to wear, and get to wherever they’re going when they need to be there.

The first day went pretty well, the only casualty being a slightly-charred side of a grilled bacon-tomato-cheese sandwich. And today has been going pretty well too, with a load of laundry washed and hung, the dishwasher currently running, and tonight’s meal (beef stew in the crock pot) already cooking.

A large part of why it’s all running so smoothly is my parents. They have totally stepped up, helping me by taking Delphine and Cordelia places, or just looking after them while I do the stuff that needs to be done around the house.

Delphine has been a huge help too. This morning, while I was in the shower, she got dressed, came downstairs, got out three bowls and three small spoons, some cereal, and the milk from the fridge. She then poured cereal for herself and Cordelia, and the two of them were done breakfast before I was dressed. I know she’s five and all, but sometimes she’s so grown up it astonishes me.

Anyways, they’re currently out on an adventure with Zaida, so I’ld better get to folding the laundry, because it ain’t gonna fold itself.

How to start developing Basie

So, first off, I think Python developers these days need to use stuff like virtualenv and zc.buildout in order to develop in a sane manner. Yeah, this is the first project I’m using them on, but do what I say, not what I do.

Anyways, on to the instructions.

sudo easy_install virtualenv
virtualenv --no-site-packages basie
cd basie/
. bin/activate

Then, you’re gonna need a buildout.cfg. Mine looks like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
[buildout]
parts = django
eggs = ipython

[django]
recipe = djangorecipe
version = trunk
settings = development
eggs = ${buildout:eggs}
project = basie
wsgi = true

You’ll also need a bootstrap.py, which will look a little something like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
##############################################################################
#
# Copyright (c) 2006 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Bootstrap a buildout-based project

Simply run this script in a directory containing a buildout.cfg.
The script accepts buildout command-line options, so you can
use the -c option to specify an alternate configuration file.

$Id$
"""

import os, shutil, sys, tempfile, urllib2

tmpeggs = tempfile.mkdtemp()

try:
    import pkg_resources
except ImportError:
    ez = {}
    exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
                         ).read() in ez
    ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)

    import pkg_resources

if sys.platform == 'win32':
    def quote(c):
        if ' ' in c:
            return '"%s"' % c # work around spawn lamosity on windows
        else:
            return c
else:
    def quote (c):
        return c

cmd = 'from setuptools.command.easy_install import main; main()'
ws  = pkg_resources.working_set
assert os.spawnle(
    os.P_WAIT, sys.executable, quote (sys.executable),
    '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout',
    dict(os.environ,
         PYTHONPATH=
         ws.find(pkg_resources.Requirement.parse('setuptools')).location
         ),
    ) == 0

ws.add_entry(tmpeggs)
ws.require('zc.buildout')
import zc.buildout.buildout
zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
shutil.rmtree(tmpeggs)

After you’ve got those, it’s basically:

python bootstrap.py
buildout -v
django help
django runserver

And when you’re done, deactivate

Any comments on things that don’t work would be highly appreciated.

5000 kilometers.

Today, I finally reached 5000km of biking. I forgot the camera, so I don’t have a picture of the odometer at exactly 5000.0, but I took this one when I got home, and it’s close enough. I guess that’s all, but I wanted to throw up a picture, as proof. So here you go:

A small detour…

A few days ago, the city closed the pedestrian bridge at Summerhill (and MacLennan) in order to tear it down and replace it. Since then I’ve been trying to find a way across the railroad tracks that doesn’t involve taking a major road. And I’ve totally failed. So from now until September 28th, I’ll be biking down Bayview and turning right on Nesbitt before dispy-doodling my way over to Glen Road. It’s not my favourite route, since the traffic on the Bayview Extension is going a fair bit faster than I’ld like to, and the lane isn’t wide enough to share at those speeds (and the right-hand side of the lane is brutally cracked and very difficult to ride on, particularly at 50 km/h), but I still think it’s better than Mt. Pleasant.

Looking closer at the map, there might be another route, if I can get into the path leading South from David A. Balfour park… Yeah, that might be a route to try on my way home tonight. I’ll reply with a comment, letting both of the people who read this know how it was. ;)

The Tour de Dufflet

This year, Amy and I decided to try the Tour de Dufflet. Okay, so it was more like I decided to try the Tour de Dufflet, and convinced Amy to come along with me, but that’s the same, right? I took a few notes12345 on which routes would be less likely to have a lot of traffic on them, and after my parents picked up Delphine and Cordelia, we set out. 46 km and 4 hours later, we arrived home, tired, sore, and full. I think it was mostly a success, although Amy was certainly done having fun by the time we were on the third leg. The stats were as follows:

  • Average speed: 15.0 km/h
  • Total distance: 46.18 km
  • Biking time: 3:04:32
  • Total time (including eating cake): around 4 hours.

I’ve got to say, I’m really pretty impressed with how well Amy did. To go from virtually no bicycling to a 46 km trek (and a 46 km trek with a self-admitted speed freak) is something that a lot of people would skip out on, or avoid, but she went for it, and went faster than I hoped she would. Would we do it again next year? My guess is no, since it wasn’t a lot of fun at the end. On the other hand, if Amy continues to bike throughout the year, she might just go for it, to see if it’s gotten any easier. (I’m hoping to do it next year, as you might have guessed from the url of the post.)


  1. The notes went as follows: “Forman -> Eglinton -> Mt. Pleasant -> Sheldrake -> Yonge”, 

  2. “Craighurst -> Rosewell -> Default -> Bloor -> Manning -> Queen” 

  3. “??? (Ended up being Strachan) -> Martin Goodman Trail -> Woodbine” 

  4. “Dundas -> Greenwood -> Strathmore -> Donlands -> Mt. Pleasant -> Laird -> Broadway -> Yonge” 

  5. and finally “Yonge -> Broadway -> Redpath -> Soudan -> Forman” to get home again. 

An Inconvienient Ride

I knew when I woke up this morning that it would be an annoying ride in. It was raining fairly hard, but there was a breakfast at The Bike Joint, and they usually have one of the better breakfasts. It’s the same coffee, muffins, bagels, and fresh fruit as filling. As it turns out, this year they got an espresso machine, so instead of the normal coffee, I had a very nice latte along with my chocolate chip muffin, but along the way I got almost completely soaked and tore a hole in the crotch of my biking jeans. The hole wasn’t a complete surprise; the other side had gone a couple of weeks ago, and I had patched it with some old t-shirt. I guess it’s time to re-do the patch, and extend it to cover both sides.

Anyways, I got there, had some coffee and a muffin, and as I got on my bike after crossing the street when I noticed that my rear wheel didn’t really feel right. I looked behind me and found that it had gone completely flat while I was standing around eating breakfast. I wheeled the bike back to the store, Derrick replaced the tube, and I was on my way just as it started to rain again. And then my front light fell off and broke into three pieces. Fortunately, that was easy enough for me to snap back together, and be on my way once more.

After all that, I ended up being late for the 10:00am Status Meeting at work, which was the cherry of annoyance on top of the annoying ride.

The rest of the day, so far, has gone much better. I listening to a not-particularly-interesting talk about bicycle touring at MEC, and while I was there bought a bell. My current bell works just fine, but it’s one of the ding-ding ones, and no-one seems to recognize it as a bike bell, so I got one that goes ringggg-ringgg, which is the canonical bike bell noise, and I hope that’ll help. Work is good too, if a little busier than I might like. And I finally got emacs working with Markdown pretty much the way I want, so all in all, woot!

(Update: The ride home went mostly well, although there were spatters of rain throughout the trip. Around Sherbourne and Bloor, my rear tire started to slow wayyyy down, and then stop. When I flipped the bike over, I noticed that it was jammed right up against the frame, so I loosened it, straightened it, re-tightened it, and kept on going. Still, that’s never happened to me before, and was pretty strange.)