• 40 Posts
  • 332 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.







  • 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.










  • I’d strongly recommend against it. Nothing to do with specs or viability but psychologically you’ll want to play games - they’re enjoyable. You can work around that in a few ways: only use the keyboard/mouse for dev work, only play games outside the workroom, etc. it will still take a lot of self discipline, but it’s nothing compared to having a different OS, physical machine, etc.

    In terms of specs - if it can run vs code, you can use the remote development plugins to run things on a beefier computer if you do heavy data work, etc. I don’t know if it will do video editing though.