• 0 Posts
  • 11 Comments
Joined 1 year ago
cake
Cake day: July 4th, 2023

help-circle





  • ByteJunk@lemmy.world
    cake
    toProgrammer Humor@lemmy.mlthe hardest exam question
    link
    fedilink
    arrow-up
    29
    arrow-down
    1
    ·
    2 months ago

    I spent way too long today figuring out why my app was doing something that it’s NOT supposed to do on weekends.

    I read Luxon’s docs (pretty cool lib tbh) again and again, and tried everything I could think of to get isWeekend to return a sane result.

    Turns out I was pulling a somewhat older version of Luxon, where isWeekend didn’t exist. In any sane language, I expect I’d get a huge warning about a property that doesn’t exist, but alas…

    Typescript helps me keep my sanity, but juuuuust barely.



  • Some people seem to have this misconception that “0F cold 100F hot” is somehow an innate or intuitive concept for everyone. It’s not, brother, you just happen to be used to it. I have absolutely no idea if I should wear a coat with 62F or not, or for any other F temperature for that matter.

    At least 0C and 100C have very practical references that anyone can recognise, but what the hell even is 0F and 100F?

    Also, not sure why you’re trying to shoehorn 0-100F to 0-100C.

    When talking about weather, it’s going to be in a range like 0C (cold) / 20C (nice) / 40C (hot), which is equally arbitrary but probably more useful than 0F/50F/100F anyway depending on where you live: my neck of the woods goes to 0C in a harsh winter, and to 40C in the peak of summer.

    And do you use F for stuff like cooking? What purpose is 0F or 100F there?

    How about stuff like chemistry or physics? I remember formulas in C or K, occasionally having to add 273.5. Is F used, or you just use K/C and convert at the start?