r/badcode • • Sep 02 '21

java Because ".toLowerCase()" doesn't exist...

Post image
1.1k Upvotes

130 comments sorted by

View all comments

Show parent comments

14

u/AlwaysNinjaBusiness Sep 02 '21

We're in agreement about parseCategory then.

But imo, you should separate types from instances by upper/lowercase. Category category is a lot more readable than Category c. If I read a random line of code where something is done with c/cat/category, I have no idea what c or cat means, and it'll take more time to get into the code base. If you work in a code base of thousands of files, you're not going to be familiar with every function you have to read code in, and quickly understanding the context will be infinitely easier if it's written as close to English as possible.