GitHub Copilot Labs Add Photoshop-Style 'Brushes' for ML-Powered Code Modifying (githubnext.com) 56
Researchers at GitHub Next asked that question this week — and then supplied the answer. "We added a toolbox of brushes to our Copilot Labs Visual Studio Code extension that can modify your code.... Just select a few lines, choose your brush, and see your code update."
The tool's web page includes interactive before-and-after examples demonstrating:
- Add Types brush
- Fix Bugs brush
- Add Debugging Statements brush
- Make More Readable brush
And last month Microsoft's principle program manager for browser tools shared an animated GIF showing all the brushes in action.
"In the future, we're interested in adding more useful brushes, as well as letting developers store their own custom brushes," adds this week's announcement. "As we explore enhancing developers' workflows with Machine Learning, we're focused on how to empower developers, instead of automating them. This was one of many explorations we have in the works along those lines."
It's ultimately grafting an incredibly easy interface onto "ML-powered code modification", writes Visual Studio Magazine, noting that "The bug-fixing brush, for example can fix a simple typo, changing a variable name from the incorrect 'low' to the correct 'lo'....
"All of the above brushes and a few others have been added to the Copilot Labs brushes toolbox, which is available for anyone with a GitHub Copilot license, costing $10 per month or $100 per year.... At the time of this writing, the extension has been installed 131,369 times, earning a perfect 5.0 rating from six reviewers."
Does anyone here have experience with it??? (Score:3)
I saw this a few days ago, chuckled a bit, and moved on with my day.
But, honestly, I'm curious. Has anyone here tried it out yet?
Do you like the experience, or hate it, and why?
Re: (Score:1)
Laughing is absolutely the right reaction. This is silly nonsense. Heaven help anyone who thinks this, or anything like it, is a serious tool.
Re: (Score:2)
Re: (Score:2)
Chaos Monkey
Interesting way to spell Jr Dev
Re: Does anyone here have experience with it??? (Score:1)
If you are a dev for a project you just do that. Browser extensions? You may be up to date with the browser changes but someone else does that and you assume the platform is handled somewhere..... Which is why I think ml and ai chat is handled wrong. Its by design presentation/application layer data types pushed to the end user. At that point nobody can really complain about what interfaces get around between userlands....
Re: (Score:2)
Yup. I want a compiler to notify me about a (possible) problem with my code so I can sort it out, not a Chaos Monkey to randomly change it to whatever some GNN has told it would look good.
Chaos Monkey? Did you mean Code Monkey [youtube.com]?
Re: (Score:2)
Re: (Score:2)
I can see trying this on code as long as you do a diff on the results to see if it really caught a bug, or just wanted to reformat the code to the brush-creator's preferred style. The comment adding feature might be nice, but plenty of "beautify" scripts can do the same thing. Adding more robust error handling was neat for those that don't do that as a matter of course.
I guess it is about as useful as having a co-worker review your code and offer comments.
Re: Does anyone here have experience with it??? (Score:1)
Yes, or having the textbook open to the chapter and section you need. It will effect coding styles for sure as the wtf alone moments that become eurika cool spots will be in new (predictable?) directions. They don't hire most for having an opinion anyway.....
Re: (Score:2)
I installed it on VS code today and I'm impressed with the brushes feature. You can highlight a section of code and 'make robust', sure enough it does add some useful hardening. The 'clean' function will refactor things nicely. I recommend people give it a shot.
I'm not a programmer, I'm an ARTISTE ! (Score:4, Funny)
I need to head off on an art-donor-funded retreat in Vermont, to reconnect with my muse with other gentle, like-minded C++ developers.
Re: (Score:2)
Programming is a skill. It's an art, not engineering. Maybe you do need a Vermont retreat...
What about (Score:3, Insightful)
'Removing open source code' brush?
Re: (Score:2, Interesting)
How about the "properly attribute this source code" brush? Because unlike stable diffusion or midjourney or what have you, copilot actually reproduces recognizable elements of copyrighted works used to produce the model.
Re: (Score:2)
I've explained this one before. The only way this can happen is if a particular bit of code is included in the training data many, many, times. Like a ridiculous number of times. This is why you find common license text pretty often, but very little code that could be considered a copyright violation. The only example I've seen, aside from license text, was the 'fast inverse square root' trick from Quake.
That is a problem with the training data and can be fixed.
Don't get me wrong, I'm not defending this
Re: (Score:2)
I get why it does what it does (in broad strokes anyway) but when it's producing byte for byte what went into it, then it might meet the requirement for a recognizable element. That's not what happens with the images because they can be surprisingly different and still be very similar.
Re: (Score:2)
It should be possible to avoid the copyright problem by putting some extra effort into the training data.
Text generation and image generation are very different, but you can still run into 'similar' problems. For example, even the smaller text-to-image things will give you a Mona Lisa good enough to make a copyright claim. The reason this happens is the same reason you get FISR in text-to-code generators: the source was was included in the training data an unreasonable number of times. You won't find too
interesting (Score:3)
There's quite some hubris in many of the comments posted.
Should we really assume so quickly that a well-trained AI is worse than a few junior devs? Given the code I've seen over the years (my job is in security, so I look from a bugs-and-exploits perspective, and sometimes readability/comprehensibility - but not from, say, performance) ... how to phrase that diplomatically? I would say that a lot of human-written code definitely has room for improvement. Sometimes quite a lot. Sometimes essentially the entire room.
An AI (again, assuming it's well-trained) should be able to at least avoid the most common issues, and possibly be much better at writing code that follows a given guideline.
I would still want a senior dev to do a code review. But he should do that on junior dev written code as well, so not much of a difference.
I DEFINITELY think that within the next 1-2 years most of the code that students write for exams and exercises at university will be AI generated...
Re: (Score:1)
Should we really assume so quickly that a well-trained AI is worse than a few junior devs?
Should you really assume that an AI owned by Microsoft is well-trained? History tells another story.
Re: (Score:2)
Should we really assume so quickly that a well-trained AI is worse than a few junior devs?
If it's not, they need to be trained and the fastest way to train them is to force them to write their own code and tests.
I would still want a senior dev to do a code review.
Code review should be seen as an extra layer of bug avoidance, not as the primary defense against bugs. Because it won't work for that. A code review that verifies there are no bugs takes just as long as writing it in the first place.
Re: (Score:2)
If it's not, they need to be trained and the fastest way to train them is to force them to write their own code and tests.
That's actually an interesting idea there. Let humans write the tests and let the AI write code that satisfies the tests. If your tests are well-written, that should work, right? Provided TDD is on the right track...
Re: (Score:2)
Then you know how subtly wrong code can be, and AI-generated code will have much, much more of that, but less conscious thought associated with it. The AI will be trained on existing code bases that are full of bugs and are mostly written by those junior devs, so their underperformance will get set in stone.
That's why I keep writing "well-trained AI". Because yes, I'm afraid in the first few iterations we'll do exactly that.
That means that the apparently already under-trained junior devs will stop learning and we'll be out senior devs in a generation.
That's a good point. We have seen this in other fields: Once things are automated, the number of people who actually know how to do it drops. There are always some around (someone needs to build and check the machines) but instead of having someone who knows X in every village you now have a few dozen in the whole country.
It's been said that the most time that goes in any project is in figuring out what to do. An AI can't really do that for you.
Honestly, I find myself very often facing a problem where I'm sure so
Re: (Score:1)
Should we really assume so quickly that a well-trained AI is worse than a few junior devs?
Yes.
The point of decent junior devs isn't that they produce good code, but that they can, when competently led, gradually learn to produce good code. The only thing this NN can produce is code snippets that superficially look like they might do what you want. IMO that is worse than nothing, because
Re: (Score:2)
Writing code that actually solves your problem requires understanding the problem and the context. Neural networks don't merely lack this capability today, they probably aren't even going the right way.
I find myself writing "boring" code quite often. The core problem is interesting, but once you've got it, there's also code all around it. AI can be useful to do that. I'm fairly sure this'll eventually be part of IDEs and you get a code generator that you can tell what to generate.
It won't solve the core problem, but why not use it to, say, generate the code for commandline parameters, with error catching in somewhat usefull user messages?
Re: (Score:2)
I actually think this can be a good tool. Something like:
"I got the logic correct, please add the exception trapping" seems perfectly fine for copilot. Or things like "add the doxygen documentation for the function and pre-populate it."
Re: (Score:1)
Should we really assume so quickly that a well-trained AI is worse than a few junior devs?
Yes.
How do you think programs like this work? There is no analysis happening here. This is, truly, code generated on the basis of similarity. It's not that dissimilar from predictive text on your phone, as it happens. It's nothing short of a miracle this ever generates functional code. That's certainly a testament to the power of large amounts of data, but you can't trust any of it for a second.
An AI (again, assuming it's well-trained) should be able to at least avoid the most common issues, and possibly be much better at writing code that follows a given guideline.
No.
Again, there is no understanding here. No analysis. You seem to think an AI is something like a robot per
Re: (Score:3)
Again, there is no understanding here. No analysis. You seem to think an AI is something like a robot person. That is simply not the case. When I compared this to predictive text on your phone, that wasn't hyperbole. That's really how it works. The biggest difference is that it uses a RNN with an obscene number of parameters.
I can tell a junior to follow a style guide or use a particular set of templates. That is well-beyond the capabilities of an AI like this.
I'm somewhat aware of how AI works, there's a paper or two on AI with my name on it out there.
And no, this is not beyond current AI. We can already tell AI to follow certain styles, the most obvious example being Stable Diffusion. I can TODAY tell ChatGPT to write a poem with a specific rhyme scheme. I can also tell it to write "hello" world in a variety of bracket styles, for example. It understands those things.
Students copy/pasting the assignment text should get the exact same output. That tends to get noticed immediately
Oh come on. You so old you don't remember? We were lazy as well, but also inventive enough to n
Re: (Score:2)
this is not beyond current AI.
You can disagree if you like, but you're absolutely wrong here. I've called these text-to-image and text-to-code toys "parlor tricks" for a reason. They're doing a lot less than you think.
It understands those things.
No, no it doesn't. That's beyond absurd and reveals a deep ignorance about the technology. Oh, I skimmed over the paper with your name on it. Are you really going to claim expertise on that basis?
You so old you don't remember?
If you were to type to cheat on your schoolwork, that does explain quite a bit. Just don't assume that the rest of us were
Re: (Score:2)
You can disagree if you like, but you're absolutely wrong here. I've called these text-to-image and text-to-code toys "parlor tricks" for a reason. They're doing a lot less than you think.
And also a lot more than what was thought possible a decade ago. We've been seing rapid progress. "AI" might be a loaded term, there's no self-awareness or any other components of true artificial intelligence there, and speaking as someone who wrote a chatbot in the early 90s there's a lot that isn't that much advanced - but there also is a lot that is.
No, no it doesn't. That's beyond absurd and reveals a deep ignorance about the technology. Oh, I skimmed over the paper with your name on it. Are you really going to claim expertise on that basis?
We're on /. here, so take "understand" as a simplified term of a complex whole. The point was that if I have a code-generating AI then yes, I absolutely can
Re: (Score:2)
yes, I absolutely can train that AI to follow a certain style guide.
Making a much weaker claim, I see. (I'm giving you a lot of leeway here as this isn't your field.) Did you think I would forget that you were claiming that toy code generators could replace junior developers? Let's review:
Should we really assume so quickly that a well-trained AI is worse than a few junior devs? [...] An AI (again, assuming it's well-trained) should be able to at least avoid the most common issues, and possibly be much better at writing code that follows a given guideline.
I can tell a junior to follow a style guide or use a particular set of templates. That is well-beyond the capabilities of an AI like this.
this is not beyond current AI.
Now that you've actually looked into your silly nonsense, you probably now know that your earlier claims are laughably absurd. Do you still want to pretend that you were making a significantly weaker claim? The truth is displayed above, for all to see. Show some character. Admit your m
Re: (Score:2)
Making a much weaker claim, I see.
Trying to win a dialog with silly games I see. I was answering to a specific point, as the part you quoted clearly shows.
I suppose you can at least accept, now, that silly toy code generators are not going to replace junior developers.
Replacing devs was not my claim. You're mixing it with something that you read elsewhere. At least look what you claim. I asked if we should assume so quickly that AI is worse then junior devs. That's not the same thing.
I've given junior developers tasks that - and I've actually tried - chatGPT can solve to a surprising degree. Not perfect, but again I would expect that I need to fix a ju
Re: (Score:1)
How, sad, Tom. This is a rhetorical game. This is me calling you out on the fact that you haven't thought through your bullshit. The only one distracting things here is you. It's pathetic.
Replacing devs was not my claim.
Lies. This is what you wrote:
Should we really assume so quickly that a well-trained AI is worse than a few junior devs?[...] I would still want a senior dev to do a code review. But he should do that on junior dev written code as well, so not much of a difference.
You make the same idiotic claim again:
I've given junior developers tasks that - and I've actually tried - chatGPT can solve to a surprising degree. Not perfect, but again I would expect that I need to fix a junior dev's code as well. And it can handle stuff like "that's nice but, please change ..."
Sorry, Tom. Between your incredible dishonesty and shocking ignorance, I'm done with this non-conversation. You're obviously not interested in reality, only spreading your own bullshit.
Clearly a runaway success - I'm sold! (Score:2)
installed 131,369 times, earning a perfect 5.0 rating from six reviewers.
I'm more interested in the opinion of the other 131.363 users.
Because if it was any good at all, a lot more people would have reviewed it. In fact, if it was mediocre of bad, more people would have reviewed it also.
What's really concerning is that it might be so shit that people try it and simply forget it immediately because it's just not worth a minute of their time. Either that or bad reviews are filtered out by Microsoft, which wouldn't surprise me one bit.
Not to mention, only 5 star ratings screams fak
Nothing new here (Score:2)
Re: (Score:2)
Malpractice (Score:3)
The opposing attorney is going to paint you as a lazy incompetent fool who takes the easy way out and has no professional standards. Are you going to say that it's OK because you trusted Microsoft? Good luck with that. You can be sure that when you downloaded the software you agreed to terms and conditions that completely absolved Microsoft from any responsibility. If a person from Microsoft is asked to testify they will blame you as well and say you misused their system.
As I said, good luck with that.
Re: (Score:1)
You can easily see what code was modified and decide if you like it. And in your example, it would surely have needed to pass the test suite which is how you knew it was correct.
Re: (Score:2)
Re: (Score:1)
These days it is getting to the point where you can tell the AI code generator to write a test suite for that software, and perpetually be on the lookout for bugs in any code you write. I experimented with the Copilot Lab 'brushes' yesterday on some existing code and it was really pretty amazing.
The horror, the horror! (Score:2)
You can't use a Mac for REAL typesetting (Score:2)
Sure, this laser-printed stuff looks kind of OK, but think about kerning. Think about the huge library of custom fonts we have on our photo-typesetter disks. Think about the low quality of laser-printed output compared to our 1800dpi typesetter paper. It's just not viable.
Developers: history doesn't repeat, but it rhymes
Re: (Score:2)
Re: You can't use a Mac for REAL typesetting (Score:2)
You're not getting the point.
The first paragraph was what I heard from graphic arts pros in the early 90s.
A train is coming. A lot of the above developers are standing on the tracks, pointing at it and complaining that "that's NOT how you make a train", as it approaches.
History doesn't repeat. It rhymes. AI code generation rhymes with desktop publishing. And with transitioning from print to web.
Re: (Score:2)
Re: You can't use a Mac for REAL typesetting (Score:2)
There's also the story of all the people who said "This won't be good enough. It can't be.", instead of learning and adapting, or preparing for new careers doing something else.
Re: (Score:2)
LOL Painting as a metaphor for coding (Score:3)
Re: (Score:1)
Re: (Score:2)
Re: (Score:2)
Yeah I look at somebody's code I have to maintain and it's structure reminds me of M.C. Escher's "Relativity" or Salvador Dalí's "The Persistence of Memory".
I like to think of myself as a modern day Jackson Pollock.
It's just a linter (Score:2)
Tools that help you format code, enforce typing, and even find and suggest fixes for bugs have been around forever. And t hey can be useful, they're fine.
Just now it says ML and pretends it's Photoshop. This was inevitable once Microsoft bought Github, the giant needs to do a bunch of nonsense no one wants to remind you about its other nonsense. We see you Visual Studio, you are relevant.
Basically, vim users are still more productive than Visual Studio users, and I would argue, better human beings.
Fight me.
Seems redundant (Score:2)
One brush is missing... (Score:2)
What about a code version of the "milk" brush [artstation.com]?