• 1 Post
  • 17 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle
  • You often need to be pretty good at math. But not because you’re “doing math” to write the code.

    In real world software systems, you need to handle monitoring and alerting. To properly do this, you need to understand stats, rolling averages, percentiles, probability distributions, and significance testing. At least at a basic level. Enough to know how to recognize these problems and where to look when you run into them.

    For being a better coder, you need to understand mathematical logic, proofs, algebra/symbolic logic, etc in order to reason your way through tricky edge cases.

    To do AI/ML, you need to know a shitton of calculus and diff eqs, plus numerical algorithms concepts like numerical stability. This is kinda a niche (but rapidly growing) engineering field.

    The same thing about AI also applies to any other domain where the thing being computed is fundamentally a math or logic solution. This is somewhat common in backend engineering.

    I’m not “doing math” when pen and paper at work, but I do use all of these mathematical skills all. the. time.

    I am an SRE on a ML serving platform.







  • cbarrick@lemmy.worldtoRust@programming.devDioxus Labs + “High-level Rust
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    2
    ·
    5 months ago

    Fair. But unwrap versus expect isn’t really the point. Sure one has a better error message printed to your backtrace. But IMO that’s not what I’m looking for when I’m looking at a backtrace. I don’t mind plain unwraps or assertions without messages.

    From my experience, when people say “don’t unwrap in production code” they really mean “don’t call panic! in production code.” And that’s a bad take.

    Annotating unreachable branches with a panic is the right thing to do; mucking up your interfaces to propagate errors that can’t actually happen is the wrong thing to do.


  • cbarrick@lemmy.worldtoRust@programming.devDioxus Labs + “High-level Rust
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    2
    ·
    5 months ago

    Unwrap should literally never appear in production code

    Unwrap comes up all the time in the standard library.

    For example, if you know you’re popping from a non-empty vector, unwrap is totally the right too for the job. There are tons of circumstances where you know at higher levels that edge cases defended against at lower levels with Option cannot occur.




  • TL;DR

    The two most popular insect specialists used to control spider mites are a ladybug named Stethorus punctum and a predatory mite named T. pyri.

    And later they say that the ladybug was the go-to. But new EPA regulations prompted some farms to use pesticides that kill the ladybugs. So the predatory mites are better if you are using those kinds of pesticides.