• 0 Posts
  • 19 Comments
Joined 1 year ago
cake
Cake day: August 9th, 2023

help-circle




  • I’m in the UK, it’s definitely “an apple a day keeps the doctor away” here. Maybe you just misheard as a kid?

    When I was in primary school someone in my class had to get all their teeth pulled, I have no idea how someone manages to rot their teeth so badly at around 5 years old. I don’t really have a point with that story, it just popped into my head and I had to share



  • There’s no point looking for logic. These people truly believe granting a licence restricts the rights of people who don’t agree to the licence, which is the exact opposite of what licenses do. It’s blatant misinformation but if you call them out on it (even by quoting their own link) they literally think you’re an astroturfer for AI, because that makes more sense to them than the fact they’re obviously wrong.



  • Blaming the people taking the loans is kind of absurd, for many it’s their only option if they want to continue their education. It’s not like they’re taking out loans they don’t need and burning the money.

    “Legally-binding contract” is meaningless too, would you make the same argument against people who signed away their lives before slavery was abolished? Just because it’s legal now doesn’t mean it always will be, or that it must be enforced indefinitely.

    You’re absolutely right that reducing tuition is the right move. Tuition is free where I am and some of the costs I see elsewhere are crazy. However, the options are not necessarily mutually exclusive; you can reduce tuition and help people that have already been shafted by the existing system.




  • It’s not just repeated moves, a draw can be called if the board is in the same state 3 times at all during the game; if you get to the same position 3 times using different moves that still counts, even if it was a white move the first two times and a black move the third.

    The game also ends after 50 moves with no captures or pawn moves so you can’t play indefinitely by just avoiding those board states. Interestingly those two moves also make it impossible to return to a previous board state (pawns can’t move backwards, extra pieces are never added) so if you’re enforcing both rules in code you can safely discard previous board states every time you reset the move counter.






  • That’s because they’re not necessarily mutually exclusive. The function is being called twice so there’s no way to guarantee the result will be the same both times without knowing what it does under the hood.

    Consider a case where isalpha performs a coin flip, 50% chance each call to return true. The first call returns false so the first condition fails, then the second call returns true so the second condition fails; in 25% of cases neither code block executes.

    You could store the result of the first call in a local variable and reuse it if you really wanted to, but the smart solution is to either use if/else properly or switch to early returns instead.