Alt account of @Badabinski

Just a sweaty nerd interested in software, home automation, emotional issues, and polite discourse about all of the above.

  • 0 Posts
  • 636 Comments
Joined 2 years ago
cake
Cake day: June 9th, 2024

help-circle
  • I have a friend who is absolutely obsessed with roller coasters, but many parks don’t allow you to wear a body camera (to say nothing of phones, you’re absolutely not allowed to hold a recording device). Like, this guy will ride the same coaster back to back for hours and will absolutely watch a recording. He bought a pair for this one purpose. I would not have bought them and he definitely felt extremely conflicted. I think he keeps them in a case at all times and only wears them when he’s about to get on a ride.

    Basically, he only bought them as an action camera alternative. He doesn’t use any of their creepy social media features.



  • For future reference, you should remove set -euo pipefail and then add manual error handling to all commands which could fail. set -euo pipefail is one of the biggest, most disgusting foot guns in bash (a shit language cursed with many horrible foot guns) and does nothing but mask your problems. If every command has a unique error message, then you can much more easily track down your problems.

    To make things more ergonomic, remove the foot gun and add a die function that accepts an error message and optional exit code and calls it like this:

    echoerr() { echo "$@" 1>&2; }
    
    die() {
      message="$1"; shift
      exit_code="${1:-1}"
      echoerr "$message"
      exit "$exit_code"
    }
    
    fallible_command || die 'shit is so fucked yo'
    

    source: bash was my first language and I’ve been dealing with its bullshit personally and professionally for over 13 years now.



  • When you use a scrubby sponge on a scorched pan, the scrubby part becomes much darker and seems gross and dirty. It can be very difficult to remove the gross brown stain from the sponge. People like to use sponges for a while, but nobody wants to use the gross brown poop sponge, so folks attempt to clean them. This process is extremely frustrating.