• ByteJunk@lemmy.world
    link
    fedilink
    arrow-up
    46
    ·
    23 hours ago

    Really curious in what scenarios people would be writing enums with months and weekdays.

    Because short of developing yet another library to handle date and time, everything else is likely a disaster waiting to happen…

    • deadbeef79000@lemmy.nz
      link
      fedilink
      arrow-up
      9
      ·
      7 hours ago

      Wrapping a blackbox/legacy system would be a good reason.

      Declare the old API in your new language, warts’n’all.

    • 6nk06@sh.itjust.works
      link
      fedilink
      arrow-up
      24
      arrow-down
      1
      ·
      21 hours ago

      A lot of developers are not passionate, or not curious, or don’t know that libraries exist, or all at once (aka stupid). I’ve seen this everywhere.

      • naught101@lemmy.world
        link
        fedilink
        arrow-up
        24
        arrow-down
        1
        ·
        18 hours ago

        The developer who was there when I started my last job believed that libraries should be avoided at all costs. He wrote a CSV reader from scratch in python. It didn’t work in many edge cases. He didn’t like it when I pointed that out. Nor when I showed him that his “better way” in another case was more than 10x slower using a profiler… At least he was using git, but the git history was full of long series of identical commit messages unrelated to code changes, because PyCharm has an option to reuse the previous commit message on a new commit…

        He eventually quit and I spent 3 years refactoring his garbage before we finally had a tech team who could take over (I’m a scientist, with self taught coding skills). Pretty sure even after we had a tech team of 7 if was still a better coder than most, purely because I was interested in how coding works, and trying to understand underlying concepts.

        • Zink@programming.dev
          link
          fedilink
          arrow-up
          19
          ·
          16 hours ago

          because I was interested in how coding works, and trying to understand underlying concepts

          Ah, yes. The secret to being better than most people at at most things. Curiosity and giving a shit.

          • MonkeMischief@lemmy.today
            link
            fedilink
            arrow-up
            1
            ·
            4 minutes ago

            This is what I try to tell everybody who wants to do the whole “I can’t understand how to use computers” schtick, and it’s still often too much to handle.

          • someacnt@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            5
            ·
            14 hours ago

            My impostor syndrome is saying that I suck at everything, I just got curiosity to get over some of it…

    • Lightfire228@pawb.social
      link
      fedilink
      arrow-up
      7
      ·
      22 hours ago

      I did it once to pull out data from a spreadsheet into a database. Specifically, I needed "${DataType}${Month}" for each month for 3 different datatypes

      Iirc, i used an sql pivot (or unpivot) in that query too

      Usually, it’s situations like this where you’re parsing data from strings, and you need some glue code to interface between the input data, and the date library you’re using to actually resolve the datetime

  • emb@lemmy.world
    link
    fedilink
    arrow-up
    103
    ·
    edit-2
    1 day ago

    Nice touch making Months plural and Day singular.

    I also like how Wednessecond isn’t going to be the end of the list, trailing comma is there.

    Cursed.

    • Xylight@lemdro.id
      link
      fedilink
      English
      arrow-up
      7
      ·
      16 hours ago

      There is a reason there is sometimes a notable decrease in quality of the same AI model a while after it’s released.

      Hosters of the models (like OpenAI or Microsoft) may have switched to a quantized version of their model. Quantization is a common practice to increase power efficiency and make the model easier to run, by essentially rounding the weights of the model to a lower precision. This decreases VRAM and storage usage significantly, at the cost of a bit of quality, where higher quantization results in worse quality.

      For example, the base model will likely be in FP16, full floating point precision. They may switch to a Q8 version, which nearly halves the size of the model, with about a 3-7% decrease in quality.

      • MonkeMischief@lemmy.today
        link
        fedilink
        arrow-up
        1
        ·
        41 seconds ago

        Expertly explained. Thank you! It’s pretty rad what you can get out of a quantized model on home hardware, but I still can’t understand why people are trying to use it for anything resembling productivity.

    • dogs0n@sh.itjust.works
      link
      fedilink
      arrow-up
      55
      ·
      1 day ago

      Maybe the more copilot is used, the more code on github is ai garbage, ths more copilot trains on github, the worse it gets.

      Probably quite a lot of other things too, but I haven’t used it so I don’t know if it has got worse.

      • Valmond@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        8 hours ago

        Yeah I remember the hype floating in the air when someone showed the magic AI writing a scan all files and folders recursively code in python. The result was like of a first year student, which is kind of incredible in itself to be fair, but it’s also just the result like of a first year student so…

    • WanderingThoughts@europe.pub
      link
      fedilink
      arrow-up
      13
      ·
      1 day ago

      It’s been reported the latest model has been optimized for reduced power use, and abilities got reduced somewhat in the streamlining.

    • webghost0101@sopuli.xyz
      link
      fedilink
      arrow-up
      10
      ·
      1 day ago

      Dont knows for these two but the enterprise version of copilot for office workers is so damn awefull its embarrassing.

      It literally suggests to do stuff that it is incapable of doing.

      I tried to get some doc as a flowchart using mermaid script, i know for a fact other llms have no problems with that:

      After 3 attempts of it trying to code but resulting in an actual error it gives me,

      Do you want me to provide this flowchart in visio format instead.

      yes, if you can do that, it would be useful.

      Generates a powerpoint about the topic.

      that is a powerpoint, not a flowchart.

      Tries to generate an image of a flowchart with not a single word spelled correctly and arrows going nowhere.

      i didn’t ask to generate an image i need a flowchart

      Sorry, if you want i can provide a flowchart in viso file format instead.

      sure, give it another go

      Generates a brand new bad PowerPoint.

      I copy pasted the entire conversation to claude and it instantly gave me what i asked.

    • samus12345@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      4
      ·
      22 hours ago

      And not even the right numbers! Months 9, 10, 11, 12 = “7,” “8,” “9,” “10.”

      Days of the week = celestial body, celestial body, god, god, god, god, celestial body