Click here to Skip to main content
15,917,968 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: "Special characters not allowed" - and we eat only raw meat Pin
kalberts14-Feb-18 23:02
kalberts14-Feb-18 23:02 
GeneralRe: "Special characters not allowed" - and we eat only raw meat Pin
Duncan K G Campbell13-Feb-18 21:16
professionalDuncan K G Campbell13-Feb-18 21:16 
GeneralRe: "Special characters not allowed" - and we eat only raw meat Pin
Kirill Illenseer13-Feb-18 22:33
Kirill Illenseer13-Feb-18 22:33 
GeneralRe: "Special characters not allowed" - and we eat only raw meat Pin
Peter Shaw14-Feb-18 2:14
professionalPeter Shaw14-Feb-18 2:14 
GeneralRe: "Special characters not allowed" - and we eat only raw meat Pin
Gerry Schmitz14-Feb-18 6:02
mveGerry Schmitz14-Feb-18 6:02 
GeneralRe: "Special characters not allowed" - and we eat only raw meat Pin
englebart14-Feb-18 9:17
professionalenglebart14-Feb-18 9:17 
QuestionRe: "Special characters not allowed" - and we eat only raw meat Pin
Stefan_Lang15-Feb-18 23:18
Stefan_Lang15-Feb-18 23:18 
GeneralRe: "Special characters not allowed" - and we eat only raw meat Pin
kalberts15-Feb-18 0:46
kalberts15-Feb-18 0:46 
As a main rule, I write software to handle any name etc. in two forms: One "internal", technical, which may be restricted in use of encoding, special characters including space, lenght etc. This is the true identifier for an object, or whatever.

The other is an arbitrary length "User friendly" name which may contain arbitrary characters, and it may even be replaced with another name depending on the UI language; it is used in all user dialogs.

The "disadvantage" is that the application code very much leaves this name to be controlled by the user. So e.g. uniqueness cannot be guaranteed. Sure, the code could have refused to accept a duplicate name, but that would restrict the UI naming. (UI names can originate from different sources, so who has "the highest right" to use a given name?) In an interactive UI both matches can be presented, with additional metadata for the user to select.

For non-interactive applications, I always make a fallback to the internal name (which is not at all "secret"), so that batch files / scripts may uniquely identify an object no matter what the user friendly names are. (But for that reason, some resemblance with the user friendly name turns out to be "user friendly" Smile | :) )

This is very much in the style of database identification of tuples: Selection may be based on one or more user specified values, or on some tuple ID defined as a primary key if no (combination of) user attributes are suitable.

I have followed this naming philosophy, with a restricted syntax "internal" name and a free syntax "external" name for a handful systems, and I am so satisfied with it that I will continue to do it that way in future projects whenever it fits in among other requirements.
GeneralWe all love cats... Pin
Rage12-Feb-18 23:19
professionalRage12-Feb-18 23:19 
JokeRe: We all love cats... Pin
RickZeeland12-Feb-18 23:23
mveRickZeeland12-Feb-18 23:23 
GeneralRe: We all love cats... Pin
CodeWraith12-Feb-18 23:41
CodeWraith12-Feb-18 23:41 
GeneralRe: We all love cats... Pin
megaadam13-Feb-18 0:35
professionalmegaadam13-Feb-18 0:35 
GeneralRe: We all love cats... Pin
lopatir13-Feb-18 1:19
lopatir13-Feb-18 1:19 
GeneralCats love people too.... Pin
A_Griffin13-Feb-18 1:27
A_Griffin13-Feb-18 1:27 
GeneralRe: Cats love people too.... Pin
lopatir13-Feb-18 1:37
lopatir13-Feb-18 1:37 
GeneralRe: Cats love people too.... Pin
CodeWraith13-Feb-18 1:56
CodeWraith13-Feb-18 1:56 
GeneralRe: Cats love people too.... Pin
DRHuff13-Feb-18 8:06
DRHuff13-Feb-18 8:06 
GeneralRe: Cats love people too.... Pin
Gary Wheeler14-Feb-18 1:23
Gary Wheeler14-Feb-18 1:23 
GeneralRe: We all love cats... Pin
Mycroft Holmes13-Feb-18 14:10
professionalMycroft Holmes13-Feb-18 14:10 
GeneralCCC 13/2 - now with inspirational music Pin
A_Griffin12-Feb-18 22:02
A_Griffin12-Feb-18 22:02 
GeneralRe: CCC 13/2 Pin
Munchies_Matt12-Feb-18 22:14
Munchies_Matt12-Feb-18 22:14 
GeneralRe: CCC 13/2 Pin
A_Griffin12-Feb-18 22:15
A_Griffin12-Feb-18 22:15 
GeneralRe: CCC 13/2 Pin
The pompey12-Feb-18 23:44
The pompey12-Feb-18 23:44 
GeneralRe: CCC 13/2 Pin
OriginalGriff13-Feb-18 0:08
mveOriginalGriff13-Feb-18 0:08 
GeneralRe: CCC 13/2 Pin
The pompey13-Feb-18 0:15
The pompey13-Feb-18 0:15 

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.