June 16, 2008

Last month, I watched the finest dvd ever created. Ever since, I’ve been counting the minutes until I can get back on the rugby pitch. Needless to say, now that I have, I really wish I hadn’t.

On saturday, we had a fitness test to set a baseline for the upcoming summer’s endeavours. Of the people who were there, I knew that I’d perhaps fare a little worse than the 9 stone 16 year-old. Seeing as the session was 2 days ago, and that even now, I’m in such splendidly searing agony that even writing this post is making my fingers hurt, I’m pretty sure that was indeed the case.

Knowing the fitness coach, I’m pretty confident that I’ll be spending the next 3 months mainlining ibuprofen. On a slightly more worrying note, the friday just gone was the last day in the next 9-10 months that I’ll spend not hurting. The rest of the preseason and season will be spent cramped, with aching muscles, bruised, and generally feeling sorry for myself.

But, as ever, would I have it any other way? Of course not. This season, my own personal Everest may come. I need to make sure that I’m ready.


A dogging holiday

May 5, 2008

For the first time in years, I’ve taken time off work, with the express intention of doing pretty much nothing. I have no holiday to go on, no major tasks, and absolutely no goals. Except, that is, to look after one of these…

the hound!

This is Wilbur, my new pedigree Basset hound puppy.

Yes, Wilbur is my only reason for taking any time off work, and I think he’s the best reason anyone could imagine for any annual leave. Wilbur is—quite simply—the most beautiful, loving, yet utterly terrifying animal I’ve ever seen. The Wilbur Switch has two settings; Hyperactive, and Asleep. Right now—of course—he’s asleep.

When Clair and I first set out buying a puppy, we soon decided that a Basset was the dog for us. They’re loving, trusting, pretty docile, and—let’s face it—pretty easy on the eye. To get in touch with him, we first contacted the Basset Hound Club, who put us in touch with a couple of proper breeders. This, by the way, is the route which I’d advise anyone wishing to get a dog—any pedigree dog—to take; speak to someone who knows an awful lot more about things than you do, and take their advice. We found a breeder who we liked—and who liked us—and got on the list of people earmarked for one of their beautiful litter. Eight fraught weeks and a couple of hundred miles on the clock later, what we have ended up with is a dog which has been brought up in a loving family environment, surrounded by its littermates, constantly handled by children, and pretty much house trained. Added to that, he’s spectacularly smart, and the only animal I’ve ever seen who can tread on its own ears.

To say that I’m captivated by him is an understatement. This captivation, however, is not without its price. I’m so eager to do everything right for the hound that it can get a bit overwhelming. I’ve never exactly been one of life’s worriers, but now that there’s this little, beautiful, precious life depending entirely on my actions, it does rather divest me of my laissez-faire predisposition. Yes, he’s had a few accidents indoors, but those can be attributed to my inexperience in reading his signs as much as they can to The Hound’s bladder. He’s scratching a bit, but with so much skin, and so little dog, that’s natural, isn’t it? How do I know he’s content, and not just crazy and anxious? Am I feeding him enough? Am I feeding him too much? Does he really like processed cheese, or is he just being polite?

I’m sure that the anxiety will wear off in time. After all, this is Wilbur’s first time, too.

If I’m painting a negative picture, it’s only of my own paranoia. Owning a puppy is one of the most rewarding things I’ve ever done. If we treat him right—which we’re trying to do—what we get in return is utterly unconditional love, and to watch this unwieldy, clumsy, yet extremely smart little beast grow up into a full-size dog. On half-size legs…

Nerdy colleague: “There should be an internationally-recognised scale to measure the strength of cheese.”
Me: “Surely that’s not just the Young’s modulus?”

Needless to say, much nerdy hilarity ensued, followed by a conversation about whether Young’s modulus or the Mohs hardness scale would have been a better punchline. Splendid stuff.

What I’m doing now

February 3, 2008


After the big match

January 28, 2008

So we lost. We’re out of the cup. But as the converse of hollow, boring wins, what we did yesterday was fantastic. Taking on a better-prepared, (better-)paid team, we showed up, and gave them one hell of a scare.

Without resorting too much to the world of sour grapes, if a couple of dubious referee’s decisions had gone the other way, I honestly think we could have taken it. We played pretty much according to plan. We were nasty, uncompromising, disruptive, and played in all facets as if we wanted the win more. In the forwards, we dominated everything. In the backs, every man left everything they had on the pitch. I even got to unleash my rapier wit.

As we limped and hobbled our way back to the coach, we did it with the warm glow that not one of us could have done anything more than we had done. We shared a few pints on the way home, in a coach unrecognisable from the one in which we arrived. Everyone was sat together, all having a laugh, all members of a team beaten but unbroken.

I received a text message this morning from a friend asking if I was walking proud or defeated. I replied “Both.”

It’s the biggest match of the year. We’re a diverse team; some older and some younger. Some short and some tall. Some fat and some thin. Some black and some white. What brings us together is the black and white hooped shirt we wear on a saturday afternoon. In just over two hours we kick off against a team from just up the road, where players are paid formidable amounts of money to play the game we play for free.

Slowly trickling to our home club, we mill around, swapping jokes about last week’s match report, swigging Lucozade, and throwing a ball around. We’re all wearing the team mufti; a black hooded top with the club name and a few logos on. We look good. Like a team.

Some of us are starting to think ahead to the game. On paper, they’re the better players. But we know we’re the better team. Our best hope lies with rattling them a bit. Getting under their skin. If we can put them off their game enough, we’ve got the skill to take them. It’ll be close, but we can do it. We’ve been told we can do it, and we’re starting to believe.

The coach is here. There’s no turning back. Once we’re on, the mood starts to change. Some players quieten down, some become more boisterous. Some lean over the back of chairs to join the banter. Others retreat into the world of their iPods. The King is keeping me mellow as the countryside drifts by the window. I say nothing.

I know my job; it’s a simple one. All I have to do is to be better than my opposite number. I know that he’s out there somewhere thinking the same thing. But I can’t let him. I refuse to let him. My friends on the coach expect this of me, as I expect it from them.

Closer to the match, the coach goes quiet. We want this win, and to get it, we have to concentrate. I look around, into the eyes of my friends. As I look, I see the unification of desire, and of purpose. We all want the same thing, and in just under an hour, will be giving everything we have to get it.

As we pull into the opponents’ club, we stand as one, resolute in our purpose. I know that there’s nowhere else in the world I’d like to be more than where I am right now. I love this game. I bloody love this game.

Webapp testing…

December 13, 2007

…is a spectacularly boring pursuit. Extraordinarily, magnificently, dull.

I hate it.

If you’ve done much, I wouldn’t be surprised to hear that you hate it too.

Which is why I don’t do very much of it any more. What’s more, I suggest that you join me in my noble quest.

Recently, I have been letting Watij do it for me. Before I go any further, I’m not normally what one would call a fanboi. I’ve sometimes heard my own brand of rampant unchecked cynicism referred to as “cautious optimism”, but that’s about as close as it gets.

In short, Watij is absolutely great. It’s an open source lump of Java that will test your webapp—albeit currently only in IE—straight from a JUnit instance. Nothing special there, then, you might think. The fab thing, however, is because it’s just a bit of bog-standard Java code, you can start doing really cool things with it.

It’s probably useful at this point to run through what I’ve been occupying the time between train journeys with recently, and how much Watij has helped me in this task. In order to get adequate functionality to become compliant with a big European directive, a sizable chunk of the intranet workflow application on which I work has recently been changed. The terribly fin-du-siecle static JSPs have been ripped out, and replaced with lovely bright, shiny, new AJAX counterparts.

The first thing I have to do on Workflow 1 is to ensure that for a given set of input criteria, the necessary pages are displayed in the necessary order, contain the necessary questions, and provide the correct result given the answers to the set of questions asked. The spec for this workflow is a series of Excel spreadsheets. With a bit of vlookup wizardry, it’s possible to generate all necessary test cases directly within Excel [I know. Sorry.] from the spec. Given a suitably-cunning test constructor, all possible circumstances in this instance can be catered for in one class, resulting in Watij testing every conceivable route through the workflow, at each stage asserting that the right pages are shown in the right order, and contain the right questions and notifications. Lovely stuff. One click, and that’s one morning saved per release cycle. And the really groovy thing is that because the test cases were generated directly from the spec, I know the tests are right.

Workflow 2 is a complete hog. With nearly 450 separate routes through it with any one of six distinct results, editable in two unique scenarios, there’s just shy of 900 test cases to run; each of which has to be perfect. If you think for one second that I’m going through that manually, you’re having a laugh. Luckily, Watij can ride into town, jump off its horse, and—at the last minute, of course—untie me from the railway line of tedium. With details of each test case handily knocking around in Excel, it’s a breeze to generate the code necessary for the test cases from a spreadsheet. [yes—I know. I’ve already apologised] With the 900 test cases falling into 7 different categories, all I need to do is to write 7 subtly different test classes, show each of them the necessary set of cases, and voila! For the price of my computer whirring away for a few hours, I’ve just saved a few days of mind-numbing testing.

The really handy stuff comes when you use Watij in conjunction with a bit of JDBC. The application on which I work accesses its own database via Hibernate, also setting up data in someone else’s database using a bunch of RMI calls. Without wanting to sound overly technical, as far as I’m concerned, both Hibernate and RMI are just black boxes. I know my application tosses objects at them, they do something to it, and some datum gets written somewhere. As a consequence of the directive for which we’re releasing the new version of the code, the data setup scenarios are somewhat arcane. If Result X is reached, data is to be written to Tables 1, 2, and 3, except in the case where Result Y is also true, in which case some data gets written to Table 1, another bit to Table 2, and under no circumstances to Table 3. Except if it’s a tuesday. There are 31 separate routes through the data setup workflow, which needs to be tested—again—in two separate scenarios. Testing all 62 routes through this setup manually would again take at least a day, and be prone to the errors I start introducing by testing whilst unconscious.

With the setup table defined in an Excel spreadsheet, I can use that to generate the test cases [right—I’m not apologising for this any more], and use them all in the same test class. Because the test is written in bog-standard Java, once a test has been run through the GUI, I can let the JDBC do its work, going off to each table and asserting that data which should exist does exist, that when data exists it is correct, and that data which should by no means exist does not exist. Again, one mouse click, a bit of a wait, and IntelliJ shows me the green bar of success or the red bar of failure. Because the code was generated directly from the spec, I know that the tests are correct, and therefore if the red bar of failure appears, we’ve got a functionality bug somewhere, either at our side in how we construct the objects to throw at the other system’s RMI server, or they’ve got an error in how they interpret the method we’ve called. It’s brilliant!

My only slight gripe is that out-of-the-box, Watij doesn’t play terribly well with AJAX, but with a few judiciously-used wait functions, there’s nothing in there that would stop me from using it.

I know I’ve been prattling on now for a while, but I hope that I’m starting to convey how much time and precious, scarce sanity the use of Watij has saved me. It’s fab, and if anyone wants the 5-minute intro course, you know how to get in touch.