this post was submitted on 07 Aug 2023
29 points (100.0% liked)
Programming
13419 readers
9 users here now
All things programming and coding related. Subcommunity of Technology.
This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Each language has their own conventions in the style guides for how they prefer variables and functions to be named.
For example,
snake_case
camelCase
(like your examples)UpperCamelCase
that's like camel case, but the first letter is also capitalizedAnd then some organizations like to override those and institute their own conventions. I generally think the latter is a bad idea, since it breaks with accepted industry standards for a given language. Even for a personal project you know that no one else will touch, I think it's good to follow the langues guides.
I generally wouldn't make a compound word all lowercase.
strikethroughoffset
is much more difficult to read, IMO. If you're going that route, then you should at least snake case it:strike_through_offset
. But again, a lot of this is going to depend on your situation.It's not really a "get good" issue so much as it's just an annoying part of the industry one has to navigate.