Mama told me not to come.

She said, that ain’t the way to have fun.

  • 8 Posts
  • 11.7K Comments
Joined 2 years ago
cake
Cake day: June 11th, 2023

help-circle
  • Yes, it’s not the same since you get a stacktrace (if enabled) and a message, but it’s the closest thing you get in safe rust (outside compiler bugs). I compare it to a segfault because it’s almost as unhandleble.

    Basically, you don’t want a panic to crash your program in most cases. If you do, make it explicit (i.e. with expect()). unwrap() tells me the value is absolutely there or the dev is lazy, and I always assume the latter unless there’s an explanation (or it’s obvious from context) otherwise.




  • It is unwrap’s fault. If they did it properly, they would’ve had to explicitly deal with the problem, which could clarify exactly what the problem is. In this case, I’d probably use expect() to add context. Also, when doing anything with strict size requirements, I would also explicitly check the size to make sure it’ll fit, again, for better error reporting.

    Proper error reporting could’ve made this a 5-min investigation.

    Also, the problem in the first place should’ve been caught with unit tests and a test deploy. Our process here is:

    1. Any significant change to queries is tested with a copy of production data
    2. All changes are tested in a staging environment similar to production
    3. All hotfixes are tested with a copy of production data

    And we’re not a massive software shop, we have a few dozen devs in a company of thousands of people. If I worked at Cloudflare, I’d have more rigorous standards given the global impact of a bug (we have a few hundred users, not billions like Cloudflare).


  • Ift is precious and beyond compare. It has tools that most other languages lack to prove certain classes of bugs are impossible.

    You can still introduce bugs, especially when you use certain features that “standard” linter (clippy) catches by default and no team would silence globally. .unwrap() is very controversial in Rust and should never be used without clear justification in production code. Even in my pet projects, it’s the first thing I clear out once basic functionality is there.

    This issue should’ve been caught at three separate stages:

    1. git pre-commit or pre-push should run the linter on the devs machine
    2. Static analysis checks should catch this both before getting reviews and when deploying the change
    3. Human code review

    The fact that it made it past all three makes me very concerned about how they do development over there. We’re a much smaller company and we’re not even a software company (software dev is <1% of the total company), and we do this. We don’t even use Rust, we’re a Python shop, yet we have robust static analysis for every change. It’s standard, and any company doing anything more than a small in-house tool used by 3 people should have these standards in place.





  • Use something like Backblaze or Hetzner storage boxes for off-site backups. There are a number of tools for making this painless, so pick your favorite. If you have the means, I recommend doing a disaster recovery scenario every so often (i.e. disconnect existing drives, reinstall the OS, and load everything from remote backup).

    Generally speaking, follow the 3-2-1 rule:

    • 3 copies of everything on
    • 2 different types of media with
    • 1 copy off site (at least)

    For your situation, this could be:

    • 3 copies - your computer (NVMe?), TrueNas (HDD?), off-site backup; ideally have a third local device (second computer?)
    • 2 media - NVMe and HDD
    • 1 copy off site - Backblaze, Hetzner, etc

    You could rent a cloud server, but it’ll be a lot more expensive vs just renting storage.




  • Let’s make a deal. We cancel SNAP and implement a Negative Income Tax as conservative economist Milton Friedman recommended. That brings everyone up to the poverty line, and everyone on SNAP today won’t need it anymore.

    Benefits for you:

    • close a bunch of SNAP jobs
    • retail stores don’t need to remember what’s snap approved and what’s not

    Benefits for everyone else:

    • no more poverty
    • no application process for benefits, just file a fax return
    • cash instead of food-specific benefits, so people with food can use the cash for something else they need (clothes, utilities, etc)




  • Yeah, 15kph seems unreasonably slow, and I think my kids ride about that fast. Maybe 20kph is better? I usually slow to 15-20kph anyway when there isn’t enough room to give others more than a meter of space when I pass.

    So yeah, in kph, I think the regular stretches should be around 30kph, and maybe 20kph around parks and parking areas since there are likely unattended young children and pets around. I can stop very quickly at 20kph.


  • The legally available ones top out in my area at 20mph, or 28mph if it has a speedometer. Professional cyclists top out in that range too, and average cyclists are around 13-15mph. If you DIY with a Bafang or something, you can go 30-40mph.

    I see people people running the throttle only at the limit on the ped path. That should be illegal. There should probably also be a top speed on the ped path (say, 20mph) because it’s shared by walkers, cyclists, and rollerskaters alike.


  • Exactly.

    There’s a difference between gatekeeping and being transparent about what’s expected. I’m not suggesting people do it the hard way as some kind of hazing ritual, but because there’s a lot of practical value to maintaining your system there. Arch is simple, and their definition of simple means the devs aren’t going to do a ton for you outside of providing good documentation. If your system breaks, that’s on you, and it’s on you to fix it.

    If reading through the docs isn’t your first instinct when something goes wrong, you’ll probably have a better experience with something else. There are plenty of other distros that will let you offload a large amount of that responsibility, and that’s the right choice for most people because most people don’t want to mess with their system, they want to use it.

    Again, it’s not gatekeeping. I’m happy to help anyone work through the install process. I won’t do it for you, but I’ll answer any questions you might have by showing you where in the docs it is.