- cross-posted to:
- programmerhumor@lemmy.ml
- cross-posted to:
- programmerhumor@lemmy.ml
I’m working on a gameboy emulator and the amount of edge cases you have to consider feels just like this lol.
Didn’t even consider leap years. Smh
That’s the customer answer, where they give an age in leap years, and everything goes to pot.
!lemmySilver
Based on the only comparison we have, the OP is twice the age of their sister. so the sister is now 44/2, or 22. Easy problem.
ML in action.
Based on the only information we have, OPs sister is two. So the sister is 2. Trivial.
This all assumes all years are measured by the same orbit with no mixing and matching planets or space habitats.
The standard earth year had not been adopted system wide
[Test] public void Sister_IsAstronaut() {
import birthday; let myAge1 = 4; let sisterAge1 = 2; let myAge2 = 44; let sisterAge2 = birthday.deriveAge(myAge1, sisterAge1, myAge2); print(sisterAge2);
Any bugs should be reported upstream. Please open a tracking issue to sync changes with eventual upstream fixes.
The API has the wrong abstraction and the type definitions fail to capture necessary information (such as in which year you were of the given age) and thus conversions can not be guaranteed to be correct
You could also simplify by saying that assuming neither of them are dead, at some point while he is 44 she will be 42. Whether or not she is actually his sister seems to be irrelevant, she was stated to be his sister, so regardless of biological data, it is being presented as a fact assumption.
The space stuff is not currently possible and can be disregarded as well.
deleted by creator
Physicist: “assuming a spherical year …”
In a frictionless vacuum
All I wanted was a cubical day
TIMECUBE!
Id hate to experience a vaccum with friction.
Ahhh I’m rubbing up against all this nothing so roughly it feels almost sticky
Really have to start with a definition of “now”
Fails to consider the case in which the 2-year-old sister is now male.
Also that you have died or that she is now of no gender
It definitely does.
If your parents had another daughter in the meantime (or if your older brother became female), “my sister” would still be a valid reference, to a completely different person.
deleted by creator
I mean, no, the tester didn’t say anything wrong here, and all of those (and more) are conditions one must take into account if one were to write a piece of software without errors
deleted by creator
I’m a Dev with no QA so i just have to be neurotically pedantic so nobody goes to jail
I think it’s more about how testers always run into all the edge cases programmers don’t think about
Can confirm, not even an official tester (just an open beta tester) and have acrued a reputation for having a legendary bug aura that can cause catastrophic and previously unseen edge cases to occur just by opening the software (game)
I used to have a QA job. Can confirm, this is the soup in my head. That’s why I was good at testing. Also, that’s not your sister. That’s your trans brother, who we also love. See?
Also misses the edge case where sister was born on a leap day
Or maybe in a country that recently switched from the Julian calendar, adding the possibility of >12 months between birthdays as described by calendar.
https://github.com/eggert/tz/blob/main/calendars has entered the chat.
Also, as ever, relevant XKCD.