this post was submitted on 25 Nov 2025
330 points (99.4% liked)
Programmer Humor
27506 readers
1529 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
We had some super old code in our company monorepo that was written by someone who became the CTO, there was a comment forbidding people from writing private methods in the code base because "we aren't babies". It explained so much about the awful code and why everything was crazy.
That sounds like someone who didn't understand the purpose of private
Yet he was still in charge of all the engineers who did. He had people actively working against their best interests lol. Disaster
Yeah, that just seems like a recipe for disaster.
Access modifiers are definitely something I despise about OOP languages, though I understand that OOP's nature makes them necessary.
I don't think OOP's nature makes them necessary, so much so as it enables them and popular programming principles encourage them. I think they're a good thing, especially if there's a way around them in case you can't get the public interface changed and it doesn't work for you, especially for performance reasons, but that should be done with care.
Funny story, when modding Unity games using external modloaders you're writing C# code that references the game's assemblies. And with modding you often need to access something that the developers made private/protected/internal. Now, you can use reflection for that, but a different trick you can use is to publicize the game's assemblies for referencing in your code, and add an attribute to your assembly that tells the runtime to just... Let you ignore the access checks. And then you can just access everything as public.