Estimated reading time: 2 minute(s)
Camel case is a simple practice ubiquitously used in computer programming to combine words or phrases into a compound word. It is used because spaces are not allowed in names.
Camel case is written by combining multiple words together into one word. You then capitalize the first letter of every word, starting with the second word. For example, the phrase "user session heartbeat" you would write as userSessionHeartbeat. You don't worry about punctuation or capitalization outside of the first character of each word.
Sometimes, you'll capitalize the first character depending on the naming standards you are working in. This is referred to as pascal case and not camel case. It is the same idea, excluding the change to the first character.
Acronyms are treated just like any other word. If you wanted to name a variable "CSV IO Converter" it would be written as csvIoConverter. The fact that acronyms are written in all uppercase is irrelevant. By writing it in all uppercase like you do in English, you'll lose readability, especially when multiple acronyms are used in a name. It can be difficult to know when one ends and another begins.
The rules for camel case are very simple although people often try to overcomplicate them. Keep it simple and avoid making special cases.
Author: Crono
,