this post was submitted on 10 Jul 2024
581 points (99.2% liked)
Programmer Humor
19564 readers
993 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 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Why are females typed differently than males instead of a base class human with a gender identity parameter? Why would human anything have a function called young?? What would that function even do????
HumanFemales and HumanM both inherit from the Ape base class, it's from an older java code base. We tried to change it once but it turned out the person that had written had retired and any changes we made just broke stuff.
Haha, I like this answer!
The young method returns a boolean parameter. Females have a different type for obvious biological discrepancies that require extra functionality.
I can accept your second point, but in your PR I would absolutely request you to rename the method to
isYoung
, and then in making said comment I would then ask… what value isYoung providing, and where is the line between young and !young ultimately for trying to get the dev to reevaluate the design. It’s hyper specific in an obtuse manner and I think it hints at design flaws especially with the perspective of product evolutionCould be a subclass. However, it should just be an 'is' method which is passed the array of [young, pretty] as input