Programming languages teach us syntax, data structures, and algorithms. But one small thing that quietly improves code readability is how we name things. When you look at well-written codebases, variables, classes, and constants rarely follow random naming. Most of the time they follow certain naming patterns. And those patterns actually have names. One of the first I noticed was 𝗰𝗮𝗺𝗲𝗹𝗖𝗮𝘀𝗲. Someone once looked at names like 'userName' or 'totalPrice' and thought the capital letters in the middle looked like the humps of a camel. Once you hear that explanation, it’s surprisingly hard to unsee. Fun fact: many people think camels store water in their humps, but they actually store fat there. The hump helps them survive long journeys, but the water is stored in their bloodstream and body tissues instead. Then there is 𝗣𝗮𝘀𝗰𝗮𝗹𝗖𝗮𝘀𝗲. This style gets its name from the Pascal programming language, which became very popular in the early days of structured programming. Developers using Pascal often wrote identifiers like 'UserProfile' or 'PaymentSystem', and eventually the naming style itself started being called 𝗣𝗮𝘀𝗰𝗮𝗹𝗖𝗮𝘀𝗲. Then comes 𝘀𝗻𝗮𝗸𝗲_𝗰𝗮𝘀𝗲. Pretty straightforward. The underscores make the words stretch across the screen like a long snake: user_name, total_price, file_path. At some point programmers decided the snake needed to shout, and 𝗦𝗖𝗥𝗘𝗔𝗠𝗜𝗡𝗚_𝗦𝗡𝗔𝗞𝗘_𝗖𝗔𝗦𝗘 appeared, also called as 𝗨𝗣𝗣𝗘𝗥_𝗦𝗡𝗔𝗞𝗘_𝗖𝗔𝗦𝗘. You’ll usually see it used for constants like: MAX_USERS or API_KEY. And then there’s 𝗸𝗲𝗯𝗮𝗯-𝗰𝗮𝘀𝗲. Words are connected with hyphens like 'user-profile' or 'product-card'. The name supposedly comes from the way pieces of food are stacked on a kebab skewer, separated but aligned in a straight line. It’s a funny image, but once you hear it, the name suddenly makes sense. These conventions might look like small details, but they quietly make code much easier to read and maintain, especially when multiple developers are working on the same project. Sometimes writing better code doesn’t start with complex algorithms. Sometimes it starts with simply naming things well. Personally, I like 𝗰𝗮𝗺𝗲𝗹𝗖𝗮𝘀𝗲 the most. What about you? #programming #softwaredevelopment #coding #cleancode #developers #computerscience
Kebab-case is the best combo of readability and typability, but most languages don’t support it. Camel case is too mushed together, and there’s too much confusion around how to deal with acronyms and single-letter segments.
snake_case
Talking about casing isn't worth the effort it is a style thing and usually just results in flame wars. What I do agree with is the actual names, in a way those names are kind of your domain language and should reflect WHAT your code is representing (variable or function names), and use as many characters as you need (avoid any uncommon abbreviations or names that represent a data type, like the historically used Hungarian notation)