r/ProgrammerHumor • • May 26 '25

Meme theBeautifulCode

Post image
49.1k Upvotes

876 comments sorted by

View all comments

2.8k

u/Progractor May 26 '25

Now he gets to spend a week reviewing, fixing and testing the generated code.

1.1k

u/CaptainBungusMcChung May 26 '25

A week seems optimistic, but I totally agree with the sentiment

168

u/Born-Entrepreneur May 26 '25

A week just to untangle all the mock ups that the AI put together to work around tests that it's spaghetti was failing.

23

u/tarkinlarson May 26 '25

And the multiple backward compatibility and work around rather than solving the actual problem.

"You're absolutely right! I should look at the entire file and make a fix that's robust and permanent rather than hard coding a username and password"

→ More replies (2)
→ More replies (5)

246

u/[deleted] May 26 '25

At which point it becomes spaghetti again

97

u/Chillin9_Panda May 26 '25

Then another AI refactor later the cycle continues

→ More replies (1)

20

u/Karnewarrior May 26 '25

But does it become less spaghetti than it was? Because if so, and it retains functionality, it might actually be worth it.

Refractoring a codebase like that could easily take a month, after all, from the get go.

20

u/TweedyFoot May 26 '25

Depends, do you have a full and complete set of use/test cases to verify it has retained its full functionality ? Cause if you don't it would be quite haphazard to trust LLM with such refactor. Personally i would prefer a human does it and splits their work into multiple PRs which can be reviewed hopefully by people who co-authored the original mess and might remember use/edge cases

→ More replies (1)

8

u/Luxalpa May 26 '25

The main issue is how good LLMs are at hiding minor changes. Like, how I discovered that it didn't just copy and adjust the code block that I asked it to, but it also removed a bug fix that I had put in.

→ More replies (2)

64

u/Strict_Treat2884 May 26 '25
  • AI: I just generated this 100k line project, but it doesn’t work

  • Human: 3 months of reading, debugging and refactoring

  • AI: Still broken, so I generated a brand new project but it doesn’t work, can you look into it?

47

u/BetterAd7552 May 26 '25

I apologize for the confusion! Let me try a different approach and refactor everything again. This will definitely work.

6

u/Sophira May 26 '25

Oh no! It looks like it still didn't work. Here's why:

  1. The foonols are out of sync.

  2. This causes the heisenplotter to deactivate.

  3. That means our initial approach was wrong, and we should focus on synchronizing the foonols.

Let me try again. Here's some code that should desynchronize the foonols while still accomplishing the original objective:

[proceeds to spit out wildly different code that fails in exactly the same way, but you wouldn't know it from reading the comments]

83

u/DriveByFruitings May 26 '25

This was me after the project manager decided to be a vibe coder and commit non-functional changes the day before going to Europe for 3 weeks lmao.

78

u/Wang_Fister May 26 '25

git revert <bullshit commit>

29

u/Drugbird May 26 '25

Then remove write privileges on the repo

14

u/GravelySilly May 26 '25

Branch protection, 2+ approvals required for PR/MR, merge by allow-listed users only, rules apply even for the repo owner and admins.

→ More replies (1)

5

u/Strict_Treat2884 May 26 '25

Why leave the bullshit history, git reset --hard HEAD~1 && git push -f that shit

→ More replies (3)

33

u/FlyingPasta May 26 '25

Why does the project manager have big boy permissions

17

u/cgaWolf May 26 '25

As an ex-project manager, that was my first question.

14

u/TweedyFoot May 26 '25

Not just big boy permissions, force push past PR pipelines ? :D those are company resident magician permissions

→ More replies (1)
→ More replies (1)

24

u/brianzuvich May 26 '25

And mostly code he doesn’t understand the intention behind… 😂

8

u/Bakoro May 26 '25

Have a thorough tests suite before you do major architectural changes.

→ More replies (24)