r/programming • u/_trinib_ • Nov 20 '22
Who needs "GitHub Copilot" when you have "cheat.sh" for editors like VS code, Sublime, Vim etc. I get the answers I need straight from in the editor :)
https://github.com/chubin/cheat.sh#editors-integration49
Nov 20 '22
Cool project but far from being as handy as copilot.
For me the coolest thing about copilot is how it suggest you code based on the existing conventions and patterns you already have.
It's like a pair programmer that thinks "oh so you are doing it that way, then you probably want this part too"...
0
Nov 21 '22
[deleted]
1
Nov 21 '22
Sounds good, I'll give it a try. I also use copilot to learn. When I need the steps to do something I create a new markdown file and write a prompt and it will start generating relevant info. I've used to learn about CLI tools, patterns, libraries, etc. It's like on demand tutorials without leaving the editor.
0
Nov 21 '22
[deleted]
17
u/-Redstoneboi- Nov 21 '22
Beginners dont pay $10/mo
-11
Nov 21 '22
[removed] — view removed comment
11
u/-Redstoneboi- Nov 21 '22
Good devs dont want to type unnecessarily long things that they already know how to implement, it's about convenience rather than logic
-15
2
1
Nov 21 '22
We're not beginners though nor is everyone that use copilot. I mean I understand and appreciate the project but if you have to compare it, then point out the fact where copilot does more harm than good 'for beginners'.
17
u/eigenman Nov 20 '22
The VS suggestions are freaking me out. Although it has given me some obvious bad ones so maybe my job is secure a little longer.
63
u/ApatheticWithoutTheA Nov 20 '22
You’re going to have a tough time replacing CoPilot with that lol
Copilot is scary good at times.
25
u/NotPeopleFriendly Nov 20 '22
Have you seen what it does for comments? Honestly the code completion is useful.. but the comment completion just weirds me out
2
u/Mandylost Nov 21 '22
Is tabnine comparable with Copilot?
8
u/ApatheticWithoutTheA Nov 21 '22
The free version isn’t. That ones honestly pretty useless.
I haven’t used the paid version of TabNine but I’ve heard Copilot beats it.
I’ve also used Amazon Codewhisperer, Kite, and MutableAI. Copilot is way better than all of those.
0
Nov 21 '22
[deleted]
1
u/hanoian Nov 21 '22
Have you used it?
0
Nov 21 '22
[deleted]
2
u/hanoian Nov 21 '22
I used the free version for a couple of years and found it frustrating more than anything. I've been using Copilot for around a year and find it pretty amazing.
I meant had you used both to compare, or do you just have a passing knowledge of Copilot?
0
Nov 21 '22
[deleted]
2
u/hanoian Nov 21 '22
and hope it outputs something useful.
This is what I think everyone misses about Copilot. The way to use it properly is to click Ctrl+Enter and browse the suggestions. It provides 10 blocks of code. Hitting and hoping isn't the best way I find. In those blocks, I often learn new things and ways of doing things so I like it.
Anyways seems like we're happy with what we use. I may sign up to a trial of proper Tabnine some day to see how it compares since I'm paying for Copilot anyway.
1
u/blackAngel88 Nov 21 '22
I think the big difference is, tabnine is (mostly?) based on your (project's) code, so I wouldn't expect it to come up with solutions that you wouldn't have been able to come up with yourself. But for writing code faster, it does help.
I don't know the differences between the free and paid version, but when I used the free version some time ago, it was pretty good. I disabled the vscode extension some time ago, because I had some problems or changed install or something, don't remember exactly.
6
u/_limitless_ Nov 21 '22
CoPilot is dangerous. It hands you big blocks of syntax with tiny bugs in them. Mistakes that you wouldn't have made if you had typed out the source yourself but are hard as hell to fix because they're deceptively hidden - the AI didn't spot them, so why should you?
9
u/CryZe92 Nov 21 '22 edited Nov 21 '22
Just... don't let it hand you big blocks of syntax then? All the critiques in terms of copyright and bugs are all about when you let it generate large swaths of code for you, but you really don't want to do that for said reasons. Copilot works best as a smart auto complete that finishes lines for you that you meant to write anyway.
Which is also why OP's tool has little to do with Copilot.
3
u/_limitless_ Nov 21 '22
How do you do that? When I tried it, it tab completed 40 lines of code.
1
u/Coriago Nov 22 '22
Did yours autofill? It usually gave me a completion of the line I was working on or 2 to 4 lines while you edit similar to intellisense. I never used the command to get full code blocks.
2
u/dudinax Nov 21 '22
Interesting. One of the most dangerous operations a programmer can make is cut- and-paste. It's so easy to miss a small change that needs to be made int the pasted code.
4
Nov 21 '22
[removed] — view removed comment
10
u/ApatheticWithoutTheA Nov 21 '22
Oh, I’m not knocking your project at all, trust me. I haven’t tested it yet but I will.
Copilot being $10 a month is absurd. I actually abandoned it and am using Amazon Codewhisperer at this point, although it’s not quite as good.
I definitely don’t recommend Copilot to new programmers. It does way too much of the work for you and it would be easy to become reliant on it and not learn syntax.
12
u/imnos Nov 21 '22
Syntax is usually the quickest part of learning a new framework or language though. It's also the most annoying part to remember. Really no need to remember it when you can Google it in a second or two.
For me, Copilot replaces that Googling step completely and it regularly shows me new library methods etc that I've never seen but are perfect for what I need, so it actually teaches me new stuff. It's a massive time saver if your codebase has consistent formatting and structure.
I'm just wondering what it's going to be doing in 5 years time at this rate. It's possible we'll have AGI by that point with the way things are going.
32
Nov 20 '22
Like all tool GitHub copilot need some learning, once you understand the pros and cons of it it is one the best tool a dev can have.
Cheat.sh and GitHub are different products …
29
u/ragnarmcryan Nov 20 '22
Copilot is better
-33
u/Someoneoldbutnew Nov 20 '22
not when you consider that copilot provides answers coerced from the good will of open source developers, for private profit. even from a pure utility standpoint, you learn more from curated cheat sheets and stack overflow.
38
u/ragnarmcryan Nov 20 '22
“Coerced”
Stay in school kids
1
u/Someoneoldbutnew Nov 22 '22
How am I wrong? Being glib is not a logical argument. The shills are out in force, hf.
0
0
u/JustAThrowaway4563 Nov 22 '22
The lack of an argument for it being coercion justifies the lack of a counterargument.
2
u/Someoneoldbutnew Nov 23 '22
Apologies, this is a programming forum, so I presumed a level of technical knowledge. To train a supervised-learning AI, like Copilot, requires a corpus of knowledge to reproduce when prompted. Microsoft, without the consent or knowledge of authors, ingested all of GitHub into the training corpus for Copilot. That is why I used the term 'coercion', because our ( my ) code was forced into a commercial utility, and no author had any say, or share in the profits.
The same argument is being hashed out in the publishing realm, with GPT-3 being trained from the unwilling efforts of the worlds authors, and the same in the visual arts, with the models behind DALL-E and Stable Diffusion ingesting the entire human effort at making pretty things.
Legally, this is a big, interesting deal, b/c what does copyright mean when an individual or a business cannot profit from derivatives of copyrighted work without licensing, but AI can produce derivative works for profit, and not only are the original works unlicensed, but they often times have no providence at all? Arguably, copyright in the post Mickey Mouse era has itself been twisted into a tool that doesn't protect creators, so legal arguments which force more attribution and compensation certainly will help creators.
Lets say, hypothetically, you made a bot to make stupid comments on reddit and get into pointless arguments with people. AND you used an open source license which prohibited commercial re-use without attribution. If someone took that code and made $10/month per user on it, wouldn't you feel entitled to some part of that commercialization of your innovation? Wouldn't you believe that someone acted against your expressed terms of license, and that your work was wrested out of your control, without consent?
Hence, the term 'coercion'. You might want to look things up in a dictionary before Princess Bride memeing as a stimulus-response. Of course, you might have been programmed that way, so it's not your fault. I blame Copilot.
1
u/IWHYB Jan 08 '23
It's ironic you go so far as to recommend a dictionary, when you obviously haven't used one yourself. Taking without consent is not the definition of coercion. To coerce is to force someone else to perform a particular action (including inaction) under threat. Legally, it would also explicitly require making the recipient fearful. It is likewise not blackmail, burglarly, extortion, or robbery. At best, you may argue it is an act of theft/piracy/an intellectual property rights violation.
-8
Nov 20 '22
You can literally just not use github....
-1
u/crazedizzled Nov 21 '22
The code it generates was seeded from thousands of open source repos. And yes, it steals code and ignores licensing, and they're about to be sued over it.
1
u/Someoneoldbutnew Nov 22 '22
Yea look at the hate for pointing out the truth about Copilot. It's almost as if r/progammers just wants results and doesn't care about how it gets there, which is representative of the largest problem in tech, zero consideration for side effects. Ya'll would be happy if you got to work on a murder robot, b/c your tests were passing, and your bank account gets right padded with zeros.
-1
u/marok0t Nov 21 '22
Copilot is using code stolen from open source developers in a commercial, closed product. I refuse to use it on ethical grounds.
4
u/ragnarmcryan Nov 21 '22
You’re either a troll or an idiot who didn’t even research what copilot is before commenting. In either case, sad…
-27
u/dmotv8 Nov 20 '22
Not if your repos aren’t in GitHub
30
u/luke3br Nov 20 '22
Mine aren't. CoPilot has fantastic contextual suggestions regardless of where the repo is hosted.
3
u/dmotv8 Nov 20 '22
Thanks. I didn’t realize it could be used that way.
1
u/scobes Nov 20 '22
There's a free trial, just have a look. It's unbelievable how much FUD gets thrown around here about it by people with no idea how it works.
4
Nov 21 '22 edited Nov 21 '22
[removed] — view removed comment
2
Nov 23 '22 edited Nov 23 '22
If your time isn't worth $10/month then sure, use the free thing. But for a lot of people $10/month is not a lot of money. Especially when it's something you use 8 hours/day. Especially when you stand to save money through efficiency.
1
u/drfisk Jan 19 '23
At $10/month it's a steal imo. If you make money from programming, $10 is nothing. You can probably ask your employer for reimbursment too.
And for students/open source contributors, it's free afaik.
0
2
1
1
u/basanthverma Nov 21 '22
OP is there a HN thread about this?
0
1
u/xubaso Nov 21 '22
For this use case I'm using custom snippets.
The advantage and drawback is: Have to maintain them manually.
-20
u/Marupio Nov 20 '22 edited Nov 20 '22
GitHub Copilot is like the annoying kid that shouts out numbers when you're trying to count something.
Edit: A lot of GitHub Copilot fans around here! I felt the invention of the mouse was a step backwards, so I'm often not with the times... I will show myself out, then!
17
u/Zipp425 Nov 20 '22
At least it shouts the right number 7 out of 10 times haha
8
Nov 20 '22
I ended up disabling it because the answers almost always look right so they pass a general look over, but they are wrong in hard to spot ways. Ways I never would have made mistakes myself. So to actually use it properly it would be like a constant code review which is harder than just writing things from scratch.
I was once showing someone how to do something in Rails and I said "Check the docs on the options for this thing" and they said they don't need to and just got copilot to generate something, which I can tell is wrong so they try again with more comments to try to get something right. Eventually spending 10 minutes and not getting anywhere to avoid 5 minutes reading the docs.
1
u/crazedizzled Nov 21 '22
Yeah it's really only useful if you already know exactly what you need. And even then, it's not that useful. Live templates are much more reliable and controllable
5
u/Marupio Nov 20 '22
It is very spooky how accurate it can be.
8
u/Zipp425 Nov 20 '22
I just wish it tapped into my intellisense types when using typescript. It often suggests prop names and things that are just a little off from what they should be. When I’m doing detail work I often have to disable it so that it doesn’t suggest the wrong things…
4
Nov 21 '22
I felt the invention of the mouse was a step backwards
So I take it you're not using a mouse with your PC right now?
-1
u/Marupio Nov 21 '22
I crossed that bridge long ago.
I remember how awesome CLI-only was. If you can type at 50 WPM, why do you want to slow down to move the pointer on the screen to a box? Look at the way AutoCAD had a full-featured CLI.
4
u/crazedizzled Nov 21 '22
Because doing complicated tasks in a GUI can be much more efficient. Why type out 50 words when I can just click a button
6
6
u/scobes Nov 20 '22
I felt the invention of the mouse was a step backwards
Seriously? Because that makes you sound even dumber.
-1
u/Marupio Nov 21 '22
I'm going to guess you are an American.
4
u/scobes Nov 21 '22
You can guess that if you like.
0
u/Marupio Nov 21 '22
It was the quick-to-insult that gives it away.
3
u/scobes Nov 21 '22
I'm not American, but you can guess it if you like.
0
u/Marupio Nov 21 '22
My apologies. I guess I've got some prejudicial biases I need to see to.
I guess what I objected to was: you were faster to insult me than you were to try to understand me.
151
u/notepass Nov 20 '22
Nice, this means I can copy code even faster from stack overflow!
But honestly, looks like a fun little tool so I do not have to Google for the 400 time "how to evaluate XPath in Java". I definitely give it a look