• 47 Posts
  • 424 Comments
Joined 1 year ago
cake
Cake day: June 23rd, 2023

help-circle







  • Ew no.

    Abusing language features like this (boolean expression short circuit) just makes it harder for other people to come and maintain your code.

    The function does have opportunity for improvement by checking one thing at a time. This flattens the ifs and changes them into proper sentry clauses. It also opens the door to encapsulating their logic and refactoring this function into a proper validator that can return all the reasons a user is invalid.

    Good code is not “elegant” code. It’s code that is simple and unsurprising and can be easily understood by a hungover fresh graduate new hire.








  • Sanctions have not been effective - AQAH has been sanctioned since 2007, and only the direct military threat on Iranian planes bringing cash seems to be having the desired impact.

    The quiet part is here in the details - Iran is Hezbollah’s financier - confirming what everyone has known for decades. AQAH is unlicensed, yet they do business with AQAH because they know that someone (Iran) will guarantee AQAH’s debts. More importantly, it shows a path forward for Lebanon - to simply enforce their existing sovereignty and laws - punishing banks that do business with unlicensed banks.








  • None built in from what I recall. That was from back in 2011, so it’s possible things changed since.

    Reading through, it looks like retries do exist, but remember that duplicate packets are treated as a window reset, so it’s possible that transmission succeeded but the ack was lost.

    I remember the project demos from the course though - one team implemented some form of fast retry on two laptops and had one guy walk out and away. With regular wifi he didn’t even make it to the end of the hall before the video dropped out. With their custom stack he made it out of the building before it went.

    I’ll need to dig through to find the name of what they did.