Feeds:
Posts
Comments

Posts Tagged ‘Naming’

Last week I registered my first ever company in the UK – hurrah and huzzah! (That’s not the company name, just the sound of me celebrating). The hardest and most time-consuming part of this operation was coming up with a name. I wanted the root of my company name to fulfil the following deceptively tricky requirements:

  1. It must be unregistered at Companies House in any variation – not only should there be no “XYZ Ltd”, but also no “XYZ Accounting”, “XYZ Blinds”, etc.
  2. The .com domain name must be available
  3. It should be short – ideally one word, so nothing like “Blue Sky Software Consulting”
  4. It should sound good to my ears (I’m going to have to live with it for a while, after all)

Initially I did the same thing most people probably do and tried to rely on my own unprompted creativity. “How hard can it be?”, I thought. “Come to me, company naming muse, I have cakes and PlayStation…”.

Muse reading Louvre CA2220

(more…)

Read Full Post »

I’m currently reading the excellent Growing Object-Oriented Software, Guided by Tests. Although I have read less than half of it so far, this book has already changed the way I think about Test-Driven Development. It covers a broad range of TDD topics and their intersection with OO, but for now I want to focus on a very small part of this landscape – the naming of unit tests.

Names are important. Class names, method names, variable names – good names inform us, bad names mislead. I’m sure we all know that naming stuff can be tricky. However, a little discipline in choosing names can go a long way to improving the quality of unit tests.

Consider a tiny class I wrote recently while performing the leap year kata:

public class Year {

    public Year(int year) {
        // constructor type stuff
    }

    public boolean isLeapYear() {
        // code to check for leap year
    }
}

I could have made isLeapYear() static, and in fact I have done so in previous attempts. But it isn’t the design choices of the interface to Year that I want to discuss.

(more…)

Read Full Post »