Sam Newman's site, a Consultant at ThoughtWorks

Archive for ‘September, 2004’

An email from Atlassian’s Mike Cannon-Brookes pointed out something which I really hadn’t noticed – the “”: links being spliced in using “FeedBurner”: seem to be getting a huge number of hits – not just compared to the normal dross I put out, but compared to everyone else too. So far I’ve been unable to see how this could be happening – Javablogs only tracks reads made via JavaBlogs itself, which implies someone/something is hammering these specific entries via Javablogs itself. I think Mike is going to look into this a little more, but if we can’t find a fix I’ll pull my links from the Javablogs feed.

A meeting with more than six people in it can only hope to achieve one thing – to arrange more meetings.

* A huge supposition on my part, that 1. I’m going to come up with more than these ( It’s kind of like those bands that release “Best Of, Volume 1” – it’s just asking for trouble), and 2. that I’ll come up with so many that some kind of classification system is required.

During a pairing session today, we spotted some duplicated code and a period of refactoring ensued. The code in question related to some simple DB queries – the code for getting a connection, returning results and cleaning up was duplicated, with only the query and the exact part of the result set required being duplicated. We already had some code which could be used to remove this duplication – previously someone had written a DB visitor which was being used internally in a test class.

Extracting the visitor code out into a class in its own right was trivial. What was not was replacing the repeated code. After 10 minutes of head-scratching we had to ask ourselves the question “is this still refactoring”?

Let’s look at what we had done – we’d extracted out our visitor code to make it an object. The existing code using the visitor still worked. We couldn’t get other code using our visitor happily quickly. We decided to leave it and move on – the rational being that refactoring should be something quick you do in the normal test-code-refactor process. If you can achieve a quick win that improves code outside the scope of what you are working on, then great – but when improving code outside the purview of your current task takes too long, it feels like going off at a tangent.
Continue reading…

I have just discovered the delight that is pluggable search implementations in Firefox. Click on the Google icon to the left of your firefox search box, then click @Add engines…@. You are presented with a (rather ugly) page presenting a multitude of search plugins for everything from “amazon”:, “imdb”:, “SamSpade”: and most importantly “AllMusic”: Best of all you don’t even have to restart your browser to pick up your newly installed plugins.