Uncategorized 28 Jul 2003 12:08 pm

I resolve not to be a smart ass

I think this should be my new signature for emails.

“get: verb. 1) to obtain and bring where wanted or needed. ex: “get my English dictionary.” 2) A common beginning of a naming pattern for functions in programming languages signifying that the intent of the function is to retrieve a particular value, ex: “object.getName()”.
3) To understand the meaning of something ex: “get it?” ”

Is it too subtle for anyone to understand that it means I think naming should be simple and concise instead of verbose to the point of distraction. Or does it actually come off mean? I don’t want to be mean, I just hate being distracted when I am trying to work. Bad names are distracting.

Names should reveal intent, to paraphrase the saying, but you have to have information hiding as well. Otherwise there are too many pieces to juggle at once (remember 7+-2). Also, available information will get used eventually. Dependence on that information can create brittle systems due to high coupling between objects.

So, “get” a value however you have to. I don’t want to know how you got it.

2 Responses to “I resolve not to be a smart ass”

  1. on 28 Jul 2003 at 8:53 pm 1.bill said …

    I suspect you have a specific example (or two) of bad naming in mind.

    My suggestion for your signature:
    object.getBent()

  2. on 30 Jul 2003 at 1:52 pm 2.Bob said …

    Heh. Maybe my rant was a bit much. I feel better today. Also, once I realize what is annoying me, then I can usually ignore it or fix it. Fixed in this case.

Subscribe to the comments through RSS Feed

Leave a Reply