this post was submitted on 11 May 2024
771 points (99.0% liked)

Programmer Humor

19463 readers
30 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 50 comments
sorted by: hot top controversial new old
[–] CompostMaterial@lemmy.world 99 points 5 months ago (4 children)

You got it admit, it is a good suggestion. It just wasn't the right one. But it is trained well enough to correlate left and right together. Since those are very commonly associated together it is certainly a logical choice.

[–] bort@sopuli.xyz 65 points 5 months ago (2 children)

. But it is trained well enough to correlate left and right together

eliza could do that 60 years ago

[–] FaceDeer@fedia.io 11 points 5 months ago (2 children)

Why hasn't it been incorporated into IDEs until now?

load more comments (2 replies)
[–] marcos@lemmy.world 6 points 5 months ago (2 children)

Ah, come-on, why do you think Eliza could do that 60 years ago?

(It couldn't. It's at most 40 years old technology, and way more likely just 30. Even though you could program Eliza to do something like this, it would be way too specific for any use.)

[–] bort@sopuli.xyz 18 points 5 months ago* (last edited 5 months ago) (5 children)

It’s at most 40 years old technolog

the 60s were 60 years ago

load more comments (5 replies)
[–] Morphit@feddit.uk 3 points 5 months ago

Ah, come-on, why do you think Eliza could do that 60 years ago?

Does that question interest you?

[–] Tamkish@programming.dev 2 points 5 months ago

wdym it isn't the right one? It clearly says time RIGHT

load more comments (2 replies)
[–] vox@sopuli.xyz 73 points 5 months ago* (last edited 5 months ago) (4 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 = <tab> <tab> 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 28 points 5 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.

[–] bisby@lemmy.world 17 points 5 months ago* (last edited 5 months ago) (1 children)

too lazy to type this obvious thing in?

This has been the thing for me. I get really bored and lose focus when doing all the obvious repetitive stuff. And the obvious stuff is the stuff I find copilot does best. For anything that requires thought I'm engaged. Those are the fun parts of the job. It lets me do more of the fun part.

The one major downside that I've found is that sometimes I just want to tab complete a long variable/function name, and because of copilot i dont have "old style" tab completion anymore. (I could definitely still handle this myself, but i haven't)

edit: this all to say that I don't use copilot to write code that I don't know how to write, I use copilot to write code that I've written 1000 times before and don't want to write again. Copilot does a good job of looking through all the open files for context to help make sure the suggestions actually fit into the codebase's pre-existing style.

[–] CrossbarSwitch@lemm.ee 2 points 5 months ago

I ended up making copilots auto complete use ctrl+tab and its been amazing.

[–] oldfart@lemm.ee 9 points 5 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 6 points 5 months ago (1 children)
load more comments (1 replies)
[–] MonkderDritte@feddit.de 2 points 5 months ago* (last edited 5 months ago) (1 children)

What, you write your stuff always from scratch again?

[–] vox@sopuli.xyz 6 points 5 months ago* (last edited 5 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)

load more comments (1 replies)
[–] andrew_bidlaw@sh.itjust.works 53 points 5 months ago (2 children)

It knows, the time is right.

[–] pyre@lemmy.world 9 points 5 months ago (1 children)

when the AI says the time is right it sounds ominous

[–] andrew_bidlaw@sh.itjust.works 6 points 5 months ago

And then it replaces datetime output with the countdown.

[–] Klear@sh.itjust.works 8 points 5 months ago

The time is right when there's no time left.

[–] kamen@lemmy.world 43 points 5 months ago (2 children)

The opposite of the opposite of "left" is "wrong".

[–] Land_Strider@lemmy.world 6 points 5 months ago* (last edited 5 months ago) (1 children)

Thanks, this solution worked for me.

Edit: What the hell, I'm trying to reply to a parent comment below.

[–] Klear@sh.itjust.works 11 points 5 months ago

Something went not not left.

[–] Land_Strider@lemmy.world 2 points 5 months ago

Thanks, this solution worked.

[–] Sotuanduso@lemm.ee 39 points 5 months ago (1 children)

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

[–] pyre@lemmy.world 25 points 5 months ago (3 children)

i mean, "AI" is already a glorified autocomplete

[–] Sotuanduso@lemm.ee 12 points 5 months ago

Well, LLMs are, at least. But also, autocomplete is already AI, so really LLMs are just glorified AI. And that checks out, they are the ones that get all the glory*. Everything else is just spooky algorithms.

*Except for walking robots and stuff like that.

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

I am becoming increasingly convinced that so is the human brain.

load more comments (1 replies)
load more comments (1 replies)
[–] Emmie@lemm.ee 18 points 5 months ago* (last edited 5 months ago) (1 children)

Ai wIlL eNsLAve huMaNs aNd rUlE tHe wOrLD

AI:

[–] dariusj18@lemmy.world 11 points 5 months ago (1 children)

If anything this is a great example of why that could happen. Simple leaps of logic without context.

load more comments (1 replies)
[–] coffee_poops@sh.itjust.works 18 points 5 months ago

Should be named timeRemaining, tbf.

[–] chahk@beehaw.org 17 points 5 months ago (7 children)

Glorified autocomplete. That, and Clippy.

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

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

[–] dan@upvote.au 4 points 5 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.

load more comments (5 replies)
[–] cupcakezealot@lemmy.blahaj.zone 10 points 5 months ago

wibbly wobbly timey wimey

load more comments
view more: next ›