The other day I was looking through our code and I came across a class name IdempotentObject I didn’t know what this meant at the time so I questioned whether it was a poorly chosen name. I found out who wrote it and asked the developer why he had named it so confusingly. He was surprised that I didn’t know what it meant and told me that it was a well chosen name because the object is Idempotent.
On one side I see an argument for keeping it simple and having everyone understand what everything is at first reading. On the other hand we have the idea that we should name things precisely and if you don’t know the meaning look it up.
Which one is better, precise or easy to understand at a glance?
No offence, but anybody with a CS degree or who hopes to practice in the field should recognize the term ‘Idempotent’ as having a specific meaning in computer science even if you don’t know the term and have to look it up.
On the other hand, I don’t think objects should have the word ‘Object’ in the name – that’s redundant.
Now, if it were called ‘IdempotentDataAccessor’ or something that is both precise and descriptive, that would be good.