January 28, 2005
Putting it all together

Tell me what to do, please.

I've most often come across this issue building Java web applications. There are just so many pieces to stitch together, and to find places to put; your your build script, your business objects, your tests, your JSPs (or whatever), all your 3rd party JARs, your persistence stuff, your MVC stuff, your IoC stuff, about a gazillion configuration files to make all this lot work together, it just goes on and on. It takes a while, and if you get it wrong, well, everything still works, mostly, but you'll have maintenance nightmares for life.

In fact, it got so out of control that Matt Raible came up with the wonderful AppFuse. Appfuse is great - it builds a project structure for you, using your choice of frameworks, so you can hit the ground running. I only hope that Matt learns to slow down a little!

Perhaps that's what Python needs - not Rails, but AppFuse.

Update: Matt's site seems to be down at the moment. But do try later - AppFuse really is worth a look

Posted to Python by Simon Brunning at 02:24 PM
Quote of the day

"I can tell you from personal experience that Pierce Brosnan isn't gay." - Tulna Shah Chauhan.

Don't tell Rakesh!

Posted to Apropos of nothing by Simon Brunning at 02:02 PM
We only let you drink it when it's ready

Last night's Einstein Legacy lecture was good. It was a helter-skelter overview of cosmology, and I didn't actually learn anything - but it was a privilege to hear Sir Martin Rees speak, and there were plenty of pretty pictures.

It was also nice to see Jez. The Java Meetups are great, but you don't usually get to have an extended chat with one person.

We chatted about Groovy mostly. There's been a Groovy is dead or dying meme sweeping the blogsphere recently, so it was interesting to speak to someone on the inside.

According to Jez, work is continuing on Groovy and progress is being made, but it's slow. Groovy is in its early days, and it's taking a while to mature.

I think that that might be a major part of the Groovy's problem - it got big quickly, and it's not had time to mature. It's really still at the stage where it ought to be developed (and used) by a few dozen people. Instead, it's all over the blogsphere, it's got a JSR, and everyone is clamouring "where is it?" Well, it's just not ready yet.

For me, the major problem that I have with Groovy is that I really still don't see the point in it in the first place. James was looking for something better than Java, but he dismissed Python without looking at it very deeply. There were a couple of fairly trivial syntax issues that he didn't like, so bang, off he goes and writes his own. Wheel-reinvention is all to common, and this looks to me to be a prime case of it.

What does Groovy deliver that Jython doesn't? Little or nothing, so far as I can see. Groovy's syntax is a bit more Java-like, but that's about it.

Also, Groovy is heading in a Perl-like include everything direction, rather than in a keep it spare and simple Python-like direction, so I'm really not too tempted by it.

Ironically, James has given Python a much more thorough going over since the Sun summit, and he likes it now! He still likes Groovy better, of course, but got can't get in the way of cognitive dissonance!

The real tragedy is that Jython could really use some help. It's progressing now, but getting over the 2.1 to 2.2 hump has proved a real stalling point, and had James and the Groovy team put as much effort into Jython as they have into Groovy, I think real progress could have been made.

Posted to Python by Simon Brunning at 12:32 PM
Never Forget

The hypocrisy is staggering. Via davblog.

Posted to The Big Room by Simon Brunning at 11:30 AM
Damn you, Mark Matthews!

I've had to make some changes to a very old project of ours. Very old. I've not worked on it since rebuilding my PC, so I've had to rebuild the project's environment from scratch.

Well, I can certainly see that we've learnt a great deal since then. The first problem is that the structure in VSS has nearly no resemblance to the structure in disk. Setting up all the working folders correctly is a nightmare. (OK, using VSS is the first problem :-)

We didn't know about Ant back then, so everything is built using nightmarishly huge batch files. Batch files aren't too flexible, so we have multiple versions of all of these batch files, which we have to build using template versions and a cool little find-and-replace script that I put together in Python. (God, that's nasty, too. I've learnt a lot of Python as well!)

The whole process is insanely complicated. (And I do mean complicated, not complex.) Thank God Tracey was in charge of documenting it. No one has ever accused Tracey of leaving anything out of a document. ;-)

All this is irritating. But the worst thing, by far the worst thing, is that bloody Mark left fistfuls of PAUSE statements all over the place. If I see "Hit any key to continue..." one more bloody time...

Update: It's finished, finally:

Press any key to continue . . .
-----
****************************************************
* FINISHED EVO Development/EVO_Base GET ALL *
****************************************************
Press any key to continue . . .

Seriously. There's a PAUSE, and ECHO or two, then another PAUSE. Daily WTF?

Posted to Software development by Simon Brunning at 11:06 AM
Bloglines Meme

Meme of the day: Fun with Bloglines, via boncey.org.

Go to Bloglines. Find your own blog. (If it's not there you can sign up and add it. If you don't have a blog this one's not for you.)
Click related feeds.
Post the top 5 (or more) on your blog.

Here are mine:

  1. Joel on Software
  2. Thinking About Computing
  3. Simon Willison's Weblog
  4. ongoing
  5. Martin Fowler's Bliki
  6. Boing Boing
  7. Jon's Radio
  8. Dilbert
  9. Sam Ruby
  10. Slashdot

I subscribe to all of these with the exception of Jon's Radio, which I'll take a look at.

Posted to Blogs by Simon Brunning at 10:01 AM
Bloody Pregnant Women

I got a seat at Colliers Wood for a change. Then a heavily pregnant woman got on at Tooting Broadway, and wasn't quick enough to get the last seat. All the people near her started reading their papers really intently.

Well, I say papers - mostly it was Metro or The Daily Bigot, neither of which really deserve the appellation. They were probably all too intent reading some rant about how nobody has any manners any more to notice her. And how it's all the fault of immigrants and the left wing press.

So, I ended up standing all the way to Bank again. :-(

Posted to Rants by Simon Brunning at 09:47 AM
January 26, 2005
Common sense

Or it should be common sense: Don't build web apps that only work in IE.

Don't do it deliberately, and don't do it by accident, either. Test with multiple browsers. I use Firefox (which is also my main day-to-day browser) and IE. I'd test with Safari on a Mac, too, if I could talk my management into buying me one, and with a Linux browser or two if I could talk them into allowing me to run a Debian box on the network.

Oh, and don't write web apps that don't work in IE, either. Like it or not, it's still 90% odd of the market, and will remain the number one for the foreseeable future.

Posted to Software development by Simon Brunning at 09:56 AM
January 21, 2005
"Mostly Python. with ample helpings of C++"

If it's good enough for Google...

Posted to Python by Simon Brunning at 04:48 PM
Rivers on Titan

Seeing, touching and smelling the extraordinarily Earth-like world of Titan. The cool stuff is appearing sooner than I dared hope...

Posted to Science and technology by Simon Brunning at 03:16 PM
Collapse

Last night's lecture at the RS was fascinating. Collapse: how societies choose to fail or survive was very popular, too - a little too popular. Tulna and I arrived twenty minutes early, but the main hall was full, so we ended up in the first overflow room, where we met Katherine. (Welcome to the blogsphere, Katherine!)

Michael was a bit later still, and ended up in the 2nd overflow room downstairs! This was by far the most popular lecture I've been to there - usually, everyone fits into the main hall.

Mark, Katherine's SO, wasn't able to make it at all. He went back to his jujutsu class after a bit of a break, and got his head kicked in. He's been off work for a week. :-(

Anyway, it was a fascinating talk, as I said. Some civilisations fail, while others succeed in the face of seemingly similar problems. Why is this?

Jared Diamond has found a number of factors that make the difference between surceases and failures. Some of these are external - the success of your neighbour civilisations, friendly or otherwise, is one, natural climate change another. But many of the factors are internal - things like willingness to challenge and change dearly held beliefs, willingness to see problems, the extent to which elites are remote from the problems of the wider population, for example.

The example of Easter Island was startlingly pertinent. You can almost see the world as Easter Island writ large just right now, with us cheerfully ruining out environment. The inhabitants of Easter Island ended up totally deforesting the entire island. I wonder what went through the man who cut down to last tree? (I'm willing to bet that it was a man.) With no trees, fishing and building became impossible, and soil quality plummeted. The natives turned to cannibalism towards the end - apparently, a popular insult was "your mother's meat sticks between my teeth."

Things aren't looking too hot for us, I must say. :-( But it's still not too late.

For the full story, you'll need to read Dr. Diamond's new book. That's what he was there for, anyway - to sell his new book. And if it's as interesting as the lecture, and as interesting as his last book, I'd recommend it. I'll be buying it - though I might wait for the paperback. Civilisation should last at least that long, hopefully.

His last book, Guns, Germs and Steel, was fantastic. It's basically about the rise of Western European as the dominant civilisation in the world, and the reasons for that rise. After all, a thousand years ago, Western European civilisation was looking pretty shabby. The title gives away the most proximate reasons, but the reasons for Europe's technological dominance are more complex, going back through The Enlightenment and the reasons for that, including the population thinning caused by The Black Death, and a cultural willingness to experiment (in a pre-scientific sense) and to think freely. A fascinating read - also highly recommended. I was going to bring it in to lend to Tulna, but I don't seem to have it. It's probably at my ex's - which is scary in itself, 'cos it means that I've not read it for a looooong time.

Posted to Science and technology by Simon Brunning at 02:25 PM
January 20, 2005
Zope at Lastminute.com

Another interesting snippet from last night - Lastminute.com are running their system on Zope! Well done to Seb at Jamkit for getting this gig!

Posted to Python by Simon Brunning at 02:43 PM
Steve's future, take two

Steve doesn't want to be a carpenter any more. Now he wants to be a brewer.

I'm worried that he'll drink all the profits. I'm even more worried that I might help him. What do you think?

Posted to Apropos of nothing by Simon Brunning at 02:38 PM
Special Cases

Very interesting London Java Meetup last night. It was nice to see Darren and Steve along for the first time, and I had a very interesting chat with James about Sun's new interest in dynamic languages, and Groovy, his baby. (Jez is also working hard on Groovy at the moment.)

It's interesting to see the differences and similarities between the philosophies of Groovy and Python. One thing that James and (channelling) Guido agree on is that simplicity is good. They disagree on what constitutes simplicity, though.

Take functions for a moment. In both Python and Groovy, functions and methods are 'first class', which means that they are objects in their own right, and can be passed around like any other object. They differ in how that's done, though.

In Python, a function is called by putting parenthesises after its name:

>>> def spam():
...  print "spam's been called!"
... 
>>> spam()
spam's been called!

If you want to refer the function object, you just leave the parenthesises off:

>>> spam
<function spam at 0x0117CDB0>

This makes it easy to pass the function around:

>>> eggs = spam
>>> eggs()
spam's been called!
>>> def chips(a_function):
...  a_function()
... 
>>> chips(spam)
spam's been called!

To me, that's nice and simple. No special cases. As Tim put it, "special cases aren't special enough to break the rules". A function is an object, names are bound to objects, using the base name refers to the bound object.

"Ah!", says James, "but 99% of the time when a newbie leaves the parenthesises off, it's a mistake. That want to call the function." This is probably true. So in Groovy, if the function takes no arguments, you can call it without parenthesises. If you want to refer to the function object, there's a special syntax for that. (Perhaps James or Jez would care to give an example here?) The 'normal' case gets the normal syntax, and the unusual case gets the special syntax. So, is this simpler?

Another example - self. Python requires all methods to take an explicit self argument. After all, a method is just a function belonging to an instance really, and it's simpler to pass that instance explicitly. No black magic, and it makes injecting new methods into classes and instances at runtime simpler. But you always need a reference to the instance, though, so in Groovy it's is available implicitly. It's not like you need to dynamically add methods that often, is it?

To me, having all this implicit stuff is more complex than doing everything explicitly. But to James, keeping the common case simple to write is simpler. Who's right? Who knows. I like Python's approach myself, but it's not obvious to me that James is wrong.

I'm also sad to say that James is starting to understand what it must be like to be Guido, attacked every time you propose a change. Bloody nice chaps, both of them, so this is a real shame.

Oh and where were you, Sam?

Posted to Python by Simon Brunning at 01:52 PM
January 18, 2005
Big Red Button

I don't know what I need one of these for, but I need one. I just do.

Question is, what should it do? I mean, kicking off a build just doesn't seem significant enough. Bringing down the live systems perhaps?

Whatever it triggers needs to be acompanied by a klaxon, a red flashing light, and a voice counting calmly but loudly down from ten minutes, like the starship destruction sequence from Alien. Dry ice optional.

Posted to Toys and games by Simon Brunning at 03:40 PM
Look out, Clapham

Salsa update: I'm safe for the next couple of weeks, but after that, I've run out of excuses. There's no escape. :-(

Posted to Apropos of nothing by Simon Brunning at 03:15 PM
Jinkies!

Woman jailed for haunting castle in Bolzano.

Police extended their thanks to four teenagers for helping them resolve the situation, along with their large Great Dane. The 42-year-old Polish perpetrator said: "And I would have gotten away with it, too, if it wasn't for those meddling kids".

Posted to Funny by Simon Brunning at 09:29 AM
January 17, 2005
"Have a Twinkie, fat-boy"

El Presidente to Pete, one of our directors. A career limiting move, perhaps? Anyway, at least we know how he expects us to refer to our managment in future.

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

Friday night's TV coverage of Huygens was a real disappointment, partly because there was, at the time, really much nothing to add to the initial images, but mostly because it was presented by Adam Hart-Davis. I mean, I'm sure that he's a nice bloke really, but he makes me want to pluck my eyeballs out and stuff them into my ears.

Frankly, even today the pictures aren't much to look at. Massively significant and informative scientifically speaking, I'm sure, but if you mixed them up with a bunch of Mars pictures, I'd be hard pressed to tell which was which.

The audio wasn't any more exciting. I suspect that it'll be a while before the good stuff starts to come out, when the scientists have had a chance to do some interpretation.

Update: I take it all back - these are lovley.

Posted to Science and technology by Simon Brunning at 01:43 PM
Twinkie

Someone brought in a box of Twinkies today, for some reason. I've never had the opportunity to try one of these American cultural icons before.

It was bloody horrible.

Posted to Apropos of nothing by Simon Brunning at 01:35 PM
January 14, 2005
Huygens lands on Titan

Well done Huygens!

Posted to Science and technology by Simon Brunning at 05:03 PM
Malicious software removal tool from Microsoft

Hmmm. So, does it remove malicious software, or does it maliciously remove software? I can't believe that it's the former - it's hardly likely to remove Word, Visio, Outlook and SQL Server (to name but a few), is it? So, it must be the latter - it'll probably try and take Java and Python off, then.

Posted to Software by Simon Brunning at 01:54 PM
London Java Meetup

The next London Java Meetup is next Wednesday, the 19th. Nerds of all persuasions and ranks welcome.

Predicted topics of conversation: Jez and James will tell you that Groovy is the future, I will be unconvinced, Sam will tell us all about build pipelines until our brains fall out, then we'll either talk about how cool the Huygens probe was, or, should it go tits up, how sad it all was. Everyone will show off their cool iBooks, and I'll be jealous.

Shall we try and talk Jez into going to The Poet again? It's much quieter than Smiths of Smithfield...

I've ordered some Ubuntu release disks, both x86 and PowerPC flavours. With luck, I'll have them in time to give them out.

Oh, and don't forget the 20th and 27th...

Posted to Java by Simon Brunning at 01:24 PM
Elves Of Valinor Warn Of "Critical Security Flaw" In Palantír Browsers

A critical security flaw which could leave users open to attacks by malicious Dark Lords. Superb.

Via Gimboland.

Funny, if you are a total nerd, that is. Tulna will love it.

Posted to Funny by Simon Brunning at 12:17 PM
January 13, 2005
Huygens arriving at Titan tomorrow

Huygens will hit Titan's atmosphere at 0907 GMT tomorrow. According to the timeline, though, no one will get to see any of the actual data until it's all over, in the late afternoon. I wonder how quickly we outside of JPL will get to see some pictures?

Well I'm excited. ;-)

Update Friday, 11 a.m.: So far, so good.

Update Friday, 12:30 p.m.: The Live announcement (mp3).

Posted to Science and technology by Simon Brunning at 03:35 PM
If I wasn't a republican already...

This would make me one - Prince Harry dresses up as a Nazi.

Prince Harry urged to visit Auschwitz. Good idea, but leave the uniform at home, eh?

BTW, that's a republican, not a Republican. ;-)

Posted to The Big Room by Simon Brunning at 01:13 PM
January 11, 2005
Impromptu beer

I'm meeting Steve at The Stage Door this evening, in case anyone's interested in joining us...

Posted to Beer by Simon Brunning at 05:18 PM
Nokia 7610

Monkey Island on your phone? Now that's worth getting a good phone for.

What with this and Python for Series 60, I've got to get myself a 7610. Can you get one pay-as-you-go?

Update: Course you can...

Posted to Toys and games by Simon Brunning at 04:11 PM
A Day Off

The girls had an INSET day on Monday - which is to say, a day off school. I only found this out on Saturday, but El Presidente was good enough to give me the day off anyway.

We saw Lemony Snicket’s A Series of Unfortunate Events on Saturday. The girls loved it, and I was impressed too. I can't usually stand Jim Carrey, but he suited this role. After all, you weren't supposed to like him ;-) Freja wants to start on the books now.

On Sunday we went to the V&A for an hour or so, then on to the Science Museum, the girls' favourite. The Fashion display at the V&A was still closed, unfortunately, but thay can always look in my wadrobe if they want to see the fashions of yesteryear. The Great Bed of Ware was a big hit, for some reason.

Posted to Parenting by Simon Brunning at 03:36 PM
Richard Morgan

Apparently, Richard Morgan has weighed into the Waterstones blog sacking affair. Aside from being cool, it's also a bit of a coincidence, 'cos I'm just reading his latest paperback, Market Forces. His first novel, Altered Carbon, was absolutely stellar. His second, Broken Angels, was a crushing disappointment. Thus far, Market Forces is looking somewhere in the middle...

Hmmm. Perhaps it's not that much of a co-incidence after all. Market Forces only came out in paperback this weekend. I'm I just being cynical in wondering if Morgan's letter to Waterstones might be a well aimed publicity stunt. After all, the nerd demographic is well represented in blogging circles, and it has to be his main target audience...

Posted to Books and magazines by Simon Brunning at 03:02 PM
Python in Computer Weekly

Clarity, not speed, makes Python an ideal language for beginners, according to Computer Weekly.

This is far from the worst Python-for-pointy-haireds that I've seen, and it's far better than nothing. Computer Weekly is very well read in the UK - I'd say that more IT pros read it than not.

It's not the first article I've seen that implies that Python is slow to run, though. In practise, everything that I write is I/O-bound (either network or disk), and Python is at least as fast as any other language in this case. It can be a bit slower than compiled languages when it comes to number-crunching and tight loops, it's true, but that doesn't bother me at all.

Also, they do bang on about Python being a good language for beginners, which it is, but they mention only in passing that it's just as good for advanced programmers.

Posted to Python by Simon Brunning at 01:46 PM
Time to find a new bookshop

Waterstone's have sacked an employee for blogging. So much for respecting freedom of expression. Oh well, I prefer Blackwell's and Books etc anyway...

I hope El Presidente doesn't get any ideas.

Via Gimboland.

Posted to Blogs by Simon Brunning at 01:30 PM
January 07, 2005
With friends like these...

Man stabbed his "Friends Reunited" pal.

Don't say I didn't warn you.

Posted to The Big Room by Simon Brunning at 04:14 PM
January 06, 2005
Fell in love with a ...

Cor. I've just noticed that "Fell In Love With A Boy" from Joss Stone's The Soul Sessions is a cover of The White Stripes' "Fell In Love With A Girl" from White Blood Cells.

Who'd have thought it? I'd probably never have noticed if iTunes hadn't picked up the composer tag.

Posted to Music and Film by Simon Brunning at 04:49 PM
January 05, 2005
And another thing!

While I'm in grumpy old man mode - what do you call it when the last track on a CD has a long silent patch after the last listed song, followed by another, unlisted song?

What do you call it, and why do they do it? It was irritating enough when I just listened to the CD, but now, on my iPod, it's even worse. There I am on the train, and my iPod goes quiet. I dig it out of my pocket, elbowing my neighbour in the process, only to find that it's still playing. Bah!

Who came up with this stupid idea? I thing that I first came across it on The Black Crowes' Shake Your Money Maker in '89, but that probably isn't the first time it was done. Anyone know of an earlier occurrence?

And another thing. When I was a boy, R&B was the kind of music that Chuck Berry and The Fabulous Thunderbirds played. When did it start referring to that insipid ballady sub-soul come hip-hop shite that people call R&B these days?

Posted to Rants by Simon Brunning at 04:33 PM
Who am I working with?

Arrrrgh!

El Presidente's been looking into MySQL, and we were chatting about searching and sorting techniques. In MySQL, I gather, you can specify one of a number of data structures and algorithms to be used for a given index. One of those available is a 'btree', which I assumed to be binary tree.

I dug out Knuth's The Art of Computer Programming, Volume 3, Sorting and Searching, (As much to scare El P as anything else - it's not like I understand it). El P asked what a Fibonaccian search is.

I haven't got any idea. Hey, I write accounting packages! But like anyone who's gone through primary school, I know what the Fibonacci Numbers are.

"Hey, I know that," piped up Tulna, "That's from The Da Vinci Code!"

Arrrrgh! Arrrrgh! Arrrrgh! What is it about that book that irritates me so much?

Perhaps it's the fact that I wasted a good few hours reading it. "Hey", I thought, "all those hundreds of people that I've seen reading it on the train can't be wrong. It must be good."

Wrong. It's dreadful. It reads like Jeffrey Archer's take on Holy Blood, Holy Grail.

If you want to read a good novel about the Templars, the Illuminati and so on, pick up Umberto Eco's Foucault’s Pendulum instead.

Posted to Rants by Simon Brunning at 03:50 PM
If a job's worth doing...

Berlusconi forgives attacker. Yeah, well I don't. A "minor injury behind his right ear"? Put a little effort into it, man!

Posted to The Big Room by Simon Brunning at 02:12 PM
Outputting dates in RFC822 and ISO8601 formats in Python

I'm not feeing terribly inspired at the moment, so it's time for a spot of meme-jumping. You've seen it in Java, you've seen it in Perl; now here it is in Python - Outputting dates in RFC822 and ISO8601 formats in Python.

Odd thing there - when you ask Python for the current (or default) locale, it gives it to you with an underscore, like so: 'en_GB'. But when you set the locale, you need to provide it with a dash - 'en-GB'. I'm sure that there's a good reson for this, even if I'm too stupid to work out what it is.

Posted to Python by Simon Brunning at 12:29 PM
January 04, 2005
Sorry

I can only apologise for that appallingly self indulgent and whiny post on New Year's Eve. I wasn't feeling too good, but there was no need to inflict that on you lot.

Sorry. It won't happen again.

Posted to Apropos of nothing by Simon Brunning at 09:06 AM