Skip to main content

Posts

Gun at Nottingham Rock City 2009

First up were New Device , a very good young rock band. Good vibe, good sound and tight musicians. Very enjoyable to watch, I won't be buying any if their CDs though. Gun , to my surprise had the ex-little angel Toby Jepson singing for them. A deeper voice than the original singer, but still very good. They opened with don't say it's over, which is one of my favourite songs. About halfway through the show was stopped by Toby as someone was starting a fight. He demanded they were thrown out as there was no place for that behaviour at a Gun gig. Inside, outside of love included a cover of the Police's So Only. All the way through, Gun made it clear that Les Paul guitars were made for Rock bands like this. They finished with Steel Your Fire and Shame on you. And Encored, of course, with a superb Word Up, the place erupted.

Threshold at the Garage 2009

Pythia , a fairly good female fronted metal band, were up first. The matching tshirts were a bit much , as was the shrill, slightly irritating singer. Overall I quite liked them, but not enough to be persuaded to buy their CD from the merchandise stand. Serenity , who were up next, completely blew me away. An absolutely superb prog/power metal band. They were heavy in places along with great ballads and an exceptionally strong signer. They did persuade me to part with money for both of their CDs! Threshold are always superb. Plain and simple. They played lots of old stuff as well as some new stuff. I loved it all. The guitar sound wasn't mixed properly in critical mass, which was a shame, and I had to leave early to get a tube. I only missed Mission Profile, Pilot in the Sky of Dreams and Slipstream, but given that they are three of their best songs, I did miss out.

Stranger in a Strange Land

by Robert A. Heinlein (978-0340938348). This book lacks much real science fiction. At most it's a fantasy book. What it really is is a dig at society and religion and that, unfortunately, stifles a story that actually isn't there. Many science fiction books make these points as well, but that doesn't make this science fiction. If this was a relatively new book I'd say it's all been done before, but given its age, all I can say is that it's all been done again since and better. If I was reading it in the 1950s or when I was a teenage boy, I'm sure I would have loved it. One ray of light in an otherwise dull read was one of the main characters, Jubal. The story is very much told through his, very sensible, view on the world. He understands everything perfectly, has seen it all before and is never fazed by anything. While everyone else is giving into their prejudices and preconceptions he is watching and making sense of it all. The ending was probably the worst...

Item 57 - Use Exceptions only for exceptional conditions

Using exceptions only for exceptional conditions is something we can all agree with. However, this item should have been named "Don't use exceptions for control flow and how to decided between state-testing method and distinguishing return value". Bloch gives an example of how exceptions can be used for ordinary control flow, two alternatives in state-testing method and distinguishing return value and how to choose between them. I was rather hoping for some discussion of what exception conditions are, not just a brief discussion of what they are not.

Java Dependency Management with Ivy Part I – The Basics

Along with the rich enterprise libraries that come as part of the language, one of the biggest advantages of Java is the vast number of third party libraries available. For example if you are writing an enterprise web application, GWT, Spring and Hibernate provide a framework with a huge amount of pre-existing functionality. The size and number of dependencies grows as your application grows. GWT and Spring alone, without their dependencies, are more than 7MB. The ideal place to put dependencies is in a source control repository as part of your project so that when you or your continuous integration server check out the project for the first time all the dependencies are there. Then you don't have to go and get them and store them locally in a location that is agreed by the entire development team. Storing the dependencies for a single project in a source control repository isn't too bad, provided there is plenty of room on the source control server.. However, if you have mo...

Item 55: Optimize Judiciously

Bloch gets this item so right! He includes some famous quotes about optimisation and of course the most well known one: We follow two rules in the matter of optimisation: Rule 1: Don't do it. Rule 2: (or experts only). Don't do it yet. But Bloch doesn't leave it there. He goes on to summarise the rules with "measure performance before and after each optimization attempt." We all know this, but how many of us actually do it? Actually I've seen these rules put to bad use and Bloch covers that too when he points out that you should still be thinking about performance issues when writing code. The example I've seen is someone retrieving a lookup table from a database for each iteration through a dataset, rather than reading it once and caching it. At least that optimisation was straight forward. The new information that surprised me a little was that it appear to be accepted that Java does not have a strong performance model. We all know Java is traditionally...

Item 49: Prefer primitive types to boxed primitives

This is the first item, certainly that I have reviewed, where I feel Bloch has it spot on. There's no arguing with this one! Bloch points out that Java has a number of primitive types such as int , double and boolean and each of these types has a corresponding reference type: Integer , Double and Boolean . These are the boxed primitives. Auto-boxing and auto-unboxing was introduced into the language in 1.5, so the Java programmer must now be more mindful of their use. There are three main differences between primitive types and boxed primitives: Primitives have only their values, whereas boxed primitives have identities distinct form their values Primitive types cannot be null , but boxed primitives can Primitive types are more space and time efficient than boxed-primitives Care must be taken with using the == operator with boxed primitives as, with any other reference type, it compares identity and you almost certainly want to be comparing value. If a boxed primitive is compa...