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 [...]

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, [...]

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 [...]

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 [...]

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 [...]

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 [...]

Refactoring / Design: Composed Method

I’m going to try and write a few posts over the next few weeks around the subject of Refactoring and Design. This is mainly practice for me, so that when asked to explain, I don’t confuse the issue. All comments and suggestions are gratefully accepted. When I am looking at code, I feel a lot [...]