Wednesday, May 14, 2014

The Power of My Label

I see this frequently, and fall for it still myself: just because what you're looking at has a label that suggests it is something or does something or represents something, you should still check that it really is the case if what you're doing depends on it.

A couple of examples:
  • when a list of user records you have pulled from your server contains one labelled JamesThomas it does not necessarily mean that I have an account on your server or even that anyone called James Thomas has an account on your sever or, even if they do, that it is active or valid or has other properties you're interested in.
  • when you're using a test object named x_4_y_5 it does not necessarily mean that it encodes the obvious variable assignments and, even if it once did, you might want to avoid assuming that no-one edited it to have some other values because it was a convenient way to run their quick test.
  • when you find a script called clear_down_safe.sh in the test data directory it does not necessarily mean that it will delete all and only the test run data that you would like it to. 
The label is not the thing. The label is not the thing. The. Label. Is. Not. The. Thing.
Image: Public Enemy
Lyric: Rebel Without a Pause

5 comments:

  1. Could this be accurate?:
    "A description is always a leaky abstraction of reality"

    ReplyDelete
    Replies
    1. @Chris It could be.

      Spolsky says "One reason the law of leaky abstractions is problematic is that it means that abstractions do not really simplify our lives as much as they were meant to."

      Delete
    2. ... would these be counter examples?

      * if you can regard a function as a description then perhaps a function can describe (e.g.) a curve perfectly: f(x)=3x.

      * not all descriptions are of reality, e.g. in a sci-fi novel.

      Delete
    3. * if you can regard a function as a description then perhaps a function can describe (e.g.) a curve perfectly: f(x)=3x.

      That depends on the curve. If it's an abstract/conceptual curve then yes - but that's just a description describing another description (or a heuristic defining a heuristic). If it's a real curve then... maybe. Not completely. A curve of what? Maybe pen ink on paper, but where the ink bleeds into the paper that doesn't follow the curve exactly, not to mention that lines are 1 dimensional and so invisible - any thickness to that curve deviates from the description of it.

      * not all descriptions are of reality, e.g. in a sci-fi novel.
      I'm a little less sure about this, but I think this is about purpose. A novel's description (it's story) could be said to be deliberately open to interpretation (deliberately leaky). Those leaks are put there so that humans can create their own models to their own will. Which is why the book is so often better than the film - a film is a less leaky abstraction of a definition.
      Where I get confused is what "reality" actually is and what a novel/film is a description of. So it could be that only descriptions of reality are leaky abstractions of it.

      Delete
  2. While I think that "The label is not the thing" is a very useful heuristic, there is only so far we can go meta and still make sense - "description of description of abstraction of reality" is probably not a good way to think about novels, especially if none of those concepts are defined formally, so everyone is free to interpret them differently.

    I think "story" is a much better label - both to understand what a SF novel is about and for the stuff that needs to be developed and tested in software projects. It implies the vagueness of our understanding and emphasizes the communication aspects of our testing work.

    ReplyDelete