This is really important for me. Please, consider the options carefully.
This is about naming things in the code.
I'm struggling to choose one.
Please, boost. Really need to decide quickly:)

@lig Just echoing similar sentiments here, I would go with 'object_id' as I personally find camelCase to be horrifyingly unreadable.

@oedmarap that's usually the choice made for us. Each ecosystem has its own tradition. I use both depending on the language.

@lig I hear you. If you're coding as part of a team/org then naming conventions are forced upon you.

In that case, might I suggest going for a more structured approach.

If the second word has less than three letters then capitalize it, otherwise use camel case.

E.g. objectID, objectRef, objectName, targetDB, targetArr, targetArray, etc.

Hope that helps. πŸ‘

@lig Exceptions for proper nouns yes, e.g. orgFSF, orgEFF, amountBTC, amountUSD, airportJFK, etc.

@oedmarap So, you mean acronyms should be always capitalized. Ok. Then the question is: Is `ID` an acronym or a shortened abbreviation?

@lig Well to my point, ID isn't a proper noun (acronym), so it falls back on the character-limited rule without any further context.

@oedmarap I don't see the point in character limit here then. Consider those: thingsToDo, doWell, amountUSD, userId, currentDate, currentTS.

Follow

@lig Exactly the reason I don't use camel case. πŸ™‚

But I'm just suggesting adding _some_ type of sanity checks into the naming schemes. Edge cases will happen but not very often.

Β· Β· 0 Β· 0 Β· 0
Sign in to participate in the conversation
Fosstodon

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.