July 30, 2004
I'm off

I'm on holiday next week. I'll be taking the girls up to visit their Gran in Newcastle.

I'd better take a jumper. And something waterproof.

Posted to Apropos of nothing by Simon Brunning at 04:56 PM
A *painful* boycott...

OK, so we are boycotting The Odeon, Caterpillar, and Nestlé, none of which is too painful. But if I have to boycott Penguin, too, that's going to hurt.

Posted to Books and magazines by Simon Brunning at 04:38 PM
The new goatse.cx?

Goatse.cx was bad enough, but now there's this monstrosity. Safe for work, if not for your sanity, via Ben Hammersley. (The goatse.cx tribute that I linked to above is safe for work too - but many of the pages to which it links couldn't possibly be any less safe for work.)

Posted to Funny by Simon Brunning at 04:31 PM
July 29, 2004
Mocking a URL

Tulna's having a bit of trouble with some unit testing at the moment. The lovely Emma has pointed out a few holes in our test coverage, and Tulna is endeavouring to fill them.

She's currently working on building tests for our configuration classes. We use Digester to pull in all our configuration from XML. In real life, it's all as sweet as a nut, but obviously we still want unit tests to ensure that any future breakage is discovered PDQ.

We run digester in a ServletContextListener's contextInitialized(). After setting up our digester, after all that addObjectCreate(), addBeanPropertySetter() shenanigans, the code which actually does the digesting looks like this:

URL configFileURL = context.getResource("/WEB-INF/config.xml");
InputStream configFileStream = configFileURL.openStream();
config = (Config) digester.parse(configFileStream);

Question is, how do we get our test data into configFileStream? The context object is a mock, so we can do anything we like there - but how do we mock URL? It's a final class, so we can't sub-class it...

Posted to Java by Simon Brunning at 05:12 PM
Quote of the week

"The Web is the sum of all human knowledge, plus porn." Via SlashDot.

Posted to Funny by Simon Brunning at 03:47 PM
Oooh, look

They are selling my old house. I lived there from the age of around six intill I was 19. Bedroom 2 was mine. They still have the washing line in which I cut my arm in the garden - I've got a scar from that.

Good Lord, how self indulgent is this post?

Posted to Apropos of nothing by Simon Brunning at 03:42 PM
July 28, 2004
Keeping Me Sane

I don't seem to have much to say for myself just a the moment. Apart, that is, from pointing out the fact the StyleReport Pro is eating my soul.

Luckily enough, there have been a few things on the 'net recently to keep me sane:

Posted to Funny by Simon Brunning at 04:12 PM
IBM's new Eclipse toys

IBM has released some cool looking new Eclipse plug-ins: Eclipse Web Tooling Platform Contribution - IBM. I particularly like the look of the Data Tools, the Server Tools and the Structured Source Editing.

Posted to Java by Simon Brunning at 02:38 PM
Soft-coding the class's name

Ever since I started using log4j, it's irritated me that I'veneed to hard-code the package name in my Category log = Category.getInstance("package.name.here") statements, once in every class. Well, it turns out I don't; Pretty Log4J shows how to avoid hard-coding. ClassName.java lets me do Category log = Category.getInstance(ClassName.getPackageName()) - much nicer.

Posted to Java by Simon Brunning at 02:18 PM
Chav Central

Via Darren, I've discovered the delightful ChavScum. Hey, bit of a Chav name there, Darren mate. ;-)

I've lived in sunny Colliers Wood for most of my life, on and off, and we have a healthy Chav population. You'll find them particularly concentrated in and around our local BNP meeting place, The Victory.

Update: The nearest fast food to The Victory is Chic N Ribs. :-(

See also: sheppeyscum.com. I've never been to Sheppey, but El Presidente worked there at one point, and I'm assured that sheppeyscum.com is, if anything, generous.

Posted to Funny by Simon Brunning at 11:23 AM
Worst Album Covers Ever

Worst Album Covers Ever, via Simon Willison.

Posted to Funny by Simon Brunning at 09:39 AM
July 27, 2004
In the event of an emergency

Relax, have a cup of tea.

Posted to Funny by Simon Brunning at 03:39 PM
I like to think of myself as an all-round entertainer

I know that all our bosses have the occasional David Brent moment, but this takes the biscuit; El Presidente has just been humming Mah Na Mah Na. ;-)

Posted to Funny by Simon Brunning at 01:35 PM
July 26, 2004
Your Top Five Stinkers

I was re-reading High Fidelity this weekend, and the irony didn't escape me as I slipped a Sting CD on as I was reading.

So, who would you be really embarrased to admit to having in your CD collection, but that you actually like even though you know you shouldn't? My top five, in no particular order:

Posted to Music and Film by Simon Brunning at 01:16 PM
Conquistador

WordCount: "WordCount™ is an artistic experiment in the way we use language. It presents the 86,800 most frequently used English words, ranked in order of commonality. Each word is scaled to reflect its frequency relative to the words that precede and follow it, giving a visual barometer of relevance. The larger the word, the more we use it. The smaller the word, the more uncommon it is." Via gfdc.

Posted to Apropos of nothing by Simon Brunning at 12:42 PM
July 21, 2004
Making me laugh today...

Google circa 1960, via Boing Boing.

Empty Supervillian Threats: the statistics, via Lonita.

"The Designer is extremely intuitive," StyleReport Pro blurb.

Posted to Funny by Simon Brunning at 04:15 PM
The UKIP and political correctness

It isn't politically correct, is it?

Arrrgh! Have you noticed that the only people who talk about PC these days are bigots who want to use "not being beholden to political correctness" as an excuse for spouting their offensive reactionary shite?

Posted to The Big Room by Simon Brunning at 02:04 PM
Six Squared

Happy birthday to me,
Happy birthday to me,
Happy birthday to me-ee,
Happy birthday to me!

24 today. In hex.

If you were thinking of a late gift, I wouldn't be averse to a PowerBook. An iPod would be nice, too. ;-)

Posted to Apropos of nothing by Simon Brunning at 08:53 AM
July 20, 2004
Evil deeds

I bought a Time computer once. Cheep 'n' cheerful, only without the cheerful. It looked like good value for money, but every single component was rubbish.

These days, I gather, Time have attempted to leave their reputation for selling shoddy kit behind by re-branding themselves as "The Computer Shop". They'll have to re-brand themselves again pretty soon if they stitch people up like this too often.

Microsoft wouldn't want to get left behind on the dodgy business ethics front, so they are up to no good too.

Posted to Business by Simon Brunning at 05:11 PM
Circular Printer

I'm not usually too excited about printers, but the Circular Printer (via Boing Boing) is a thing of genuine beauty. Practical, too, if you are on the road.

Posted to Science and technology by Simon Brunning at 04:00 PM
EMMA

Sam pointed me at EMMA, (a Java test coverage tool,) and I've recently found the time to implement it.

Well, it was either that, or struggle with StyleReport Pro. What you you rather do? ;-)

Anyway, EMMA's output is really rather nice. It's structured and informative - you get a good high level overview, but you can you can drill down to reports on individual line coverage. Getting it running with our existing test suite took me a couple of hours of fiddling - but perhaps that's another post...

Posted to Java by Simon Brunning at 01:50 PM
del.icio.us

People have been mentioning del.icio.us, the on-line bookmark manager, on and off for some time, but I've only in the last couple of days got around to giving it a go. It's fabulous! I'll never save bookmarks to my desktop again. It's very simple, but it does everything it needs to do. Give it a go.

My bookmarks.

Posted to The Internet by Simon Brunning at 01:22 PM
I swear I never posted these...

Cuddly Alien, via GussetBLOG.

Posted to Funny by Simon Brunning at 01:18 PM
Taking the back off the radio

Inetseft's StyleReport Pro is the bane of my life at the moment. We need to point our reports at different data sources and even different servers under certain circumstances. StyleReport offers no way of soft-coding these values, so the suggestion is that we have a separate instance of each report definition for each combination of server and data source that we might want to use. Yuck.

But... the report definitions are stored as XML files. Editable XML files. Mwahahahahaha!

Now, StyleReport insists that these report definitions live in the file system. This breaks our J2EE application to a certain extent, because J2EE does not guarantee the availability of a file system. In practise, we are OK; we are deploying to Tomcat, which does give you a file system. We need to keep the application's home directory in a configuration file, which is nasty, but which works. Had we needed to deploy to a sterner J2EE server, though, such as WebSphere, we'd have been buggered.

I wonder how many supposedly J2EE applications need access to the filesystem? Quite a few, I'll be bound. So, does this mean that IBM is being a bit over-strict with WebSphere? Well, no; WebSphere runs on platforms with totally non-standard file systems; the AS/400, no, sorry, iSeries, no, sorry, i5.

Anthony points out that with a bit of work, you can give a J2EE application a file system using Commons VFS. Cool stuff.

Posted to Java by Simon Brunning at 01:05 PM
July 16, 2004
StyleReport

I've spent the last couple of days with Tulna, building PDF reports with Inetseft's StyleReport Pro. It's a piece of shit. My brain is numb.

Posted to Java by Simon Brunning at 04:47 PM
July 15, 2004
Bigots in the BNP? Say it ain't so!

BNP activists admit to race crime. Well, there's a surprise. Still, well done the BBC - the more light is thrown on these nasty racist thugs, the less likely it is that people will be taken in by the new, moderate image that they are attempting to fool us all with.

Posted to The Big Room by Simon Brunning at 12:55 PM
July 14, 2004
SpellBound

SpellBound, Spell checker for Firefox, my browser of choice.

Via Geek News Central, via Erik again.

Posted to Software by Simon Brunning at 02:44 PM
Scary Hacks

Hats off to David Shay for Unfinalizer. Light the blue touch-paper, and retire to a safe distance.

Via talios, via Erik.

Posted to Java by Simon Brunning at 02:36 PM
Eclipse: Mark Occurrences

My favorite feature of the new Eclipse release, by far, is something that isn't turned on by default, and took me a long time to discover: Mark Occurrences. This is just so useful...

Give it a bash, if you haven't already; it's great! Basically, it highlights whichever element your cursor is on. This element is highlighted throughout the Java editor, both in the edit area and in the right-hand margin where errors and warnings are shown. (What is that called, by the way?)

And there's more. Put your cursor over a method's return type, and it'll highlight all the method's exit points. Put it over an exception in a method's throws clause, and it'll show you all the places in your method where that exception can be thrown.

Posted to Java by Simon Brunning at 02:17 PM
The Ism Book

Fascinating; The Ism Book, A Field Guide to the Nomenclature of Philosophy.

Via lonita.

Also; Prefix/Suffix Meanings.

Posted to Apropos of nothing by Simon Brunning at 01:53 PM
Obscene Tube Map

I love tube maps. I wonder why? Anyway, via qwghlmBlog I've found some great new ones, including the Obscene Tube Map and the Upside Down Map. Marvellous.

Posted to Apropos of nothing by Simon Brunning at 01:33 PM
July 13, 2004
More Tribute Bands

I've mentioned The Marones before. Scary Duck points out some other fab tribute band names; Nudist Priest and the Red Hot Silli Feckers. Wonderful.

Posted to Music and Film by Simon Brunning at 01:25 PM
Wetherspoon warns of slow sales

Wetherspoon warns of slow sales, which will come as no surprise to anyone who's ever drank in on of their pubs - it's like watching the continents move behind the bar.

Posted to Beer by Simon Brunning at 12:59 PM
July 12, 2004
The Ultimate Swiss Army Knife

The Leatherman Squirt is nice, but it doesn't have everything. The Swiss Champ XXLT, now that has everything...

Via The Old New Thing.

Posted to Toys and games by Simon Brunning at 04:03 PM
London Java Meetup Tonight

Ooooh, it's going to be an exciting London Java Meetup tonight!

Firstly, we've got Hani versus James and the Groovy boys arguing about Groovy. Despite what Sam says, I'm not against Groovy as such, but I have my own favorite, and with religious wars, you often get a with-us-or-against-us kind of thing going on. ;-)

Then, for the 2nd act, you'll have the Thoughtworkers having a full and frank exchange of views with Hani, who's been dissing them and their Guru.

Should be fun.

Posted to Java by Simon Brunning at 02:11 PM
Test Coverage: JXCL

Our unit test suite isn't all that it could be. For one thing, it wasn't run at all while I was away - that's two months! Sigh. Naturally, running Ant's test target resulted in a smoking ruin...

Still, we've got all but a couple of the tests working again, usually by changing the tests to reflect changed functionality, but often by fixing the bugs that the tests should have been making plain.

Now I'd like to see what our test coverage is; I'm sure that it's far below 100%, and I'd like to start moving it in the right direction. Has anyone used JXCL and UCovered? Any good? Or is there something else I should be looking at?

Aside from "run your bloody unit tests", there's one other lesson learned; some of the code breakage resulted from changes to our database definitions, which for some reason were never kept under source control, so it's not possible to establish who made a change, when, and most importantly, why. The database change might have been made for a good reason, so you just can't remove it - especially if your unit tests are spotty.

I gather that keeping your database definitions under source control isn't trivial when you are using SQL Server, but it must be possible. We'll do it next time; if I can't manage to convince the team to move away from SQL Server, we'll just have to work it out.

Posted to Java by Simon Brunning at 01:42 PM
I smell another boycott...

Have you ever tried to use the Odeon website? Well, you have better be using IE for a start; Firefox ain't happening...

Via Boing Boing I find that one Matthew Somerville had fixed this; he scraped the Odeon site and re-presented the data in an accessible manner.

I say had fixed this, because the odious Odeon people have forced him to take the site down.

Sadly this attitude towards accessability is very far from uncommon; I raised the issue with some clients of ours recently for whom we are building a web application, and was ridiculed for my trouble. :-(

Posted to Music and Film by Simon Brunning at 01:21 PM
July 09, 2004
Ouch!

Shy, sensitive to criticism and suffering from low self esteem? Hmmm...

Posted to Blogs by Simon Brunning at 04:04 PM
July 08, 2004
That's quite enough for one day...

Right, I'm off down the pub.

Posted to Beer by Simon Brunning at 04:59 PM
Squirt

Just because I'm pointing out how lovely the Leatherman Squirt P4 is a mere three weeks before my birthday, you shouldn't assume that I'm hinting or anything. ;-)

Posted to Toys and games by Simon Brunning at 02:44 PM
About Time

Via Managability's Top Ten Truly Obscure But Useful Java Projects, I find the suddenly essential Joda Time. Not quite mxDateTime for Java, but almost.

Some other interesting recent Java links:

Posted to Java by Simon Brunning at 02:03 PM
Jython and Groovy

Groovy is still getting all the hype at the moment, but Jython is still very much in the picture. In fact, I hope and expect that they'll both succeed. Both get a flattering mention in Extend your Java Application with Embedded Languages.

On the Jython side, the Jython site is now indicating a major Summer release, just as Samuele said in April. Also, I hear from Jez that the Sun boys are planning to make some changes to the JVM to make continuations easier to implement in Groovy. Might this make generators easier to implement in Jython? Perhaps Samuele should get in touch with James...

Also, IBM's developerWorks is running a new series, alt.lang.jre, covering alternate JVM languages. The first article, Get to know Jython, in a nice little intro into, uh, well, I suppose you can work out what it's about for yourself. ;-) I wouldn't be surprised if a Groovy article isn't to far behind.

Posted to Python by Simon Brunning at 01:33 PM
July 07, 2004
Firefox 0.9.1

I've finally got around to upgrading Firefox to version 0.9.1, and it's nice. It seems a little more snappy that it used to be, and I'm sure its memory footprint is smaller. Looks nice, too.

But I have a problem with it. Whenever I open a URL via a shortcut, I get an error dialogue: "The system cannot find the file specified". The page opens fine, though. It seems that I'm not the only one: Firefox problem. I tried the suggested solution, but the result was worse than the original symptom - Firefox ended up opening the contents of the shortcut file as text!

This is almost certainly the same problem as has been reported as breaking Python's webbrowser module on c.l.py, and I'm getting odd results opening URLs via Lookout, too - I'm getting a 'File Save' dialogue, though again, Firefox opens the page OK.

Anyone know of a fix for this? It's not a show stopper, but it is irritating.

Posted to Software by Simon Brunning at 12:29 PM
Curry Time!

Beer and curry at The Halal for lunch, with El Presidente, Mark "The Burger Flipper" Matthews and Jez, amongst others.

Expect no sense from me this afternoon.

Posted to Beer by Simon Brunning at 12:08 PM
July 05, 2004
Bloody dog

It was Ella's sixth birthday last Tuesday. I'd seen her the previous weekend, and given her her present then - a Flame Red Game Boy Advance SP and a copy of Pokemon Ruby. She was rather pleased with this.

Then, on her birthday, the dog ate it. Can you imagine, six years old, and your new Game Boy gets destroyed, on your birthday? She took it as you'd expect her to take it.

So this weekend, I got her a new one. There goes this month's discretionary funds...

This one is staying at my house.

Posted to Parenting by Simon Brunning at 05:28 PM
So Long Angel

Also in my hectic social calendar in the next couple of weeks, So Long Angel, the thinking man's pub blues band, will be at The National Theatre on Wendesday the 14th. They are well worth a listen; they are better at music than they are at web site design, trust me. ;-)

And don't forget the London Java Meetup next Monday, now featuring A-list Java blogger Hani.

Posted to Music and Film by Simon Brunning at 04:04 PM
I Rule!

Robocode is a blast, but I've been having trouble getting a robot which does even the simplest things. I wanted to code up, just to give myself a starting point, a 'bot which can circle around a given point, but my trigonometry wasn't up to it. :-(

Besides, I'm more into strategy games than I am into shoot-'em-ups, so perhaps CodeRuler will be more my speed...

See Conquer medieval kingdoms with CodeRuler.

Posted to Java by Simon Brunning at 03:51 PM
Fail Fast

This one's for the team: Null is bad.

Null is bad because it allows errors to float around the system for quite some time before you get any symptoms (like bloody logging code falling over), and well behaved code fails fast, near the source of the problem. Mike gives some other nice examples of fail-fast code, like building stub test cases containing a single Assert.fail("Test not yet implemeted."), so you can't forget to build the test case, and having unimplemented methods in your mock objects throw runtime exceptions, so it's obvious if they get called.

Posted to Java by Simon Brunning at 03:21 PM
The Nerd Herd

Steve, Andy, Michael and I will be at The Stage Door this Thursday evening at sevenish, with an option of moving on to either The Fire Station or Cubana later, so that Steve can get some good ogling in. All welcome.

Thanks to Tim Couper for the title. I hope you can make it too, Tim. ;-)

Posted to Beer by Simon Brunning at 02:59 PM
The Nanny State

How about we mix things up a little; let's ban parents from smoking, and ban smacking in public places.

Posted to The Big Room by Simon Brunning at 02:41 PM
July 01, 2004
JSTL and instanceof

I'm working on a JSP page. I'm using JSTL's c:forEach to iterate through a collection, and I want to display each item.

Thing is, the collection is heterogeneous; that is to say, it contains objects of different types. Each object might be a String, in which case I want to show it as-is. It night be a Date, in which case I want to use JSTL's fmt:formatDate tag to format it for me. Lastly, it might be a BigDecimal which again I'll want to format, this time using fmt:formatNumber.

The question is, how can I tell what type of object I have? JSTL's EL seems to lack an instanceof operator. Will I have to write my own taglib for this?

Posted to Java by Simon Brunning at 02:33 PM
Dad

Just a little update on Dad's condition: He's over the painkiller side-effect issue, which is a huge relief. This has meant that he's had to come off the Codeine, though, so the pain has come back a bit more. Still, he's back on the road on steady improvement, so all's well.

Posted to Family by Simon Brunning at 01:53 PM
Happy Birthday, Bloglines!

Bloglines, one year old today.

Bloglines has become as indispensable as Google to me - perhaps more so, since I have a Bloglines window open at all times. If you read blogs, you need Bloglines.

Posted to Blogs by Simon Brunning at 01:43 PM