Notes from PM-R group Code Review 6/11
November 6, 2009
In case they’re of wider interest.
- Get used to
"literal".equals(object). Get used to it. Yes, yes, blah blah blah. Just get to used to it! - Useful classes 101: there’s a generic BidiMap in the Commons-collections library, version 4.0. Hasn’t hit maven2 repo yet, but it’s released (javadocs).
- Useful classes 101: org.apache.commons.io.output.NullWriter – writes to
dev/null - Boolean unpleasantness. Don’t test
myBoolean == true, just usemyBoolean. Also remember that this: -
is a really long way of sayingif(something) { return true; } else { return false; }return something. - No Magic Numbers
- Yes, Tuples are lovely. If you really don’t want to design your way around their absence in Java, use something like the generic Pair class.
Unchecked Type Conversion best practice
November 5, 2009
A couple of months ago, we started using the Murray-Rust group meetings to perform code review. It’s been interesting – sometimes we look at fairly low level idioms, sometimes at more fundamental refactoring and design issues. I’m particularly pleased that the tone has remained constructive, even when PM-R took centre stage last week.
Occasionally we stumble across an issue for which there is no established or widely accepted best practice. One of the things that came up recently was what you should do about the “Unchecked Type Conversion” warning that appear when you try to shoehorn a 1.4 library into 1.5 code that’s expecting generics. I should probably have posted it myself, but Joe has done me the service of recording the results of our discussion and research.
Cambridge Clojure Meetup 10th Nov
November 4, 2009
I’ll be going to the weekly Cambridge Clojure Meetup next Tuesday, 10th November, 2009.
The time place is the usual, 8pm at the Kingston Arms.
Update: I’ve set up an upcoming entry for next week’s meeting.
Embedding Metadata and Other Semantics in Word Processing Documents
October 16, 2009
The paper by Sefton, Barnes, Ward and Downing that I presented at the International Digital Curation Conference last Edinburgh has been published in the International Journal of Digital Curation: http://www.ijdc.net/index.php/ijdc/article/view/121.
Cambridge Clojure meetup 6th Oct
October 6, 2009
Myself and a couple of colleagues from the Unilever Centre will be at the Cambridge Clojure meetup this evening.
Time: Tuesday 6th October, 2009. 8pm
Location: The Kingston Arms. Has food, wifi and usually excellent and varied ale. 10 min walk from the train station.
ICE-TheOREM Final Report Available
October 5, 2009
The JISC-sponsored ICE-TheOREM project’s final report is available from the IE repository. The project was a technical investigation into applying ORE to scholarly workflows; along with Peter Sefton’s team at the Australian Digital Futures Institute at the University of Southern Queensland, we developed a demonstrator that passed ORE-described ETDs between systems to recreate a thesis submission process.
Au revoir, Nico!
October 1, 2009
I’d like to publicly mark the occasion of Nico Adams leaving the Murray-Rust group. Nico has been a hugely influential member of the group, and a great colleague to work with, always ready with a rigorous position in a vigorous discussion!
I’m hoping we’ll be able to collaborate in future. Enjoy your break, Nico!
Why I’ve been looking at functional languages (redux)
October 1, 2009
There are a diminishing number of people in the world I haven’t cornered and harangued with this argument, which is that the dominant languages of the future will prevent the worst 95% of programmers hanging themselves when writing concurrent programs, rather than the one that is efficient in the hands of the other 5%. This is why I’m convinced functional languages will happen this time around. It seems Tim Bray agrees, at least in principle:
… Once you get past Doug Lea, Brian Goetz, and a few people who write operating systems and database kernels for a living, it gets very hard to find humans who can actually reason about threads well enough to be usefully productive.
– Tim Bray
Cambridge Clojure Meetup 22nd Sept
September 18, 2009
The Cambridge (UK) Clojure Meetups have become an informal but regular occurence, weekly on Tuesday evenings at 8pm in the Kingston Arms. I’ll be there next Tuesday.
There’s also a camclj google group set up for discussion.
PeekORE on bitbucket
September 17, 2009
A while ago, Andrew Walkingshaw and I knocked together a JQuery based tool for visualizing ORE objects in web pages, with the working title of PeekORE. In response to a request from Daniel Gonzalez I’ve finally put PeekORE on bitbucket with an MIT license.