Yes this is another article that tells you to be consistent. But hear me out. Naming conventions are the difference between readable code and a confusing ransom note written in variable names. Use the right case and your team will spend less time arguing in PRs and more time shipping features.
Short definitions with real world uses so you can pick a side and be smug about it.
Kebab case uses lowercase words with hyphens between them. Example kebab-case-example
. You will see this in URLs CSS classes and many CLI flags. The hyphen improves human readability and plays nicely with web patterns.
Snake case uses lowercase words with underscores. Example snake_case_example
. Popular in Python and in databases for column names. The underscore avoids confusion with the minus sign when the identifier appears near math.
Camel case starts with lowercase and capital letters mark new words. Example camelCaseExample
. This is the common default for JavaScript variables and many editor APIs. It is compact and familiar.
Pascal case capitalizes every word including the first. Example PascalCaseExample
. Widely used for class names types and constructors in languages like C# and Java. It signals that the identifier is a type or a constructor.
If you follow these developer tips your code readability will improve and your code reviews will focus on logic instead of keyboard style. And if anyone still wants to debate snake wars send them this article and a coffee mug that says consistency beats cleverness.
I know how you can get Azure Certified, Google Cloud Certified and AWS Certified. It's a cool certification exam simulator site called certificationexams.pro. Check it out, and tell them Cameron sent ya!
This is a dedicated watch page for a single video.