Live data from Hacker News

GitHub Copilot available for JetBrains and Neovim

github.com

311–320 of 446 posts

Re: GitHub Copilot available for JetBrains and Neovim

#311

Earlier quoted context omitted.

Bit of a dodgy way to form query parameters though. Other than for a quick script.

Even for a quick script this worries me about copilot; if it suggests this, then more people use it and think this is right, commit it, and then copilot suggests this more - that’s a bad feedback loop. At least in StackOverflow you get someone commenting why it’s bad and showing how to use a dictionary instead

I think they only pick starred repos not truly in the wild code. That's not a guarantee of good code but still a decent check.

Re: GitHub Copilot available for JetBrains and Neovim

#312
post #170
post #76

Copilot is crazy. The other day, I was writing a Python function that would call a Wikipedia API. I pulled from the internet an example of a GET request, and pasted it as a comment in my code. # sample call: https://en.wikipedia.org/w/api.php?action=query&format=json&list=geosearch&gscoord=37.7891838%7C-122.4033522&gsradius=10000&gslimit=100 Then I defined a variable, base_url = "https://en.wikipedia.org/w/api.php?"…

For me APIs are actually one of the places it performs the worst. Copilot is like having an inexperienced yet annoyingly optimistic pair programmer. The code it generates appears conceivable in some hypothetical universe. No guarantee it's this one though. Remember it doesn't actually know an API or how it should be used: it's putting things together to look like typical code. For me that has meant difficult to spot…

I think my experience has been sort of between you two. Maybe 1/3 times it's spot on. The rest of the time, there is some minor tweak I need to make (it gets a parameter or variable name wrong). I've yet to hit cases where the code it generates looks right but doesn't run as expected, thankfully.

I've only had it for about a week now but overall I'm happy with it. None of the code I'm writing is crazy cutting-edge stuff and in aggregate I'm sure it saves me more time than takes, including the time I spend reviewing and potentially changing the generated code.

Re: GitHub Copilot available for JetBrains and Neovim

#313
post #289

Earlier quoted context omitted.

Did you try it? Because I've been using it for weeks and it makes me read these types of comments as "I don't understand the value of the internet" or "what's the purpose of owning a phone". It's night and day if you have it enabled or not. There's just no question about the value proposition once you start using it. I mean, you can tell comments here from people who have actually been using it, and people who have n…

> Because I've been using it for weeks and it makes me read these types of comments as "I don't understand the value of the internet" or "what's the purpose of owning a phone". And yet apart from making this very inaccurate comparison you haven't made any argument for why such a thing as Copilot would be useful to anyone. How do you personally find Copilot useful? And why do you think someone whose job demands more t…

> The onus is on you to convince the skeptics.

Is it?

Look, I don't care at all if you use copilot; you can use notepad to write your code if that floats your boat; do whatever you want.

What the parent post said is: Copilot is useful; it helps you write code with autocomplete suggestions.

If you think that you don't get productivity gains from an IDE or you're in the 'no IDE makes you more hardcore and better programmer so never program with an IDE' camp, we just have to agree to disagree.

So, I have no interest in that conversation.

...

However, there is a more interesting conversation here we can have:

Given that you have an IDE and use autocomplete:

1) Does Copilot give suggestions are meaningfully useful?

Yes. I honestly can't give you a better answer than that. Yes, it does, it's quite good.

If you don't believe me, try it.

2) Is it better than regular autocomplete?

Look, forget the 'Look, I typed 'process user form and display on UI' and it autocompleted a whole application for me!!' hype.

That's stupid and that's not how it works.

It's an autocomplete. It can autocomplete large chunks, but they're generally rubbish. ...but it does two very interesting things:

- It suggests things that are contextually correct.

For example: even though its rubbish at C++ syntax, it generates valid UPROPERTY and UFUNCTION blocks for unreal code. If I write a `for (y = 0;...` on an array, it generates the associated `for (x = 0;...` when I'm iterating over a 2D array.

If I have a function which takes a pointer like:

> UFvContainerWidget* UFvContainerWidget::ForEquipmentDef(UFvEquipmentDef* EquipmentDef, bool& IsValid)

I press enter and it pops up:

    if (!EquipmentDef) {
      IsValid = false; 
Sure, it's a similar pattern to other code in related files, but still. This surprised me. I've never encountered an autocomplete that does that before.

Sometimes the suggestions don't make sense, and the larger the chunk, the less sense they make.

...but the suggestions that do make sense, make you regret not having it when you don't have it.

Like... regular autocomplete.

It's just a tool; it works very well at small scale autocomplete tasks.

- It can suggest comments from code as well as code from comments.

Literally, I can go above a function and type "/*" and it'll suggest a comment.

These don't always make sense, but often they're pretty close, and it saves me 20 seconds typing.

You have to carefully read these comments, because they tend to get random crap in them, but once again, for short comments its not bad.

Again... it's surprisingly good. Not perfect. It doesn't write your comments for you... but, it's easy to get into the habit of getting it to autocomplete "Returns null if the object is invalid" for you instead of typing it out.

3) Should I use it?

Look, I literally do not care if you do or don't.

What I take issue with is people saying 'it has no value'.

Does autocomplete have a value? Then this has a value.

Saying it has no value is just trolling.

Is it worth the cost?

Well, it's free to use right now.... so, well, you can't beat free right? :)

Longer term, would I pay for it?

Probably (** Personal opinion only: Maybe... you should try it and decide for yourself?)

Re: GitHub Copilot available for JetBrains and Neovim

#314

Earlier quoted context omitted.

What if I - a human - read your code, learn from it, and then use that knowledge to write my own code? Am I stripping your license off and ignoring it? Clearly it's not as simple as you imagine.

It is. Machines are running algorithms, which, by definition, are not creative. Of course, people may argue that people are not creative, but considering that for a recent court case, it was decided that AI cannot be an inventor, it does matter to that court at least.

It's not. The legal system doesn't have the consistency or dependability of code. A lot of legal 'results' (judicial decisions) are somewhat arbitrary, balancing abstractions with practicality and so on, but get attention because they include clear explanations of the basic issues. Other lawyers then treat those decisions as 'legal facts' by echoing the language and (basically) challenging other lawyers to come up with a more impressive explanation than the decision that they are citing.

Look into a famous recent copyright case, Cariou v Prince. Cariou is a photographer, who made a series of photographs of people in Jamaica an dpublished them in a book. Prince, an artist, liked them, and then treated them as raw material, basically printing them up large, adjusting them, and slapping some paint on top, and declaring it original art - indeed, he called it 'appropriation art' saying 'this is mine now.'

Cariou was upset (very understandably) and sued. The judge found for Cariou, said that Prince was a bullshit rather than a visual artist, and ordered the infringing work to be collected and set fire. Prince appealed, and his appeal succeeded, with the 2nd circuit saying it was "transformative" from the point of view of a "reasonable observer" and therefore fair use, because Prince had added a different aesthetic by turning the portrait photos into oversize graffiti-collage mashups. Cariou gave up at that point as he didn't have the resources or will to fight the case further, and eventually the two artists settled.

Look up the art and see for yourself. I think Prince does have his own aesthetic, but it's a very shallow one that just surfs on other people's work, not very different from drawing glasses and a mustache on top of an existing portrait and saying you made an original work. In many ways, what he's selling is his taste, and the modifications he makes to the picture are just a sort of signature that's semantically equivalent to saying 'I, Richard Prince, approve of this image' - the artist as curator-critic of others' work, if you like.

Back in the computing context, this decision substantially loosens the boundaries of copyright. Found some code you wish you had written and want to put out your own thing, but feel stymied by the license? Just refactor it, add a bunch of sassy comments, and make the interface (whether, CUI, CLI, or API) aggressively different - not necessarily better, just distinctive. If it's fun and whimsical, make it corporate and bog-like. If it's scientific and functional, make it silly and juvenile. Just futz with it a bit until you can plausibly say you either made it better or easier to read or more accessible/intercompatible in some way. Hell, slow it down a bit and say your code smells better because it cooks the JSON longer, and generates a bunch of 'useful' statistics that might seem superfluous to the original designers but are essentially interesting to you. You'll probably get away with it.

Re: GitHub Copilot available for JetBrains and Neovim

#315
post #213

I’ve never understood the value proposition for Copilot. In terms of difficulty, writing code is maybe on average a two out of ten. On average, maintaining code you wrote recently is probably a three out of ten in terms of difficulty, and maintaining code somebody else wrote or code from a long time ago probably rises to around a five out of ten. Debugging misbehaving code is probably a seven out of ten or higher. Gi…

I guess it really depends on what you are working on.

If you are writing some non-trivial algorithms or working on some projects which requires delicate handling of things, then Copilot is most likely going to mess up.

But if you are working on many of those frontend code or backend CRUDs which are usually quite repetitive. Then Copilot could be helpful.

Re: GitHub Copilot available for JetBrains and Neovim

#316

Earlier quoted context omitted.

Copilot also optimizes for speed to a degree. It's akin to advanced auto complete. IntelliJ auto-completion is great. As much as it pains to say this, I don't think I will be as effective writing Java in Vim as much as I am with IntelliJ. The key differentiator is the auto complete speed. Copilot I feel is just auto complete on steroids. It may not be perfect yet, but there is definitely a problem it solves.

I pair program with a guy who completely refuses to use the keyboard unless there is no other option. He uses the mouse to cut/copy/paste everything possible. He is not handicapped. It is frustrating for me to pair program with him because of that. He will spend an extra 3-5 seconds using his mouse in order to avoid typing. Perhaps he is the target market.

Then making it work with Neovim seems like an odd choice.

Re: GitHub Copilot available for JetBrains and Neovim

#317
post #232

Earlier quoted context omitted.

> value proposition for Copilot. now, instead of copying off stackoverflow, it's gonna be off copilot. It will enable a lot more people to code who otherwise would not. Whether this is a good outcome or not...

This is even another example of just optimising for the easy bit. I could hire 50 juniors that can code tomorrow if I wanted to. But even with an unlimited budget, finding good devs that can make it through a 2 year project without coming out of it with a big ball of unmaintainable shit is difficult. The gulf from beginner to expert is already big, and the more crutches you use early on, the bigger it's going to get.…

Sooner than later using copilot will be an interview question and it will trigger a big red flag if the company cares about talent.

Re: GitHub Copilot available for JetBrains and Neovim

#318
post #229

Earlier quoted context omitted.

> This is low coverage. No, as a sibling comment to mine shows, it's actually easy to make 100% coverage with bad tests, since one doesn't challenge the implementation to handle edge cases.

It's easy to achieve 100% coverage with happy-path code and low quality shallow tests, agreed. AFAIK, «high coverage» may have different meaning for different people. For me, it's «high quality», for others it's «high percentage», e.g. «full coverage» or «80% coverage», which is easy to OKR.

It's the fact this could even have a different meaning that makes this a useless metric - defining 'quality' or 'coverage' is subjective. The majority of tests written are meaningless noise, and serve mainly to distract from covering 'critical' failures. Again, a subjective measure, in the sense that was is critical to you and me may not be the same thing.

Which is what makes this whole concept of code coverage so much toxic nonsense...

Not to argue against writing 'quality' tests, but high 'coverage' actually decreases quality, objectively speaking, since erroneous coverage of code serves negative purposes such as obscuring important testing, enshrinig bugs within testing.

I would make my case here CodePilot and all such 'AI' tools should be banned from production, at least until they solve the above problem, since as it stands they will serve to shovel piles of useless or worse, incorrect testing.

It is also important to remember what AI does, i.e. produce networks which create results based upon desired metrics - if the metrics were wrong or incomplete, you produce and propagate bad design.

So yes people use it now as a learning tool (fine) and it will get 'better' (sure), but as a tool, when it gets better, it will constrain more, not less, along whatever lines have been deemed better, and it will become harder, not easier, to adjust.

Re: GitHub Copilot available for JetBrains and Neovim

#319

Earlier quoted context omitted.

It is. Machines are running algorithms, which, by definition, are not creative. Of course, people may argue that people are not creative, but considering that for a recent court case, it was decided that AI cannot be an inventor, it does matter to that court at least.

It's not. The legal system doesn't have the consistency or dependability of code. A lot of legal 'results' (judicial decisions) are somewhat arbitrary, balancing abstractions with practicality and so on, but get attention because they include clear explanations of the basic issues. Other lawyers then treat those decisions as 'legal facts' by echoing the language and (basically) challenging other lawyers to come up wi…

All of that completely ignores the fact that a court just basically said that a machine cannot invent, which is a small step away from saying a machine cannot copyright, which would mean that Copilot is not transformative.

The copyright case you cited involves humans. We are talking about machines.

Re: GitHub Copilot available for JetBrains and Neovim

#320
post #289

Earlier quoted context omitted.

Did you try it? Because I've been using it for weeks and it makes me read these types of comments as "I don't understand the value of the internet" or "what's the purpose of owning a phone". It's night and day if you have it enabled or not. There's just no question about the value proposition once you start using it. I mean, you can tell comments here from people who have actually been using it, and people who have n…

I've only used it a bit and it's like glorified autocompletion. It messes up a lot in some ways too, often suggesting getFoo when in kotlin we just use foo. It is really fun to see it sort of understand your code though, and every once in a while it does a smart suggestion that could've taken a while for me to figure out myself.

It's certainly a good autocomplete but it can't be used for anything more complex because you just can't trust it. Every now and then it produces an entire function filled with complexity and I think "This looks right but I would need to independently verify everything" and at that point it's easier to write from scratch.
Post reply on HN