this post was submitted on 28 Mar 2024
615 points (98.1% liked)

Programmer Humor

32415 readers
385 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 14 points 7 months ago* (last edited 7 months ago) (6 children)

The real naming fail is calling the class "GameManager", still my number one pet peeve. With a class name as vague as that you would have to add tons of information into the variable name. (Also the class name begs for unorganized code. I mean name one function or variable that you could not justify putting into the "GameManager" class. After all if it's managing the game it could justifiably perform any process in the game and access any state in it.)

Once you put the first bool into a class with a name like AccessibilitySettings, calling it something like HighContrast is completely sufficient.

[–] [email protected] 2 points 7 months ago (1 children)

"Manager" classes often end up like "God classes", just like how "Utils" classes end up with a bunch of random stuff in them.

[–] [email protected] 1 points 7 months ago

At my first job I was working on an MMO and we had a DatabaseManager class with 10k+ lines of code. Less than the first 200 lines actually used any of the members of that class.

load more comments (4 replies)