It's pretty wild to see tab complete go from just variables and quotes to writing entire comments and finishing functions. I like that it will learn from the project that you're currently in so it'll suggest comments and variable names that follow the standards you're using.

Edit: so my takeaway from this thread so far is that this implementation of machine learning for code completion is awful because it's trained on all the code on GitHub and will frequently create buggy results and literally steal public domain code and put it into private codebases without respecting licensing.

Having used it for a day I can say that there's some things it does that are really helpful, mainly the templating for docstrings and autocompletion of comments (e.g. # Find all minima in > {list variable} and return list of minima where everything after the > is autofilled) as well as auto filling function calls when variables you're going to pass as arguments are initialized (eg. sum_list = [1,2,3,4] total = sum( > sum_list) where > is the start of the autocorrect)

There also needs to be a limiting of the machine to only the code within the libraries in included in your codebase and the code you've written (which is already an aspect of it, where it caches something like 1kb of cute and will use it to autocomplete future cute in your project).

The creation of new code from comments is an anti-feature.

  • RussianEngineer [she/her]
    ·
    3 years ago

    copilot bad. it produces code thats vulnrable and ignores licensing of the code it pulls from https://visualstudiomagazine.com/articles/2021/08/26/github-copilot-security.aspx

    its just corporations trying to make their wheels spin faster at the expense of safety

  • teamcutiesweetie [none/use name]
    ·
    3 years ago

    don't let machines tell you what to do

    turn off swype

    ignoregoogle maps take long leisurely strolls and get lost

    return to monkey...

  • blobjim [he/him]
    ·
    edit-2
    3 years ago

    Sounds like an extremely dumb and awful idea that's designed to get programmers to pump out more lines of code to produce more business value at the expensive of software that works or is understandable. There have been demos of how stuff like that can just reproduce large blocks of code verbatim from public projects. And it basically ignores the license that code is using too. So anything copyleft can suddenly be incorporated into proprietary software without a thought. It can also reproduce bugged code. Like listen to their marketing for it:

    Skip the docs and stop searching for examples. GitHub Copilot helps you stay focused right in your editor.

    "stop doing due-diligence, just go with what's easy". It's so creepy sounding.

    It's scary because when stuff like this takes off it just sticks around and starts causing lots of little problems. Look at how many people Tesla "autopilot" stuff has already killed. And all of the problems caused by it will be explained away as "it's just a tool, so any problems are actually the fault of the user".

    And it'll probably just lead to more code duplication too because people can autocomplete stuff instead of factoring common functionality out.

    • invalidusernamelol [he/him]
      hexagon
      ·
      3 years ago

      Yeah, it's definitely not something that shouldn't be used at all for writing real code. If they had a way to tone it down to just doing comments that might actually make it useful.

      Comments and automatically filling out function calls are it's only actual value added features. The massive codeblocks are usually total garbage or full of bugs but look right and cause more problems than they're worth.

      • blobjim [he/him]
        ·
        3 years ago

        Even comments could end up being totally wrong really easily. Wording usually has to be pretty precise to not mislead.

        • invalidusernamelol [he/him]
          hexagon
          ·
          3 years ago

          Definitely agree, there's better options for generating templated docstrings out there. It's a fun toy to play around with, but it's definitely a solution looking for a problem right now

    • Thomas_Dankara [any,comrade/them]
      ·
      3 years ago

      . It can also reproduce bugged code.

      which, in the case of software used for medical devices, or anything of similar real-world consequences, can kill people :stress:

        • Thomas_Dankara [any,comrade/them]
          ·
          edit-2
          3 years ago

          .NET is a framework that provides language interoperability, rather than a programming language unto itself (if I understand)

          • invalidusernamelol [he/him]
            hexagon
            ·
            edit-2
            3 years ago

            It's C# and visual basic I think, but you can usually interact with apps programmed in it through an API. I know that a lot of AutoCAD's scripting libraries use .net passthroughs to bring in data from other Windows apps like Excel.

            Kinda weird writing in Lisp to interact with .NET code lol

            • NewAcctWhoDis [any]
              ·
              3 years ago

              There's also F# officially, and ironPython unofficially, as well as some others I think.

      • regul [any]
        ·
        3 years ago

        Y'all act like people just write code and don't test it. The FDA to their credit has pretty strict requirements around medical devices.

        • Thomas_Dankara [any,comrade/them]
          ·
          3 years ago

          when I was in college I took some courses that had some lessons in software ethics, and we were given several examples of cases where oversights in quality control and hunger for profits led to companies shipping code that actually caused people to die due to their failure. This was years ago so I can't recall the specific examples I was given, but it made a permanent impact in how I think about these things. In a capitalist economy, even when private corporations are regulated, they regularly violate regulations, because the consequences of doing so are less costly than forgoing profits. Social-democratic regulation of for-profit conglomerates is a failure precisely because private entities are willing to do a basic cost-benefit analysis and decide time and time again that working class human life is worth less than profit. Therefore it does not matter how strict the FDA's regulations are, people break them. I used to work for a company that had several government contracts saying they couldn't outsource to vendors in other countries, but they always did so anyway, and they always got away with it. When they were finally caught it was a slap on the wrist, and no media coverage.

          • regul [any]
            ·
            3 years ago

            Those standards exist because of Therac-25.

            This is like saying you don't trust paint companies because they used to use lead paint or that you won't go in a house because they used to use asbestos.

            You can have as much or as little faith in the US regulatory apparatus as you want, but at a certain point it's paranoia.

            • Thomas_Dankara [any,comrade/them]
              ·
              edit-2
              2 years ago

              You can have as much or as little faith in the US regulatory apparatus as you want, but at a certain point it’s paranoia.

              i'm sorry, what precisely are you saying amounts to paranoia? I didn't assert that anything was actually happening one way or another. I merely stated that bugged code can, in cases where regulation fails, kill people. Which is true. I presented no paranoid theory.

              You said that present day regulations exist because of Therac-25. This is true, but I'm not sure why you brought it up. I didn't bring up Therac-25. I said that i learned about several instances of software killing people from software ethics lectures I attended in college. One of those things may have been Therac-25, but Therac-25 happened in the 80s. There has been several instances of software killing people, despite regulations, since then.

              • a software-induced flight crash happened in 1993, when an error in the flight-control software for the Swedish JAS 39 Gripen fighter aircraft was behind a widely publicized crash in Sweden.
              • In 1994 in Scotland, a Chinook helicopter crashed and killed all 29 passengers. While initially the pilot was blamed for the crash, that decision was later overturned since there was evidence that a systems error had been the actual cause
              • In Sheffield, United Kingdom, a Y2K bug caused miscalculation of the mothers' age and sent incorrect risk assessments for Down syndrome to 154 pregnant women. As a direct result two abortions were carried out, and four babies with Down syndrome were also born to mothers who had been told they were in the low-risk group.

              I don't see how this amounts to paranoia. I am merely pointing out how capitalism, i.e., private ownership over the means of production, and profit-oriented production, leads to unnecessary deaths, and how capitalist legal systems incentivize the corporate disobedience of regulation, by punishing said disobedience with fines amounting to less than the profits produced from the crime itself. I wouldn't imagine anyone on here would disagree with this, let alone characterize it as paranoid.

              EDIT: looking at this a month later, it sucks that I wasted my effort on this since you promptly backed out of the conversation and had nothing else to say

    • KeepStalin [comrade/them]
      ·
      3 years ago

      Larger corps usually have thorough review processes for even non-critical systems. It's not like they'll just push the code as it is, lol. The copyleft part is a big issue, though. No corp will touch this tool until it's guaranteed that they won't get sued for using it. MSFT will need to address this is future iterations if they want widespread adoption.

  • Quimby [any, any]
    ·
    3 years ago

    on principle, there is no way hexbear should be letting Microsoft write our code.

  • regul [any]
    ·
    3 years ago

    It's cool. It's not perfect yet, but I really like how it learns off the code in your project and can make repeating boilerplate less tedious.

    All the alarmist takes in here are obnoxious.