For a serious reoly, I think the expression “If they have eggs, buy two” is redundant. If they didn’t have eggs, the kid just can’t and won’t buy any eggs.
I think the proper command would be, “Please buy 1 bottle of milk and two eggs.” That way, the kid won’t be confused and it’s still a proper valid command.
Unfortunately though, the sentence is ambiguous even to non-programmers. It is unknown whether the if condition applies to
buying two eggs (buy two eggs)
buying two bottles of milk (buy two bottles instead)
I’ve actually had an excavator take out my network. I’ve also had networks taken out by forklift, train, and a semi-truck towing three other semi-trucks.
You don’t suddenly find out that your peeler is several versions behind
And then proceed to spend 17 hours trying to get it to peel just the way the invetors wanted it to, which is different from the other 987654321 peelers around.
After 20 years in the field, I hate love despise like 'm ok with technology
Here’s my take. In order to be able to write meaningful unit tests the code should be structured in a certain way, with very modular, decoupled units, dependency injection, favoring composition and polymorphism over inheritance and so on.
If you manage to write your code this way it will be an objective advantage that will benefit the project even if you don’t write a single unit test. But it does make unit tests much easier to write, so presumably you’ll end up with more tests than otherwise.
IMO teams should prioritize this way of writing code over high test coverage of non-modular code. Unit tests for deeply-coupled code are a nightmare to write and maintain and are usually mostly meaningless too.
Basically: The game is Cataclysm: Dark Days Ahead. For those not aware of how the game works, it operates in turns, with every character and monster getting 100 turns to perform actions before the other creatures in the game get theirs. Each action takes a set amount of turns, and you can take actions until your 100 turns are used. So walking a tile might take 80 turns, and running that same tile 40, giving you an extra tile before the other creatures get to go.
What happened here is, a commit changed how limb breaks affect turns, but didn’t put a maximum cap. Meaning that players would spend 0 turns moving. If you don’t spend any turns, other things in the game never get theirs. In other words, time stops for everyone but you.
programmer_humor
Active
This magazine is from a federated server and may be incomplete. Browse more on the original instance.