this post was submitted on 26 Feb 2025
719 points (98.0% liked)

Programmer Humor

20886 readers
1158 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
 
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 15 hours ago

The right one is after 10+ hours of debugging.

[–] [email protected] 129 points 5 days ago (2 children)

You can instantly get whatever you want, only it’s made from 100% technical debt

[–] [email protected] 2 points 2 days ago

Just start again from scratch for every feature 🤣

[–] [email protected] 28 points 5 days ago (1 children)

That estimate seems a little low to me. It's at least 115%.

[–] [email protected] 21 points 5 days ago

even more. The first 100% of the tech debt is just understanding "your own" code.

[–] [email protected] 69 points 5 days ago (4 children)

And then 12 hours spent debugging and pulling it apart.

[–] [email protected] 29 points 5 days ago (1 children)

And if you need anything else, you have to use a new prompt which will generate a brand new application, it's fun!

load more comments (1 replies)
[–] [email protected] 9 points 5 days ago (1 children)

And it still doesn't work. Just "mostly works".

load more comments (1 replies)
load more comments (2 replies)
[–] [email protected] 57 points 5 days ago (12 children)

If you know what you're doing, AI is actually a massive help. You can make it do all the repetitive shit for you. You can also have it write the code and you either clean it or take the pieces that works for you. It saves soooooo much time and I freaking love it.

[–] [email protected] 70 points 5 days ago (1 children)

That's the thing, it's a useful assistant for an expert who will be able to verify any answers.

It's a disaster for anyone who's ignorant of the domain.

[–] [email protected] 26 points 5 days ago

Tell me about it. I teach a python class. Super basic, super easy. Students are sometimes idiots, but if they follow the steps, most of them should be fine. Sometimes I get one who thinks they can just do everything with chatgpt. They'll be working on their final assignment and they'll ask me what a for loop is for. Than I look at their code and it looks like Sanscrit. They probably haven't written a single line of code in those weeks.

[–] [email protected] 18 points 5 days ago (3 children)

I turned on copilot in VSCode for the first time this week. The results so far have been less than stellar. It's batting about .100 in terms of completing code the way I intended. Now, people tell me it needs to learn your ways, so I'm going to give it a chance. But one thing it has done is replaced the normal auto-completion which showed you what sort of arguments a function takes with something that is sometimes dead wrong. Like the code will not even compile with the suggested args.

It also has a knack for making me forget what I was trying to do. It will show me something like the left side picture with a nice rail stretching off into the distance when I had intended it to turn, and then I can't remember whether I wanted to go left or right? I guess it's just something you need to adjust to. Like you need to have a thought fairly firmly in your mind before you begin typing so that you can react to the AI code in a reasonable way? It may occasionally be better than what you have it mind, but you need to keep the original idea in your head for comparison purposes. I'm not good at that yet.

[–] [email protected] 3 points 3 days ago* (last edited 3 days ago) (1 children)

I haven't personally used it, but my coworker said using Cursor with the newest Claude model is a gamechanger and he can't go back anymore 🤷‍♂️ he hasn't really liked anything outside of cursor yet

[–] [email protected] 1 points 3 days ago

Thanks, I'll give that a shot.

[–] [email protected] 8 points 5 days ago* (last edited 4 days ago) (2 children)

I don't mess with any of those in-IDE assistants. I find them very intrusive and they make me less efficient. So many suggestions pop up and I don't like that, and like you said, I get confused. The only time I thought one of them (codium) was somewhat useful is when I asked it to make tests for the file I was on. It did get all the positive tests correct, but all the negative ones wrong. Lol. So, I naturally default to the AI in the browser.

load more comments (2 replies)
load more comments (1 replies)
[–] [email protected] 11 points 5 days ago (4 children)

If you're having to do repetitive shit, you might reconsider your approach.

load more comments (4 replies)
[–] [email protected] 7 points 5 days ago* (last edited 5 days ago) (4 children)

I knocked off an android app in Flutter/Dart/Supabase in about a week of evenings with Claude. I have never used Flutter before, but I know enough coding to fix things and give good instructions about what I want.

It would even debug my android test environment for me and wrote automated tests to debug the application, as well as spit out the compose files I needed to set up the Supabase docker container and SQL queries to prep the database and authentication backend.

That was using 3.5Sonnet, and from what I've seen of 3.7, it's way better. I think it cost me about $20 in tokens. I've never used AI to code anything before, this was my first attempt. Pretty cool.

load more comments (4 replies)
[–] [email protected] 8 points 5 days ago (3 children)

It's taken me a while to learn how to use it and where it works best but I'm coming around to where it fits.

Just today i was doing a new project, i wrote a couple lines about what i needed and asked for a database schema. It looked about 80% right. Then asked for all the models for the ORM i wanted and it did that. Probably saved an hour of tedious typing.

load more comments (3 replies)
load more comments (7 replies)
[–] [email protected] 43 points 5 days ago (8 children)

Not to be that guy, but the image with all the traintracks might just be doing it's job perfectly.

[–] [email protected] 2 points 2 days ago

That's the problem. Maybe it is.

Maybe the code the AI wrote works perfectly. Maybe it just looks like how perfectly working code is supposed to look, but doesn't actually do what it's supposed to do.

To get to the train tracks on the right, you would normally have dozens of engineers working over probably decades, learning how the old system worked and adding to it. If you're a new engineer and you have to work on it, you might be able to talk to the people who worked on it before you and find out how their design was supposed to work. There may be notes or designs generated as they worked on it. And so-on.

It might take you months to fully understand the system, but whenever there's something confusing you can find someone and ask questions like "Where did you...?" and "How does it....?" and "When does this....?"

Now, imagine you work at a railroad and show up to work one day and there's this whole mess in front of you that was laid down overnight by some magic railroad-laying machine. Along with a certificate the machine printed that says that the design works. You can't ask the machine any questions about what it did. Or, maybe you can ask questions, but those questions are pretty useless because the machine isn't designed to remember what it did (although it might lie to you and claim that it remembers what it did).

So, what do you do, just start running trains through those tracks, assured that the machine probably got things right? Or, do you start trying to understand every possible path through those tracks from first principles?

[–] [email protected] 29 points 5 days ago (1 children)

The one on the right prints “hello world” to the terminal

[–] [email protected] 6 points 4 days ago

And takes 5 seconds to do it

[–] [email protected] 24 points 5 days ago (1 children)

Engineers love moving parts, known for their reliability and vigor

[–] [email protected] 7 points 4 days ago

Vigor killed me

[–] [email protected] 9 points 5 days ago

Might is the important here

[–] [email protected] 7 points 5 days ago (4 children)

It gives you the right picture when you asked for a single straight track on the prompt. Now you have to spend 10 hours debugging code and fixing hallucinations of functions that don't exist on libraries it doesn't even neet to import.

load more comments (4 replies)
load more comments (3 replies)
[–] [email protected] 40 points 5 days ago (1 children)

Im looking forward in the next 2 years when AI apps are in the wild and I get to fix them lol.

As a SR dev, the wheel just keeps turning.

[–] [email protected] 19 points 5 days ago (3 children)

I'm being pretty resistant about AI code Gen. I assume we're not too far away from "Our software product is a handcrafted bespoke solution to your B2B needs that will enable synergies without exposing your entire database to the open web".

[–] [email protected] 19 points 5 days ago (4 children)

It has its uses. For templeting and/or getting a small project off the ground its useful. It can get you 90% of the way there.

But the meme is SOOO correct. AI does not understand what it is doing, even with context. The things JR devs are giving me really make me laugh. I legit asked why they were throwing a very old version of react on the front end of a new project and they stated they "just did what chatgpt told them" and that it "works". Thats just last month or so.

The AI that is out there is all based on old posts and isnt keeping up with new stuff. So you get a lot of the same-ish looking projects that have some very strange/old decisions to get around limitations that no longer exist.

[–] [email protected] 14 points 5 days ago

Holdup! You've got actual, employed, working, graduated juniors who are handing in code that they don't even understand?

load more comments (3 replies)
load more comments (2 replies)
[–] [email protected] 25 points 5 days ago (2 children)

Offtopic: But when I was a kid, I was obsessed with the complex subway rail system in NYC, I keep trying to draw and map it out.

[–] [email protected] 17 points 4 days ago (1 children)

When did you get diagnosed?

[–] [email protected] 4 points 4 days ago* (last edited 4 days ago)

He's got that ol' New York City Metropolitan Area Transit Authority Blues again, momma!

[–] [email protected] 8 points 4 days ago

OpenTTD is a good game.

[–] [email protected] 18 points 4 days ago (1 children)

I personally find copilot is very good at rigging up test scripts based on usings and a comment or two. Babysit it closely and tune the first few tests and then it can bang out a full unit test suite for your class which allows me to focus on creative work rather than toil.

It can come up with some total shit in the actual meat and potatoes of the code, but boilerplate stuff like tests it seems pretty spot on.

[–] [email protected] 2 points 2 days ago

I believe that, because test scripts tend to involve a lot of very repetitive code, and it's normally pretty easy to read that code.

Still, I would bet that out of 1000 tests it writes, at least 1 will introduce a subtle logic bug.

Imagine you hired an intern for the summer and asked them to write 1000 tests for your software. The intern doesn't know the programming language you use, doesn't understand the project, but is really, really good at Googling stuff. They search online for tests matching what you need, copy what they find and paste it into their editor. They may not understand the programming language you use, but they've read the style guide back to front. They make sure their code builds and runs without errors. They are meticulous when it comes to copying over the comments from the tests they find and they make sure the tests are named in a consistent way. Eventually you receive a CL with 1000 tests. You'd like to thank the intern and ask them a few questions, but they've already gone back to school without leaving any contact info.

Do you have 1000 reliable tests?

[–] [email protected] 23 points 5 days ago (1 children)

God, seriously. Recently I was iterating with copilot for like 15 minutes before I realized that it's complicated code changes could be reduced to an if statement.

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

AI can't imagine an image full glass of wine because there are barely any images of that in any dataset out there. AI can't think, just massage it's dataset into something vaguely plausible.

https://www.youtube.com/watch?v=160F8F8mXlo

[–] [email protected] 17 points 5 days ago

The key is identifying how to use these tools and when.

Local models like Qwen are a good example of how these can be used, privately, to automate a bunch of repetitive non-determistic tasks. However, they can spot out some crap when used mindlessly.

They are great for skett hing out software ideas though, ie try a 20 prompts for 4 versions, get some ideas and then move over to implementation.

[–] [email protected] 15 points 5 days ago (1 children)

And of course the ai put rail signals in the middle.

Chain in, rail out. Always

!Factorio/Create mod reference if anyone is interested !<

[–] [email protected] 1 points 2 days ago

SpoilerYour spoiler didn't work.

[–] [email protected] 10 points 5 days ago

I think I would more picture planes taking off those railroads when it comes to AI. It tends to hallucinate API calls that don't exist. if you don't go check the docs yourself you will have a hard time debugging what went wrong.

load more comments
view more: next ›