April 30, 2003
My cat died under a labour government

It rained less under a Conservative government - story and photos.

Almost makes you feel sorry for him, doesn't it?


Via Anthony Baxter.

Posted to Funny by Simon Brunning at 01:53 PM
The Indy goes pay-per-view

Arrrgh! I was going to link to Philip Hensher's interesting piece in yesterday's Indy. In fact I will anyway - In defence of sex and violence on television.

Problem is, all of a sudden you have to pay to read it. (It's not that interesting, by the way, so don't bother.) It's a shame, this - I shan't be linking to the Indy in future.

I wonder why they did this? I mean, it's not like anyone is going to pay for this, is it?

I wonder how much it all cost to set up?

Posted to Business by Simon Brunning at 01:42 PM
April 29, 2003
The Mobitopians...

Off for a beer with the Mobitopians now...

Posted to Apropos of nothing by Simon Brunning at 05:29 PM
The latest from Iraq...

And nobody's died. Makes a nice change.

Archaeologists believe they may have found the lost tomb of King Gilgamesh.

Actuaslly, I suppose that Gilgamesh died, but since that was over four thousand years ago, I'm not bothered.

Posted to History by Simon Brunning at 04:23 PM

I'm off to eat curry and drink Cobra now. Later...

Posted to Apropos of nothing by Simon Brunning at 12:28 PM
April 28, 2003
Floating Point Arithmetic: Issues and Limitations

Floating Point Arithmetic: Issues and Limitations

About once a week or so, someone will post to c.l.py, reporting as a bug the fact that 0.1 is showing up as 0.10000000000000001. This isn't a bug, it's just the way that floating point works. There is nothing peculiar to Python about this behaviour, either - any floating point implementation will show some variation on this behaviour. Java, RPG, C#, VB, you name it.

In a (so far unsuccessful) attempt to have this 'bug' reported less frequently, Tim Peters added this appendix to the Python Tutorial. It's worth a read whatever you code in.

In general, then, business oriented software should avoid using floating point, and should certainly never use it to store currency values. For that you shoud use Decimal or java.math.BigDecimal, or the like.

Posted to Python by Simon Brunning at 05:49 PM
Alone in the office...

5:15 p.m., and I'm the last one here. UK working hours rise sharply? Not here!

I'm pretty much honour-bound to start downloading hardcore pornography at this point, I'd say. Any suggestions? ;-)

Posted to Apropos of nothing by Simon Brunning at 05:21 PM
Are Programmers People?

Are Programmers People? And If So, What to Do About It?

Ken Arnold on human factors in programming language design.

Naturally, in a discussion about why programming languages are crap, Python is bound to be mentioned as a counter-example!

Via Ned Batchelder.

Posted to Software development by Simon Brunning at 03:42 PM
Seeing Seeing Double

The girls wanted to see the S Club film this weekend. Sigh.

What can I say? Freja (6½) loved it. She got most of the jokes. (Though thankfully not the vibrating egg one - which I felt was rather out of place, to be frank.)

Ella (4¾), though, was all at sea. The plot, such as it was, involved a set of clones of the band. Every thirty seconds or we had "is that the real one, or the robot, Daddy?" Bless her.

The music was unadventurous but workmanlike pop, as you'd expect. Again, Freja loved it. As you'd expect - she's pretty much their target audience

On the plus side, that Rachel Stevens scrubs up OK, it must be said.

And it was ten times better that The Jungle Book 2! A real stinker. Three reprises of the The Bare Necessities - and when you heard the new songs, you know why they made so much of the old ones. Avoid.

Oh, it's Ella's first day at school today. Good luck Ella!

Posted to Parenting by Simon Brunning at 02:44 PM
The Future of Programming on the iSeries

The Future of Programming on the iSeries, Part 1 and Part 2.

Some interesting history here, but no real news. According to IBM, RPG III is strictly legacy, and RPG IV must coexist with Java.

My, I'm inclined to doubt that many new systems will be written using any RPG at all. Though the developpment tools are improving, RPG itself is still a pig. My current company is a '400 shop, and our main product is in RPG III, but even we haven't written a new system in any flavour of RPG for some years. There is still plenty of maintenance and enhancement work for the RPG people, but it's strictly legacy stuff.

And if you are a '400 developer, and you don't know Java yet, then now is the time.

Some other iSeries stuff:

Posted to iSeries by Simon Brunning at 01:53 PM
Python 2.3

Python 2.3 Beta 1 is out.

A.M. Kuchling has put together his usual What's New in Python 2.3 document.

I particularly like the inclusion of the logging and csv modules in the standard library. I already use both of these, so I'm glad they are now the standard.

Also good - the string method changes. One of these was my feature request - the optional arguments on the strip method and its siblings. This was backported to 2.2.2 - it was added to the string method, but not to the string module function, though the documentation incorrectly said that it was added to both. Given the frequency with which this comes up on c.l.py, it seems that this is a much-used feature already!

I'm also keen on extended slices, importing from zip archives (i.e. JAR files for Python), and the if 'fred' in 'bill and fred' thing.

Generators are now enabled by default - I've been using these a lot.

Posted to Python by Simon Brunning at 10:37 AM
April 25, 2003
This hidden entrance...

Jenny (a receptionist administrator at work), is bored out of her mind at the moment, so she's borrowed my GameBoy and is playing Zelda.

She's just come up to me and asked "This hidden entrance to the castle, is it obvious?"

I'm afraid that I have to admit that we laughed at her.

Posted to Funny by Simon Brunning at 03:18 PM
April 24, 2003
Ted Codd

A moment's silence, please. Dr. Ted Codd passed away last week.

I'd like to second Andy here - RDBMSes have been my bread and butter for years. Thanks, Dr. Codd.

Posted to Software development by Simon Brunning at 01:07 PM
I'll have to keep an eye on that one...

My girls and their cousins, Izzy & Lucy, were playing families this weekend. Freja was the mummy, as usual, and Ella was 'the teenager'.

Ella was carting a doll around, and I asked her whether it was her little sister.

"No, this is my baby," she said.

"Who is the daddy?" asked my Auntie Rachel (my sister).

"We don't know who the daddy is - I've got loads of boyfriends."

That's it - no boyfriends for my girls.

Posted to Parenting by Simon Brunning at 12:52 PM
April 16, 2003
Bottom-Heavy Email

If I've ever sent you an email from work, you'll have seen the big wodge of cruft at the bottom.

The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
email by anyone else is unauthorised. If you are not the intended
recipient, any disclosure, copying, distribution, or any action taken or
omitted to be taken in reliance on it, is prohibited and may be
unlawful. <My Employer> Ltd. cannot accept liability for statements made
which are clearly the senders own.

This is pretty embarrassing - since this was added, I've posted to c.l.py and the like very much less frequently.

Well, it looks like companies are pretty much obliged to put this stuff in these days - you can't get insurance without it. So it looks like we'll just have to put up with this waste-of-perfectly-good-bandwidth in future. Sigh.

Oh, and the missing apostrophe in "senders" is just the icing on the cake. ;-)

Posted to The Internet by Simon Brunning at 01:27 PM
The Hundred-Year Language

What will programming languages look like in the next century? No one knows, but Paul Graham has been thinking about it.

Posted to Software development by Simon Brunning at 01:16 PM
April 15, 2003
Python - an agile programming language?

Python is an Agile Programming Language

I like this - I've always felt that the term 'scripting' language is a little, well, demeaning. 'Agile' seems to sum it up rather well.

Oh, and it seems we've converted Anthony!

Posted to Python by Simon Brunning at 04:48 PM
The human genome

So, the sequencing of the human genome is complete.

What I want to know is, which human?

We all have a different genome, yes? And they certainly haven't sequenced me. So, what have they done - sequenced one person? Would this be useful? Probably not - the useful information must surely lie in the differences between people's individual genomes.

So surely they must have sequenced a number of people.

Posted to Science and technology by Simon Brunning at 04:39 PM
Blogging MP

Labour MP Tom Watson has a weblog!

One day, everyone with something to say will have one.

Via Simon Willison.

Posted to Blogs by Simon Brunning at 04:32 PM
comp.lang.python made flesh

Andrew Koenig wasn't able to make it to the UK Python Conference this year - his company has a travel ban due to the threat of terrorism. Anyone would think that America was unpopular, or something.

Anyway, Andy Robinson put together a short-notice replacement session - a panel discussion entitled "P2EE - is Python ready for the enterprise?" On the panel were Andy, Guido, Jacob Hallén, Laura Creighton and Marc-Andre Lemburg.

This discussion was comp.lang.python made flesh - good natured, rambling, frequently going wildly off topic, the occasional total non sequiter, that sort of thing.

One of the threads of discussion was about Python advocacy. Andy and the other Python-in-a-tie people are really big on this. To them, Python is strategic, it's a 'platform'. They want it to have 'market share', they want CEOs to have heard of it, and they want them to have heard good things about it. Me, I can't get excited about this. I sympathise with their position, but Python, to me, is tactical - it's a tool. It's the best goddamn tool I've ever had, and it's a beautiful and elegant tool, but it's just a tool nevertheless. I don't care if CEOs have heard of it. So long as the user base stays large enough to keep the 'platform' viable, that's all I really care about. Which is probably lucky - Python in unlikely to ever have a marketing budget to speak of, so Python will probably only ever grow organically.

There was then a quick discussion of the difficulties of application deployment, and distutils' unhelpfulness in this regard. I didn't really follow this with my full attention - as a way of installing libraries, either pure Python or with C extensions, distutils just works for me. As for application deployment, well, that is just plain hard in general. My needs are very simple, and I've been happy using py2exe and Inno, though I'm thinking of switching to NSIS. But if you want cross-platform scriptable installers, then I'm not sure what exists. Distutils, though, was designed to simplify module and package distribution rather than application deployment, or so it seems to me. Marc-Andre suggested that extending it to support application deployment is trivial enough that everyone could use it, but I think that he was forgetting that most of us don't have a brain as large as his.

We then talked a little about web application frameworks, and the complete and utter lack of a de facto standard in this area. This has been pretty much reiterated on c.l.py now. I myself would be interested in using a Webware/Cheetah combination, but I'm rather stuck in Java-land, where J2EE/JSPs/Taglibs rule the roost. I'm interested in Struts - pure JSPs are an invitation to the Magic JSP anti-pattern discussed in Bitter Java. But I'm also very interested in Anthony Eden's JPublish project. It uses Velocity for its templating, which is *much* nicer than JSPs, and for the action scripting and business logic, you can use Java or any of the BSF languages, which gives you access to Jython. I'll blog more about this later, because this is a lovely approach.

Another issue discussed - documentation. Andy Robinson felt that Python should provide better tools for the production of documentation. Python's docstring approach is a good one for 'embedded' documentation, and for the generation of API reference documentation. reStructuredText support will just be the icing on the cake. As for the rest of the documentation, well, as I pointed out, this is not a technological problem, but a sociological one - people have always failed to write documentation, and they probably always will. Good tools exist, but people would rather do other things.

On the off chance that anyone is interested, Duncan Grisby has put up some photos taken at the conference, many of the ones from Wednesday taken at this session. It's interesting to put faces to names...

Posted to Python by Simon Brunning at 04:05 PM
Grey hair!

I found a grey hair in my beard this morning. Sigh.

Age is creeping up on me, it seems. I keep telling myself that I'm only 22, but there is only so long that measuring my age in hex is going to make myself feel better.

Another horrifying discovery. It had been my profoundly held belief that whenever a man would say "she's too young for me", he would always really mean "I'm too old for her". No physically mature woman is ever too young, right?

No, wrong. I'm now finding that perfectly attractive young women are just, well, too young. One of my flat mates, Zoe, is 23. Pretty little thing, she is, but the only urge that I have to fight is the urge to pat her on the head. Sad.

It's just a matter of waiting to die, now, I suppose.

Posted to Apropos of nothing by Simon Brunning at 03:22 PM
April 11, 2003
Congo massacre

We are in danger of tunnel vision here. Things are happening in parts of the world other than Baghdad.

Somehow, I missed the fact that at least 966 men, women and children were killed in the Congo earlier this week. No one knows who did it, and no one seems to care.

Going to do anything about this, Mr Bush? Mr Blair? No, I thought not.

Posted to The Big Room by Simon Brunning at 04:14 PM
It's not over yet

Bush Subconsciously Sizes Up Spain For Invasion

Posted to Funny by Simon Brunning at 02:15 PM
Oh Lord...

I must have been drunk.

Posted to Funny by Simon Brunning at 02:01 PM
It's not for girls

I do like the new Yorkie ads...

Via vodkabird.

Posted to Funny by Simon Brunning at 01:58 PM
Bob’s Quick Guide to the Apostrophe, You Idiots

Bob’s Quick Guide to the Apostrophe, You Idiots

Via dive into mark.

Posted to Funny by Simon Brunning at 11:07 AM
Python and Apache

Python and Apache is a useful little guide to configuring Apache to run Python CGI scripts.

The guy obviously didn't really get on with Python - he calls code blocks delimitation by indentation 'tiresome' - it was the first thing that attracted me to Python! But, hey, it's his loss.

Posted to Python by Simon Brunning at 08:58 AM
April 07, 2003
Bloggers in the flesh

It looks like Anthony has made it back to the US now. Sleep well, mate - you need it. ;-)

Meeting other bloggers after having read their blogs is a funny thing. Some are pretty much as you'd expect them to be. Andy Todd, for example, has the same gently self-deprecatory sense of humour as I would have expected, the same not-quite-smile while he's joking. Good techie, too. And Eloon, well, the only way she could have been more herself if she was wearing several pairs of shoes.

Anthony, though, wasn't at all what I was expecting. In his blog, he comes across as rather serious, very focused, and just a little irascible. In reality, though, he's a funny guy, who suffers fools (i.e. me) easily enough. He was just, well, warmer as a person than I'd expected. Nice chap.

I'll cover his presentation in a little detail later, but it was really good. His demo showing the automation of a simple Java app made my hair stand up on end. It was just so easy.

On, and in the subject of bloggers - this is a take off, right?

Posted to Blogs by Simon Brunning at 04:31 PM
Al Jazeera

A very interesting article over at The Register - Al Jazeera and the Net - free speech, but don't say that. The Register are mainly a techie news outfit, but they are sometimes at their most interesting when they go off topic a bit.

It seems that Al Jazeera are finding themselves being blocked from Western audiences.

A couple of bits I'll quote verbatim: We should also clarify something regarding the footage of the prisoners and the dead servicemen; military spokesmen to the contrary, reproducing such images is not a breach of the Geneva Convention. The Geneva Convention is directed at governments, and does not cover news organisations. Al Jazeera has arguably broadcast images of the Iraqi Government breaching the Geneva Convention, but that is not the same thing.

To get this into perspective, note that one of the most striking pictures from the Vietnam war was of a South Vietnamese officer shooting a prisoner - do we argue that this should not have been published? If Al Jazeera had footage of an Iraqi shooting a British prisoner, should that be broadcast? The other way around? Are our standards today different from those of the 60s, or do the criteria differ depending on the nationalities of the participants and/or the audience? The answers are not straightforward, nor should they be.

Posted to The Big Room by Simon Brunning at 03:46 PM

It's not fair!

Eloon's got a cartoon, Charles Miller's got a cartoon, I want one!

Posted to Apropos of nothing by Simon Brunning at 02:28 PM

Whoever invented the term “sleep like a baby” was not a parent. I feel your pain, Paul.

It's a wonderful thing when they start sleeping through. Mine still wake me horribly early in the morning, though. They are happy to leave thier mother to sleep, but if they are with me they have to wake me - they just can't resist. Saturday morning telly - I watch it all. Is that Fearne Cotton to young to fancy? But I digress...

My sister reckons that it's 'cos I'm too nice. She just tells them to piss off. If done with sufficient conviction, this works, I gather. I get all of my iracable rudeness out of my systems at work though - I just don't have any left for the kids.

Posted to Parenting by Simon Brunning at 02:11 PM
Python and Patterns

Duncan Booth gave a presentation at Python UK 2003 on Patterns in Python.

Anyone not knowing what a software pattern is, and who is the slightest bit interested, should pay a visit to the Portland Pattern Repository.

It was a superb talk, mostly because of the audience participation, and Duncan's handling of that participation.

It was, in some ways, the audience from Hell. Sitting on the back row were Guido and Alex Martelli (AKA the martellibot). Elsewhere sat Anthony Eden and some other Java pattern-head whose name I didn't get. All of these people threw all manner of nasty questions, objections and counter-examples at Duncan, who reminded me of nothing so much as a first class batsman in dealing with them all.

He gave a few good examples: Singleton, Borg, Observer/Observed (or possibly Publish/Subscribe - one of the little debates kicked off over that one). He also presented on the Flyweight pattern. Well, everyone else seemed to understand him...

He also covered what he called 'Little patterns in Python', things like DSU (of which he gave a nice little example, BTW), and the use of list comprehensions. The question here was as to whether these things qualify as patterns. The general consensus was that these are actually idioms rather than patterns. Someone referred to them as 'textures', though, and I rather liked that - these sorts of things do seem to supply the texture to Python source code.

Posted to Python by Simon Brunning at 01:26 PM
April 04, 2003
Python UK 2003 - I'm back!

This will be a brief one - I've only got a 1/2 day today, and I've got a ton of work to catch up on. I've got notes enough for a couple of week's worth of postings out of this, so expect details later.

The conference was superb. I'm still buzzing. I had a fabulous time. I had a chance to talk to some really cool people - Guido, Alex Martelli, Mark Shuttleworth (yes, that Mark Shuttleworth), Anthony Eden, Andy Todd, Andy Robinson, Marc-Andre Lemburg, Duncan Grisby, Paul Brian, Duncan Booth, Tim Couper and his bright-young-thing daughter, Fiona. (Pretty as well as bright, but married. :-( )

I'm still not sure whether it was cooler to meet Guido or an astronaut, to be honest. Some of these people were seriously bright. Nevertheless, I feel I was able to contribute to some of the discussions without making too much of an arse of myself.

It was nice to meet up with some people in the same boat as me, too - I'm the office eccentric, in a way. Every time a problem comes up, and I pipe up "You could do that in...", the groan goes round the office "Yes, you could do it in Python, we know..." For whatever reason, the fact that I am right doesn't seem to stop people thinking that I'm a little odd. Well, for the last couple of days I've been with the other office eccentrics who are usually right, too.

Much more later...

Posted to Python by Simon Brunning at 10:48 AM
April 01, 2003
In the spirit of the day...

The War seems to have made people a little reticent about April Fools Day hoaxes. I haven't spotted any in The Independent, yet. But then, I've only read as far as page eight, and the war coverages goes on until page ten. Even I'd admit that putting a joke story in amongst that lot would be in poor taste.

So anyway, to lighten things up a little, here is someone's idea of the Top 100 April Fool's Day Hoaxes of All Time.

I'm also rather fond of the MIT Hacks. (Not remotely computer related, by the way. This use of the word 'hack' predates anything computer related. The current meaning may be derived from the old practical-joke meaning, though.)

Update: One for the nerds - Whitespace. The best spoof language since Brainfuck. Perhaps even since Perl.

Posted to Funny by Simon Brunning at 03:20 PM
Python UK Conference 2003

I'm off to the Python UK Conference 2003 after work today.

Say 'Hi' if you spot me. I'll be on the desk some of the time.

Loads of good stuff to see. Most important to me professionally will be Anthony Eden's Scripting Java Applications with Jython session. Guido's keynote will be unmissable too, naturally.

Other than that, well, I'll probably want to see the big names' sessions - Marc-André Lemburg and Alex Martelli. But then, I might find Boyd Roberts's Object Storage in Python session more useful tan Alex's, since I don't know C or C++. Andy Todd's PythonCard session looks good, too.

Posted to Python by Simon Brunning at 01:53 PM