Debug in Script (Python)

Golly completely missed this one, thanks Daniel Nouri.

It allows pdb.set_trace() inside Script (Python) objects.
enablesettrace

When it's only two lines of code, you have to bang your head and say, why did I think putting a pdb.set_trace() in a Script (Python) would be any harder.

Lazy weekend

Kids are away so had an amazingly lazy weekend. Read the papers, slept for a few hours in the afternoon, went to my brothers for dinner and read all of Chart Throb. Good typical Ben Elton read, easy to get into fun and easy to finish without exercising too much brain power.

British utility companies are all terrible

I find the way utility companies treat their customers is absolutely terrible. I'm in a mood to write a letter to someone anyone about the way they do their billing. We moved into our new house and settled down and waited for the bills to come, but nothing. Then sure enough we receive in the span of week:

  • United Utilities have sent us a bill for all the water and waste water for the house. For one year in advance. Kindly they have broken it down into 6 monthly payments, so payable immediately £250 please.
  • British Gas have sent us a bill for electricity. Payable immediately for £75.
  • British Gas have sent us a bill for gas. Payable immediately for £150.

The total of these bills (plus the council tax) is now somewhere in the order of 4x the cost of the same bills in Canada. But the thing I find obscene is that they are payable immediately, no arguing right now. I've never seen any other business operate in such a manner. You can't bill a client and expect immediate payment, never mind immediate payment for a years work in advance.

Time to complain to someone and try and get Britains utility rules improved... throw the letters to the bottom of pile and sort out my bank account on my own time.

No wonder

Django 0.96 is out

Django 0.96 is out. Get those shiny new features you know you want including the things I wanted: newforms, tests and fixtures.

Django now ships with a comprehensive set of testing tools. You can write tests based on doctest or unittest, test your views with a simple test harness, and load initial data ("fixtures") automatically.
Django 0.96 also ships with a brand new forms library, django.newforms. This is a replacement for django.forms, the old forms/manipulator/validation framework

What's with all these web 2.0 apps I don't use

There's a gazillion of them. Every time I think "oh I should do that" I Google and find someone already has. Doesn't mean I can't do it better of course. But it begs the question why I don't use any of them. Not one. Perhaps I'm just old fashioned, I write data locally using various tools, events are managed in the family using iCal (everyone has Macs), I don't use de.licio.us, I manage my RSS feeds in Safari (such a luddite). The main sites I read are Slashdot, TechCrunch, The Register and after that it's all news and non-tech sites.

What's wrong with me? How can I expect other people to use something if I don't?

Englands new passport rules

So there'll be a new passport rule in the UK, to get a new one, you'll need to do an interview. They mentioned on the radio this morning a possible 200 question they could ask you, but I can't find verification on that yet. Perhaps I wasn't awake when I heard it. This raises a few bizarre situation in my mind.

What information will they have and where will they get it? From:

This will include checks with independent sources such as the electoral roll and address histories.
PDF

Surely if you were going to fake a passport would have previous address information or bank information, to a point. But where do they get it? What if the two don't match... what if they got information on the old wrong John Smith? They clearly can't rely on your form, so they have to get some independent data.

And what if you fail? Sorry "Andy McKay, you clearly aren't Andy McKay. You clearly haven't demonstrated enough knowledge to prove you are who you claim to be." Erm what then? Try again tommorrow?

Heathrow Terminal 5

Terminal 5 is a very interesting project from how it has been approached from a project management point of view. I saw this on Newsnight the other night, and there's a long posting on the subject here.

If the performance of T5 had been in line with those schemes in terms of timing, cost and safety, according to Riley, ‘it would have been 1-2 years late in completing, been 40 per cent above original cost estimates and we would have killed six people.’ So BAA looked in detail at why these projects had not met their targets.’

Essentially a normal project tries to lock the contractors down into taking the risk on, the client provides vague outlines simply because until it's done not everyone is sure how it will go or how things will change. This in the end pushes the risk back to the client but in a more adversarial way.

Any contractor who's been at the end of a contract and been in one of those meetings where you are upset because you haven't been paid enough and the client is upset because they haven't got what they wanted... you know what that feels like. Except the size of Terminal 5 is about 18 gazillion times bigger than one of those projects. When the numbers are that big lawyers get involved really quickly.

One interesting point is this comment:

It is a very open process with the books of the suppliers being made available to BAA, a very different relationship than in many large public sector projects where companies hide behind considerations of ‘commercial confidentiality’.

That article was 2005 and it seems that things are going well. Just that for every Terminal 5 there's at least four other projects out there eg: Wembley stadium, Jubilee Line, Big Dig and my favourite the Canadian gun registry. The latter is probably unknown outside Canada but work out the percentage of this overrun:

The registry again became a political issue in the early 2000s when massive cost overruns were reported. The project which was meant to cost approximately $119 million ended up costing over a billion dollars to implement. Documents obtained by the Canadian Broadcasting Corporation now estimate the program cost at $2 billion.

... I think that is around 1700%. Good job Canada.

The big bang theory of household cleaning

Every couple of weeks my wife and I have a fight. A bit of shouting and maybe a slammed door. Over something as trivial as cleaning the house. I'm not a huge freak about having a spotless house, unlike say my mother. But after one month of the recycling piling up, or as it is currently we can't use the microwave because of all the recycling piled in front of it, a fight normally ensues.

Curiously we don't (well with one or two very rare exceptions) have fights about other household chores like washing the dishes or doing the laundry. These are tasks that get done regularly and we keep on top of them. And inevitably we get into a discussion where I point out that if we tried to tidy occasionally every other day or so and kept on top of things we wouldn't get into this situation.

But who get's praise for doing minor tasks regularly:

"I really cleaned the house for two hours, doesn't it look fantastic?" as I get in through the door.

"Yes it does, good job."

No-one ever praises the continual slow grind of minor cleaning.

In several businesses I've been in (and worked with as a consultant), there is an obsession with big bang development and projects. Often it will go something like this. Action X is a mess, it's slow and full of problems. We need to get in process Y, this will fix it up. This process addresses every problem and will make us better (replace process with product).

What the ensues is something that makes business managers and accountant's happy. We'll spend this much money doing Y and this will lead to a return of Z over a few years. A clear win and something good for the business and its all good. Once it's implemented the manager get's patted on the back (or sometimes fired, but good managers are like politican's do anything to deflect the blame).

My house will be beautiful and clean and worthy of royalty for about 1 day. Then it's back to normal.

Sure enough before long similar problems will remain. This leads people into a paralysis, we've tried X and Y and it didn't work we just ended up back where we were. The real answer can often lie in the day to day actions of people and the way work is done. I know they are dirty words but things like culture and process are often the problem.

If your co-workers all do things differently, if no-one writes anything down in a place others can use, if management doesn't support initiatives from people trying to make improvements, if no-one tries to improve everything they get involved with, then things don't change and it doesn't matter what you do. Do your big bang and you'll stick be stuck there in your problem again soon enough.

Rather than big bang changes to your organisation, continual tinkering, changes and improvement can make all the difference. It won't show up on the balance sheet in one chunk, it will take time. No-one will pat you on the back for doing a fantastic job, but things will improve and that's what matters. Even worse this approach requires discipline and continual attention, but I believe it can be worth it.

Or we could just spend 5 minutes at the end of every day cleaning a few things up, one day doing the recycling another the compost. Fortunately at home, I'm often reminded I'm not the boss. The little 3 yr old, not only wears the pants, but has us all well trained or as she says with a grin "I'm a bossy boots"... and yes we had a fight yesterday which made me think about this.

Simple TAL for Django 0.2

Simple Template 0.2 is released. In a completely unprofessional manner I can't remember what I changed. Just that as I've been using it more and more I've made some changes. Still need to get a nice logging error mechanism in there, but the error handling is improved.

Simple Template yets you use SimpleTAL in Django.

Download here: simpletemplate.0.2.zip

LookRSS

Kamal just released LookRSS, which uses XSL to format Plone's RSS into something pretty. If you are looking for a really ancient and crotchety version of this, try PloneRSSNG, which did this as well. Just a few years older and probably way worse.

The reason I didn't check it all in to Plone then was I based it on 3rd party code and so as such couldn't agree with the letter of the Plone contributor agreement. Since then the Plone 3rd party area in SVN was created, a place to contribute anything that you didn't write (eg: I recently threw some of PloneS5 in there) and the whole situation cleared up.

I would really like to see LookRSS, PloneRSSNG or something similar go into Plone. Something needs to be improved with the user experience for clicking on RSS links, my mother can't understand it right now. Would be nice little PLIP for someone to get started in Plone.

Sometimes Ruby is annoying

Well its annoying a lot of the time to me since it's so magical. Yes I got bitten by the difference between single quoted strings (') and double quoted strings ("). In the previous there are very few escape sequences, in the latter there are more. What got me was a good old newline: \n

Python 2.4.4 (#1, Feb 18 2007, 22:11:27) 
>>> '\n' == "\n"
True

And now in Ruby:

~ $ irb
irb(main):001:0> '\n' == "\n"
=> false

This isn't hidden, it's documented (for example), but to me it's a strange language decision. For a Python programmer it's certainly a gotcha.

Doing the Pennine Way

A few years ago we did the Bowron Lakes in canoes. It was one of the most wonderful holiday's I've had. I've never been so relaxed. It was a 9 day canoe trip in one of the most beautiful places on earth (shame none of the photos are scanned in, before our digital SLR).

This year I'm taking the opportunity of being in the UK to do the Pennine Way with my father. The Pennine Way is a long walk from Edale near Manchester up to the Scottish border. 250 odd miles (depending upon the exact route) over 20 days. We can't take 20 days in a row, my father at 65+ could do it. But for me it will take some breaking in for me to get that far. So we are breaking it down into day and weekend trips.

We'll try and do it in order, so should be setting off from Edale in a few weeks and giving a shorter walk a try. So now I've got an excuse to buy some new GPS and walking toys...

Castlerigg stone circle

Went up to the Lake District last weekend and stopped by Castlerigg stone circle. Coming from Vancouver everything is about 1/10th scale. But everything has a history, a name. Every last bump. I spent half the drive up (especially going past places like Rydal Water) tell Danae of times I spent there as a kid.

Was a good day, except for the rain :)

Why is it so hard...

...to include a URL to the page. Why do people have to make up descriptions of the page in question or use vague terms. A URL is clear, unquestionable, obvious and simple, copy it straight from your browser.

This rant brought to you by the letter M for Muppet!

Blockbuster DVD rental doesn't suck

Yet... it's more expensive than Tesco and the turn around time is a little slower. But 5 DVD's and they all worked. Take that Tesco.

Apple TV sucks

I haven't used it. Or seen it. But I have seen this page and I'm now convinced it sucks. The first thing it offers is Movie Trailers. Movie trailers are adverts, people pay to put movie trailers in front of us. It's annoying enough having them on DVD's you have to fight your way past.

If you think I'm paying to buy a box so I can watch adverts think again. Having movie trailers there makes the omission of movies glaring. It doesn't have a DVD drive on it... so let me get this right... it's a TV that you can't actually watch TV on, or movies, or DVD's.

But what if you want to watch music videos, movie trailers, podcasts, and photos on TV?

C'mon Apple what if you want to watch TV or DVD on your Apple TV?

And this comes from someone with 2 MacBooks, 2 Mac Mini's, 2 iPods and lots of gadgets. I don't think I'd buy non Apple again. But I'm not buying the Apple TV. Someone said that in Apple they justify a new product by saying "Whats the TV commercial like". Someone was asleep when they said in a meeting "You can watch movie trailers on it".