James Tauber

journeyman of some

blog >

James Tauber's Blog 2005

XML Declaration Required for UTF-8 AJAX

Jenni was adding some non-ASCII cards to her local Quisition instance and it wasn't working. The browser, Safari, was getting the wrong encoding.

Strangely, manually telling Safari the encoding didn't help. I suspected culprit might be AJAX as the problem was with content loaded asynchronously.

Sure enough, after being thrown off by a couple of red herrings, I found that the response to XMLHttpRequest, at least on Safari, requires an XML Declaration with encoding="utf-8" even though, according to the XML TR, it shouldn't.

by jtauber : Created on Dec. 30, 2005 : Last modified Dec. 30, 2005 : Categories quisition ajax : 2 comments (permalink)

Summer of Code T-Shirt

When I got back from Brunei, there was a notice from DHL saying a parcel delivery had been attempted but no one was home. I wasn't expecting a parcel while I was away.

The notice had a waybill number so I entered that in on the DHL website and, while it didn't give me the sender, it did give me the city of origin: Redwood City, CA.

I hadn't ordered anything from a company in Redwood City.

So I rang DHL. The package was from Google.

I went and picked it up from the depot and it was a Summer of Code t-shirt to thank me for my participation this year as a mentor.

Cool that it arrived in time for summer here :-)

by jtauber : Created on Dec. 30, 2005 : Last modified Dec. 30, 2005 : 0 comments (permalink)

Contributing to Open Source Python Projects

Adudzik asks on 43things:

As a smart and enthusiastic beginner, where should I look for good open source projects, preferably in Python?

While it's possible to find open source projects being done in Python on SourceForge and listed on FreshMeat, what would benefit people like Adudzik, in my opinion, is being apprenticed to a willing project lead. Sort of like the Summer of Code but longer term and restricted to existing projects (and presumably with less chance of monetary payment). SourceForge and FreshMeat don't really indicate which projects would be willing to take on an apprentice.

So perhaps python.org could run a directory of open source python projects that would be willing to take on an apprentice.

I'd certainly be willing to take on an apprentice or two on a number of my projects such as Leonardo, pyso or Cleese.

As I've written elsewhere:

I believe writing software is a craft. I also believe that writing code is something well suited to an apprentice-journeyman-master model particularly when applied in an open source context.

So ultimately I'd love to see virtual schools under a master with a number of journeymen and apprentices. Apprentices work on projects mostly under the direction of the journeymen. The journeymen have more responsibility on projects and start their own projects under the direction of the master. Eventually, a journeyman presents a released piece of software as his or her "masterpiece" and is declared by some loose collection of masters (a guild) as a new master. This guild would also be responsible for the recruitment of new apprentices.

That's my larger vision but just having a directory of projects willing to take on an apprentice would be a good start.

Any other thoughts?

by jtauber : Created on Dec. 26, 2005 : Last modified Dec. 26, 2005 : Categories python software_craftsmanship open_source : 2 comments (permalink)

Congratulations Bowstreet

Congratulations to the investors and employees of Bowstreet on the acquisition of their company by IBM.

Bowstreet, where I worked from mid 1999 to early 2002, was a wonderful experience for me. Without Bowstreet, there would be no mValent.

by jtauber : Created on Dec. 24, 2005 : Last modified Dec. 24, 2005 : 2 comments (permalink)

Back After Vacation

If you're wondering why I haven't blogged for two weeks, it's because I've been on vacation.

My parents, sisters and HB went to Brunei, where my family lived from 1982-1986. Besides relaxing at the hotel and doing what little sight-seeing there is, we visited my old house, school, etc.

It's a strange experience going back to a place after 20 years; especially when the last time was as a child. Some scenes brought back memories; others I had to really struggle with to match up with my memories (because of changes; not faulty memory)

I'll probably post some photos soon - perhaps even some then and now photos.

by jtauber : Created on Dec. 24, 2005 : Last modified Dec. 24, 2005 : 0 comments (permalink)

Short-Term Testing in Quisition

When using physical flash cards I use two distinct methods for determining which subset of cards to test myself on in a particular session and what happens when I get a card right or wrong. I'm implementing the same system online for Quisition.

The first is what I call short-term testing.

It applies only to the current pile being learnt (as opposed to older ones being reviewed) and I try to keep this to around 10 cards. I try to do this a couple of times a day and it usually only takes a few minutes.

I go through the pile testing myself on each one and putting them into a right pile or wrong pile. If there are no cards in the wrong pile, I'm done. However if there are, I go through the wrong pile again. If I get it right it goes in the right pile but if I get it wrong again it goes back in the wrong pile. I keep repeating this until the wrong pile is empty. Then I repeat the whole process again.

So there are, in effect, two while loops, the outer while loop testing (or retesting) all cards and the inner loop retesting the cards got wrong.

Note that the results of the short-term test don't need to be persisted. For this reason, I've implemented it entirely client-side in Javascript for Quisition.

I'll put up a demo short-term test in the next few weeks for people to try out. Subscribe to the announcement feed on the Quisition website to find out when it's available.

UPDATE (2006-01-21): Now see the demo.

by jtauber : Created on Dec. 10, 2005 : Last modified Jan. 21, 2006 : Categories quisition : 4 comments (permalink)

Scalability and Uptime for Quisition

I've been thinking a lot about how to scale Quisition, the online flashcard site I'm working on in my "copious spare time".

Flashcard testing isn't a critical app but, given one of the features of Quisition will be its scheduling of what cards to review on which day, it's fairly important to users that the site is available daily.

Scaling I can mitigate somewhat by the number of users. I've been thinking my goal should be get 100 very happy users and then worry about the infrastructure to support 1000.

Given I'm thinking about these sorts of things, it was interesting to read Don't Scale: 99.999% uptime is for Wal-Mart at Signal vs Noise. In particular, this quote is a nice confirmation of my current attitude:

Before you have users, it’s a waste of time ensuring that they can always get to the service

Some interesting comments have been made on the Signal vs Noise post. Thoughts welcome here too.

by jtauber : Created on Dec. 7, 2005 : Last modified Dec. 7, 2005 : Categories quisition : 1 comment (permalink)

Aperture Arrives, 50mm Prime On Its Way

Apple's Aperture arrived today, just two days after I read the damning review on ArsTechnica.

I have yet to try it out but I did notice that the box features a close up of a 50mm f/1.4 lens. Coincidently, I just ordered Canon's EF 50mm f/1.4 lens yesterday.

I've been eyeing the 50mm for a while as my first prime lens. I'll be using it on my 10D although I'd really like a 5D which has a full-size sensor.

by jtauber : Created on Dec. 6, 2005 : Last modified Dec. 6, 2005 : Categories photography : 0 comments (permalink)

DPs Seeing Red

A company simply called RED is tantalising digital cinematographers with their promise on an otherwise information-scarce website of a 2540p camera based on a full frame 4K CMOS.

That's as much a resolution increase over 1080-line HD as 1080-line HD is over standard definition.

by jtauber : Created on Dec. 6, 2005 : Last modified Dec. 6, 2005 : Categories filmmaking : 1 comment (permalink)

iMac Back Home

I got my iMac back today after three weeks.

I'm happy with the AppleCentre store that did the repairs but still very frustrated that Apple doesn't let them keep spare power supplies in stock (and then takes 2 weeks to ship them).

by jtauber : Created on Dec. 6, 2005 : Last modified Dec. 6, 2005 : Categories mac : 0 comments (permalink)

Leonardo 0.7 beta 1 Released

The first beta of Leonardo 0.7 is now available at:

http://jtauber.com/2005/leonardo/leonardo-0.7b1.tgz

Leonardo is an extensible content management system written in Python and initially focused on providing for personal websites with a password-protected wiki and blog (including Atom feed).

Changes Since 0.6.x

  • support for Atom 1.0
  • pages now record their author which is displayed on the page, in blog lists and atom feeds
  • there is now a provider which lists blog months
  • it is now possible to update a page or its properties without the last modified changing
  • comments can be deleted if logged in
  • formatting of comments is improved by translating newlines to br
  • the main page template is now in LFS
  • home page link is now part of menu rather than template to give user more control
  • subtitle is now completely formatted in page template to give user more control
  • copyright_holder changed to general rights statement
  • switched from using shelve to pickle (shelve was causing problems for people moving between different systems with different anydbm implementations)
  • fixed bug where question mark in permalink wasn't getting escaped
  • removed stray ) in draft template causing malformed html
  • delete page no longer has duplicate headings
  • template files now have provider name in the filename
  • leonardo library now in Python package to avoid name clashes

by jtauber : Created on Dec. 6, 2005 : Last modified Dec. 6, 2005 : Categories python announcements leonardo : (permalink)

IE6 Transparent PNG Bug

I was just showing a friend the Quisition website on their machine (Windows XP with IE6) and noticed the background is non-white.

I vaguely remember reading about IE6 having a problem with transparent PNGs but until now it hasn't been something I've needed to worry about.

I guess the solution is to go back to Illustrator CS2 and make a white background version.

by jtauber : Created on Dec. 5, 2005 : Last modified Dec. 5, 2005 : Categories quisition web_design : 11 comments (permalink)

Quisition: An Online Flashcard System

I've previously mentioned that I'm working on a web-based flashcard system. Well I've decided I'm going to try to make a website out of it.

I've given it the name Quisition because it's all about acquisition through inquisition. I've registered the domain quisition.com.

Nothing to see there yet, but there is an atom feed you can subscribe to to get announcements.

Well, there's also a little logo I designed for the site :-)

Over the next month, I'll probably put up some info about how it all works along with some screen shots.

Then, some time in Q1, I'll launch a limited beta to get feedback and gauge interest.

by jtauber : Created on Dec. 4, 2005 : Last modified Dec. 4, 2005 : Categories quisition : 3 comments (permalink)

Upgrading This Site to Leonardo 0.7 Beta Candidate

I'm about to upgrade this site to what will (assuming all goes well) then be released as Leonardo 0.7b1.

Apologies if anything breaks.

UPDATE: Looks like it worked!

by jtauber : Created on Dec. 4, 2005 : Last modified Dec. 4, 2005 : (permalink)

Babylon 5 Scripts

JMS is releasing his Babylon 5 scripts with notes as a 14-volume series over the next year.

Besides being an absolutely thrill for someone like me who's a fan both of B5 and the making of films and episodic television in general, the project is interesting in some other ways too:

  • it's essentially a self-published print-on-demand effort via Cafe Press
  • they are being released a volume at a time and the first week a volume is out it's 25% off
  • there's a bonus 15th volume available only to people who buy all 14 previous volumes.

Amongst other things, the 15th volume will answer the decade-old question: "What would Babylon 5 have been like had Sinclair stayed?"

First two volumes are out. Discount on the second ends today.

And so it begins...

by jtauber : Created on Dec. 2, 2005 : Last modified Dec. 2, 2005 : Categories filmmaking babylon_5 : (permalink)

Revisting Versioned Literate Programming

Greg Wilson asks about incremental display of source code.

His example shows somewhat the kind of thing I was thinking when I wrote about versioned literate aspect-oriented programming where I said that I'd like a literate programming tool for writing tutorials...

I could write a web and then tangle it to generate the [...] application and weave it to get the tutorial. But as features are incrementally added to the application over the course of the tutorial, conventional literate programming might not be enough. At the very least, some kind of versioning would need to be included.

Greg is talking more about animated display online using Javascript but from an authoring perspective, I think we're looking for a similar tool. Greg's example is really nice for demonstrating how code gets developed at certain insertion points. That starts to touch on the aspected-oriented element I was thinking of (although there are no cross-cutting concerns in his simple case)

Back in March 2004 when I wrote my original post, Dave Long commented:

Literate programming is composing a program source by pasting together a dag of (smaller) chunks.

Versioning, however, is composing a program source by pasting together a list of (sequential) edits.

The former is primarily spatial, and the latter primarily temporal, so it may not be too difficult to keep the two from interfering.

Heck; use the versioning capability to expand chunks in the appropriate environment of a configuration tree, and one would have self-documenting CM.

One thing that occurs to me is that the versioning in what I'm talking about isn't exactly the same kind of versioning you normally do with something like Subversion. It's not about keeping a history, it's about creating a history, so there'd be nothing wrong with going back and changing earlier versions.

I'm still wondering if anyone has built something like this. I haven't had the time :-)

by jtauber : Created on Dec. 2, 2005 : Last modified Dec. 2, 2005 : Categories software_craftsmanship : 4 comments (permalink)

The Naming of Musical Notes, Part III

In the next few parts, I'll talk about things using a made-up naming system to make it clearer what's going on with note names.

Let's start off by naming the 12 ascending notes within the octave in 12-ET with numbers in angled brackets:

<1> <2> <3> <4> <5> <6> <7> <8> <9> <10> <11> <12>

We'll call these the absolute note names. Notice that this gets us around the problem of which enharmonic spelling to use when talking about a note in isolation.

Now a major scale starting on <1> would consist of the following notes:

<1> <3> <5> <6> <8> <10> <12>

A major scale starting on <3> would consist of the following notes:

<3> <5> <7> <8> <10> <12> <2'>

If we want to refer to individual notes within the major scale regardless of where we start, we can use a different naming. Let's use curly braces to distinguish that type of name:

{1} {2} {3} {4} {5} {6} {7}

Let's call these the relative note names.

The correspondences in our <1>-major scale would be:

<1> <2> <3> <4> <5> <6> <7> <8> <9> <10> <11> <12>
{1}     {2}     {3} {4}     {5}     {6}       {7}

The correspondences in our <3>-major scale would be:

<1> <2> <3> <4> <5> <6> <7> <8> <9> <10> <11> <12> <1'> <2'> ...
        {1}     {2}     {3} {4}     {5}       {6}       {7}

Notice that the absolute meaning of {5} depends on the key. In a <1>-major key it's <8> and in a <3>-major key it's <10>.

Notice also that some absolute notes don't have relative note names (or have them in one key but not another. We can overcome this limitation in the relative note naming system by using + to mean one (absolute) note above and - to mean one (absolute) note below.

So <9> could be expressed as either {5+} or {6-} in a <1>-major key and as either {4+} or {5-} in a <3>-major key.

In the next part, we'll continue to use this notation to explain some of the subtleties of note naming in Western music, including what we observed in parts I and II.

by jtauber : Created on Dec. 2, 2005 : Last modified Dec. 2, 2005 : Categories music_theory : 1 comment (permalink)

Relational Python: Restrict

The next relational operator I implemented in my relational python experiment was RESTRICT.

Restrict filters the set of tuples by some condition. In many formulations of the relational algebra, the restriction is on just one attribute at a time and you chain RESTRICTs together but for relational python, we'll use a lambda that can do rich testing across one or more attributes.

Here was my first attempt:

def RESTRICT(orig_rel, restriction):
    new_rel = Rel(orig_rel.attributes())
    for tup in orig_rel.tuples():
        if restriction(tup):
            new_rel.add(tup)
    return new_rel

but I thought it would be neater as a list comprehension. The only problem was, there was no way in Rel to add multiple tuples at a time so I added the following method to Rel:

    def add_multiple(self, tupset):
        self.tuples_.update(set([self._convert_dict(tup) for tup in tupset]))

This enabled me to rewrite RESTRICT as:

def RESTRICT(orig_rel, restriction):
    new_rel = Rel(orig_rel.attributes())
    new_rel.add_multiple([tup for tup in orig_rel.tuples() if restriction(tup)])
    return new_rel

Here's how to use the function:

rel4 = RESTRICT(rel1, lambda tup: tup["SALARY"] > "30K")

And, of course, I had to write a lazy "view" version:

class RESTRICT_VIEW(Rel):

    def __init__(self, orig_rel, restriction):
        Rel.__init__(self, orig_rel.attributes())
        self.orig_rel = orig_rel
        self.restriction = restriction

    def add(self, tup):
        raise Exception

    def tuples(self):
        for tup in self.orig_rel.tuples():
            if self.restriction(tup):
                yield tup

As always, suggestions for improvements are welcome in comments.

Next up, I'll implement the cross product.

by jtauber : Created on Nov. 29, 2005 : Last modified Nov. 29, 2005 : Categories python relational_python : 6 comments (permalink)

Demokritos 0.1.0 Released

I've decided my Atom server prototype written in Python is probably at the stage where it needs some interoperability testing.

You can download a very early alpha at http://jtauber.com/2005/demokritos/demokritos-0.1.0.tgz

Alternatively, if you have a client and want to do some interop testing with me, either email me directly or look for me on #atom at irc.freenode.org.

Some caveats about this version:

  • no persistence (planned for 0.3.x)
  • no security (planned for 0.4.x)
  • implements much of draft-ietf-atompub-protocol-06 but no additional Paces
  • no support for list templates (planned for 0.2.x)
  • no support for publishing control (planned for 0.2.x)

by jtauber : Created on Nov. 29, 2005 : Last modified Nov. 29, 2005 : Categories python atompub demokritos : 0 comments (permalink)

Weight Loss

On 1st November I decided to try to lose some weight. I was already overweight at the start of this year but then put on an additional 15 pounds during the five months I was in the US and Europe.

I need to lose somewhere between 30 and 50 pounds. My first goal is to lose the 15 pounds to get me back to my weight at the start of the year. The next goal after that is to lose an additional 15 pounds to get me to the weight I was five years ago. Anything after that is a bonus but I'm going to go for another lot of 15 pounds to lose a total of 45 pounds.

My target is to lose 2 pounds per week.

I'm not doing anything dramatic. I'm easing my way into the first phase by doing four things:

  • no snacking
  • no sugared sodas (and only the occasional diet soda)
  • smaller meal proportions (resisting the temptation to have seconds)
  • no eating after 9pm

For the most part, I've stuck with that so far.

More than anything, this strategy is simply reflective of what I was doing wrong before.

How am I going? I've lost 8 pounds as of last weekend (i.e. after 4 weeks). I already feel a lot less bulky. Hopefully I'll reach my first 15 pound milestone by the end of the year.

The real test will be whether I can continue the loss when visiting the US next.

by jtauber : Created on Nov. 29, 2005 : Last modified Nov. 29, 2005 : Categories personal weight_loss : 9 comments (permalink)

Devin Kilminster Has Been Annealing

Devin Kilminster has taken the lead in category III of my ongoing programming competition. Unlike Mark Ellison, who used a deterministic algorithm, Devin used simulated annealing like I did.

I'm starting to put together a second edition of the programming competition that will involve more complex relationships between prerequisites. I don't think that will make the problem any harder for simulated annealing approaches (it will just involve changing the scoring function) but it will probably require quite different deterministic approaches than the current competition. I might have two divisions to keep it fair between the 'annealers' and the 'deterministas'.

by jtauber : Created on Nov. 29, 2005 : Last modified Nov. 29, 2005 : Categories programming_competition : 4 comments (permalink)

What I've Been Up To

I haven't blogged for a week. Here's a quick summary of what I've been up to:

  • work (the first three days of the week, anyway)
  • slow but steady progress on Leonardo
  • slow but steady progress on Demokritos
  • attending Small Screen Big Picture (big television conference held locally)
  • a web-based flashcard program (Python server implementing a Leitner-inspired system and my first attempt at AJAX)
  • MorphGNT
  • upgrading to ProTools LE 7
  • great recording session with Nelson James

by jtauber : Created on Nov. 27, 2005 : Last modified Nov. 27, 2005 : 3 comments (permalink)

Atom (and Demokritos) Status

Tim Bray has a nice summary of how the Atom Publishing Protocol works and a note on the current status.

On the weekend I worked more on my Python implementation of said protocol, Demokritos. I'm close to an initial release which won't be usable as a real Atom server yet but should be good enough for interop testing.

The small hurdle I've just encountered is that (at least in the 06 spec), Atom entries sent from clients to a server need not be fully valid entries. They can omit information that will be subsequently provided by the server itself. The mistake I've make is that my code for parsing Atom entry xml and building an object model is strict about the entry xml being valid. I'll need to relax that for incoming entry POSTs.

by jtauber : Created on Nov. 21, 2005 : Last modified Nov. 21, 2005 : Categories python atompub demokritos : 1 comment (permalink)

The Big 040

Today I turned 040. In octal that is. 0x20 in hex.

That's 32 for the humans.

Achieved almost none of the goals that I set for myself last birthday but it was a great year nevertheless. I'll write more later.

by jtauber : Created on Nov. 19, 2005 : Last modified Nov. 19, 2005 : Categories personal : 1 comment (permalink)

Relational Python: Projection

Now that we have a basic class for relations and a method for displaying them, we'll now start to go through some relational operators, starting with PROJECT.

PROJECT is defined such that if rel1 is:

+-----+-------+-----+--------+
| ENO | ENAME | DNO | SALARY |
+-----+-------+-----+--------+
| E1  | Lopez | D1  | 40K    |
| E3  | Finzi | D2  | 30K    |
| E2  | Cheng | D1  | 42K    |
+-----+-------+-----+--------+

then PROJECT(rel1, ["ENO", "ENAME"]) is:

+-----+-------+
| ENO | ENAME |
+-----+-------+
| E1  | Lopez |
| E3  | Finzi |
| E2  | Cheng |
+-----+-------+

It's sometimes useful, even when not dealing with relations, to be able to do projections of dictionaries. The following function does that:

def project(orig_dict, attributes):
    return dict([item for item in orig_dict.items() if item[0] in attributes])

This can then be used to define PROJECT:

def PROJECT(orig_rel, attributes):
    new_rel = Rel(attributes)
    for tup in orig_rel.tuples():
        new_rel.add(project(tup, attributes))
    return new_rel

(Note that if Rel took an iterator over tuples in its constructor, this could be simplified further—I might do that at some stage)

This PROJECT function implements the relational operator PROJECT. It makes a new relation based on a point-in-time snapshot of another. However, it's easy to make the projection dynamic as well.

The following class allows one to create a projection of a relation that is dynamic. In other words, it is a projection of the current state of the original relation not just at a point in time.

class PROJECT_VIEW(Rel):

    def __init__(self, orig_rel, attributes):
        Rel.__init__(self, attributes)
        self.orig_rel = orig_rel

    def add(self, tup):
        raise Exception

    def tuples(self):
        for tup in self.orig_rel.tuples():
            yield project(tup, self.attributes_)

rel3 = PROJECT_VIEW(rel1, ["ENO", "ENAME"]) works just like rel2 = PROJECT(rel1, ["ENO", "ENAME"]) except that if new tuples are added to rel1, then rel3 changes whereas rel2 stays the same.

As always, I welcome people's suggestions as to how to improve this.

by jtauber : Created on Nov. 17, 2005 : Last modified Nov. 17, 2005 : Categories python relational_python : 2 comments (permalink)

Disclosure: Trying Out Google Analytics

I want to try out Google Analytics so I've temporarily added it to this site. Just letting everyone know in the interests of openness.

by jtauber : Created on Nov. 16, 2005 : Last modified Nov. 16, 2005 : Categories this_site google : 1 comment (permalink)

Early Birthday Present: Australia in the World Cup

It's my 32nd birthday on Saturday, but Australia's soccer team, the Socceroos, gave me an early present by beating Uruguay to qualify for the World Cup in Germany next year.

The last time the Socceroos made it into the World Cup, I was only a few months old.

To give those of you in the US an idea of the significance of this: it's almost the Australian equivalent of the Red Sox winning the World Series.

One of my fondest memories growing up was watching the 1986 World Cup in Mexico. I went for Germany, as I have every time since. Next year, I'll be able to follow my home country for the first time.

by jtauber : Created on Nov. 16, 2005 : Last modified Nov. 16, 2005 : (permalink)

Dead iMac and Getting Stuff Off the Hard Drive

So my iMac is completely dead now.

I rang the local AppleCentre and asked if they had power supplies in stock. I had dreams of them being able to replace it on the spot (assuming that is the problem) so I could be up and running by this afternoon.

"We're not allowed to carry spare parts" was the response. I'm trying to keep an open mind but I'm not sure why Apple would not allow spare parts to be kept on site at an AppleCentre. Especially given how far away Perth is and how long it takes for things to get shipped here.

The estimate for the replacement power supply to come in (again assuming that's the problem—I haven't actually brought the machine in to them yet) is 1-2 weeks.

1-2 weeks without my main non-work computer!

I (stupidly in hindsight) didn't get AppleCare on the iMac (although I have it on other Apple hardware that's never had a problem). The guy on the phone claimed AppleCare owners would get priority but given it's a shipping issue I doubt it makes much difference to the 1-2 weeks.

While I do do regular backups, there's a lot of cool stuff I've been working on in the last week that isn't in the last backup.

So I'd really like access to the stuff on the hard drive. I wonder if I take my iMac apart, whether the drive will just plug straight in to my PowerMac (temporarily replacing the second drive in that).

UPDATE: When I got to the AppleCentre I asked if they could open up the iMac right away and give me the hard drive. Fortunately they were happy to do this for me. I should be able to hook it up to my PowerMac (the one usually used for music and film) and get my stuff off. Now I don't really mind the 1-2 weeks as much :-)

by jtauber : Created on Nov. 14, 2005 : Last modified Nov. 14, 2005 : Categories mac : (permalink)

Using Python Coroutines for AJAX Applications

I think I just had an epiphany regarding the upcoming coroutine support in Python. I don't mean I came up with anything new (I think Ruby programmers have been doing it for a long time), just that I finally grok it—or at least, I think I do.

You see, I'm writing a little AJAX-based flash card website and I started off writing a standalone dynamic HTML mock-up of (obviously) the client side but without any communication to the server yet.

I then wrote a console-based flash card program to experiment with the algorithm I want to use for what card to show when, when to learn new cards, etc. The console-based program just has a function called test that takes a card object, tests the card on the user and returns a boolean as to whether the user got the card right or not.

So my code has a bunch of places where I say:

for card in to_test:
    correct = test(card)
    if correct:
        ...
    else:
        ...

In theory, it's only this test function that's throw away. It would be nice if I just had to replace those calls to test when I come to write the server version.

The only catch is that it will be the client that initiates requests for cards. Easy, I thought: I can use yield statements in the server code wherever I want to present the user with the next card. That way, the client (or more accurately some proxy for the client running on the server) can do a next() to get the next card.

The problem is that the client needs to return the result. The yield can't be a one-way street. At the point the server yields a card, it needs to also find out the result of that yield.

Enter coroutines. If I understand correctly, this is exactly the kind of problem coroutines solve. The yield statement in my server-side code becomes a yield expression. The client sends the generator the result of testing the card and that becomes what the yield expression evaluates to.

Have I understood coroutines correctly? If so, I can't wait for Python 2.5!

by jtauber : Created on Nov. 13, 2005 : Last modified Nov. 13, 2005 : Categories python : 8 comments (permalink)

Optical Illusion

Okay, so this is just about the coolest optical illusion I've ever seen. Especially the second part about the pink dots disappearing all together.

Apparently the visual cortex only cares about differences and the pink dots are fuzzy enough (especially when you are focused on something else) that they seem constant even though the eye is doing its usual fast little movements (saccades). The green appears because a reduction in pink and a gain in green are the same thing.

Jenni pointed out to me that

if you fixate somewhere outside the circle, it still works, but if you move your focus to another point outside the circle, you can see the pink again. You don't have to look at the pink dots again to make them reappear. You just have to move them to a different point on the retina.

by jtauber : Created on Nov. 13, 2005 : Last modified Nov. 13, 2005 : 3 comments (permalink)

More on the One Red Paperclip

In response to my comments on One Red Paperclip project and the benefits of trade, Mark Baker wonders:

if there's any way to benefit from this asymmetry on a large scale?

But I'm not sure there is an asymmetry. Remember that both parties in each exchange value what they are receiving more than what they are giving. The exchange might look asymmetric to a third party but that third party might have different values than the two participating in the exchange.

Clearly it seems dramatic when you look at the start and end points but remember also that each step is with a different person. So say A gets traded for B which gets traded for C and so on to Z.

It's possible that every participant along the way could value Z more than A but still be perfectly happy with their individual exchange.

One might argue that the person giving up Z for Y might have accepted A on the grounds that they could have done the A, B, ... Y exchanges themselves but there is the transaction cost of discovery that the person doing all the exchanges has to bear. When you think about it, the person who started with A is doing a benefit to everyone along the way, even if he's just motivated by getting Z for himself.

I think one also needs to consider that the person who gave up, say, L for K might then go trade K for something even more valuable to them, so it's not just the people on the path from A to Z that participate in some sense.

The transaction cost of discovery might be very high and this might be the undoing of a project like One Red Paperclip. How does Mr Paperclip know that exchanging P for Q gets him closer to Z? Do the self-organizing benefits of a free market really come into play when there is one person essentially trying to coordinate? Finding the individual exchanges that would lead to a particular goal sounds like a job for the market as a whole, not one individual.

Wow. Mark's question opened up a whole bunch of thoughts. And I didn't even get to his second question about the long tail. I also didn't talk about arbitrage which presumably is relevant to all this. And eBay has got to factor in somewhere :-)

As I'm just an economics novice, I'd really like to get some of my favourite economics bloggers to post their thoughts on this. I'll email Tyler Cowen and Peter Boettke and link to their posts if they make them.

by jtauber : Created on Nov. 12, 2005 : Last modified Nov. 12, 2005 : Categories economics : 1 comment (permalink)

First Email, Now My iMac

A couple of days ago, my iMac turned off. By itself. I didn't think much of it at the time. I thought maybe I'd shut it down and forgotten about it.

But it happened a couple more times last night and this morning. Now it dies within a minute or two of starting.

Definitely won't get stuff done this weekend that I was planning. Oh well :-)

UPDATE (2005-11-13): Now it dies within seconds of starting. I'd say the power supply is fried. From a little research it seems to be a known issue. Hopefully the local service place has power supplies in stock and can fix it on the spot.

by jtauber : Created on Nov. 12, 2005 : Last modified Nov. 12, 2005 : 0 comments (permalink)

Relational Python: Displaying Relations

Here is the first pass of a method I wrote for displaying the relation in tabular form. One or two of the for loops could probably be replaced with a list comprehension and I should probably write to a file object that gets passed in rather than use print, but it serves the purpose of pretty printing during experimentation on the relational operators.

It will result in a display like:

    +-----+-------+-----+--------+
    | ENO | ENAME | DNO | SALARY |
    +-----+-------+-----+--------+
    | E1  | Lopez | D1  | 40K    |
    | E3  | Finzi | D2  | 30K    |
    | E2  | Cheng | D1  | 42K    |
    +-----+-------+-----+--------+

If it seems inefficient that display uses self.tuples() rather than self.tuples_, it is because that way it will work later on on views where tuples() is dynamic.

    def display(self):

        columns = range(len(self.attributes_))
        
        col_width = [len(self.attributes_[col]) for col in columns]

        for tupdict in self.tuples():
            tup = self._convert_dict(tupdict)
            for col in columns:
                col_width[col] = max(col_width[col], len(tup[col]))
        
        hline = ""
        for col in columns:
            hline += "+-" + ("-" * col_width[col]) + "-"
        hline += "+"

        def line(row):
            l = ""
            for col in columns:
                value = row[col]
                l += "| " + value + (" " * (col_width[col] - len(value))) + " "
            l += "|"
            return l
    
        print hline
        print line(self.attributes_)
        print hline

        for tup in self.tuples():
            print line(self._convert_dict(tup))

        print hline

by jtauber : Created on Nov. 11, 2005 : Last modified Nov. 11, 2005 : Categories python relational_python : (permalink)

Email Outage

If you've sent me email in the last 18 hours, I haven't been able to read it and may not be able to do so for some time. My mail provider has had an outage (8+ hours so far) and is claiming that it will still be hours before service is returned.

UPDATE (2005-11-12): Email is still down. Could turn out to be days. Looks like Merlin Mann uses the same mail host.

UPDATE (2005-11-13): I woke up this morning and mail was working. Unfortunately iMac isn't.

by jtauber : Created on Nov. 11, 2005 : Last modified Nov. 12, 2005 : 4 comments (permalink)

One Red Paperclip and the Benefits of Trade

The One Red Paperclip project and the Donald Duck story it reminded Hans Nowak of is a nice example of a key principle in economics: voluntary trade benefits both parties.

Gene Callahan, in his wonderful book Economics for Real People, makes the point that when we trade voluntarily it isn't because we give equal value to what we are receiving and what we are giving—it is because we value what we are receiving more than what we are giving. If we valued them the same, there would be no reason to trade. (Note that I'm not just talking about monetary value.) The exact same thing is true of the other party.

People value things differently, in part because people just have different values but also because of marginal utility. Marginal utility is just the idea that the value to you of something is based on the value of getting it in addition to what you already have. e.g. if you already have enough food to eat, you might not value extra food as much. A second car isn't as valuable as the first. A third even less so. The animal in the Donald Duck cartoon that needed the string for his kite was willing to give up a pocket knife for it but if someone offered him the same deal again 5 minutes later, he likely would have rejected it as the marginal utility of the string had greatly reduced.

by jtauber : Created on Nov. 10, 2005 : Last modified Nov. 10, 2005 : Categories economics : (permalink)

5 things

Dave Warnock has tagged me in this blogospherical equivalent of a chain-letter.

Ten years ago

Finishing up my linguistics degree at University of Western Australia. Working part-time there as their first webmaster. Conspiring to get SGML used on the Web.

Five years ago

Living in Portsmouth, New Hampshire. Working at Bowstreet Software as Director of XML Technology. Going to conferences every couple of weeks to talk on XML and Web Services.

One year ago

Living back in Perth, but working for mValent in Boston. Working on the editing and scoring for my first short film, Alibi Phone Network. Resumed work on my morphological database of the Greek New Testament, MorphGNT and was in the midst of a major rewrite of Leonardo (release as 0.4)

Five yummy things

Kaju katli, good sushi, anything at Tu Y Yo (Somerville, Mass.), anything cooked by HB, anything cooked by my Mum.

Five songs I know by heart

Too many to name. Certainly anything by Nelson James :-)

Five things I would do with a lot of money

Relative to most of the rest of the world, I already do so I'd do what I'm already doing.

Five places I would escape to

A library, a film, a piano, HB's house, my parent's house.

Five things I would never wear

Wouldn't or shouldn't? :-)

Five favourite TV shows

Babylon 5, Seinfeld, ...

Five things I enjoy doing

Writing open source software, making films, producing records, teaching, learning

Favourite toys

My Macs, my Digi 002, my Canon 10D, my books (do they count as toys?)

Five people who get this 'meme'

Nelson, Graham, Rick, Anthony, Jenni

by jtauber : Created on Nov. 10, 2005 : Last modified Nov. 10, 2005 : 0 comments (permalink)

Relational Python: Basic class for relations

A relation is basically a set of dictionaries (called tuples) where each dictionary has identical keys (called attributes).

While, as you'll see in the next couple of posts in this series, my display routine and the initial relational operators work on iterations over plain Python dictionaries, I found it useful to implement a relation, at least in these preliminary stages, using a different internal structure (something Date is clear in his book he has no problem with).

Basically, I store the each tuple internally as a Python tuple rather than a dictionary and the relation also keeps an ordered list of the attributes which is used as the index into the tuples. Amongst other things, this gets around dictionaries not being hashable. It's also a storage optimization akin to using slots for Python attributes.

class Rel:

def __init__(self, attributes): self.attributes_ = tuple(attributes) self.tuples_ = set()

def add(self, tup): self.tuples_.add(self._convert_dict(tup))

def _convert_dict(self, tup): return tuple([tup[attribute] for attribute in self.attributes_])

def attributes(self): return set(self.attributes_)

def tuples(self): for tup in self.tuples_: tupdict = {} for col in range(len(self.attributes_)): tupdict[self.attributes_[col]] = tup[col] yield tupdict

Note that Rel.attributes and Rel.tuples return a set of attributes and a generator over dictionaries just as you would expect.

By implementing the handy little helper function:

def d(**args):
    return args

we can now create a relation and add tuples like so:

rel1 = Rel(["ENO", "ENAME", "DNO", "SALARY"])

rel1.add(d(ENO="E1", ENAME="Lopez", DNO="D1", SALARY="40K")) rel1.add(d(ENO="E2", ENAME="Cheng", DNO="D1", SALARY="42K")) rel1.add(d(ENO="E3", ENAME="Finzi", DNO="D2", SALARY="30K"))

In the next post I'll share my display routine and, following that, start on the relational operators, beginning with PROJECT.

by jtauber : Created on Nov. 9, 2005 : Last modified Nov. 9, 2005 : Categories python relational_python : (permalink)

Multiclassing versus single classing in RPGs and real life

Sometimes I think about alternative paths I could have followed vocationally and the steps I would take to get there if I were much younger and making that choice now. It's almost like creating a new character in a role-playing game: "I'll start off as a economics undergraduate and then after five levels I'll switch to the prestige class Austrian Economist and go on a quest for Bigby's Prize in Honour of Alfred Nobel".

In RPGs, if you feel your character "concept" isn't working, you can go back and start a new one. Of course, that's much harder to do in real life, although some people do go back to undergraduate studies for a complete change in career.

I'm clearly multiclassing in real life. After getting a couple of levels in Mathematician, I switched over and progressed three or four in Linguist. Then I went and levelled up in Technologist a good eight or ten levels (the first few specialising in the schools of Web and XML but then also adding Python and Open Source). Somewhere along the way I picked up a level in Filmmaking and a couple in Music.

Progression as a multiclass character is much slower because you're a jack of...no...a journeyman of some.

Oddly enough, very few of my pen-and-paper RPG characters have ever been truly multiclass. They've either completely been in one class or had a few initial levels in one then made a permanent switch.

I think I'm attracted to the singular focus of just one class but, without the ability to go back and start a new character in real life, I've decided multiclassing is the way to go for me.

by jtauber : Created on Nov. 9, 2005 : Last modified Nov. 9, 2005 : 0 comments (permalink)

Relational Python

Reading Chris Date's Database in Depth, I started to wonder what it would be like to have relational algebraic operations in Python. This is the first in a series of posts exploring that idea.

I'll start by defining a simple class for relations. In subsequent parts, I'll implement tabular display, the relational algebra and then see where it goes from there.

The goal is not to try to implement a SQL database in pure Python. Rather the goal is to extend Python's rich data structures like dictionaries and sets with additional concepts from relational theory.

It's an exploration for me and you get to come along for the ride (sort of like the Poincare Project which is by no means over yet). Maybe some of you will learn something. I certainly hope you'll teach me a thing or two in the comments and in your emails.

by jtauber : Created on Nov. 9, 2005 : Last modified Nov. 9, 2005 : Categories python relational_python : (permalink)

Mark Ellison Regains Lead

Mark Ellison has regained the lead in Category IV of my ongoing programming competition.

by jtauber : Created on Nov. 8, 2005 : Last modified Nov. 8, 2005 : Categories programming_competition : 0 comments (permalink)

Working on atompub-protocol-06

I've just started working on moving Demokritos over to supporting atompub-protocol-06.

I've completed the changes to the introspection document. Next step will be throwing away the old collection format in favour of a normal atom feed. I'll also need to implement support for collection indexing. I'm glad APP defines the manner in which ranges of a collection are accessed because it saves us having to come up with something proprietary for Leonardo.

by jtauber : Created on Nov. 8, 2005 : Last modified Nov. 8, 2005 : Categories python atompub leonardo demokritos : (permalink)

MorphGNT 5.08 Released

I'm pleased to announce the release of a new version of MorphGNT, the morphologically parsed Greek New Testament database made available under a Creative Commons license.

I haven't put together the change log yet but will shortly.

UPDATE (2005-11-08): Change log is now available on MorphGNT page.

by jtauber : Created on Nov. 7, 2005 : Last modified Nov. 8, 2005 : Categories morphgnt : 1 comment (permalink)

Apple Shipping Woes

I made the mistake last week of ordering a bunch of stuff from the online Apple Store at the same time as preordering Aperture. Just about the time I thought the stuff shipping immediately would arrive, I discovered that it hadn't even shipped yet because Apple doesn't ship partial orders. I guess I'm spoilt by Amazon.

I'm going to try to give Apple a call on Monday to see if they'll just go ahead and ship the rest of the order now—otherwise I'll have to cancel the entire order and start again. Can't say this is the first time Apple shipping has let me down. (Actually, Amazon did once too, but it was an Apple product they were shipping!)

by jtauber : Created on Nov. 5, 2005 : Last modified Nov. 5, 2005 : 0 comments (permalink)

Why the Q in IRAQ?

Hans Nowak asks:

Why is "Iraq" spelled with a q?

Iraq in Arabic is العراق

The final letter (Arabic is written right-to-left) is ق (qāf) which is a uvular plosive. A uvular plosive is produced like a velar plosive (English 'k') but with the back of the tongue touching the roof of the mouth further back.

Arabic also has a velar plosive ﻙ (kāf).

'k' is a common transcription for velar plosives and 'q' is a common transcription for uvular plosives.

So Iraq is spelled with a 'q' because the final consonant is a uvular plosive and not a velar plosive (even though English speakers pronounce it as if it were a velar plosive). Irak would be a different word in Arabic.

by jtauber : Created on Nov. 3, 2005 : Last modified Nov. 3, 2005 : Categories linguistics : 2 comments (permalink)

Questioning the Authorship of Bach's D minor Toccata and Fugue

Bach's D minor Toccata and Fugue has long been one of my favourite works. Even though I find the exposition of the fugue oddly simplistic for Bach, I've always loved the drama of the work and its improvisational feel.

So, like Tyler Cowen, I'm shocked to discover that some scholars doubt its authenticity.

The arguments seem to include:

  • lack of an autograph manuscript
  • use of the term Toccata instead of Prelude
  • certain note progressions that "Bach would never have allowed" (I'll have to investigate more)
  • unusual final cadence
  • double at the octave and other "rule" breaking
  • contains many violin idioms (again, I'd like to investigate more)
  • simplistic counterpoint (I'll grant them that one)

One theory is that it is an organ transcription of a piece for strings by another composer.

Like many popular articles on scholarly controversy, it's not easy to tell just how mainstream a view it is. It happens all the time in Biblical Studies that one scholar's controversial viewpoint is published in popular article as though it were scholarly consensus.

I'm also dubious of authorship debates in general just because I think the variation within one author can be much greater than the average difference between authors. And isn't a composer allowed to experiment and grow?

As (a sorry excuse for) a composer, I'm very aware of just how different my works from different time periods are.

Still, it's a fascinating theory, and one I might have to dive into a bit more.

by jtauber : Created on Nov. 2, 2005 : Last modified Nov. 2, 2005 : Categories music : 0 comments (permalink)

Word of the Day: Mojibake

According to wikipedia, Mojibake refers to the gibberish characters one gets when a document's character encoding is wrongly interpreted.

(via Infundibulum)

It's actually a word I'll probably find myself using.

by jtauber : Created on Nov. 2, 2005 : Last modified Nov. 2, 2005 : 0 comments (permalink)

There Needs to Be Enough Subject-Verb Agreement

In my previous blog entry I said:

so there need to be enough serviceable customers locally to sustain you

I initially wrote:

so there needs to be enough serviceable customers locally to sustain you

but I decided that "need" has to agree with "serviceable customers".

I confess, though, that I struggled for a while with it (although, as with many cases like this, it's clear to me now that I've thought about it).

by jtauber : Created on Nov. 2, 2005 : Last modified Nov. 2, 2005 : Categories linguistic_observations : 0 comments (permalink)

The Size of the Perth Market

In an answer to a question asked at the end of my talk on Monday, I suggested that mValent couldn't have been started in Perth because the market is too small. I didn't say the market is too small for software companies in general, just that certain types of software (and markets) require you to be close to the customer in the early stages so there need to be enough serviceable customers locally to sustain you in the initial years. In mValent's case, I don't think that's true of Perth.

I suspect that successful software companies based in Perth generally either have an ideal customer profile that fits more local companies or have a more mature market that is easier to service remotely.

by jtauber : Created on Nov. 2, 2005 : Last modified Nov. 2, 2005 : Categories entrepreneurship : (permalink)

Inaugural Commercial Technology Network

Last night I was the guest speaker at the inaugural Commercial Technology Network. CTN is "an initiative to foster collaboration between entrepreneurs, service providers, suppliers, and most importantly, customers."

I was asked to speak on how I came to be involved in the founding of mValent and the role networking played.

Besides the actual telling of the story (starting all the way back at my childhood entrepreneurial endeavours) I tried to stress the importance of individual relationship building and, in particular, individual contributions to one's "tribe", particularly through a willingness to share knowledge.

One of my heroes, Tom Peters, has long talked about loyalty to one's network and recently, I've been reading the Tim Sanders book Love is the Killer App where he argues that "nice, smart people can win business and influence friends by sharing generously."

It was certainly a great honour that Michael Kyriacou and the other members of the CTN steering committee asked me to give the inaugural talk. It seemed to be well received.

by jtauber : Created on Nov. 1, 2005 : Last modified Nov. 1, 2005 : Categories entrepreneurship speaking : (permalink)

iTunes Music Store Opens in Australia

The Apple release I've really been waiting for...

iTunes Music Store is now available to people in Australia.

by jtauber : Created on Oct. 24, 2005 : Last modified Oct. 24, 2005 : Categories apple : (permalink)

Aperture

Back in March, I asked Why No Apple Pro Photo App?

Looks like now there is one.

UPDATE (2005-10-20): I've now had a chance to watch the quick tour videos. It looks fantastic as a photographic productivity tool. It's no Photoshop when it comes to image manipulation (although perhaps it will eventually develop into that) but for actually managing photos it looks like they've got a lot of things right.

by jtauber : Created on Oct. 19, 2005 : Last modified Oct. 20, 2005 : Categories apple : (permalink)

Keep the Academic Writing Samples Simple, Stupid

James Gosling recalls his PhD days:

Back when I was a grad student I was spinning out of control trying to come up with a thesis topic. My advisor took me out to lunch one day and asked me a simple question: "What is a PhD thesis?" I yattered on for a while and he listened patiently. Eventually he said "No: It's just a stack of 100 pages with 4 signatures on top". I was falling into a common grad student trap of feeling that I needed to do something grandiose and solve all of the worlds problems. He was into "keep it simple". So I did, and I came up with a pretty straightforward thesis proposal. The odd thing was that when I finally finished my thesis, I realized that I had only delt with one sentence out of the simplified proposal.

This is significant for me, not because I'm having problems with my thesis, but with something much smaller. For my application, I have to provide samples of academic writing. I have two papers in mind I want to write (new papers because I'm too embarrassed about anything I wrote during my undergraduate days ten years ago). The problem is I think I'm setting the bar too high. I keep thinking these two papers have to be ground-breaking work. But they aren't even my thesis. They are just samples of academic writing. As long as remind myself they are just "a stack of 10 pages that proves I can write English and put together a bibliography" then I think I'm in good shape.

by jtauber : Created on Oct. 16, 2005 : Last modified Oct. 16, 2005 : Categories linguistics phd : 1 comment (permalink)

Error 400 Trying to Watch Apple Special Event

Last month, when I wanted to watch the Apple Special Event, QuickTime just gave me a 400 Bad Request error.

Same thing is happening with this month's Apple Special Event.

Anyone else getting a 400 Bad Request error?

In the case of the September event, it finally started working after a few days. Surely Apple can do better than this.

by jtauber : Created on Oct. 12, 2005 : Last modified Oct. 12, 2005 : 1 comment (permalink)

New Draft of Atom Protocol Out

draft-ietf-atompub-protocol-05 is now out.

I haven't looked at it yet to see what will have to change in Demokritos. I will, however, delay releasing Demokritos until I've implemented at least as much of 05 as I had 04.

by jtauber : Created on Oct. 12, 2005 : Last modified Oct. 12, 2005 : Categories atompub demokritos : (permalink)

Alibi Showing at New Hampshire Film Expo

I've neglected to mention until now that Alibi Phone Network made the official selection at the New Hampshire Film Expo which is on this week in Portsmouth. That's four festivals we've made the official selection for. Unfortunately I won't be able to make this one.

Tom Bennett had a great poster made for this festival which I'll hopefully be able to put online at some stage.

Tom is also a finalist in the screenplay competition for his feature script The War in My Backyard.

by jtauber : Created on Oct. 10, 2005 : Last modified Oct. 10, 2005 : Categories filmmaking alibi_phone_network : (permalink)

TiddlyWiki and Atom Store

Continuing my thinking about To Do List Aggregation, it would be interesting to see a variant of the amazing TiddlyWiki that is backed by an Atom Store.

Probably wouldn't be that hard to do. Any Ajaxians interested in working with me on something like that?

by jtauber : Created on Oct. 9, 2005 : Last modified Oct. 9, 2005 : 2 comments (permalink)

To Do List Aggregation

For a while now I've been thinking about the need for a To Do List Aggregator.

While some "next actions" can be manually put on a list, some are time-based (either coming from a calendar or from something like Sciral Consistency). Others come from yet other applications: flagged emails or blog entries, unread email, etc.

Having multiple "inboxes" is a bad thing. So what would be nice would be an application that simply aggregated action items from multiple electronic inboxes, or what I'll call "Action Feeds".

By separating aggregation from the feeds themselves, it would be possible for people to develop all sorts of clever action feed generators that ranged from simple manual lists to integrations with calendars, email, etc.

The list aggregator would be similar to a regular blog aggregator but with a few important differences:

  • priority and not time would be the key ordering criterion
  • 'done' and not 'read' would be the key annotation
  • the items wouldn't necessarily have meaningful content
  • it would be nice if marking items done and adding certain new kinds of items could be done from the aggregator and communicated back to the feed generator.

However, I still think Atom could be the basis for the protocol between aggregator and action feed generators. The comments I make in the UPDATE to Google Reader about IMAP are relevant here too.

by jtauber : Created on Oct. 9, 2005 : Last modified Oct. 9, 2005 : 3 comments (permalink)

Serenity

Saw Serenity last weekend but haven't had a chance to blog about it until now.

Enjoyed it a lot and will probably go see it again in Australia.

Some of my favourite aspects of it, as a filmmaker:

  • the layers of flashback at the start: voice-over becomes childhood lesson becomes flash-back becomes security video
  • the long tracking shot through the ship, introducing all the characters
  • the use of hand-held-style camera shake and refocusing during dramatic CGI shots that made it look like news or doco footage.

You can even observe the first point in the comfort of your own home as the first nine minutes are online at Vividas.

by jtauber : Created on Oct. 8, 2005 : Last modified Oct. 8, 2005 : Categories filmmaking : 0 comments (permalink)

Google Reader

Google recently launched the beta of Google Reader which is a web-based feed aggregator with the GMail-look you'd expect from Google. Like GMail, feeds are tagged rather than in folders.

If I were still using Bloglines, I might consider switching but I'm pretty attached to NetNewsWire so I'm not sure. The cost of switching is high for me because I flag a lot and I'd like my 'read' list to be consistent between clients. With email, that's achievable because of IMAP.

I took a look at my server logs to see if Google is grabbing feeds with something different from their GoogleBot. Turns out they are. Since 7th Oct I've got regular accesses to my atom feed from a user agent:

FeedFetcher-Google; (+http://www.google.com/feedfetcher.html)

The page linked to in the user agent string makes it clear that FeedFetcher is only for user-initiated feed retrieval (i.e. subscriptions in Google Reader or the personalised Google home page) and that the blog search and regular Google search are crawled for separately.

UPDATE: I started thinking more about IMAP for feed reading. Atom is the obvious contender but something more is necessary because the server needs to indicate what's read/unread and the client needs to be able to mark entries read/unread. A simple extension element would work for the former. What about the latter?

by jtauber : Created on Oct. 8, 2005 : Last modified Feb. 11, 2006 : 1 comment (permalink)

Demokritos and Leonardo

What is Demokritos?

Demokritos is an open source Atom Store I'm writing in Python.

What is the relationship between Demokritos and Leonardo?

The focus of Demokritos is implementing the Atom specifications. The focus of Leonardo is implementing a practical CMS for personal websites. Although the two will likely merge at some point, I think doing so at this stage would slow down things too much.

What's the short term plan for Demokritos?

Get a 0.1 release out that can at least be used for interoperability testing.

What's the short term plan for Leonardo?

Work out what else (if anything) needs to be done for a 0.7 release; start a beta cycle.

by jtauber : Created on Oct. 8, 2005 : Last modified Oct. 8, 2005 : Categories python leonardo demokritos : (permalink)

XML Catalog Spec Approved

I've just read, Via Anthony Coates, that OASIS has approved the XML Catalog 1.1 spec (disclosure: I voted YES to it)

XML Catalogs are near and dear to my heart...

Back in 1995, I was thinking about how SGML could be used on the Web and decided that one thing that would be useful is resolution of SGML public identifiers. So I proposed an extension to the existing SGML Catalog spec (under SGML Open, which was the forerunner to OASIS) to make them operate more like DNS than /etc/hosts for name resolution. Paul Grosso invited me to present the idea to an SGML Open meeting in early 1996. It was there that I met Jon Bosak and we shared our common vision for SGML on the Web. Just a couple of months later, Jon emailed me to say he had convinced the W3C to let him start a WG to work on this and would I like to be involved.

by jtauber : Created on Oct. 5, 2005 : Last modified Oct. 5, 2005 : Categories xml : 0 comments (permalink)

Laura Breckenridge: The Next Chapter

Back at SxSW I said of the film Southern Belles:

The real find was Laura Breckenridge, who plays Bell. Laura is definitely an actress to keep an eye on.

Well, Laura stars in the new series Related airing on the WB this Wednesday.

I can't comment on whether the series is any good, but Laura was certainly impressive in Southern Belles so it might be worth checking out if you're in the US.

Plus it's important to support actors who are into Ancient Greek :-) (Laura is a classics major at Princeton)

by jtauber : Created on Oct. 3, 2005 : Last modified Oct. 3, 2005 : (permalink)

The Circle is Not Simply Connected

In the comments to Number of Connected One-Dimensional Manifolds, I questioned why the circle (or more precisely the one-dimensional sphere S^1) was not simply connected. I wasn't trying to argue—I just didn't have the intuition myself, for some reason.

It's funny because now it's bleeding obvious to me that it isn't simply connected. A loop that goes from one point to another then back again clearly isn't homotopic to a loop that simply goes around the circle.

I think I was letting my intuition that S^n is simply connected override this fact. I was over generalising in my mind. S^n is simply connected only for n > 1. Thanks to Michael Hamm and Allan Engelhardt for setting me straight.

UPDATE: next post

by jtauber : Created on Oct. 2, 2005 : Last modified Aug. 9, 2007 : Categories poincare_project : 2 comments (permalink)

The Power of Editing

This has already gone around the blogosphere but I shouldn't assume that people that read this blog read the same blogs as I.

Fake Trailer for 'Shining'

I think the first time I truly realised the power of editing in film was listening to the writer/director commentary on Jerry Maquire. Cameron Crowe said that the Tom Cruise - Renee Zellweger story was secondary in his script and during shooting. It was editor Joe Hutshing's rough cut that dramatically altered the story's emphasis and Crowe decided that he preferred it.

It's almost impossible to tell from the final cut of a film just how much the editor did to change the story. An editor may save a film but you'd never be able to tell this without seeing the raw footage. I once asked an editor "how do you judge good editing for, say, the Academy Awards, given that without seeing the raw footage, you really don't know just how much the editor contributed." His response: "you can't and that's the dirty secret of editing awards".

by jtauber : Created on Oct. 2, 2005 : Last modified Oct. 2, 2005 : Categories filmmaking : (permalink)

What Does 'Relational' Mean?

I would guess that many people think that "relational" in "relational database" has to do with relationships between entities expressed via foreign keys.

I confess that's what I thought until I started reading Chris Date.

In fact, the term "relational" is a reference to the mathematical concept of a relation that I've touched on as part of the Poincare Project.

This fact was obscured to me somewhat by the fact that I've typically only dealt with binary relations but relations can be n-ary.

A relation is really just a subset of a cartesian product.

Consider the set of Employees at a company and the set of Departments. Which employees work at which departments can be expressed as a set of ordered pairs, a subset of the cartesian product Employees x Departments. In mathematical terms, this is a relation.

If we wanted to express, say, extension number as well, we could take as our relation a subset of the cartesian product Employees x Departments x Extensions. This relation is just a set of tuples.

This is the sense in which "relational" is used in "relational database".

In SQL, tables almost correspond to relations and rows to tuples. I say almost because SQL violates the relational model in allowing duplicate rows.

by jtauber : Created on Sept. 28, 2005 : Last modified Sept. 28, 2005 : 0 comments (permalink)

William Bardon Takes the Lead In Category IV

William Bardon just submitted two entries in Category IV of the programming competition that beat the reigning champion, Mark Ellison.

by jtauber : Created on Sept. 26, 2005 : Last modified Sept. 26, 2005 : Categories programming_competition : 0 comments (permalink)

Coding Weekend

This weekend is the first weekend in a long time where I have the opportunity to do some solid open source coding.

So I've decided that's what I'm going to do. I have a particular standards-based project in mind that I'm starting largely from scratch but will hopefully be usable by Monday.

I won't say much more now other than to say that (i) it's pure Python; (ii) it's relevant to Leonardo and will probably be folded into (or at least used by) Leonardo at some stage.

I'll post more as I progress.

UPDATE (2005-09-24): Spent yesterday afternoon and evening implementing a library for parsing, manipulating and generating one format. Have spent today implementing the less mature protocol that goes with it. Might not finish the second part tonight but by the end of the weekend I should have a working system that can participate in interop testing with others. Currently at 2000 lines of Python code and 88% code coverage on the unit tests.

The software will be called DEMOKRITOS so no prizes for guessing what I'm implementing :-)

UPDATE (2005-09-26): By last night I'd got to the point where I had a working Atom Store with support for generic collections. It won't take too much work to finish off support for atom entry collections. I should be able to do a release in the next couple of days for interop testing although, without authentication and authorization, it won't really be usable in the "real world" just yet.

by jtauber : Created on Sept. 23, 2005 : Last modified Sept. 26, 2005 : 5 comments (permalink)

Microsoft blames Sun

This crash analysis message seen in a colleague's browser gave me a chuckle.

by jtauber : Created on Sept. 23, 2005 : Last modified Sept. 23, 2005 : 0 comments (permalink)

Number of Connected One-Dimensional Manifolds

The current Wikipedia article on Manifolds says that:

  • The open interval (0,1) is a one-dimensional manifold without boundary.
  • The closed interval [0,1] is a one-dimensional manifold with boundary.
  • Every connected one-dimensional manifold is homeomorphic to one or the other of these.

I'm confused by the third statement as I would have thought that the half-open interval (0,1] and the circle are both connected one-dimensional manifolds but that neither of them are homeomorphic to either the open or closed intervals.

What am I missing?

UPDATE (2005-10-03): Looks like the Wikipedia entry is, in fact, wrong in making the third statement above.

UPDATE: next post

by jtauber : Created on Sept. 22, 2005 : Last modified Oct. 2, 2005 : Categories poincare_project : 9 comments (permalink)

New Leader in Programming Competition

Mark Ellison (who has just started blogging at rip-roaring pace) submitted entries in each category of my programming competition and completely blitzed the competition. See the results!

His algorithm rivals what I've been able to achieve with simulated annealing.

by jtauber : Created on Sept. 20, 2005 : Last modified Sept. 20, 2005 : Categories programming_competition : 1 comment (permalink)

The Naming of Musical Notes, Part II

In Part I, we saw that the key signature in modern music notation supports 15 major keys although only 12 are usable at a time if one wishes to avoid enharmonic scales. Here are the 15 with the 12 that Bach used in the major key preludes and fugues of his Well-Tempered Clavier in bold.

C# F# B E A D G C F Bb Eb Ab Db Gb Cb

Note that C#, F# and B are no more preferable than Db, Gb or Cb. A choice of 12 of the 15 will always include E, A, D, G, C, F, Bb, Eb, Ab but 8 combinations exists for choosing C# versus Db, F# versus Gb and B versus Cb. Mind you, one would probably be unlikely to choose Gb over F# if they had not also chosen Db over C#. That would mean having a 4-flat and a 6-flat but no 5-flat. So, in practice, a composer choosing 12 major keys from the 15 possible would probably choose either C#-Ab (as did Bach), F#-Db, B-Gb or E-Cb.

But we are still missing some enharmonic alternatives. Each of the seven letter names can appear with a sharp or flat (or nothing) and that gives us 21 note names:

Ab A A# Bb B B# Cb C C# Db D D# Eb E E# Fb F F# Gb G G#

In particular the following are not from amongst our major key candidates:

G# D# A# E# B# Fb

If we have a look at our minor key signatures, the following are missing:

E# B# Fb Cb Gb Db

These are acceptable note names, they just can't be (major and minor, respectively) keys. Why not? Well a clue is in the fact that we've already seen the keys that have up to 7 sharps or 7 flats. Given there are 7 distinct note names in an octave, we've run out of notes we can make sharp or flat!

C# major, for example, already sharpens all 7 letter names. What would G# do?

The C# major scale has the following notes:

C# D# E# F# G# A# B# C#

Note that even though there are alternative enharmonic spellings of these notes when considered in isolation, in the context of the C# major scale they must be spelt as above.

This is because only one note can use each letter name. Furthermore, even though the notion of a double-flat or double-sharp is available for individual chromatic notes in a piece, the diatonic notes of a scale are restricted to natural, flat or sharp.

We'll explore these two conventions more in Part III.

by jtauber : Created on Sept. 15, 2005 : Last modified Sept. 15, 2005 : Categories music_theory : 4 comments (permalink)

New CEO at mValent

I don't often blog about work, but I'm delighted to now be able to announce that mValent has a new CEO, Joe Forgione. I haven't met him in person yet but I'll get a chance on Friday when I arrive at the US office.

It's exciting times at mValent with a major release just around the corner and a veteran chief executive ready to take us to the next stage of the company's growth.

by jtauber : Created on Sept. 13, 2005 : Last modified Sept. 13, 2005 : Categories mvalent announcements : 0 comments (permalink)

Approaches to Tracking Vocals

Had a final recording session with Nelson before my next trip to the US.

One issue we often wrestle with is whether to do full-song takes or per-section takes.

I think the following might work well for us:

  • do a few rough full-song takes with Nelson free to improvise and embellish
  • listen to the song with those takes for a while (weeks) to see what variants we like (really needs to be done a distance from the recording session so we're hearing the song more like a normal listener does)
  • come together and review what bits we like / didn't like
  • do per-section takes to get each section sounding the way we liked best

I'll try this approach with a few more songs and see how it works out.

by jtauber : Created on Sept. 11, 2005 : Last modified Sept. 11, 2005 : Categories record_producing_and_engineering : 0 comments (permalink)

Old Classical Piece of Mine

I've never made any of my classical music available on the web and I thought now is as good a time as any. Here's an MP3:

Divertimento for Three Clarinets — First Movement

I wrote this piece in 1988-1989 at the height of my study of and love for the music of Mozart. I was fifteen at the time and this is probably the best piece I wrote while at high school (which isn't saying much—there is a reason most composers retract their juvenilia.

The MP3 above is a realisation in Logic Pro using the Garritan Personal Orchestra samples. The piece has never actually been performed with three clarinets. It had one public performance—in Canberra at the National Science Summer School that I attended in early 1990. The performance there was with a flute, violin and another violin restrung as a viola.

by jtauber : Created on Sept. 10, 2005 : Last modified Sept. 10, 2005 : Categories music_composition : 9 comments (permalink)

Update

Only a couple of posts in the last two weeks. I think that's the worst blogging drought I've had in a long time (mayb