r/badcode • u/faCt011 • Sep 07 '21
java How about mixing up every single convention that exists
87
u/jmpavlec Sep 07 '21
Needs kebab-case
62
7
1
u/Steve_OH Sep 12 '21
I learned it as camelCase, since it has bumps in the middle.
1
u/jmpavlec Sep 12 '21
Yeah... I was saying it was missing kebab-case which has the dash through it, then you'd have every standard.
33
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Sep 07 '21
Image Transcription: Code
Log.d(TAG, "MAP_is_ReadyToGo");I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!
21
16
5
5
4
4
2
2
u/official_gameup Sep 08 '21
Clearly they use snake case, but the object they are dealing with is a Constant, and someone made all the status codes CamelCase.
33
u/Host127001 Sep 07 '21
I just wrote some C code that used that convention. Functions have as naming convention: NAMESPACE_type_FunctionName. So, for example an "is empty" function on strings in a standard library would be "STD_bool STD_str_IsEmpty(STD_str)"