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.
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:
"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.
which, in the case of software used for medical devices, or anything of similar real-world consequences, can kill people :stress:
Isn't a bunch of medical code written in .net?
.NET is a framework that provides language interoperability, rather than a programming language unto itself (if I understand)
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
There's also F# officially, and ironPython unofficially, as well as some others I think.
I have never used F#, but I probably should. I'm not a big fan of C#
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.
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.
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.
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.
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
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.
Even comments could end up being totally wrong really easily. Wording usually has to be pretty precise to not mislead.
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
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.