Ronseal Pattern

Often items, such as object classes, components and files, are given less than sensible names by their authors. As names are the first piece of information an outsider uses to try to understand the purpose of an item when it is encountered, a good name is very important.

The meaning associated with a name can skew a reader's whole interpretation of what something may do, making it difficult for them to truly understand the purpose of your actions.

Choosing a Name

Examples

Don't create a WoesEmpathizer (share feelings) when you really mean a WoesSympathizer (feel for).

Favor the name StrawberryPreserve over StrawberryJelly as 'jelly' is used to mean a fruit jam in the U.S. and a gelatine desert in the U.K.

Don't create a DrinkingCup when it's actually going to be a general purpose DrinkingVessel.

Anti-example

Don't create a pattern called "RonsealPattern" when your readers may be unfamiliar with Ronseal. Instead, choose something like "MeaningfulNames". [Ronseal is a UnitedKingdom company that makes paints and varnishes. Their trademarked slogan is "Does exactly what it says on the tin."]

That was the intentional pun.

But being clever is often at odds with being clear ...

Though humour can often commit an idea to memory. Anyhow, I've demoted this page to a link from the MeaningfulNames page of which I was not aware and which more comprehensively describes the ideas laid out here.


Moved from DoesWhatItSaysOnTheTin:

We've taken to using the acronym DWISOTT for labelling things as fairly obvious.

I think the origin of this was a Ronseal waterproof varnish product of some sort, in which the chap in the advert explains what it does using these words: "Does exactly what it says on the tin". -- RogerLipscombe

You're quite right: http://www.ronseal.co.uk/. I accidentally abbreviated the phrase because I remembered it wrongly. In PostJustification?, I think the abbreviation doesn't harm the meaning I intend when I use the phrase. I would rather not find out whether the change will interact in a positive or negative sense with Ronseal's legal department...


While I appreciate the intent, the examples given seem pedantic - and unlikely in software, unless you're (re)writing Zork.


See also: LatherRinseRepeat, ItJustWorks


EditText of this page (last edited February 17, 2010) or FindPage with title or text search