Re:Donkey Code – the art of naming things
by still_grokking on Wednesday November 29, 2023 @01:47PM
(#38463423)
Primary keys in DBs should be natural keys in the first place. You use surrogate keys only to optimize things.
So the whole analogy now points in the exact opposite direction as stated.
Re:Donkey Code – the art of naming things
by akoboldfrying on Thursday November 30, 2023 @03:08PM
(#38478405)
What's an example of a natural key for a person, that never changes?
I think of these kinds of names as being like primary key fields in a database: Their main purpose is to distinguish the identities of various things, so it's better not to incorporate any functional/behavioural description into them because that way there's never a need to change the name in the future if the behaviour changes.
The downside is that the names become arbitrary lumps of data that you have to become familiar with by rote use.