Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Programming AI Google

Google Unveils Code Completion Powered by Machine Learning in Dart SDK (zdnet.com) 20

Google's previewing something new in the SDK for their Dart programming language: machine learning-powered automatic code completion.

ZDNet reports: ML Complete works with the editor to offer developers completions as they type their code. It's also meant to help developers quickly explore lists of completions that are likely to be what they want next, rather than having to sort through options alphabetically. "With code completions, developers can both avoid misspellings and explore APIs by typing the beginning of expected symbols and choosing from the offered completions," explains Google project manager Michael Thomsen in his article, 'Announcing Dart 2.5: Supercharged development'.

Google's take on AI-powered code completion for Dart relies on a model trained on a large body of Dart code on GitHub. The model is powered by Google's TensorFlow Lite deep-learning framework and can predict what developers will type next as they're editing code.

ML Complete is built into the Dart analyzer, meaning the preview is available in "Dart-enabled editors" including Android Studio, IntelliJ, and VS Code.
This discussion has been archived. No new comments can be posted.

Google Unveils Code Completion Powered by Machine Learning in Dart SDK

Comments Filter:
  • Comment removed based on user account deletion
    • Is the model available offline, or do we have to start sending all of our code to Google? Lol. It's a trap! Google: code and data, nom nom nom. (Makes cookie monster sounds.)
    • Re: (Score:2, Insightful)

      by Anonymous Coward

      Sounds like a Full Stack Developer problem.

      People who only know Javascript thinking that somehow that qualifies them to know their ass from a hole in the ground. I headdesk every time I see someone saying ,"well, it might this or it might be that, just put a null check around it or catch the exception and ignore it."

      • by Anonymous Coward

        Or, even better, if you propose a change and the answer is, "no, we don't know what that might affect."

        WELL WHY THE FUCK NOT?! That's cause you coded like assholes, you fucking cunts.</rant> Stop writing shit you haven't reasoned about.

        Clarity of thought is the root of correctness.

      • by Anonymous Coward

        catch the exception and ignore it

        My boss thinks that this is the definition of the word "robust".

    • I am a little concerned that we're writing more and more code that we may not understand. It started with copying and pasting from tutorials and stack overflow.

      Hello /. reader, if you feel the above snippet applies to you, if you don't understand what you're copy-pasting [wikipedia.org] from Stackoverflow [xkcd.com] (the alt-text for that comic) and you're supposed to be a developer, I would suggest strongly that you resign from your job and go jump of a bridge.

      Or at least think a bit about your career choice.

      Or at least next time try to research a tiny bit why that answer was suggested, and why it works.

      Or you know, you could try to find a family "doctor" who randomly tries anything he's r

  • The usual you'll get what we think you want, instead of what I fucking asked for.

  • After about 50 years, we still build applications as if we were building a car by hand.

    Common functions and features of your average application have been coded 10s of thousands of times, yet it is still practically done by hand.

    Googleâ(TM)s tool is about as revolutionary as the guy building the car having a helper hand him tools.

    • All code you could ever want has been written in the comments and replys on stack overflow.

      What would be even better than code completetion is code-initiation: how should I do X.
      They could train it on stack overflow replys.

      Google, how do I put my tongue in my cheek?

      • I'll look to StackOverflow as a quick indication of the ways people have dealt with a problem in the past. It's one form of reading the literature in our field. 9 times out of 10 when it comes to something like that, I learn one little tidbit or another, but it's rarely a direct solution to my problem (or I wouldn't be searching online after almost 3 decades of doing this). I might use that information as a jumping off point into more detailed research.

        Typically, I wind up writing something more closely sui

        • I should clarify, by "searching online", I mean sorting through these sorts of Q&A sites, forums, etc.. I'm not referring to searching for a particular specification or downloading the source code of something directly--which are more often where I turn.

    • by serviscope_minor ( 664417 ) on Saturday September 14, 2019 @11:35AM (#59193944) Journal

      After about 50 years, we still build applications as if we were building a car by hand.

      In some cases, sure, but there are a lot of small run/one off commercial vehicles that are built by hand or nearly so. I visited a backhoe production line once, and there was tons of hand fitting. For low volumes it's just not worth automating it.

      But we build plenty of applications automatically. I have a blog with a few features. I built it by going to wordpress.com and clicking a few buttons and it's lightly customised for my use, for example. I don't build a wordprocessor, I just use one of the available options off the shelf, just like the last time I rented (or bought) a car, it was a standard off the shelf model that many people have used before.

      The reason we still code is because as soon as it gets automated enough we don't call it coding. It's like saying "why do we still build anything when we could just buy something ready made?". Meanwhile we buy cars but there are thousands of engineering companies and job shops worldwide doing short runs or one-offs, some for automotive use. They make use of hand tools, power tools and machine tools, sometime both at once (like the old favourite of using a hand file on a lathe to break the edges).

      I've also had some things factory made. The circuit boards are semi hand made. There are a bunch of by-hand steps in order to make a large batch of boards. Assembly was done by a fully atuomatic pick and place machine which even feeds it into the reflow oven and collates the assembled boards that come out the back. I put enough panels through that it was worth setting up the biggest pick and place machine they had (smaller ones run slower and don't do some of the automatic steps but are much easier to set up).
      Depaneling was done by hand. Case assembly (including a few gluing steps) was also done by hand.

      Actually come to think of it, there is plenty of hand assembly and fitting that goes into car building.

    • by iggymanz ( 596061 ) on Saturday September 14, 2019 @12:30PM (#59194072)

      eh, the common stuff has been made into libraries. the experienced programmer uses the (hopefully rich, mature and debugged) library functions

    • by vux984 ( 928602 ) on Saturday September 14, 2019 @01:10PM (#59194172)

      "After about 50 years, we still build applications as if we were building a car by hand."

      "After about 50 years, we still build applications as if we were building a car by hand."

      We still build buildings by hand after more than 5000 years. Automation only works if you want a lot of exactly the same thing.

      We build thousands of EXACTLY the same car, and thousands of variants of the same car that are PRECISELY defined up front -- e.g. customer wants the base model, with sunroof option, with leather package, with sport rims, etc.

      Applications are like buildings, they each have more unique needs. The car assembly analogy doesn't work. A better comparison would be construction of bridges or buildings, and even the vast majority of houses, where they are all different, and all built by hand.

      Applications assembled like cars may have a niche. Pre-fab housing has a niche too. But its pretty limited what you can do with it, and its not going to deliver what most people want.

      • by sycodon ( 149926 )

        So here's an example of what I'm whining about:

        How to create dynamic drop down list in JSP from database [codejava.net]

        Without the steps of creating the database and tables in MySQL, it is 216 lines of java and html code in eleven separate locations, all to create, populate and display a dynamic drop down list.

        Sure, different types of applications, and such, but this just illustrates how things are hand made instead of just a single line with some parameters.

        • by Anonymous Coward

          Okay, now compare that same thing to writing the end-result in machine code directly.

          Still happy? Point is, we don't do it by hand--and if you think that things like the html tag aren't automagically granting you a world of functionality, you're off your rocler.

      • We still build buildings by hand after more than 5000 years. Automation only works if you want a lot of exactly the same thing.

        That was before, this is now. We're now experimenting seriously with new types of building methods (that is, more machine-based) because computers are getting good enough to make them viable. A lot of construction may well wind up at least partially automated in the near future.

        We build thousands of EXACTLY the same car, and thousands of variants of the same car that are PRECISELY defined up front -- e.g. customer wants the base model, with sunroof option, with leather package, with sport rims, etc.

        Yes, but many automakers will let you make special orders that get down to fairly particular levels of detail, on at least some models. And honestly, we build a lot of houses which are meant to be exactly the same, but aren't because

      • Coding is more like creating blue-prints. Compiler is the equivalent of the framers, plumbers, electricians. cp is the assembly line that turns out thousands or millions of exactly the same application.
  • by QuietLagoon ( 813062 ) on Saturday September 14, 2019 @11:13AM (#59193882)
    Now we have bugs written automatically by the development environment.

It's a naive, domestic operating system without any breeding, but I think you'll be amused by its presumption.

Working...