Many Pies

Many Pies

Wednesday, February 13, 2013

Naming things is hard

Nearly five years ago I wrote that Names are important. Recently I came across a quote from Phil Karlton “There are only two hard things in computer science: cache invalidation and naming things.” (I couldn't find out where I came across it, but here's an old reference from Tim Bray). The difficulty of naming things doesn't just apply to Computer Science, it applies to a lot of things.

So here's some advice based on my 26 years' experience:
  • Name things by what the people who need to know would call them. For a couple of years we did a joint tour with the Saltmine Theatre Company. The first year we called it the Saltmine tour. They may have called it the Wycliffe tour. The second year it was called by the name of the event, much better.
  • Never call anything "new". There will come a time when it's not new and then the name will seem silly. New York is the exception to this, New Holland isn't. Buckinghamshire New University is going to have to undergo an expensive re-branding exercise in a few years.
  • Confusing where you are with what you do. The Wycliffe USA offices used to be in Huntingdon Beach, California. They produced a financial statement we called the HB report. Then they moved to Orlando... One way round this, which may be used elsewhere, if you think you're going to stay in the same part of the country, is to use airport codes. So we code our online jobs with LHR and then a numerical code on the UK website. Whoops, did I just link to a job in the IT Department here?
  • Confusing who you are with what you produce. The Joint Photographic Experts Group produced the spec for JPEG files. I guess they were happy with that. The Personal Computer Memory Card International Association produced a spec for what we called PCMCIA cards, and then later they wanted us to call them PC Cards. RIM produced BlackBerry phones and finally have renamed their company. I guess if the phones hadn't taken off under that brand they might have invented a new brand.
  • Confusing an interface with a system. We developed a system for interfacing with an internal system PMC. We called it PMC, but it should have been the PMC Interface.
  • When creating a document filename it's worth adding a bit of context in case the document gets a life of it's own. So if the proposal for Project X is just called proposal.doc in the directory ProjectX and it gets emailed to someone then it's just going to be called "proposal.doc" on their machine. The project name in the filename would prevent that.
  • What's next in this sequence? A, A, D, F, J, J, M? What's next in this sequence 2012-01, 2012-02, 2012-03, 2012-04. yyyy-mm(-dd) is great for date related files, month names aren't as when you sort them alphabetically they go out of sequence.
Do you have any other tips?

No comments: