Click here to Skip to main content
15,890,506 members

Survey Results

How important is naming to you in your code?

Survey period: 23 May 2022 to 30 May 2022

There are 2 hard problems in Computer Science: caching, naming and off-by-one errors

OptionVotes% 
I am obsessive and consumed with getting naming right657.80
I am very, very careful with naming23227.85
I do my best, but try not to over-think thiings46956.30
I don't really give it too much thought. Whatever name pops into my head is fine384.56
I really don't care. 26 letters in the alphabet, 26 names, right?40.48
I'm deliberately malicious, obfuscating, and / or sarcastic with my naming50.60
I don't understand what this "naming" thing refers to.202.40



 
GeneralRe: Careful with naming - Always descriptive Pin
CHill6022-May-22 23:29
mveCHill6022-May-22 23:29 
GeneralRe: Careful with naming - Always descriptive Pin
trønderen24-May-22 0:19
trønderen24-May-22 0:19 
GeneralRe: Careful with naming - Always descriptive Pin
JP Reyes24-May-22 6:34
JP Reyes24-May-22 6:34 
GeneralOutdated options PinPopular
lmoelleb22-May-22 21:08
lmoelleb22-May-22 21:08 
GeneralMany more hard problems Pin
Patrick Van Cauteren22-May-22 21:50
Patrick Van Cauteren22-May-22 21:50 
GeneralRe: Many more hard problems Pin
Gary R. Wheeler23-May-22 14:22
Gary R. Wheeler23-May-22 14:22 
GeneralRe: Many more hard problems Pin
lmoelleb23-May-22 20:43
lmoelleb23-May-22 20:43 
GeneralRe: Many more hard problems Pin
trønderen24-May-22 0:59
trønderen24-May-22 0:59 
I'll add another problem not solved "by using either the standard library function or the appropriate operating system API": Alphabetic ordering. Going beyond A-Z, different languages may have common extensions. E.g. Norwegian has '..xyzæøå', while Swedish has '...xyzåäö'. Historically, æ is the same character as ä, ø the same as ö. (In old Norwegian writing, you frequently encounter ä and ö.)

Everything is fine as long as you sort a list list of either Norwegian or Swedish words (typically: names), but what if the the list contains both Norwegian and Swedish names? Should 'Örnes' be sorted before or after 'Årnes'? Should 'Ørnes' be sorted before or after 'Årnes'? What about the Norwegian name 'Ørnes' in the old Norwegian spelling 'Örnes': Should it be sorted after 'Årnes' because the Swedes would do it that way, even though Sweden/Swedish was never in question?

You could evade the problem by saying: If you address a Norwegian audience, you sort ä and ö like æ and ø. If you address a Swedish audience, you sort æ and ø like ä and ö. If you address an English-speaking audience, how to you do the sorting?

Similar issues occur with some languages where a few double characters are sorted in special ways. I believe (correct me if I am wrong) that in Spanish, 'll' is sorted after all other 'l?'s (i.e. 'l' followed by any other character than 'l'), but before any 'm'. In French, there are numerous words of the same alphabetic characters, but with different accents; the accents have a well defined ordering sequence. In other languages, accents do not affect alphabetic ordering. So should or shouldn't you consider accents when ordering?

There is of course the ostrich (also known as 'US') solution: "Well, that is your problem!" And it is, but that doesn't solve the problem. It is still there, in spite of standard library functions and operating system APIs.
GeneralRe: Many more hard problems Pin
Julian Ragan24-May-22 8:45
Julian Ragan24-May-22 8:45 
GeneralRe: Many more hard problems Pin
Cpichols24-May-22 1:17
Cpichols24-May-22 1:17 
GeneralRe: Many more hard problems Pin
k505425-May-22 3:20
mvek505425-May-22 3:20 
General3 problems listed Pin
Shao Voon Wong22-May-22 20:43
mvaShao Voon Wong22-May-22 20:43 
GeneralRe: 3 problems listed Pin
den2k8822-May-22 23:46
professionalden2k8822-May-22 23:46 
GeneralRe: 3 problems listed PinPopular
Daniel Pfeffer23-May-22 0:57
professionalDaniel Pfeffer23-May-22 0:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.