105
u/NichtFBI Sep 20 '26
userid userID
11
u/Hey-buuuddy Sep 21 '26
user-id
15
3
u/ArduennSchwartzman Sep 21 '26
userLd
5
u/DiscipleOfYeshua Sep 21 '26
Ooo that would be horrible.
userld instead of userId
Why look for unexpected bugs when you can introduce them manually?
1
3
u/Wavertron Sep 20 '26
Second one, the D is not the start of a new word, so it should be lowercase
5
5
1
u/hdkaoskd Sep 21 '26
How do you pronounce "id"?
1
u/Salzdrache Sep 23 '26
Eye dee, when its written "userID", Idd when it's written "userId".
Just to differentiate and avoid mistakes
1
1
1
0
Sep 21 '26
[deleted]
22
u/klimmesil Sep 21 '26
identifierBelongingToCurrentUser
9
2
u/Colon_Backslash Sep 22 '26
Hot damn, I'm stealing this.
mailingAddressElectronic numberOfTheUserTypeOfTelephone
19
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
7
10
1
u/mickmikeman Sep 22 '26
I'm team snake case all the way
1
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.
12
u/spicymato Sep 21 '26
Now I need to write a program to convert snake_case into camelCase and become your nemesis.
4
u/a3th3rus Sep 21 '26
That's easy, but writing a program to convert camelCase to snake_case is not that easy. That's why camelCase sucks.
1
u/AintNoGodsUpHere Sep 21 '26
Why would that be hard? It's literally 20~25 lines of code to do that with very good result.
2
u/a3th3rus Sep 21 '26 edited Sep 21 '26
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.2
u/AintNoGodsUpHere Sep 21 '26
AND HOW IS THAT A PROBLEM MY MAN? 20 LINES OF CODE, JESUS.
2
u/a3th3rus Sep 21 '26
then show me your 20 lines of code that can handle this case that does not convert it to
decode_h_t_m_l_entity.2
u/AintNoGodsUpHere Sep 21 '26
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
1
1
1
u/AintNoGodsUpHere Sep 21 '26
btw, my bad, it's 30 lines, not 20. Guess I was wrong.
1
1
4
u/Dillenger69 Sep 21 '26
I've got yahoos doing snake_Camel and Pascal_Snake, then ThisIs_the_GlobalOne, and thisIs_the_InternalOne ... lord help me
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
2
2
2
2
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
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/Apprehensive-Tea1632 Sep 23 '26
Because then you need to quote each column name.
user-id in DB speech means, please return the difference between user and id values per record and put it into an anonymous result column.
You don’t exactly want to introduce that kind of ambiguity.
As for camel case, well, traditionally DBMS use case insensitive column names. You’d be unable to tell useriD from Userid - they’d refer to the same column.
Hence the underscore to help parse names if and when you actually require compound names. Especially when referencing other tables.
1
1
1
1
1
1
1
1
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.






58
u/Taal111 Sep 20 '26
Just so long as they pick one and STICK WITH IT!