Live data from Hacker News

I figured out how to get GitHub Copilot to run in the terminal

github.com

91–100 of 105 posts

Re: I figured out how to get GitHub Copilot to run in the terminal

#91
post #85

Earlier quoted context omitted.

nothing tells me you've never even tried it as much as this comment of yours it is "intelligent context-aware code autocomplete on steroids"

> nothing tells me you've never even tried it as much as this comment of yours You mean the part where I said that I haven’t tried it?

Hah, fair. Honestly, it's great. It's great in 2 ways:

1) When it's 100% correct, I smile, because it's often very clever, and as a programmer whose very existence is based on work elimination, when that amazing technological weapon is aimed at my own work needs as a developer, this is some Inception-level glee.

2) It's often wrong. Maybe like, 33% of the time? BUT when it's wrong (note that 95% right is still "wrong," so it's still very good), I smile, because it's often STILL clever, even in its wrongness, and this cleverness amuses me while working. For example, I use Elixir, which linguistically (but NOT semantically) is very similar to Ruby, so on occasion I've seen it make a Ruby-flavored suggestion to my Elixir. "Silly Copilot," I'd say smiling as I'd correct it (and probably teach it further).

So basically, it's made my day slightly more joyful, which is great. I already enjoy programming, so watching a program try to write my code ahead of me is absolutely fascinating.

Simple example of labor saving- I was doing some bash scripting and I wanted some constants for ANSI colors. Well I started writing them, and Copilot finished the whole damn table (with correct constant names, using the naming pattern I'd already established). And all the color codes were correct. This was wonderful! It's GREAT for language domains you're not hugely familiar with. Like, know how you have to often look something up working in a lesser-used language? Well in Copilot, you can just start writing a comment describing what you need or what the code will do, and 8 times out of 10 it will then spit the actual correct code out for you, it's just amazing.

Oh, tip: There's a keystroke combo that will advance through various suggestion possibilities. Often the first suggestion is not quite there, but another suggestion is.

Re: I figured out how to get GitHub Copilot to run in the terminal

#92
post #27

Earlier quoted context omitted.

Who copyrights individual bash commands?

No one; I'm referring generally to Copilot and similar tools. But god, who needs an AI to write their fucking shell commands?

It would be cool if it could learn to recover from failures and try other approaches until it gets the job done, and in the end verify it was correct. The security implications are huge, though.

Re: I figured out how to get GitHub Copilot to run in the terminal

#93

Earlier quoted context omitted.

Good codebases don't need boilerplate to do basic stuff: in this sense, copilot is a patch over the real problem, which can be solved with better frameworks and more code reuse. I tried copilot during the beta, and apart from the obvious legal licensing issues, I simply could not find a valid usecase for any of the codebases I usually work with. At my day job, I spend more time thinking of better ways to do X, rather…

I disagree. Some amount of boilerplate is preferred versus abstracting everything. Boilerplate can be frustrating to write, and fiddly boilerplate absolutely should be abstracted, but in general it should makes the flow of logic easier to follow. > At my day job, I spend more time thinking of better ways to do X, rather than writing boilerplate code :) Not that you are suggesting otherwise, and I am being somewhat fa…

A million times yes. If a codebase is magically adding _all_ of the boilerplate, it's almost always harder to understand what's actually happening.

Re: I figured out how to get GitHub Copilot to run in the terminal

#94

Earlier quoted context omitted.

Copilot is a crutch that prevents learning. You are not falling behind. "Catching up" by using this tool will only land you in a lawsuit for copyright infringement.

This is the “spell checkers cause bad spelling” fallacy. People learn by being told they are wrong. When you use copilot you are constantly being given examples that challenge your intuition. Maybe copilot is wrong, maybe you are wrong, either you are learning more with it on than with it off. Countless programmers get stuck in a rut writing the same bad code over and over again because nobody tells them it’s wrong.…

Spell checkers do cause bad spelling, though. My spelling was once excellent (literally spelling bee kid), and after years of spellcheck, it's not only a lot worse, but I also often use the wrong word because it passed spellcheck - either because the wrong word is spelled similarly to the right word, or because the right word isn't in the spellcheck dictionary so I assumed I was wrong.

I don't know how you can tell me that my spelling has actually improved, and that I'm learning something from spellcheck other than not to worry about spelling things correctly because the computer will do it.

edit: By the same reasoning, you could argue that people are better at remembering phone numbers now because their cellphones remind them of the numbers every time they make a call. It would be a vaguely plausible theory before cellphones were widespread, but obviously false with experience.

Re: I figured out how to get GitHub Copilot to run in the terminal

#95
post #44

It’s generally claimed that reading other people’s code is harder than writing your own. I mean, everybody loves writing code on a greenfield project but hates maintenance of legacy code, right? So, why do people like these code generators? The only explanation I can see is that people use them and then don’t read the code . Which would be horrifying. (I stay away for obvious copyright reasons.)

I'm sorry, but this is an incredibly shallow analysis. You don't even know what CoPilot is, apparently, and yet you speak in these broad generalities that are misguided at best. It's the only explanation you can see because clearly you haven't looked...

Re: I figured out how to get GitHub Copilot to run in the terminal

#96

Earlier quoted context omitted.

I was against copilot until I tried it. It’s not always on target, but it’s usually pretty close and the suggestions are good. No, it doesn’t write all of the code for me. But it does rapidly construct even quite complicated if/else statements that I was going to write anyways, just from knowing where I’m typing. Quite a great tool.

I was just revisiting an api call which it turns out needed pagination. I put a note in the docstring before I began and copilot just... rewrote the function to include pagination. Except for a couple of corrections to the json returned by the api (copilot could only guess), it just worked! I'm amazing by copilot and it frequently writes chunks of my code, especially shell scripts and docker files. A little worried t…

I love it but it’s nowhere near the level of replacing anything but the lowest skill developers. The actual real skills involved with deciding what problems to solve, architecting and developing complex software would require general AI level AI, and at that point a *lot* of people are going to be out of jobs.

Re: I figured out how to get GitHub Copilot to run in the terminal

#97
post #54

Earlier quoted context omitted.

Are there any companies forbidding developers to use it? If that was my role I'd totally forbid it, precisely for the reasons you indicated. If a developer is paying on his own for it to work, who would have the legal responsibility in the end? The developer personally? Another good reason to stay away from it.

Our company is forbidding it too, for exactly the legal reasons parent posted

I see the concern here from a level perspective so I’d probably forbid it too just to be safe.

That being said…I think this line of thinking is probably mostly a nothing-burger at this point. My experience is that anything sufficiently complicated that Copilot outputs is likely to be somewhat wrong.

I’ve only really found it to be (quite) useful for speeding up small things like if statements, switches/matching, short documentation etc, which I don’t think you can copyright anyways. I wonder to what degree we can expect customization options in the future to forbid any complex code from being generated, or to constrain Copilot to helping with specific whitelisted

Perhaps, extending that last thought, there’s an ideological argument to be made that code that is so simple an AI can generate it isn’t worthy of being protected under copyright law anyways. I don’t know.

Re: I figured out how to get GitHub Copilot to run in the terminal

#99

Speaking of copilot, when is GitHub going to support billing for it at the organization level? Right now I would have to do a monthly reimbursement request which is a pain.

I reckon there's a reason why it's not available yet: legal uncertainty about the training data and generated code in a commercial context. Right now it's only individual developers, placing the burden on them and preventing any major repercussions for Github. This changes when (large) companies start using it, and when GitHub gives potentially copyrighed code to companies. Personally I only use it for personal/OS pr…

It can detect and remove any exact collisions with code from the training data now, by the way.

Re: I figured out how to get GitHub Copilot to run in the terminal

#100
post #44

It’s generally claimed that reading other people’s code is harder than writing your own. I mean, everybody loves writing code on a greenfield project but hates maintenance of legacy code, right? So, why do people like these code generators? The only explanation I can see is that people use them and then don’t read the code . Which would be horrifying. (I stay away for obvious copyright reasons.)

This is a bit off topic, but I am naturally excellent at reading other people's code. I can somehow factor in commit messages and see their style to determine if they didn't know X area very well, if it was a temporary hotfix, or if they intended to come back and fix this area up at a later time. It's like I'm sitting there with them while I read it.

Is there a job title where I can put this to use? I'm alright in general feature work, generally exceptional in bug fixes or finding exploits, and exceptional in code reviews. I always get stuck in leetcode tests of technical interviews though despite having like 8 years of experience.

Post reply on HN