• 0 posts
  • 18 comments
Joined 3 years ago
Cake day: October 13th, 2023
  • Yes, there’s definitely worse out there.

    But this is still worth fighting. It’s a bellwether for more restrictive age+identity verification laws, and those should not exist in the US. The gov’t shouldn’t have any say in what I compute the same way they shouldn’t have any say in what I discuss using the mail. This is a clear step away from that and it’s important to make that clear to lawmakers now so they don’t use this as evidence the populace is ok with something stronger.

  • If the servers have public IPs and you want the minimum possible ports open, just SSH? With passwords disabled and large keys, it’s quite secure.

    If that’s still not enough for you or you need a private gateway, then Wireguard. I can strongly recommend Tailscale - It’s really an orchestration layer on top of Wireguard. You can setup your own Derp relays and head scale if you are truly paranoid. But 99.9% you don’t need all that and Tailscale out of the box will work well.

    Also Tailscale isn’t a single point of failure the way you’re imagining. It’s certainly possible for Tailscale’s servers to go down, but that won’t drop existing connections.

  • Also the number of outcomes isn’t connected to the solution space reduction the way you say. If you don’t know whether the fake coin is heavier or lighter, both tilt-right and tilt-left are effectively the same result. So at least your first test really only has 2 meaningful outcomes.

    In general, you’ll only reduce your solution space DOWN TO (not by) 1/(number of distinguishable outcomes) if the possible solutions are evenly divided among those outcomes. It’s easy to have a problem where “result 1 narrows it down a lot, result 2 doesn’t tell us much”

  • For a first step you can get away with just add, commit, push, and pull. Maybe reset, but tbh using git like svn at first is fine.

    Next branch, checkout and merge. At this point show, log, bisect and blame also start to be useful.

    I’m not a fan of stash, and would instead recommend reflog and cherry-pick as the first two advanced commands to learn. Then rebase and squash.

  • In addition to the excellent points made by steventhedev and koper:

    user.password = await hashPassword(user.password);

    Just this one line of code alone is wrong.

    1. It’s unclear, but quite likely that the type has changed here. Even in a duck typed language this is hard to manage and often leads to bugs.
    2. Even without a type change, you shouldn’t reuse an object member like this. Dramatically better to have password and hashed_password so that they never get mixed up. If you don’t want the raw password available after this point, zero it out or delete it.
    3. All of these style considerations apply 4x as strongly when it’s a piece of code that’s important to the security of your service, which obviously hashing passwords is.