this post was submitted on 27 May 2025
656 points (99.4% liked)

Programmer Humor

23530 readers
1714 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
[–] olafurp@lemmy.world -2 points 2 days ago (1 children)

These AIs really suck at writing correct code but I've had good success in having them write code generators. I recently made it write a script that takes a SQL create table statement and converts in to TS and gives insert update, delete and whatnot and also creates a simple class that handles the operations.

I had to write the original code by hand but having it write code that writes boilerplate which I correct is pretty good.

Other code is hit or miss IMO

[–] Blackmist@feddit.uk 4 points 2 days ago (1 children)

I consider boilerplate code output like that to be well within reach of simple tools though. Tools that didn't need a year to learn from hundreds of terabytes of examples, 20GB of VRAM, or the power use of a small city.

[–] olafurp@lemmy.world 2 points 1 day ago* (last edited 1 day ago)

Don't get me wrong, I still write more than 98% of code by hand and of course, I can write those functions myself in 30m myself but I can get it in 60s with the AI. LLMs can write code to that does parse - > model - > map - > format with only one or two easy to fix bugs.

It's in the very niche cases where it's just tedious to write something out that LLMs actually work. "Write an API client that uses [library] that handles these requests/responses" comes also to mind as something that would work.

I'm using now also to learn react native where I get bugs I'm very unfamiliar with and SO doesn't give me a good answer.

I've also had decent success at having it review my code with "how would I further optimise this code" and it gives me some pointers and then writes buggy code but the approach is correct usually and I can implement it myself.