this post was submitted on 11 May 2024
438 points (100.0% liked)

Programmer Humor

421 readers
33 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
top 29 comments
sorted by: hot top controversial new old
[–] vox@sopuli.xyz 49 points 6 months ago* (last edited 6 months ago) (3 children)

don't get the negativity towards copilot in other comments.
it's a really smart autocomplete, and this is exactly what i wanted for the past 5 years.
(yeah it's not going to replace programmers or whatever people's exaggerated opinions of it are)

wanna quickly create a wgpu bind group?
let texture_bind_group = and it's smart enough to understand the context and pull in texture and texture sampler that are already defined as local variables.

too lazy to type this obvious thing in?
(like of course the next opcode islet op = self.fetch();) just press tab and move on with your life.

wanna quickly refactor something?
select, ask CP Chat to "replace all if statements with match", check if it's correct and click confirm (it will even show git-style diffs, so it's hard for something unexpected to slip in)

it's not perfect, and it's suggestions do not match your intention like 50% of the time but when they do match or your intention is REALLY obvious (like you already wrote a clear and concise variable name and need to complete the value), you're a single keypress away from completing those 2 lines of code

It's not a total deal breaker but it's definitely very useful. (especially for me, because of my very short attention span. unless i can quickly complete a thing I'm currently working on in less than a minute i will forget about the next 10 things I was thinking of doing)

also i don't believe the price is justified, but it's free for students so of course I'm gonna use it.

(you just need to verify your student email and upload a photo of your student id on education.github.com, and you get a free gh copilot subscription, gh pro account, priority support and promos on loads of services like heroku etc while you're a student)

[–] evatronic@lemm.ee 17 points 6 months ago

I've been using it a lot lately in the day job.

My experience has been it's close but wrong often.

It shines when I am doing the same thing for 20 variables, but then I should be using a loop instead and copilot won't go there.

[–] oldfart@lemm.ee 7 points 6 months ago (1 children)

What's CP Chat? Im a bit afraid to type that into a search engine but it seems to be what I'm missing in my Copilot-assisted flow. It's a great autocomplete but sometimes refactoring would be useful too.

[–] vox@sopuli.xyz 4 points 6 months ago (1 children)
[–] oldfart@lemm.ee 1 points 6 months ago

Seems so obvious now, thanks

[–] MonkderDritte@feddit.de 2 points 6 months ago* (last edited 6 months ago) (1 children)

What, you write your stuff always from scratch again?

[–] vox@sopuli.xyz 4 points 6 months ago* (last edited 6 months ago) (1 children)

well I'm using lower-ish-level stuff like wgpu a lot, so there's a lot of repeated code in my codebase with only small variations, but I can't really encapsulate it into anything since all of my pipelines are completely different and have different requirements (it's basically already as encapsulated as it gets without limiting freedom)

[–] MonkderDritte@feddit.de 1 points 6 months ago* (last edited 6 months ago)

Ah, yeah, situations like this always hurt me somewhere.

[–] Sotuanduso@lemm.ee 22 points 6 months ago

I was surprised when I made attackPower and it suggested defensePower next. It was then that it sunk in that the autocomplete was AI.

[–] chahk 22 points 6 months ago (3 children)

Glorified autocomplete. That, and Clippy.

[–] kbin_space_program@kbin.run 6 points 6 months ago (1 children)

Clippy was occasionally useful as it could offer shortcuts you didn't necessarily know about.

This is just bad autocomplete

[–] EatATaco@lemm.ee 8 points 6 months ago (1 children)

I was lucky enough to get in on my company's beta test for copilot.

When I hear people say it's bad, all that tells me is that they are either completely ignorant and have never really used it, or they aren't good at learning how to use new tools.

[–] kbin_space_program@kbin.run 4 points 6 months ago* (last edited 6 months ago) (1 children)

The example shown is setting a timer, then copilot suggests timeright value.

Contextually, it is bad autocomplete.

In practice, chatgpt4 is incapable of producing code to my coding standards. Edit: to clarify, its incapable of doing that in a timely enough manner that it saves me any time.

[–] FaceDeer@fedia.io 5 points 6 months ago (1 children)

The example shown was specifically selected because it's funny, not because it's representative.

The fact that you called the tool "chatgpt4" suggests you're not experienced with copilot. They're not the same thing even if they're using similar LLMs as a component.

[–] kbin_space_program@kbin.run 2 points 6 months ago

I know its not chatgpt4, I never said it was?

That paragraph is on its own because it is a different topic. In this case I was using my own experience experimenting with chatgpt4 as to why I won't be using it any time soon.

[–] dan@upvote.au 4 points 6 months ago

Glorified autocomplete

That's what I need most of the time, though. I don't see these AI things as replacing programmers or writing large chunks of code. I just see them as an improvement over the autocompletion/IntelliSense features we're all using already.

[–] holgersson@lemm.ee 4 points 6 months ago

Autocomplete and Clippy havent translated a script from one language into another for me without major errors yet.

[–] Emmie@lemm.ee 12 points 6 months ago* (last edited 6 months ago)

Ai wIlL eNsLAve huMaNs aNd rUlE tHe wOrLD

AI:

[–] cupcakezealot@lemmy.blahaj.zone 6 points 6 months ago

wibbly wobbly timey wimey