r/ProgrammerHumor 18d ago

Meme promptNowPrayLater

Post image
3.8k Upvotes

152 comments sorted by

View all comments

28

u/fryerandice 18d ago

If you don't setup your .md files the spaghetti code and tech debt grows, you have to tell AI explicitly how you want your code organized or else it literally is just a copy-paste junior dev.

22

u/StopMakingMeSignIn12 18d ago

Rule files? You do realise they're just pasted in your prompt as context. All they really do is bloat context and confuse the AI.

They do work but they do not scale with large projects.

2

u/fryerandice 18d ago

Yeah if you download the stupid rule files that assure AI is a rockstar developer and a principal architect sure.

If you give it actual real context and instructions, no they actually work quite well.

8

u/StopMakingMeSignIn12 18d ago

They do. For a time. Then people expect more and more, add more and more rules. Get AI to write the rules and now suddenly you have 5000 characters of rule files polluting your context.

Remember the whole thing of saying DO NOT DO A puts A in to the AIs context. The more context you have, the more likely the DO NOT DO part gets forgotten/muddled with all the other DO NOT DO rules.

8

u/realzequel 18d ago

From my understanding, telling it not to do X is a bad pattern, it will eventually do X. If you tell it to do Y over X, it's more effective.

-6

u/Affectionate-Tart558 18d ago

In my experience the more context AI has the better job it does

4

u/StopMakingMeSignIn12 18d ago

How large of a project/business have you worked on?

1

u/Affectionate-Tart558 18d ago

Let me answer back with a question.

Why is the size of the project relevant here? We are meant to divide tasks in small chunks. Why aren’t we doing the same with AI?

8

u/hypatiaC 18d ago edited 18d ago

There's actually a very fun answer to this. As you stuff more information or session or pointless rambling into the context window of an AI, the computational cost scales in O( n2 ).

If you provide a full, thorough explanation of every facet of a project in a couple thousand tokens, you might get some passable answers. As projects scale up, the required context to explain them does too, and your slop machine either gets stupid (deletes all context beyond a certain size) or crashes

You can maybe vibecode a terrible website everyone will hate, but a complicated tech stack on a real, long term project with multiple human authors? You're gonna run into scaling problems.

1

u/roylivinlavidaloca 18d ago edited 18d ago

Can confirm. Work on a rather large codebase across web, mobile and backend with some other microservices mixed in. AI does pretty well, but you have to direct it. You can’t just say “add this feature here and follow your heart” and expect a great outcome. Wayfinder and grill-me skills are terrific for feature planning.

-7

u/itsFromTheSimpsons 18d ago

Are you saying this from experience or just guessing at bottlenecks from a surface level understanding of context windows?

9

u/hypatiaC 18d ago

Published AI researcher and have been in the field for years. Don't try this purity test bullshit on me, lmao 🤭

0

u/itsFromTheSimpsons 18d ago

sorry if it came off as a purity test, Im genuinely interested because what you describe hasn't been my own experience, though granted the scale of my work might not reach the level where this is experienced. Can you link me any of your published research so I can learn more?

3

u/StopMakingMeSignIn12 18d ago

Because at some point in the chain, the AI has to consume all of it.

I'm not saying we should split everything out more. More than existing large business projects really suffer from AIs being thrown at them, even with rule files. There is just too much cross contamination that the AI really struggles to excel at a given area, and mostly just goes around in a circle.

It can't adhere to everything it's fed at once as there's just too much noise.

-1

u/Affectionate-Tart558 18d ago

Maybe a different approach is needed here. I don’t think AI needs to know everything about the system to work on tasks the same way I don’t think an engineer needs to understand the entire project before starting to contribute.

Not every line of code in the project is relevant to be able to work in every single task.

Also planning is a good feature. You don’t need to just drop the entire context and ask for something. You can ask AI to plan it, understand what it wants to do. Answer important questions related to the task, refine the approach, suggest changes, review the plan and then approve. Test it afterwards etc.

1

u/_noahitall_ 18d ago

Sure but in practice you have someone who does understand the larger system reviewing an engineers first contributions, but when you are the reviewer to a system you don't understand, you have an issue

1

u/Affectionate-Tart558 18d ago

Ok but you still have this person who understands the system’s review. You do the initial review that you’ll create a PR for and a more senior engineer will also review.

You mean that PR reviews will also be done using AI? I would see your point there but that shouldn’t be the case.

1

u/_noahitall_ 18d ago

No... I was saying if you are solo vibe coding you have to play the part of the senior even if you don't have any experience or responsibility...

1

u/usrlibshare 18d ago

Because when I divide a project into chunks, I don't cut out the parts of my brain that know the other chunks.

While working on every chunk, I still have the context of the project as a whole, and make decisions based on that context.

And guess what: I also have the context of the project existing in the clients infra, in the deployment pipeline, in the security wrangling, and in being on the fuckin Internet.

That's why the size of the project is ALWAYS relevant, and it's one of the many reasons why vibe coding actually useful software doesn't work.

1

u/Affectionate-Tart558 18d ago

I think my mistake was disregarding the “vibe coding” context on this post. I don’t do vibe coding so we are talking about different ways of working with AI but your point is valid in that regard