Earlier quoted context omitted.
I have found Copilot useful while writing compilers and virtual machines all the way up the chain to CSS grids and media queries. Are you telling me there isn’t a fair bit of boilerplate in bog standard implementations of OP_ADD or in a grid layout with a sidebar and a footer? The irony here is that the level of abstraction necessary to remove all boilerplate means that you’re removing the descriptive nature of the b…
Whenever I have boilerplate in a codebase I try to make a tool to create it for me. So copilot does seem like an extension of that. I think the thing that weirds me out about copilot is that I can't peer inside it. I guess I like knowing something will always work?
I figured out how to get GitHub Copilot to run in the terminal
81–90 of 105 posts
Re: I figured out how to get GitHub Copilot to run in the terminal
#82Earlier 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…
Re: I figured out how to get GitHub Copilot to run in the terminal
#83I find documentation and examples of using copilot quite limited. Anyone have any good pointers? Specifically I’m interested in how you can tune copilot on a specific codebase or language.
Also interested in this, I don't think you can. One piece of info I was able to get out of copilot devs directly in their Q&A session was that it looks at other open tabs for completion context (the example they gave being header files in C/C++, commonly open alongside implementations). I've taken to just prototyping things in giant, single files because Copilot at least has the entire program in it's buffer (I think…
With the time it takes to return results with that much context, I wouldn't be suprised if they generally limit context to less than that though.
Re: I figured out how to get GitHub Copilot to run in the terminal
#84Earlier 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…
Re: I figured out how to get GitHub Copilot to run in the terminal
#85It’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.)
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"
You mean the part where I said that I haven’t tried it?
Re: I figured out how to get GitHub Copilot to run in the terminal
#86It’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 think many people see GitHub Copilot as a code generator, without having used it, and then wonder like you. But afaik almost everybody uses it as autocomplete on steroids. So the reasoning behind using it is the exact same as using autocomplete in I.e. Intellij. It's just slightly more powerful, since it will usually autocomplete the whole line (occasionally a bit more), instead of just the current keyword.
And it's scary how good it is for "autocomplete" sometimes. I've found it much more useful on our angular webside frontend rather than the c# backend.. but man on the angular/javascript side it really saves time.
I can't think of any good examples off the top of my head, but every few days I literally am wondering to myself "how did I now I wanted to do exactly that!"
Re: I figured out how to get GitHub Copilot to run in the terminal
#87It’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.)
It is absolutely amazing for writing boilerplate code that is also context aware. It saves me hours of typing. It's hard to explain if you've never tried it because you're ideologically opposed to it, but stop being close minded and try it out, I promise it's a great tool to assist your programming.
I feel like it's possible some time could be shaved off somewhere there, but this all happens very quickly and it's not an area where optimization would improve things much overall. For this to amount to literal hours of typing, I think I would need to be either very much slower at typing, writing an immensely large volume of boilerplate, or working over many many years. Typing stuff is essentially never a bottleneck for me.
Re: I figured out how to get GitHub Copilot to run in the terminal
#88It’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.)
Often, it creates code that follows the style of the surrounding environment.
Honestly at this point, the copyright concern seems either ignorant or paranoid to me. The program is interactive and generally only creates small chunks of code at a time. You can read and modify the code it generates (I always do). I only operate on it in digestible chunks, none of which are "original" enough to be considered copyright. Surely, you as a developer can easily say whether the code generated is just some non-copyrightable snippet (some simple BFS code) vs stolen code lifted off a codebase (weirdly specific implementations, fast invsqrt, comments that look like they were written for a different context, magic numbers, undiscovered algorithms).
I would argue that if you can't differentiate between meaningful IP and boilerplate algorithm implementations (with variable names conveniently matching the surrounding context), then you have a different problem.
Yesterday I implemented a BFS in about 30 seconds because copilot recognized the pattern and auto-completed. It took 5 seconds to autocomplete, and 25 seconds to read and fix one line that was wrong. That normally would have taken me 5-10 minutes to code + debug (the copilot code didn't have any errors, minus the 1 I easily found). The productivity gains are too good.
Re: I figured out how to get GitHub Copilot to run in the terminal
#89Does anyone here use Copilot with less mainstream languages? Curious to hear what your experiences are like...
It's nowhere near as accurate as it is when using Rust or TypeScript but it's still mostly "autocomplete, on steroids", just with fewer "oh shit" moments.
Re: I figured out how to get GitHub Copilot to run in the terminal
#90Earlier quoted context omitted.
Help me understand something. I understand that the company should pay for Copilot in principle. However, is paying $120 per year that much when it helps you in your at least mid-five-figures job? I would ask for the reimbursement if it was annual, but filling out a form to ask for $10 back every month seems a bit over the top. Maybe I'm a spendthrift? Am I missing something here? Would you say I am being irresponsib…
Any $ is too much $. I claim back $1.99 every month through the horrible SAP Concur.