this post was submitted on 18 Dec 2025
748 points (98.6% liked)

Programmer Humor

27920 readers
1483 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 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] definitemaybe@lemmy.ca 3 points 18 hours ago (1 children)

I actually got really clean, well commented code from Copilot earlier this week.

I have no experience with JavaScript to speak of, but realized a Bookmarklet would be a perfect solution for reformatting a particular arcuate for printing. I already had a head replacement with CSS to do all the formatting, and I was using a RegEx to strip all script tags.

Anyway, I asked Copilot to write the Bookmarklet to replace the header, with full contents explaining the training behind the code, and an explanation of how the script functions below. When I got an error, I asked if to fix the error and or identified that Bookmarklets work better as single lines, so it fixed it. Then I added the requirement about replacing scripts, and it did that too, but for commented and a clean one-line version.

The one-live versions even up getting truncated, so I need to copy/paste from earlier (correct) endings, but otherwise it was an incredibly smooth experience.

I spent longer writing the guide for how to use it than the time it took to vibe code it and test it. I was super impressed.

(Granted, that's a pretty easy coding task...)

[–] Clent@lemmy.dbzer0.com 6 points 17 hours ago (1 children)

no experience with JavaScript to speak of

You claim no JavaScript experience, declare confident in the comments and include any examples.

All you've really said here is you vibed coded a solution to a problem using one of the most common languages without knowing the language. And made claims you do not attempt to prove.

[–] definitemaybe@lemmy.ca 1 points 4 hours ago

I know enough to parse the code, especially with the comments. It was a logical algorithm, it worked, and it was just for reformatting a sure to print cleanly, so there was basically no rush if it didn't work. I code for work, I just don't know JavaScript syntax or functions.

Anyway, I was impressed it actually worked. I'm an AI skeptic, which is why I thought it was noteworthy to get well documented, clean, functional code from vibe coding—even in such a trivial context as swapping a head tag and removing script tags.