Random picture

Wonky house in Dartmouth

Six Feet Under

At the recommendation of Calvin, I started watching Six Feet Under a while back. We haven't got through season one yet, since Blockbuster's postal movie system is now grinding to a crawl taking us days to get DVD's (oi wake up Blockbuster). But we have really enjoyed this show, it's great fun. Calvin formed Six Feet Up, legend has it the name is related to the show.

Thanks Calvin, and if you haven't watched it, I recommend giving it a try.

Addendum: as noted by a few people my original post had a fantastic typo "Sex Feet Under". The show is mostly about sex, must have had that on the brain. Calvin mailed me to say the name "Six Feet Up" was before the show and came from his mother's family.

Ajax services again

I am doing some work in PHP at the moment, not a huge amount, connecting things up. I got back to how much I like doing simple things at the Ajax level. One example is I needed to normalise a string, from unicode to plain text, much like Plone currently does. For example turning:

Pòdi manjar de veire, me nafrariá pas

Into:

podi-manjar-de-veire-me-nafraria-pas

An English ASCII approximation. My first thought was "hey, that's what Plone does". So I grabbed my highly unsophisticated mod_python services framework and wrapped the Plone API from PloneTool.py (which means yes its under GPL) and threw together a quick file (about 20 lines) so that the above comes back as:

<?xml version="1.0" ?>
<response>
<info author="Andy McKay, ClearWind Consulting" 
     end="Tue Jul 31 14:28:53 2007"
     length="0.00110411643982" 
     start="Tue Jul 31 14:28:53 2007" version="1.0"/>
<result>podi-manjar-de-veire-me-nafraria-pas</result>
</response>

Weee, it's a simple manner of now writing Ajax to pull that out and bingo I can do that in Rails, Plone, mod_python and PHP. Assuming the server stays up. The pattern of doing lots of little bits at the browser level is something I really like, having the discipline of using lots of languages forces a different solution. Web services at last.

Service available at: http://www.clearwind.ca/software/normalize/

Back in Vancouver

I'll be back in Vancouver end of August beginning of September for a 3 week holiday. If anyone wants to get together for a beer, yell.

Google application server musings

I've been using Google Calendar and Google Spreadsheets a lot recently. For a while now I've been wiating for Google comes out with a box, just like the Google search appliance, that does all that. Go to your company place this box in the rack and you'll have an internal copy of these applications.

It won't be free of course, but it will work easily and it will be good. It will easily compete with offers from Microsoft and the like. It will completely change the course of CMS's in an intranet environment. This is still an area where Plone does rather well of course. With Plone you can get a very sophisticated intranet quickly. There are differences, but if you throw together Docs, Spreadsheets, Calendar and Search - add in a home page that pulls all the information together and you've got something pretty sophisticated.

Which then begs the question, could you take all that and then spit it out as an external website. Would it make sense to ditch trying to write our own beautiful UI's and find someway of taking documentation out of these areas and pulling it together into one site. At its very simplest it could be a script that say:

  • Grabs all events in a certain calendar.
  • Grabs all documents in a certain folder.

Then applies a nice template to the output and spits out a static site, you'd have a site as good as most of the static sites out there. What you'd struggle on is things like teaser or snippets or complicated pages. But this could start to be a compelling replacement to systems like Plone. Maybe. It's certainly a curious idea. But once that Google Office Appliance comes out, if I was a big intranet or office vendor, I'd have a plan.

Addendum: I'm waiting for someone to tell me the box exists and I'm idiot for missing it.

Mixing string endings in python

This one confused me for a minute when a colleague asked me:

"some string"""

My first thought was that should be a syntax error, but it's not. It is infact two strings, the first contains the text "some string", the second is empty "". If you output that you'll get:

'some string'

It's the same output as:

"some ""string"

It's actually a pattern we've all used for a long time, if a string is long and splits over a line you can append multiple strings together. Useful when you want to break the text up, but not embed spaces and new lines, like a triple quoted string would. For example:

    "This is a long message "\
    " that goes over two lines"

A good company for a change

After dealing with companies that won't give refunds and other companies that just plain suck, it's so nice to meet a good one.

We have a few jigsaws and we lost some of the peices on a flight to Canada. Danae emailed them the other day asking if it's possible to buy replacement peices somewhere. The answer was simple: "We'll send you a new puzzle in the post, it should be there in a day or two". Free, no cost. That's nice, thank you Orchard Toys. Our girls love the puzzles and play with them all the time.

The cynical in me would say that someone has taken a sane business decision along the lines of: it's a 1 pound puzzle and shipping it costs another 1 pound. For a whopping 2 pounds I've avoided a bunch of back and forth emails (and their cost), messing about with a small payment and kept a customer happy. If it is, that's a smart person.

Walled gardens of social networking

My wife and friends have started using Facebook and every time I see here I make some sort of semi-superior sigh and comment under my breath about Facebook. Partly because I've been through at least two sites including Orkut and each new site never cares about the lasts data. On some level it annoys me the attention these sites get since I don't understand why they get so much attention. Anything that is pitched to me as "MySpace for grown ups" (as it was on the radio) is just on a loser.

In the end Facebook has this problem, eloquently expressed in a post:

I feel very strongly that we already have the world's best public social networking tool right in front of us: it's called the internet
Jeff Atwood

ClearSpell 1.1 Released

Just spent some time hacking on ClearSpell 1.1, getting spell checking working on Kupu was frustrating me so I went back to this code. Once I got accessing the DOM of an iframe sorted it was pretty straightforward. So it now works with Kupu and the spell check links are now much more unobtrusive. Would need some testing before it goes in the wild, still prototype code, but getting there.

Download: ClearSpell.1.1.zip