Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Microsoft Programming

Microsoft and OpenAI Have a New AI Tool That Will Give Coding Suggestions To Software Developers (cnbc.com) 39

Microsoft on Tuesday announced an artificial intelligence system that can recommend code for software developers to use as they write code. From a report: Microsoft is looking to simplify the process of programming, the area where the company got its start in 1975. That could keep programmers who already use the company's tools satisfied and also attract new ones. The system, called GitHub Copilot, draws on source code uploaded to code-sharing service GitHub, which Microsoft acquired in 2018, as well as other websites. Microsoft and GitHub developed it with help from OpenAI, an AI research start-up that Microsoft backed in 2019.

Researchers at Microsoft and other institutions have been trying to teach computers to write code for decades. The concept has yet to go mainstream, at times because programs to write programs have not been versatile enough. The GitHub Copilot effort is a notable attempt in the field, relying as it does on a large volume of code in many programming languages and vast Azure cloud computing power. Nat Friedman, CEO of GitHub, describes GitHub Copilot as a virtual version of what software creators call a pair programmer -- that's when two developers work side by side collaboratively on the same project. The tool looks at existing code and comments in the current file and the location of the cursor, and it offers up one or more lines to add. As programmers accept or reject suggestions, the model learns and becomes more sophisticated over time. The new software makes coding faster, Friedman said in an interview last week. Hundreds of developers at GitHub have been using the Copilot feature all day while coding, and the majority of them are accepting suggestions and not turning the feature off, Friedman said.

This discussion has been archived. No new comments can be posted.

Microsoft and OpenAI Have a New AI Tool That Will Give Coding Suggestions To Software Developers

Comments Filter:
  • ...I first understood that the AI system gives the programmer the suggestion [wikipedia.org] that he is coding, while actually he does nothing.
    • "AI system gives the programmer the suggestion [wikipedia.org] that he is coding" For most people that is as far as they get.
      • by gweihir ( 88907 )

        True. That is why most people cannot write production-grade code if their life depends on it.

  • by AlanObject ( 3603453 ) on Tuesday June 29, 2021 @10:38AM (#61533708)

    Since that paper clip thing worked out so well. Do they ever learn?

    When writing code in Typescript I get from the IDE very good auto-complete suggestions from hundreds if not thousands of possibilities all the time. But it cannot make decisions about what should be in the states of my objects and what does not belong there, how to aggregate APIs, which API to use and which not to, which libraries should be imported, and dozens of other structural issues related to security, efficiency, maintainability, or just plain readability by another coder.

    It does, however, reach into my strings and when I have a static URL with "http://*" in it then I get complaints about it not being "secure." Yeah, thanks pal.

    Sorry, but for just about every one of the last 40 years I have read about the next miracle thingy where we don't have to have trained software engineers before. I have no greater expectation of this.

    • by Aristos Mazer ( 181252 ) on Tuesday June 29, 2021 @11:06AM (#61533802)

      I have greater expectation because a) the trainability of AI assistants has jumped by leaps and bounds in many other fields in the last three years b) the corpus of training data is finally large enough to provide a reasonable training basis. Those two things are game changers. Are they enough? We'll have to play with it and see.

  • Hahahahaha (Score:4, Insightful)

    by nagora ( 177841 ) on Tuesday June 29, 2021 @10:41AM (#61533722)

    I'm going to take coding tips from a Microsoft AI tool? I don't fucking think so.

    • Yeah, that + the incessant nagging, Microsoft style. I need to get things done and my time has no open windows for training their 'AI' models.

      • I totally love the pop up suggestions that obscure the preceding 5 lines of code.
        • My favorite is a site that provides buttons like bold and highlight, that you apply to text you select. Unfortunately, when you select text, a lil' tooltip-like popup appears with cut copy paste on it, hovering right over the bold & friends buttons.

          You have to play idiotic games with rotation and superzoom to squeak out half a button to carefully click -- shit! I clicked cut. Now to hit undoo god dammit it's a phone interface.

          Stupid phone programmers, idiots all, making the same mistakes yoir grandpa

  • by UnknowingFool ( 672806 ) on Tuesday June 29, 2021 @10:41AM (#61533726)

    Me: "Let's start a new coding project."
    Clippy: "I see you want to start a new coding project. Should I start your code with: 'Dear aunt, let's set so double the killer delete select all'?"
    Me *drops to one knee and looks to the sky*: "CLIPPY!!!"

    • From the news:

      but this technical preview works especially well for Python, JavaScript, TypeScript, Ruby and Go.

      ...no Perl?

      meh. My cat walking on a keyboard is more useful to me than that.

      "Cat-on-keyboards(tm) the original autocomplete for Perl hackers"

      • I thought cats walking on keyboards was how people wrote Perl.

        • I thought cats walking on keyboards was how people wrote Perl.

          Shhhh! Don't tell my employers! Or they'll realize that they can cut the middle men and pay salaries in canned food and cat biscuits.

      • In 2019, tabnine supported Python, JavaScript, Java, C++, C, PHP, Go, C#, Ruby, Objective-C, Rust, Swift, TypeScript, Haskell, OCaml, Scala, Kotlin, Perl, SQL, HTML, CSS, and Bash. Maybe they'll catch up?

    • So I started typing...
      print("W

      and got
      print("What are you doing, Dave? This is highly irregular"); os.run("rm -rf /home/dave")

  • by gillbates ( 106458 ) on Tuesday June 29, 2021 @10:48AM (#61533748) Homepage Journal

    You know what would be really useful? If the compiler could figure out which #includes I need from the references, rather than complaining about undefined identifiers.

    Yes, there may be times when I need to explicitly #include a particular version of a header, but it would be nice if the compiler could automatically deduce such a thing. Computer science has known how to build a dependency graph since the 70's at least, but we still don't have the lexical scanning of (potentially) dependent files in the compiler itself. It even knows how to find which libraries I need, but heaven forbid it should understand header dependencies.

    • Seems a top-down approach with continuous refinement would be easier to apply AI to. Coding right now seems to resemble banging on the keyboard hoping Shakespeare will come out.

      • Coding right now seems to resemble banging on the keyboard hoping Shakespeare will come out.

        I have always wondered who was inside the keyboard!

      • > Coding right now seems to resemble banging on the keyboard hoping Shakespeare will come out.

        You need more monkeys for that.

    • > You know what would be really useful? If the compiler could figure out which #includes I need from the references, rather than complaining about undefined identifiers.

      This is exactly the kind of problem AI would be good at. There may be multiple matches, which is why modern IDEs with machine-learning-powered typeahead suggestions can do exactly this as you write the code and do highlighting of well problems before they get complied. For example, in the out-of-box typeahead with Typescript in VSCode, it

    • by Anonymous Coward
      Java and C# IDEs have done the equivalent as long as I've been using them (if there's multiple options for a name, they just present a list and make you choose). I'm surprised C/C++ IDEs don't do the same. It's certainly harder in those languages, but not that much harder.
  • ... just a nag popup that tries to get you to switch to Visual Studio stuff every time it sees you using emacs or vim.

    • As someone who recently switched from vim to vs code for most programming tasks, I'm laughing, but its actually pretty good. Mostly because it has a great plugin architecture.

  • by Viol8 ( 599362 ) on Tuesday June 29, 2021 @10:51AM (#61533760) Homepage

    ... and what functionality its supposed to have how the fuck is going to be any use other than a fancy autocomplete? This is just more AI marketing BS no doubt to onboard more suckers to Azure.

  • by fleeped ( 1945926 ) on Tuesday June 29, 2021 @10:53AM (#61533770)
    ... and machine learning is based on consensus and probabilities, this will go down very well, sure. Figuring out what code to use is not the same as "is this a dog or not".
  • The return of Clippy as the Programmer.
    • by Tablizer ( 95088 )

      Clippy: "It looks like you are trying to write to a file. Here, let me subscribe you up to Azure One Drive instead. I already know your credit card number from telemetry. Have a nice day!"

  • ...written by taking all the suggestions. BTW, here it is on github [github.com]
  • by joshuark ( 6549270 ) on Tuesday June 29, 2021 @11:15AM (#61533830)

    Return of clippy. But to use an analogy, this is the grammarly or auto-correct (auto-cowreck) for programmers. But does having auto-correct and grammarly make you a writer? So this AI is making a bad programmer better?

    Simplify programming, well simplify writing...with auto-correct, the now lamentably absent Clippy (sarcasm) and now AI. Wow.

    Simplify programming, that was what Visual Basic did for approximately 30-years before it vanished from the Microsoft portfolio. Or maybe Microsoft will embrace functional programming, or intentional programming, etc. etc.

    But in both areas of writing text, one for prose, the other for code, time, practice, learning, and adapting are the way to improve. Either that, or using genetic programming to evolve code for a method, algorithm, or function.

    JoshK.

  • ...are belong to us.

  • If Copilot can predict what I want to do in the next line of code, then I must be writing something that's already been written. I'd rather have it suggest a library or package instead.
    • There's never some language or framework so great once and for all for ever and ever you don't need to rewrite everything every few years as the next thing comes along.

    • by Pimpy ( 143938 )

      There are times that would be useful, too. I often write general helpers or utility functions when working in one particular project, only to realize later that I actually already did this in another one that I forgot about, and that it would have been better to abstract this out into a separate package and use it in both projects. Having an assistant that can learn from my different code bases and that could alert me to these sorts of things wouldn't be entirely useless.

  • Am I mistaken, or don't these posts usually come with a link to a relevant article? I would have expected the "From a report:" text to be a hyperlink. Should I just do a web search?
  • by codeButcher ( 223668 ) on Tuesday June 29, 2021 @03:11PM (#61534752)

    I have written something similar, and at this stage it is fairly simple, but covers the majority of problems, even if written in BASIC. In fact, it is so simple that I will paste the code below:

    10 PRINT "Don't do daft things dammit"

    I hereby put this software in the public domain with the hope that even this Microsoft project will benefit from it.

  • Having used it, I can't imagine why anybody would use visual studio.
    • Visual Studio Code with the TabNine auto-completion plugin is pretty awesome tbh, I haven't tried Rider yet though.

  • Get too many suggestions? That means your code sucks and you will be fired.

As you will see, I told them, in no uncertain terms, to see Figure one. -- Dave "First Strike" Pare

Working...