2
tjeff90gm
311d

Seriously, what's with the naming ordeal?
We start with userInput, then spiral into userInputUpdatedFinalV2

Are we writing code or crafting spell incantations? camelCase, snake_case, kebab-case, PascalCase – it's a syntax battleground.

Can we have names that make sense, for sanity's sake?

Comments
  • 1
    Alternatives?
  • 1
    > "Can we have names that make sense"

    Come up with a standard that works for you/your team and the key is to be consistent. What that standard is doesn't really matter as long as everything is consistent and the guidelines are enforced.

    Ex. All buttons prefixed with 'bt', btOk, btCancel. or edit controls suffixed with 'Edit', CustomerNumberEdit, FirstNameEdit.

    And don't turn these guidelines into a hammer to beat people over the head. "You called the button btnOK instead of btOK...drop and give me 50 pushups!!!". Ding folks for not being consistent, not for adhering to details that don't really matter.
  • 0
    @PaperTrail > "Ding folks for not being consistent, not for adhering to details that don't really matter."

    I've been in fair number of code reviews where the reviewers seemed to be on a witch hunt instead of answering the questions "What is this code doing? Do I understand what it's doing? Do I understand why it was written this way?" Consistency helps with that clarity. When folks focus on "bt vs btn", the whole process can break down to a pissing contest.
Add Comment