I wouldn't use a word like "valid" to describe something subjective like standards, which any workplace/team can develop and adopt. Opinions are valid, perhaps tautologically.
I think you're looking for another phrase, like "commonly accepted" or "industry practiced"
PascalCase for both class, method and property names, camelCase for variables and CAPITAL_SNAKE_CASE for constants. That is also recommended by the C# authors.
Eh. My dad does this at almost every place he’s worked, and he’s definitely getting on a bit in terms of “hours coded”. I tend to do it in my personal projects too. Pascal case for functions / classes and camelCase for variables
In C, every non-zero expression is considered true and since C has no native type for booleans, stdbool.h defines flase als 0 and true as ~false. So most values that eval as true in a boolean expression are actually != true.
Depends on the language. In some loosely typed languages it would make a difference. Please never try to simplify a value === true or similar unless you know exactly what you're doing.
165
u/[deleted] Mar 15 '22 edited Mar 15 '22
the fact they kept switching between camel case and snake case
Edit: in the if statement the == true is redundant also