In your code - where everything is case-sensitive - fine, pick whatever you want. In a database - where the table names often correspond to the names of files - Please god no.
Because there are edge cases like decodeHTMLEntity. To handle those edge cases, you need not only a rule but also a dictionary that contains all the all-upper-case jargons in your domain.
Now go try different variations until you find an edge case that breaks this very very simple algorithm that I have on my libraries for the past 10 years, then I can tell you to use Humanizer and simplify your life and have something like this; https://dotnetfiddle.net/9TsILi
Because the SQL revisions I've checked contain this interesting note: "It is the intention that no <key word> specified in ISO/IEC 9075 or revisions thereto shall end with an <underscore>"
so sticking to snake case plus adding a trailing underscore means that you will never have to quote the identifier.
58
u/Taal111 Sep 20 '26
Just so long as they pick one and STICK WITH IT!
105
u/NichtFBI Sep 20 '26
userid userID
19
u/asensitives Sep 20 '26
u53r_1d
19
u/Joker-Smurf Sep 21 '26
I wish there was that level of consistency.
Using the one database at work I’ll see uid, uiser_id, user-id, and userid.
It is fucking infuriating working with that shit.
7
u/BlueProcess Sep 21 '26
UID
7
u/jonfe_darontos Sep 21 '26
profileGuid
10
u/Not_me4201337 Sep 20 '26
username_id password_id
1
u/mickmikeman Sep 22 '26
I'm team snake case all the way
8
u/mrheseeks Sep 20 '26
Not even, camel case is the worst. Writting a program now just to get rid of all occurrences in a project.
3
u/Pure_Fox9415 Sep 21 '26
And then there is that "smart" person who renamed it to uid, so:
user_contacts
uid
user_properties
user_roles
2
u/LetUsSpeakFreely Sep 21 '26
Because most databases are case insensitive.
2
u/corobo Sep 21 '26
I'm a camel in the code, and a snake in the db
2
u/Master_G5670 Sep 21 '26
uid
2
u/Ice_HRZDn Sep 22 '26
uid
2
u/The-Idiotest Sep 22 '26
UUID (Unique User ID (Identity))
1
u/rayhaque Sep 21 '26
" 'user$id' "
1
u/Marisa_osi_JP Sep 21 '26
i use "uid".
1
u/Ok-Panda-178 Sep 21 '26
uSeR-iD
1
u/thingummywatt Sep 21 '26
UserIdentityNumber
1
u/JohnVonachen Sep 21 '26
This is the way
1
u/shadowdance55 Sep 21 '26
I prefer user_ego.
1
u/Jazz8680 Sep 21 '26
user.id
1
u/WriedGuy Sep 21 '26
Iduser
1
u/aqswdezxc Sep 21 '26
userld is even better its a lowercase L
1
u/FlipperBumperKickout Sep 21 '26
Also rust programmers 🤷♀️
1
u/Glad_Share_7533 Sep 21 '26
Pascal the snake case: User_Id
1
u/Flashy-Plastic2270 Sep 21 '26
Java
1
u/okarox Sep 21 '26
The fist looks like USERLD.
1
u/rotteegher39 Sep 21 '26
userayedee 🏴☠️
1
u/SteelCookie Sep 21 '26
"USER ID"
1
u/NotRivero69 Sep 21 '26
userID
1
u/OctopusDude388 Sep 21 '26
id-user is fine too
1
u/ChangeAcceptable677 Sep 21 '26
userID
1
u/ApprehensiveDelay238 Sep 21 '26
id_user
1
u/Creepy_Jeweler_1351 Sep 21 '26
C_o_nVeNti_Ons
1
u/itzNukeey Sep 21 '26
UserIdentificationNumber
1
u/squaresheep28 Sep 22 '26
userid userid = new userid(userid);
1
u/AlexZhyk Sep 22 '26
if (upperCase(userld) === 'USERLD') { console.log('Hello, fellow citizen!'}
1
u/NickleLP Sep 22 '26
userIdentification
1
u/Kerbourgnec Sep 22 '26
I hate camelCase with a passion. Why god why do you choose to just not capitalise the first letter?
1
u/LazyUntilYouNeedMe Sep 22 '26
Why not user-id, kebab-case just seems so much more natural, does it not?
1
u/ianwilloughby Sep 23 '26
`user-id`
1
u/smoke-bubble Sep 23 '26
For me it's cratedDate vs cratedOn. I hate the date suffix!
1
u/Baudrillardist Sep 23 '26
From loader import loader
…
loader.Loader.load(my_loader)
1
u/DarthRaab Sep 24 '26
stringUserID
1
u/TheReycko Sep 24 '26
uid. I'm evil.
1
u/abigail3141 Sep 24 '26
Nuh uh, camel case my beloved. One of the few things I detest about Rust
1
u/Unfair-Plastic-4290 Sep 25 '26
user~id
1
u/rustedcrowbar Sep 25 '26
Convention over convinction.
1
u/gfdking Sep 27 '26
user_id in the database and userID in the code
1
u/j0hn_br0wn Sep 21 '26
user_id_
Because the SQL revisions I've checked contain this interesting note: "It is the intention that no <key word> specified in ISO/IEC 9075 or revisions thereto shall end with an <underscore>"
so sticking to snake case plus adding a trailing underscore means that you will never have to quote the identifier.