November 30, 2007
Orrible Strikes Again

I wasted a good couple of hours today trying to get cx_Oracle running on my Mac. I didn't have any luck - Oracle's Mac client is PPC only. You can still run it in an Intel Mac due to the magic of Rosetta, but you don't seem to be able to compile against it, so these instructions don't work for me.

Anyone got a binary I can snarf?

Posted to Python by Simon Brunning at 04:24 PM
Fear of Flying

Hey - did you know you can run less directly over a gzipped file? Cool.

less /resin-apps/r2apps/log/r2frontend.log.2007-11-29.gz

Posted to Linux by Simon Brunning at 04:00 PM
November 28, 2007
Today's the Day The Teddy Bears Have Their Owners Flogged

I was going to blog about the teddy bear thing in The Sudan, but Dave has beaten me too it.

Posted to Atheism by Simon Brunning at 09:12 AM
Football, Football, Bloody Football

Looks like I'm going to spend the next couple of months writing bloody football match report pages. I hate football. Sigh. Still - no more boring than reinsurance software, I suppose.

Update: Still, it's not all bad. The coffee machine has been fixed, the canteen had porridge this morning, and Kylie's looking for a Guardian reading man.

Posted to Apropos of nothing by Simon Brunning at 09:09 AM
November 27, 2007
My Brain is Exploding

The Mail says homeopathy really works - so clearly it must be rubbish. But then again, it also says homeopathy is rubbish, so it must be real. I don't know what to think now.

Even more confusing, this is actually all from The Guardian. Who'd have ever thought they swapped stories? What next - Asylum Seekers Responsible For 120% Of Crime In This Fair Land in The Grauniad?

Posted to Science and technology by Simon Brunning at 05:23 PM
November 26, 2007
The Rational World of Martin Amis

Chris Morris is missing the point in The absurd world of Martin Amis (in response to this). These concepts are more complex than Amis would have us believe, he says, but doesn't go on to point out what any of these complexities are, nor why they effect Amis' central thesis - Islamism is a problem.

To reveal my own biases: I take a dim view if any kind of systematic irrational thought of belief, and a dimmer view still of organisations based upon them. On the whole, I don't care much about the details of the irrationality. I don't care which particular flavour of invisible friend people chose to be obsequious to.

But we can't totally ignore the fact that religions do differ in the extent to which they tolerate those who do not share their delusions. You don't get Jain suicide bombers, for instance, and I don't believe that that's wholly due to economic or political circumstances.

In Tulna's case, it's probably also due to not wanting to get blood on her Jimmy Choos. But I digress...

Certainly, we shouldn't single out Islam - the Christian Zionists have more than their share of blood on their hands too.

Of course, the majority of the followers of these belief systems don't use violence. The books at their centers contradict themselves, and people can take very different messages away from them. I suspect that people take away whatever suits their temperament. But that doesn't mean that the non-fanatics aren't part of the problem - they are legitimising the belief system upon which these atrocities depend. We should just leave the whole sordid lot in the history books where it belongs.

I've just been reading Hitchens again. You might have guessed. ;-)

Posted to Atheism by Simon Brunning at 01:54 PM
Agile in the Large

What if powerful languages and idioms only work for small teams? (via Small teams and big jobs) is interesting. We are running a really large Agile project here at GU; what, 60 odd people? Mention any of the road bumps you hit, and people tell you your team's too large.

That's no good. The team, and the project, are the size they need to be. Splitting them arbitrarily might be possible, but it would carry huge costs of its own. The challenge is to make agile work with a big team. And on the whole, I think we are.

Interestingly, despite the fact that we've made agile methodologies scale up, some people here are still nervous about whether agile languages can do the same. Plus ca change...

Posted to Agile by Simon Brunning at 09:49 AM
November 22, 2007
Am I stupid, or is Oracle?

The story is this. We have to make a change to one of our data migration scripts. It's already doing some really nasty string manipulation, and we are about to make it far far worse. Frankly, I don't have a hope of making the change unless we can simplify things a bit first, so I was hoping to break some of our string manipulation out into functions.

In order to do that, we wanted to develop these functions out of the context of the migration script, so we could play with, uh, I mean test them. ;-)

Problem is, the finest minds in Herbal Hill haven't been able to write a function that Oracle is happy with. We have removed all the complex stuff, and are trying to write and run the simplest function that we can think of, but we get no joy. Running the broken_function.sql, we get this:

ORA-06550: line 11, column 13:
PLS-00231: function 'FOO' may not be used in SQL
ORA-06550: line 11, column 13:
PL/SQL: ORA-00904: : invalid identifier
ORA-06550: line 11, column 6:
PL/SQL: SQL Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:

Any clues?

Posted to Software development by Simon Brunning at 11:38 AM
Coincidence? I think not.

Like Dave, I was caught up in the chaos on Tuesday. Unlike Dave, my main thought is - two people seriously banging their heads, two tube stops and fifteen minutes apart? What's up with that?

Posted to The Big Room by Simon Brunning at 09:38 AM
November 21, 2007
Martin Amis is not a racist

It comes as little surprise that Ian McEwan is capable of expressing himself a bit, but nevertheless Martin Amis is not a racist is a superb piece of writing. I had been playing with a post expressing the same sentiment; I'm glad I never posted it now.

Posted to Atheism by Simon Brunning at 08:01 PM
Simple Simon

Ever had a song written about you? asks The Guardian.

Simple Simon by The Brunning Sunflower Blues Band is about me. Rubbish song, but it does have the incomparable Peter Green playing on it, so it's still a claim to fame.

Update: Oh yes, there's Big Belly Blues, too.

Posted to Music by Simon Brunning at 06:19 PM
Subversion Log Filtering

So, Annabel was complaining that she couldn't see a log of just her Subversion revisions along with details of the files that have changed from the command line. Shock horror - something you can do from Tortoise that you can't easily do from the shell!

(If you don't care about seeing a list of the files that have been changed, you can just do svn log | grep -A2 sbrunning | less, but adding the -v option turns the output to gibberish.)

Clearly I wasn't going to to let that stand, so I knocked up a very quick script. Then proceeded to over-engineer the snot out of it. (In my own time I must add.)

You can filter by author or by checkin message, with regexps. You can also reverse the output and see the latest checkin last, which is handy if you are only want to see the most recent checkins and don't want to pipe the output to less.

Get it here: svnlog (syntax highlighed - loving that Django TextMate theme) or svnlog (text). Requires Python 2.5. Works on Mac & Linux, probably on Windows too if you give it a .py suffix.

Posted to Software development by Simon Brunning at 06:05 PM
Birds do it...

We are desperately short of both QA and CS people at the moment. I wonder if we could induce them to breed?

Posted to Software development by Simon Brunning at 05:47 PM
Best. Putdown. Ever.

I just popped over to the CS team's area to help them with a spot of merging. Turns out my Shared iTunes Library is very popular over there. Nice.

I did have to point out that the High School Musical albums are Ella's, though. (I should also mention that the first album that Ella ever bought with her own money was Blondie, Parallel Lines, which is pretty cool for a nine-year-old I'd say.)

My music collection doesn't always get off so lightly. The other day the iTunes artwork screensaver was running. Negin asked me where all the album covers came from, and I told her that they were all covers from CDs I own.

"Funny," said Swells, "I thought it was my dad's record collection."

Ouch. When Swells insults you, you stay insulted.

Posted to Music by Simon Brunning at 01:05 PM
Return Triumphant, Or Not At All

Returning None is Evil. I agree. I've always subscribed to the Samurai Principle myself. If you allow nulls to float around you inevitably end up with NPEs. These can be hard to diagnose properly; not only do you not know if null is actually invalid, but if it is, it's often non-trivial to work out where it came from.

Posted to Java by Simon Brunning at 10:28 AM
Doh!

Lost in the post - 25 million at risk after data discs go missing. Bloody hell. Sounds like the HMRC's teches need some DPA training sharpish before any more of them get themselves sent down.

Why was someone able to do this anyway? Few of the places where I've worked with personal data were so lax.

Though there was that one time someone took a subset of production data to use for testing at a bank. For testing their credit agency reporting application. Naturally, someone screwed up, and the credit agencies ended up being send details of entirely fictitious unpaid debts for real people. Puts the famous Dear Rich Bastard story into perspective, doesn't it? (This was pre-DPA, so no one went to prison - they weren't even sacked!.)

Oh well, there's good advice here: HMRC Security Breach: What You Can Do to Protect Yourself From Us. "You should, without delay, change your date of birth."

Posted to The Big Room by Simon Brunning at 09:36 AM
November 20, 2007
Mocks and Stubs and Fakes, Oh My!

Fuzzyman has a new mocking library for Python, which he presents in Mocking, Patching, Stubbing: all that Stuff.

Michael takes issue with Martin Fowler's Mocks Aren't Stubs; specifically where he defines mocks as objects pre-programmed with expectations which form a specification of the calls they are expected to receive. Michael's mocks are not pre-programmed with expectations - his expectations are defined after the test execution.

Now, to me, this is a trivial distinction - the important difference between a stub and a mock is in the existence of expectations. Whether the expectations are defined before or after the text execution is not crucial - it's still a mock.

It does matter in terms or usability, of course. It feels more natural to Michael to define his expectations after the test object is exercised, along with his assertions. For me, I have to say that defining the mock object's behaviors all in one place makes sense, so both the expected method calls and any return values should defined together - and the return values have to be pre-defined. We are using EasyMock here at GU (along with the Hamcrest constraints library) and I like it just fine. But that's more a matter of taste than anything else.

Posted to Agile by Simon Brunning at 03:26 PM
November 15, 2007
Say "No" to child abuse

Like Dave says, sign here now. Now, dammit.

Posted to Atheism by Simon Brunning at 04:58 PM
November 13, 2007
Ironic

ThoughtWorks had a few Dell 926 all-in-one printer/scanner/copier/card-readers given to them, so they decided to raffle them off. I won one, but I had to throw the fish back - turns out it's a Windows only machine. Windows only! Naturally, I won't have Windows in the house, and I don't know anyone who uses Windows, either.

Well, at least I won't admit to knowing that class of person. ;-)

It's uncanny. Whenever there's a raffle with a prize I don't want, I win every time, without fail. That's proper ironic, Alanis.

Posted to Rants by Simon Brunning at 03:44 PM
London Python meetup, Wednesday, December the 5th

ThoughtWorks have given me the go-ahead to organise another Python meetup at the London office. Thanks, guys!

Details here - London Python meetup, Wednesday, December the 5th.

Posted to Python by Simon Brunning at 02:29 PM
Beard's gone

It all started when I had soup for tea last night...

Posted to Apropos of nothing by Simon Brunning at 09:49 AM
November 08, 2007
Radiohead's In Rainbows Experiment

Interesting that people seemed to assume that £2.90 per album was some kind of failure for Radiohead's In Rainbows. Thing is, it's not how much people are paying that is the issue, but how much the band gets. £2.90 is considerably more that they'd get per sale via traditional methods, and it seems that it's a lot more than they'd get via iTunes, too - so it looks like a success to me.

Whether this will work for anyone other than the best band in the world remains to be seen, of course. ;-)

Posted to Music by Simon Brunning at 02:01 PM
Compiling!

Compiling!

With us, it's Running Tests! Same thing otherwise.

Posted to Funny by Simon Brunning at 01:49 PM
Refactoring - the Dark Side

All this refactoring is all very well, Martin, but there is a cost. When a piece of code that you are currently working on gets refactored out from under you, you can end up with the merge from hell. I've just spent two hours merging a perfectly sensible set of refactorings into a change I'm making. Methods were renamed and moved, all to better names and places, but the changes were well beyond what Suvbersion can deal with automatically.

What's the solution to this? I have no idea. ;-) Certainly the refactoring of code that is hard to understand or maintain is necessary if you are to keep your code-base workable.

One piece of advice is to check in little and often. This doesn't make the issue go away, but does limit its impact.

The other thing is to bear in mind the potential cost of the refactoring that you are doing. Renaming that isPlayable() method to isVideoPlayable() might not be such a good idea, even if it is a better name, if it's going to cost someone hours of work.

Posted to Agile by Simon Brunning at 01:33 PM
More shiny shiny...

... here - launched this morning.

Those Reuters feeds weren't as simple as they look.

Posted to ThoughtWorks by Simon Brunning at 01:33 PM
Baby Jack

Jack Brunning

All together now: ahhhhh. This is Jack at circa 24 hours old, sleeping like an angel. Dan and Abby had better not get too used to that.

Update: More photos uploaded now.

More shots, courtesy of Uncle Jim.


Posted to Family by Simon Brunning at 10:16 AM
Smart Questions

The usually smart Charles Arthur make a classic mistake here - GrowlMail screwed up your Mail so it keeps crashing? Yeah, but what should the developers do? - approaching an open source developer for help in a bad mood and with a sense of entitlement.

Remember, when you ask an OSS developer for support, what you are actually doing is asking a stranger for a favour. Now, the fact that they are releasing open source probably means that they are the sort of person who's likely to help out a stranger, but if you come across as unconstructivly critical, uncooperative, or just plain unfriendly, the developer has nothing to lose by just turning her back.

The canonical work on getting help from OSS developers is of course ESR's How To Ask Questions The Smart Way.

Posted to Open source by Simon Brunning at 09:54 AM
November 07, 2007
I'm An Uncle Again!

Jack Brunning was born yesterday evening. Mother and baby are well, despite a rather lengthy labour. Well done to Abby, and congratulations to her and to little bro' Daniel.

A boy in the family at last - well done!

Photos when I have them.

Posted to Family by Simon Brunning at 09:27 AM
November 02, 2007
Brunning's Law

Brunning's 1st Law of Source Control: He who checks in first, merges least.

"Source control ate my files!" is a superb post. Spot on - 9 times out of 10, when someone complains about Subversion (or whatever) screwing things up, it can be traced back to fear of updates or commits, or to someone blatting someone else's changes with a blind merge. This last, especially, can always be traced - there's no hiding the truth when history is an open book.

The other time, it's someone trying to revert a revision from a dirty working copy. I've never yet seen the software get it wrong.

But for the love of God, Darren, start running a continuous integration server already!

Posted to Software development by Simon Brunning at 08:02 PM
Illiterate MP

Not only does Nadine Dorries MP cast aspersions on Ben Goldacre for making perfectly legitimate enquiries into the undisclosed interests of experts presenting evidence to a Commons Select Committee, not only does she disingenuously cite time pressures as her reason for removing commenting from her piss-poor excuse for a blog when it's obvious she just didn't like the comments she was getting, but what's worse, she doesn't even know the difference between "your" and "you're" - "You can't do breakfast TV", the vanity lobe in my brain screamed, "Your wearing no make up and the dog walking jumper." Not too hot on punctuation, either.

Who voted for her? Come on, own up.

Posted to Rants by Simon Brunning at 04:47 PM
November 01, 2007
Speed Dating

Mum sent me a link to this:

Very funny.

Posted to Funny by Simon Brunning at 06:52 PM
Mac screen savers

I spotted Jim running the Fracture screen saver on his MacBook the other day. Beautiful - worth £5 of anyone's money.

"As you can rely on with Stick Software products, it has a suitably overengineered configuration panel that lets you control many details of its operation." Outstanding.

It joins my ever growing collection. I love Skyrocket and Hyperspace, (I've mentioned Skyrocket before) and Euphoria, Solar Winds, Flux & Fireflies. (These also offer config screens with all the frobbing and tweaking opportunities that you could ever want.)

For traditions' sake I also have Red Pill and PongSaver. Oh yes, and a couple of Life savers that I can't seem to find links for any more.

That's a lot of screen savers. I don't want to be fiddling with them all too much. Fun screen savers are enough of a productivity sink as it is - I don't want to be changing my mind as to what to run all the time. And I don't want to use the Macs built-in screen saver randomiser, 'cos it's an all or nothing thing. Though I do like the iTunes Artwork & RSS Visualiser savers, there are a lot of the built in savers that I don't want to see.

Luckily, there's RandomExtra. Like the built in randomiser, it picks a screen saver at random, but it also allows you to select which of your installed savers you want it to pick from. What's more, you can weight the savers - so I can choose to see Fracture twice as often as PongSaver, for example.

Naturally, I just spend ages fiddling with RandomExtra, instead. Sigh.

Posted to Toys and games by Simon Brunning at 06:38 PM
Coverage Tools

Julian and I have been asked to put together some unit and functional test coverage figures. We've not actually been given any time in which to do it, though, so I wouldn't hold your breath.

Looks like some work was put into using Emma to provide these figures, but it's not finished.

Over in the Python world, there's been some discussion over on c.l.py about Ned Batchelder's coverage.py, which looks like a fairly nifty module.

OTOH, I think you have to be a bit careful with metrics such as those provided by these coverage tools. Ned himself points out many of the problems with taking your coverage figures at face value (though Emma's block-level approach fixes some of them).

I'd add one more issue - gaming. People can start to see good coverage figures as an end in and of themselves. If the coverage isn't at, oh, say 80%, the tests must be crap. If they are at 100%, they must be great. It's not just that the figures can be meaningless, they can actually lead people astray.

Now, for an approach to coverage testing that actually makes sure you are testing that your code does the right thing, check out Jester & Pester.

Posted to Testing by Simon Brunning at 06:26 PM
Hammertime!

Spotted by Paul at the Playa del Inglés, Gran Canaria:

STOP - Hammertime!

Posted to Funny by Simon Brunning at 12:48 PM
svnmerge

I've never been too intimidated by driving Subversion from the command line, so I've always maintained my branches by hand, keeping note of what had been merged in the check-in messages. But today Graham Tackley recommended I take a look at svnmerge. I must say, I didn't know what I was missing.

It keeps track of merges for you, ensuring that you'll never try to merge the same revision more than once, or miss any out by accident. Makes it easy to block revisions that you don't want to merge, too. Give it a try.

Don't forget - you'll need a decent merge tool, too

Posted to Software by Simon Brunning at 12:39 PM