Simple Solutions to Pointless Puzzles

I got fed up with the Focus puzzle in my local newspaper. For those who haven't come across it, you have a square of nine letters, like so


You have to make as many words as you can with the letters. Each word much be at least four letters. Each word must contain the central, special letter (R in the above example). No proper nouns. No -s plurals of other words.

A quick bit of python, along with the PyEnchant library nets the following code.

import enchant

def checkword(word, length, dic, required):
    """ See if a word has the required length an required letters. Removing plurals is hacked for English-speakers. """
    if len(word) < length:
        return False
    for r in required:
        if not r in word:
            return False
    if not dic.check(word):
        return False
    if word[len(word) - 1] == 's' and dic.check(word[:len(word) - 1]):
        return False
    return True

def permute(prefix, letters, length, required, dic, permutations):
    """ Generate permutations of letters, with a required length and required letters. """
    for i in range(len(letters)):
        word = prefix + letters[i]
        if checkword(word, length, dic, required):
        permute(word, letters[:i] + letters[(i + 1):], length, required, dic, permutations)

if __name__ == '__main__':
    dic = enchant.Dict()
    print dic.tag
    permutations = set()
    permute("", "sascromim", 4, set("r"), dic, permutations)
    print len(permutations), " words"
    print sorted(permutations)

With the following results: ['across', 'carom', 'commissar', 'corm', 'cram', 'crass', 'criss', 'cross', 'macro', 'micro', 'morass', 'racism', 'roam', 'sari', 'scar', 'scram', 'scrim', 'soar']

According to the puzzle, I should get 28, rather than 18. But that's better than I would ever be able to do.

Yes, the plural stuff is a bit of a hack.

New Fire Weather

Rick McRae and Jason Sharples were kind enough to give some talks on the new research into fire weather last night. Their research covers the high country of SE Australia, where I happen to live. Of course, none of this is part of official NSW RFS doctrine -- yet.

First, the TL;DR version.

  • You can get Foehn Winds in SE Australia. Particularly down on the coasts but the Brindabellas can produce the same effect in my area. These can lead to sudden drops in RH and increases in temperature in the wee hours of the morning, just when it looks like a good time for a back-burn.

  • There's a process known as channelling where wind in the lee of a steep slope causes a fire to go sideways to the prevailing wind, with lots of spotting both sideways and ahead of the wind. You can spot this by a leading edge of dark smoke moving across the wind.

  • There's an area called the thermal belt with warm, dry air on the sides of slopes, even if the top and bottom areas are cold and moist.

  • Fires evolve through small, medium, large, very large and plume-driven phases. The plume-driven phase is where the weather created by the fire feeds back into the fire itself, causing real trouble.

  • Fires in rugged landscapes are only suppressed when they exit the rugged landscape.

  • There are effects called low-level jets and inversion subsidence that can cause high points to suddenly become hot and dry at night, even though things are stable further down.

  • A simplified indicator of when things are really going to go to shit is when the temperature (Celsius) gets close to 40 more than the RH (%).

  • The HighFire Risk Project is developing tools to help decisions about these things.

Foehn (Föhn) Winds

Basically, you get a dry wind which comes down from a high area. As it comes down, the pressure increases and the temperature rises. Traditionally, these are caused by air having to rise over a range, dropping its moisture as rain and then descending on the other side. The mechanism in this neck of the woods can also be that the low-level air gets diverted, leading to the high level air dropping down into the lee of the range.

What this means is that you can get really sudden rises/drops in temperature/RH -- less than an hour -- appearing. This will really screw up your back-burn.

Foehn winds are semi-predictable. You can see when this is likely on the synoptic charts. An intense low in the Bight or a trough running NW-SE across Australia are warning signs. Apparently, there are humidity maps that the BOM produce. If you can find them (I can't, maybe here) then you can see slots of dry air coming in from the West.



Fairly high winds (this effect is pretty much guaranteed at 25kph or so) crest over a steep slope and create an eddy on the lee slope. This can be very strong and explains why, during Black Saturday, the down slopes were often more damaged than the up slopes.


We kind of get taught about this in fire weather. Now the really interesting bit. Once a fire has established itself on the lee side, the eddies start to spiral along the slope, away from the fire. So you end up with a channel of fire moving across the slope and the wind; in both directions in some cases. But it gets better. The spiralling eddies will pick up lots of embers and create spots both along the channel and in the "normal" direction of the fire. Dave Hubbard mentioned the Lake George escarpment fire from a few years back and said that this effect had happened there.


I'm not sure where to put the video Rick showed of a hill in Canberra during the 2003 fires but here will do. You can see a lot of spot fires starting and then you gets what's effectively a landscape flashover; the whole lee slope of the hill lights up at once. Yikes!

Thermal Belt

You can have cool, moist air at the peak and cool moist air in the vally. And half-way up the slope, it's hot and dry. What happens is that the top of a hill cools off rapidly at night. This cold air runs down the hill, but tends to run down the gullies only; the spurs remain warm. The cool air them pools in the valleys.


Plume-Driven Fires and Rugged Landscapes

I'm not really up on the details of all this. It's generally said that large enough fires generate their own weather. There's more to it than what I have here, but the thing that I noticed was that, once a pyro-culmulus cloud starts generating rain, the heat released from forming the rain drops gets fed back into the fire.


Rugged landscapes make everything difficult. They're also prone to multiple lightning strikes.


There's a model for fire evolution


Low-level Jets and Subsidence Inversions

These both cause sudden rises/drops in temperature/RH at high altitudes, even if everything is stable at lower altitudes. Low level jets are just what they say they are, jets of warm, dry air that have somehow got themselves trapped at a lower altitude. They come in an hit whatever peak happens to be in the way. Subsidence Inversions are high-level temperature inversions that lower throughout the night. Eventually, high peaks will punch through the inversion layer.

Mildish version of these events happen about every 4-5 days in the high country. Strong versions about once every 9 days. So you can


Simple Fire Danger Estimation

FMI = 10 - 0.25 (T - H) where FMI=Fuel moisture index/drought factor (0-10), T = temperature (Celsius) and H = relative humidity
FDI = W / FMI where FDI = Fire danger index, W = wind speed (kph)

As T - H approaches 40, the FMI approaches 0 and the FDI takes off into the stratosphere. This measure doesn't seem to produce the same really high peaks as the McArthur meters on very high days, but it's pretty easy to calculate.



There's a poster of watch-out rules of thumb for these effects.

  • Current Music
    The Voice - The Boys Next Door

From the Bungendore School Playground

With a due nod to the Opies.

To the tune of "This Old Man"

I hate you,
You hate me.
Tinky-winky shot Dipsy.
Fifty bullets through the head.
Sorry, La-la, Dipsy's dead.

La-la cried,
Then she died.
Po committed suicide.
Tinky-winky did the same.
Teletubbies are insane.

My little pony,
All skinny and bony.
Put it in the microwave,
And watch it burn!

Put it to bed.
Chew off it's head.
My little pony,
Is officially dead.

Row, row, row your boat,
Gently down the stream.
Push your teacher overboard,
And watch her kick and scream.

nvidia, mythbuntu, 10.04, overscan

Posted as a warning to to others.

I've upgraded from mythbuntu 09.10 to 10.04 and had a bit of a wobbly time. The playback tends to have performance problems and jerk and freeze quite often. And the TV out, which seemed to cause a great deal of problems. The jerkiness seems to be solved somewhat by using the CPU-- playback profile.

The overscan was a bit more of a headache. Basically, the output picture extended beyond the TV and needed to be scaled back. The nvidia documentation list an option called TVOverScan for the xorg.conf file. This does not work, since the option is ignored. What you need to use instead is nvidia-settings. There's an overscan slider in the gui, but it crashes every time I use it.

Instead, what seems to work is using the command-line, putting in

sudo nvidia-settings -c :0.0 -a 'TVOverScan[TV-0]=15'

for some suitable monitor name and overscan value. Then start nvidia-settings and save the configuration. The configuration should be loaded on login.

Hibernate and MySQL timeouts

Oh my.

This seems to be a common problem with using Hibernate and MySQL. MySQL is conventionally configured to drop connections after a period (8 hours). The standard advice (which is good) is to use a connection pool.(The advice to drop the wait timeout in mysql for testing purposes is also good, since your testing cycle time is otherwise creakingly slow.)

However, I was still getting timeouts, no matter what I did or what combination of parameters that I set. What seems to be the problem is that I wasn't letting go of hibernate sessions properly. I has kind of assumed that, when I make a web call, thread-based sessions get cleared up on exit. Since hibernate allows for long-running sessions, this is wrong, wrong, wrong. What's needed is either neat code that properly cleans up or an interceptor implemented as a servlet filter that cleans up on exit. Like this, in fact.
  • Current Music
    The Moodists - The Disciple's Know

Software as a Share House

With a considerable debt owed to He Died with a Felafel in His Hand1

Free Software

is the control-freak vegan. She insists that the dog is fed lentils until it can fly around the room at mach-1. She throws a massive tantrum every time she comes home and can smell sausages. She keeps on trying to insist that the household should buy a complete new set of saucepans, just in case the old ones have been used to cook meat. She's an "artist" and is "working on a big project". She posts the list of house rules on the fridge and monitors the kitty. She can explain the reasons for her decisions in detail and will do so until your ears bleed. Her inflexibility attracts cohorts of teenage boys, who think she's cool.


is free software's boyfriend. Pretty easy-going, he spends a lot of time acting as a sort of buffer between his girlfriend and practically the entire universe. He's a cabinet maker and lots of people want his work, since it's very solid. His girlfriend insists on co-signing all his work, on account of her "creative input." You'll often find him sleeping on the couch, when he's got fed up with the monotonous diet and has snuck out for a steak.

The Open-Source Collective

A labyrinth of rooms at the back of the house, some smelling of bong water, some pumping out viking metal at hazardous volumes and some containing desiccated corpses, contains a floating artists commune pumping out endless paintings, group shows and installations. Everybody is sleeping with everybody else. The collective is on pretty good terms with Linux and borrow his power tools all the time, returning them polished and sharpened. Free Software's teenage admirers usually get sucked into a room, after a while.


is an immaculate clubber, always perfectly dressed and stepping carefully over the left-over food on the floor in the living room. His room is exquisitely decorated and perfectly clean. At least, that's what the rest of the household see when they sneak a look through the door, since nobody is allowed in the room. Ever. Occasionally, he brings people back from outside the house. They vanish into his room and are never seen again. He never does the washing up, claiming that he has a private dishwasher in his room.


is a monogamous couple of bank tellers. They spend their time oscillating between telling the rest of the household to "get a real job", ostentatiously ignoring them and being barely aware that they're in a share house. Grossly overweight, they spend their time on the couch, watching TV and eating off trays. One of the collective secreted a webcam in their room one night and filmed them having sex; the rest of the household spent a lot of time sniggering over the result, but everybody watched it. His mother occasionally shows up and tries to force the rest of the house to move out. They're the only ones with any real money.


works at the same bank as Microsoft, but in the IT department. She wears a short skirt and a long jacket and is a bit older than the rest of the household. She moved in after her marriage broke up and was short on cash.

1 The fun book, not the dreary movie.
  • Current Music
    The Trilobites - I wish it could be 1965 again

One. two, three. four. I declare a thumb war!

One of the delights of school-age children is learning all the new lore and language1 that comes from the school-ground. I've always thought that "paused" for temporarily being out of a game because you've got a stich or such-like was very clever.

Before going to bed tonight, we were having a thumb-wrestling tournament and there's now a little rhyme to ensure that both players start at the same time.

1 My mother has a book called The Lore and Language of School Children from the 60s. A fascinating read.