Programmer in NYC

  • 0 Posts
  • 18 Comments
Joined 1 year ago
cake
Cake day: May 7th, 2023

help-circle






  • The problem is that the way PEMDAS is usually taught multiplication and division are supposed to have equal precedence. The acronym makes it look like multiplication comes before division, but you’re supposed to read MD and as one step. (The same goes for addition and subtraction so AS is also supposed to be one step.) It this example the division is left of the multiplication so because they have equal precedence (according to PEMDAS) the division applies first.

    IMO it’s bad acronym design. It would be easier if multiplication did come before division because that is how everyone intuitively reads the acronym.

    Maybe it should be PE(M/D)(A/S). But that version is tricky to pronounce. Or maybe there shouldn’t be an acronym at all.



  • The comment from subignition explains that the phone’s answer, 16, is what you get by strictly following PEMDAS: the rule is that multiplication and division have the same precedence, and you evaluate them from left-to-right.

    The calculator uses a different convention where either multiplication has higher priority than division, or where “implicit” multiplication has higher priority (where there is no multiply sign between adjacent expressions).


  • hallettj@beehaw.orgto196@lemmy.blahaj.zoneTheodrule
    link
    fedilink
    English
    arrow-up
    10
    ·
    7 months ago

    Radium produces the most radiation by miles. The plutonium gives off some alpha radiation that won’t hurt you if you don’t eat it. (Eye protection would be a good idea I suppose.) I don’t remember what U-235 emits but I don’t think it’s a huge amount.



  • hallettj@beehaw.orgto196@lemmy.blahaj.zoneSharks Rule, Rule
    link
    fedilink
    English
    arrow-up
    38
    ·
    8 months ago

    Wow, this is one of the most complicated Snopes analyses I’ve seen. But it seems like the statement is accurate with caveats. If the brightest component of Polaris is probably 50 million years old what was there before wasn’t really Polaris. And then it doesn’t make a difference whether sharks have been around for 450 million or 195 million years.



  • I’m finding this mess interesting: the MAGAs vote and debate like a third party, which kinda gives us a House with no majority party which is something we usually don’t get to see in America. And we’re getting the deadlocks that come from a chamber that isn’t willing to form a coalition - or at least not a reliable one.

    I just hope the next speaker candidate doesn’t try for the same Republican-MAGA coalition. Although I’m prepared to be disappointed. Do you think there’s any chance a Republican would offer to sideline the MAGAs to get support from Democrats?

    Under this analysis the Democrats have a plurality. How does that tend to work out in governments with more than two parties?



  • I totally agree.

    Right now I’m on a new project with a teammate who likes to rebase PR branches, and merge with merge commits to “record a clean history of development”. It’s not quite compatible with the atomic-change philosophy of conventional commits. I’m thinking about making a case to change style, but I’ve already failed to argue the problem of disruption when rebasing PR branches.



  • I get fatigued too! At the end of an especially busy day of coding I have trouble forming sentences for a bit until I take some time to rest. Programming is complicated, and all that mental work literally uses up calories, and fatigues brain cells. Have you heard of the waterfall illusion? The short version is if you watch stuff moving down for a while your downward-motion-detecting cells get tired, and become less active which which messes with your ability to perceive not-moving-upward things for a minute. Your other brain cells get tired too - but it doesn’t take long to recover if you take a break.