magpiebrain

Sam Newman's site, a Consultant at ThoughtWorks

Posts by samnewman

Now first off I have to say I have a lot of time for Allen Holub. Ever since I got a review copy of his “Taming Java Threads”:http://www.apress.com/book/bookDisplay.html?bID=35 a few years ago, it has become my bible for threading in Java. Allen Holub’s article “extends is evil”:http://www.javaworld.com/javaworld/jw-08-2003/jw-0801-toolbox.html made some very valid points – in fact I realised that I’ve subconsciously completely removed implementational inheritance from my code – the places in which the use of an extends relationship made sense seemed to occur less and less frequently.
Slightly less informative was his latest piece “Why getters and setters are evil”:http://www.javaworld.com/javaworld/jw-09-2003/jw-0905-toolbox.html. I understand the logic and applaud him for raising this to peoples attention, but feel the rather abstract article could do with more in the way of concrete articles.
In anycase it seems that Allen is working on a new book, Patterns: Learning Design Patterns by Looking at Code, which I’ll be sure to pickup.

At work recently I’ve been doing an informal review of our code base, in an attempt to get together a potential code refactoring work package. I say informal because I haven’t got any official time allocated to it – currently its taking place in lunchtimes and during slack that I haven’t told management about. Along with tools like “checkstyle”:http://checkstyle.sourceforge.net/ and “QStudio pro”:http://www.qa-systems.com/products/qstudioforjava/ I’ve been able to pick up some issues which will exist in any organisation which, like ours has had no real coding standards or review process. In addition I’ve been carrying out a more general design review, and one issue that cropped up was that of singleton classes and static classes.
Continue reading…

After some service hick-ups Gradwell hae got things back to normal. Despite their main file server being down for two days, the worst disruption I faced was the blog being unavailable for a couple of hours, then it being in a read only state for an hour or so.

From the Apache announcement mailing list:

The Regexp team announces the availability of Jakarta Regexp 1.3 release.

This is primarily maintenance release containing several bug fixes
accumulated since the last Regexp release. Complete list of changes is
available at: “http://jakarta.apache.org/regexp/changes.html”:http://jakarta.apache.org/regexp/changes.html

Regexp comes in one download, containing binary and source code.
Download Regexp from “http://jakarta.apache.org/site/binindex.cgi”:http://jakarta.apache.org/site/binindex.cgi

Bug reports and patches are accepted via Bugzilla,
http://nagoya.apache.org/bugzilla/”:http://nagoya.apache.org/bugzilla/

My otherwise excellent ISP Gradwell suffered a heart stopping (for me at least) outage today:

Our primary fileserver has failed, causing primarily an outage of out web and shell account services. We are working on recovering this machine as quickly as possible, and apologise for the inconvenience this will cause. We regret no ETA is currently available.

I was at work an unable to check the dates of my last backups, but its seems to be back and working now. The outage was reported at 8am and fixed by 10:30am so no harm done. I am however going to make sure I have everything backed up when I get home tonight!

I’ve just downloaded QStudio for Java Pro, which is being offered with a free year-long license.

QStudio for Java Pro is a comprehensive software health quality assessment and control tool targeted towards the software developer.

Developers can automatically inspect their Java source code and improve their Java programming skills as they write their programs. QStudio for Java Pro provides descriptive Java patterns explaining error prone code constructs and providing solutions for it.

For those of you familiar with tools like Checkstyle or even the built in code checker in Eclipse, it does a similar job, although it does seem more sophisticated. Probably the best feature is the ability to generate a HTML view of your source complete with annotated “Observations” (as QStudio puts it) making code reviews a real breeze. I’m still trying to get it to play nice with Jalopy – however thats more an issue with getting Jalopy to format its code so QStudio doesn’t moan about it.

Reading the “Register”:http://www.theregister.co.uk/ recently, I’ve been slightly surprised by not-so-sly digs at some Bloggers as a whole and specifically on their use of Trackbacks on a couple of their recent articles (see text in “Max OpenOffice Delay Debunked”:http://www.theregister.co.uk/content/4/32483.html and “Webloggers deal Harvard blog-bores a black eye”:http://www.theregister.co.uk/content/6/32315.html). Now as a long time register reader I’ve learnt to take their occasional rants with a heavy pinch of salt – indeed I’ve long suspected the register journalists are incapable of NOT having an opinion about something. In any case, their problem with Trackbacks (over and above the fact that they believe developers using them would be better served developing a port of OpenOffice for the Mac) was the problems it has been causing Google. Not really knowing too much about Trackbacks despite having them enabled myself, I decided to look into them in a bit more depth.
Continue reading…

It seems that either a very bored individual or some new kind of bot has been spamming my comments. Two identical comments advertising a Hotel have appeared on this Blog, which is mighty annoying. In an attempt to stop this kind of thing I’m now going to have to require that people leave email addresses (which will not be displayed) when making comments.

I’ve been interested in XP for a while now. Whilst many of the rules outlined in XP have always made perfect sense to me (simple design, frequent unit testing), the one that really made me sceptical was the notion of “Pair Programming(Extreme Rules – Pair Programming)”:http://www.extremeprogramming.org/rules/pair.html, which forms much of the focus of a recent “Wired article(Wired – The New X-Men)”:http://www.wired.com/wired/archive/11.09/xmen.html?pg=1&topic=&topic_set=. For the uninitiated, pair programming has two programmers working at the same desk – one programmer ‘drives’ whilst the other watches. The idea is that they can bounce ideas of each other, and while the coder doing the actual typing can be quite focused on a single line, the other can pick up simple mistakes such as missing semi-colons and the like. The net result is that despite the apparent upfront loss in productivity bugs occur less frequently, and when they do appear they are fixed more quickly.

Although the practice adds 15 percent per programmer to the time it takes to complete a task, the lost productivity is offset by having fewer bugs to fix. “Pre-XP,” says Kevin Yu, “an eight-hour debugging session wasn’t unusual. With XP we spend about half an hour.” Meanwhile, 90 percent of the 41 coders in the study enjoyed working together more than alone, and almost all were “more confident in their solutions.”

My main reservation concerning Pair Programming is the issue of finding someone compatible to work with – I often find it frustrating to try and explain my ideas to people who take longer to understand the concepts being discussed than I do. Likewise trying to reign the enthusiasm of a colleague who completely understands how their one line obfuscated beyond all recognition Perl script works long enough to work out whats going on can really make a dent in my patience. That said maybe I should follow Kent Beck’s (the father of XP programming) advice:

“Extreme programming is an emotional experience,” he maintains. “When you feel it, you understand.” Then he adds a typically cheeky metaphor. “Talking about XP and trying it are two different things – like reading The Joy of Sex versus losing your virginity.”

Perhaps when it comes to looking for my next job XP should be on my “would like to have” list along with reasonable working hours, time for training and decent pay!

* “David Raynes'”:http://www.rayners.org/ “MTSubCategories plugin”:http://www.rayners.org/2003/08/19/subcategories.php for MT lets you use subcategories in MovableType, as you’d expect. Thanks to “Brainstorms and Raves”:http://brainstormsandraves.com/archives/2003/08/19/organizing_your_website/
* Another “link(Brainstorms and Raves – BBC News Styleguide”:http://brainstormsandraves.com/archives/2003/08/20/bbc_news_styleguide/ from Brainstorms and Raves, the BBC has published its “style guidelines(BBC News Styleguide)”:http://www.bbctraining.co.uk/onlineCourse.asp?tID=5487&cat=3 for news journalism. I doubt it’ll help with my spelling.
* OnJava.com has an article by Tom White entitled “Memoization in Java Using Dynamic Proxy Classes”. It details a design for a transparent caching layer for functions.