Do you have enough oil?

I was talking to someone who had had a project manager mention in a retrospective that he felt that the testing was slowing down the delivery. They wanted to stop “wasting time” on testing and refactoring.
When I heard this, I said “That’s a bit like going on a car journey and your passenger telling you [...]

Code should start out messy

Earlier today Antony said on Twitter:
“stop apologising if your code starts out messy… it’s how it ends up that counts…. you can’t make an omelette without breaking some eggs”
I replied:
“Code _should_ start out messy. Finding the right places for things is harder when they’re already neatly in the wrong place”
If you have a preconceived idea [...]

Installing Eclipse

I’ve just bought myself a netbook, and following the example set by John Smart with his article on installing Eclipse, I’ll document what I do with a clean install of Eclipse.

First Things First
I download the Eclipse IDE for Java Developers. The download is less than half the size of the Java EE edition, and I [...]

Forming good habits requires discipline

A long time ago, I went on an advanced driving session. One of the things that my instructor taught me was a mnemonic for checks that you should do before every journey. The mnemonic was POWER[1][2], which stands for:
Petrol – (or Phuel for diesel cars) check that you have enough
Oil – Check the dipstick level
Water [...]

Checked Exceptions are Waste

I can’t get no satisfaction, I can’t get no satisfaction
‘Cause I try and I try and I try and I try
(I Can’t Get No) Satisfaction – The Rolling Stones
Checked vs. Unchecked Exceptions
It’s a controversial subject; searching Google for checked versus unchecked exceptions reveals a lot of heated discussions both for and against Checked Exceptions.
Charles Lowell [...]

What should my code tell me?

When I’m reading code, there are a number of things that make my job much easier.The most important (in my opinion) is good naming, but how can we choose suitable names?This is the pattern that I am starting to see (and recommend), and I think it is pretty effective.
What? How? Who? Why?
If we think of [...]

Well, how did I get here?

And you may find yourself living in a shotgun shackAnd you may find yourself in another part of the worldAnd you may find yourself behind the wheel of a large automobileAnd you may find yourself in a beautiful house, with a beautiful wifeAnd you may ask yourself, “Well… how did I get here?”
Once in a [...]

Returning ‘null’ Considered Dishonest

Background
Antony Marcano and I have just started running a coding design workshop. Most of the audience are new to coding and we are trying to focus on good habits that are applicable across all programming languages.In our first session, we created a vending machine. By the end of 90 minutes, it was able to dispense [...]

Singletons

I’ve been playing about with a code base that has a large number of singletons, for what appears to be no apparent reason.Something about singletons doesn’t sit quite right with me, but in the most part, if they’re not misbehaving, I’ll probably leave them be.
The thing that bothers me a lot more though, is the [...]

Static Utility Methods

A few of us were chatting about static methods the other day.I’m not a big fan. I think that they tie you unnecessarily to a concrete class.
Most people were saying that there is no harm in having static methods in utility classes, and this is one place where I would disagree.The example used was the [...]