Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
snake_case for html/css ids
skewer-case for html/css class names
PascalCase for global variables and class names
camelCase for local variables
That’s what I prefer, but when in Rome... -
I tend toward camel case. Pascal case seems to be mostly for classes and structs. At least in C++. I will at times use m_ to denote member variables of classes. Mostly I just match whatever the current code base has. I do prefer 4 spaces per tab over tabs though. Once you go 4 spaces in Python I don't think you can ever go back.
-
Pascal case barely used? What kinda language are you using?? Java and C++ exclusively use pascal case for class names
-
Non breaking spaces are valid characters for variables, methods & classes in PHP.
Pro: It's the apex of readability.
Con: Your coworkers will repeatedly kick you in the genitals because spaces in function names is the last straw, they already hated you when you changed indentation to 3 spaces. -
What about xXx-dankgam3r-420-m3mecas3-xXx?
You gotta postfix all your tests with a 360-noscope, all your variables prefixed with pro or leet, and your methods should encourage coworkers to "blaze it".
PascalCase for life, what about you?
joke/meme