Copilot purposely stops working on code that contains hardcoded banned words from Github, such as gender or sex. And if you prefix transactional data as trans_ Copilot will refuse to help you. 😑

  • wsheldon@lemm.ee
    link
    fedilink
    English
    arrow-up
    81
    ·
    3 days ago

    I’m still experiencing this as of Friday.

    I work in school technology and copilot nopety-nopes anytime the code has to do with gender or ethnicity.

    • chaosCruiser
      link
      fedilink
      English
      arrow-up
      22
      ·
      edit-2
      3 days ago

      Really? Maybe my variable names and column headers were sufficiently obscure and technical that I didn’t run into these issues about a month ago. Didn’t have any problems like that when analyzing census data in R and made Copilot generate most of the code.

      Is this one of those US exclusive things?

      I definitely did refer to various categories such as transgender or homosexual in the code, and copilot was ok with all of them. Or maybe that’s the code I finally ended up with after modifying it. I should run some more tests to see if it really is allergic to queer code.

      Edit: Made some more code that visualizes the queer data in greater detail. Had no issues of any kind. This time, the inputs to Copilot and the code itself had many references to “sensitive subjects” like sex, gender and orientation. I even went a bit further by using exact words for each minority.

      • wsheldon@lemm.ee
        link
        fedilink
        English
        arrow-up
        16
        ·
        edit-2
        3 days ago

        Specifically, it will not write the word “Gender” where it will write “HomePhone”.

        Maybe there’s some setting that’s causing us to get different results?

        Edit: saw your note about U.S. exclusive and that could definitely be it.

      • RedstoneValley@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        21
        arrow-down
        1
        ·
        3 days ago

        Why would anyone rename a perfectly valid variable name to some garbage term just to please our Microsoft Newspeak overlords? That would make the code less readable and more error prone. Also everything with human data has a field for sex or gender somewhere, driver’s licenses, medical applications, biological studies and all kinds of other forms use those terms.

        But nobody really needs to use copilot to code, so maybe just get rid of it or use an alternative.

        • dirthawker0@lemmy.world
          link
          fedilink
          English
          arrow-up
          4
          ·
          3 days ago

          There’s 2 ways to go on it. Either not track the data, which is what they want you to do, and protest until they let you use the proper field names, or say fuck their rules, track the data anyway, and you can produce the reports you want. And you can still protest, and when you get the field names back it’s just a replace all tablename.gender with tablename.jander. Different strokes different folks