• 0 Posts
  • 6 Comments
Joined 1 year ago
cake
Cake day: July 28th, 2024

help-circle
  • Ediacarium@feddit.orgtoProgrammer Humor@programming.devFree iphone
    link
    fedilink
    arrow-up
    57
    arrow-down
    1
    ·
    edit-2
    6 days ago

    I worked at a company where everyone would try and send an email to themselves from an unlocked PC. That mail contained a heads up that the victim willl bring cake into the office e.g. next tuesday. They then were typically forwarded to the whole team while thanking them for their generosity.

    It really hammered that lesson home and the victims did honor the cake-mails. Only downside was, that this led to people to tryimg to bait each other into leaving their PCs unlocked and creative countermeasures, such as delaying mails containing the word ‘cake’.


  • Languages like Java or C++ have Exceptions, which are errors, that are not explicitly mentioned in the function signature. Meaning, you might need to handle an exception you didn’t even know existed. And if you don’t, your program will just crash when these exceptions occur.

    In Rust all errors are explicitly mentioned and part of the return type. Because of this Rust has a lot of ways to quickly handle an error. One of those ways is “Trust me, bro” (or .unwrap()), which converts the combined error/success return type into just a success type, causing the program to crash if it actually was an error, restoring the more unsafe behavior of other languages.