2037
the beautiful code (programming.dev)
submitted 3 days ago by [email protected] to c/[email protected]
top 50 comments
sorted by: hot top new old
[-] [email protected] 8 points 1 day ago* (last edited 1 day ago)
[-] [email protected] 17 points 2 days ago

Write tests and run them, reiterate until all tests pass.

[-] [email protected] 27 points 2 days ago

Bogosort with extra steps

[-] [email protected] 15 points 2 days ago* (last edited 2 days ago)

That doesn't sound viby to me, though. You expect people to actually code? /s

[-] [email protected] 9 points 2 days ago

You can vibe code the tests too y'know

[-] [email protected] 3 points 2 days ago

Return "works";

Am I doikg this correctly?

load more comments (4 replies)
[-] [email protected] 108 points 3 days ago

Ai code is specifically annoying because it looks like it would work, but its just plausible bullshit.

[-] [email protected] 37 points 2 days ago

And that's what happens when you spend a trillion dollars on an autocomplete: amazing at making things look like whatever it's imitating, but with zero understanding of why the original looked that way.

load more comments (8 replies)
[-] [email protected] 25 points 2 days ago

Well I've got the name for my autobiography now.

load more comments (2 replies)
load more comments (1 replies)
[-] [email protected] 56 points 2 days ago* (last edited 2 days ago)

Watching the serious people trying to use AI to code gives me the same feeling as the cybertruck people exploring the limits of their car. XD

"It's terrible and I should hate it, but gosh it it isn't just so cool"

I wish i could get so excited over disappointing garbage

[-] [email protected] 11 points 2 days ago

You definitely could use AI to code, the catch is you need to know how to code first.

I use AI to write code for mundane tasks all the time. I also review and integrate the code myself.

[-] [email protected] 4 points 2 days ago

The AI code my “expert in a related but otherwise not helpful field” coworker writes helps me have a lot of extra work to do!

[-] [email protected] 2 points 1 day ago

It's useful if you just don't do....That. it's just a new fancy search engin, it's a bit better than going to stack overflow, it can do good stuff if you go small.

Just don't do whatever this post suggested of doing...

[-] [email protected] 273 points 3 days ago

Code that does not work is just text.

[-] [email protected] 171 points 3 days ago

I’ve never thought of it that way. I’m going to add copy writer to my resume.

load more comments (5 replies)
load more comments (13 replies)
[-] [email protected] 86 points 3 days ago

All programs can be written with on less line of code. All programs have at least one bug.

By the logical consequences of these axioms every program can be reduced to one line of code - that doesn't work.

One day AI will get there.

[-] [email protected] 13 points 2 days ago

The ideal code is no code at all

[-] [email protected] 16 points 2 days ago

On one line of code you say?

*search & replaces all line breaks with spaces*

load more comments (7 replies)
[-] [email protected] 147 points 3 days ago* (last edited 3 days ago)

The image is taken from Zhihu, a Chinese Quora-like site.

The prompt is talking about give a design of a certain app, and the response seems to talk about some suggested pages. So it doesn't seem to reflect the text.

But this in general aligns with my experience coding with llm. I was trying to upgrade my eslint from 8 to 9, and ask chatgpt to convert my eslint file, and it proceed to spit out complete garbage.

I thought this would be a good task for llm because eslint config is very common and well-documented, and the transformation is very mechanical, but it just cannot do it. So I proceed to read the documents and finished the migration in a couple hour...

[-] [email protected] 72 points 3 days ago

I asked ChatGPT with help about bare metal 32-bit ARM (For the Pi Zero W) C/ASM, emulated in QEMU for testing, and after the third iteration of "use printf for output" -> "there's no printf with bare metal as target" -> "use solution X" -> "doesn't work" -> "ude printf for output" ... I had enough.

[-] [email protected] 2 points 1 day ago

Can't you just send prints to serial?

[-] [email protected] 1 points 1 day ago

Yes, that was the plan, which ChatGPT refused to do

[-] [email protected] 55 points 3 days ago

Sounds like it's perfectly replicated the help forums it was trained on.

load more comments (8 replies)
load more comments (21 replies)
[-] [email protected] 77 points 3 days ago

Welp. Its actually very in line with the late stage capitalist system. All polish, no innovation.

load more comments (1 replies)
[-] [email protected] 71 points 3 days ago

To be fair, if I wrote 3000 new lines of code in one shot, it probably wouldn’t run either.

LLMs are good for simple bits of logic under around 200 lines of code, or things that are strictly boilerplate. People who are trying to force it to do things beyond that are just being silly.

load more comments (36 replies)
[-] [email protected] 47 points 3 days ago

I’ve heard that a Claude 4 model generating code for an infinite amount of time will eventually simulate a monkey typing out Shakespeare

load more comments (2 replies)
[-] [email protected] 71 points 3 days ago
load more comments (3 replies)
load more comments
view more: next ›
this post was submitted on 27 May 2025
2037 points (99.5% liked)

Programmer Humor

23545 readers
2687 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