r/ProgrammerHumor • u/themightydud • Oct 26 '21
GitHub Copilot, the technology that will replace programmers. Also GitHub Copilot...
27k
Upvotes
r/ProgrammerHumor • u/themightydud • Oct 26 '21
470
u/pet_vaginal Oct 26 '21
I get the following code starting from the same comment:
I would be curious to see the full content of your source file OP, I do get the funny suggestion if I write similar shitty code above in the source file.
48
u/[deleted] Oct 26 '21
OP's post aside, is this Copilot thing actually good?
3.7k
u/Music_Quartermaster Oct 26 '21
“I get paid per line of code”
6.1k
u/OptionX Oct 26 '21
1.5k
u/lennnyv Oct 26 '21
... if (num == 3957294729) { return "3957294729"; } ...
1.3k
u/Sag3Jar0n Oct 26 '21
pffft come on everyone knows u have to use switch case here, u know for performance reasons.
434
u/Gigabyte5671 Oct 26 '21
Welp, that's the halting problem in a nutshell...
543
u/[deleted] Oct 26 '21
Ah yes the YandereDev method of coding.
294
u/fracturedpersona Oct 26 '21
C'mon, everyone knows you have to use an else if there.
165
u/Blaz3 Oct 26 '21
I really liked how GitHub copilot was implied to replace programmers.
If we haven't replaced accountants and lawyers yet, what makes people think that programmers will get replaced?
17
u/Sam_Tyagi Oct 26 '21
newsflash:- "Ai replaces human bosses in programming fields worldwide"
Boss AI while firing you :- "Also, I need your clothes, your boots and your motorcycle"
13
u/lightwhite Oct 26 '21
It has learned from the code that was written by humans. What did you expect?
57
u/The--HackerMan Oct 26 '21 edited Oct 26 '21
Image Transcription: GIF
[Someone types a javascript comment, the camera follows the comment being written, it pans to the right.]
[The camera unzooms, and follows the code as it is written. Github Copilot is typing a javascript function.]
I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!
11
u/[deleted] Oct 26 '21
Me: who often writes bad code I'm proud that I know a better solution to this.
60
u/[deleted] Oct 26 '21
Capitalism was always going to find a way to make expensive skills a commodity.
9
u/noob-nine Oct 26 '21
Wouldn't it be better using a loop!!1!11
5
u/FCrange Oct 26 '21
Well you're going to need some sort of hardcoded map between the digits 0 to 9 and the characters "0" to "9" somehow, and if it's not ascii or unicode you have no guarantee that the character codes are sequential.
Sure a hash map would be better but (assuming the point is that you can't use build-in functions) this isn't nearly as terrible as people are pretending.
16
u/webdevbrent Oct 26 '21
Yes, i can see how .toString() is difficult to remember. Much easier to type // convert num to string.
Another result of some good idea by non programmers to replace programmers by hiring programmers to write this to replace programmers. The irony here is just hilarious
9
u/ambarish_k1996 Oct 26 '21
I will push troll code to github to throw the model off. Will singlehandedly save the programming community.
4
u/Benbig_ppdover Oct 26 '21
Looks like me trynna Pass my coding exam
4
u/JunkiYarde Oct 26 '21
Oh god pls don’t do this I’m almost done getting my degree nooooooo
4
u/Vidrolll Oct 26 '21
I see no problem here. It programs just like a real human!
4
u/bumblebuoy Oct 26 '21
Matlab just added a similar copilot function in their latest release, and I’ve gotta say, is really convenient.
4
u/Abstruse15 Oct 26 '21
Humans creating Atom Bombs to eradicate Humans Programmers programming to eradicate programmers 😂
4
u/MrExistence Oct 26 '21
Seriously though, can we get copilot to instead refactor bad code instead of learn from it? That’s what I need more than something to help develop new code.
4
u/cid01 Oct 26 '21
If (num === 69) return "nice";
1
u/[deleted] Oct 26 '21
Is this online for the public ?
1
u/TheGhostlyFucker Oct 26 '21
Can someone please explain why the video is poorly reverse-engineering the .tostring() function?
Edit: also use a switch statement for pete's sake!
3
u/midnitte Oct 26 '21
So it basically writes Kat Maddox jokes?
3
u/MedonSirius Oct 26 '21
If someday an A.I. can program anything what managers wants then everyone including the managers will be replaced
3
u/seamanlyfundamen Oct 26 '21
"Yeeeaaah! Thanks for the free code from our Lord and savior, Jesus Christ."
3
u/burnblue Oct 26 '21
So it does replace programmers
If no programmer ever typee that, CoPilot wouldn't have sampled it
3
u/hexperimento Oct 26 '21
They didn't say what type of programmers that it would replace. 🤣
3
u/robotix_dev Oct 26 '21
It has learned too much from GitHub repositories.
7
u/[deleted] Oct 26 '21
Microsoft is working on a similar project. The code AI is terrifyingly good. Watching a demo, a person need only speak what they want, and the code starts to build from there.
Of course, being a demo video, there won't be any issues, but the complexity of the input words to the final product was both impressive and terrifying.
Only the human species is capable of working so hard to make itself obsolete.
5
u/billFoldDog Oct 26 '21
Github Co-Pilot is a GPL violation, change my view
2
u/[deleted] Oct 26 '21
u/savevideo
2
u/Accidentallygolden Oct 26 '21
Wait, what does === do? What language is that?
2
u/kinduff Oct 26 '21
I get this in Ruby:
I lol'd.
2
u/[deleted] Oct 26 '21
i sometimes hear about developers dealing with “edge cases”? this makes no sense to me. why would you not simply account for every outcome when you write the code the first time like the very gifted individual autocompleting the suggested snippets in this video
2
u/thobod Oct 26 '21
To be fair, this is like only using lane assist in a car, and then complaining you don't get to the correct destination cause it just brought you to the end of the highway.
2
u/LEGOL2 Oct 26 '21
I actually use new visual studio 2022 with those new ai intellisense and I feel it works quite well. When your code contains a lot of templates and weird classes hidden in hundreds of directories, standard intellisense looses it's track.
2
u/Overdoze55 Oct 26 '21
I've registered for co-pilot like 4 month ago but haven't heard from them, what can I do?
2
u/molasaheb Oct 26 '21
https://twitter.com/AliShirzad/status/1435208975092359171?t=4q1tofJy18ft47rsKe84_w&s=19
2
u/N0tAGoos3 Oct 26 '21
Wait. I’m new to coding, but I think I can solve this one.
import dataSwitch
dataSwitch(472, str)
I did it
2
u/mtz_federico Oct 26 '21 edited Oct 26 '21
On the positive side, nobody is going to lose their job anytime soon
2
u/-Redstoneboi- Oct 26 '21
literally just rewriting a module
2
u/Malorn44 Oct 26 '21
I was pretty impressed when I told it to write gradient decent on a function f I defined in another python function. It calculated the gradient of the function (nearly) correctly and performed gradient descent on it correctly
2
u/snarkuzoid Oct 26 '21
Real Men don't let computers write their code.
2
u/Calygulove Oct 26 '21
This does not pass the First Law of Robotics.
2
u/PsiEcstasy Oct 26 '21
Jokes aside. GitHub Copilot can be very useful when used right.
2
u/stivafan Oct 26 '21
Sounds like another Power Builder.
2
u/[deleted] Oct 26 '21
There’s GOT to be an easier way.
2
u/The-Copilot Oct 26 '21
Nah, wasn't me, leave me out of this
2
u/ReelTooReal Oct 27 '21
Copilot does not like relying on standard functionality of the language. It's trying to avoid unnecessary use of the runtime in hopes that the JavaScript engine will realize it doesn't need to load it's entire runtime to run your code. We should all strive to be a strong independent coder like Copilot and stop relying on language features as a crutch.
3
u/hopbel Oct 26 '21
I see it was trained on the yandere simulator source
2
u/mendip_discovery Oct 26 '21
If the AI learns from all the outsourced programmers that firms have been using. You know the ones that write 11 trillion lines of code where just 8 would do. Sorry I am a bit sour, my PC with 16GB RAM just ran out of RAM because....W11, Firefox with 1 tab , and Thunderbird. Oh how I wish I could go back to Win2K.