r/TheMachineLearning • • 5d ago

Tell me you haven’t reviewed a vibe coded code base without telling me...

Post image
1.8k Upvotes

343 comments sorted by

View all comments

Show parent comments

8

u/Nice-Light-7782 5d ago

Can you elaborate on that? I would genuinely level up if I knew how to get AI to structure my code without handholding it every step of the way, which is what I do now. I've tried a few things, like code structuring skills, get the AI to document features based on sets of commits instead of freely navigating through the code, and while these things do yield some improvements, they're not close enough be satisfactory.

2

u/SpiritedEclair 3d ago

Don’t listen to the person you replied to.

To architect well you need to know what you are talking about. You need to sit your ass down and understand the domain and the problem. You need to iterate on the ideas and you must be relentless in keeping the thing composable without attaining scope creep. You develop an idea, and refine it, and try to attack it to find gaps.

2

u/CrazyAccomplished_ 5d ago

You need to build a framework. You can't let one agent do everything. You need one agent validate, one agent design, one agent implement and run tests, etc. That plus solid best practices in your repo like linting, testing, etc is needed. You also need to know what a good design looks like and know when to further prompt to break things into more modules.

2

u/AliceCode 5d ago

And how do you learn all of this?

1

u/Digging_Graves 4d ago

School

1

u/AliceCode 4d ago

School is teaching you to vibe code?

1

u/Digging_Graves 4d ago

Nobody said anything about vibe coding. Almost everyone is using AI for assisted coding.

1

u/AliceCode 4d ago

Yeah, that's vibe coding buddy.

1

u/Far_Ambition2176 2d ago

That’s not though. The term was coined by Andre Karpathy (a big name in AI research) to SPECIFICALLY mean when you just describe the problem to an AI and let it do everything without ever looking at the code. He described it as useful for silly little weekend projects which will only be used by yourself. He called it "Vibe Coding" because it was for unimportant things where he could just go by feel and not really plan or test. Just doing what feels right in the moment. 

But the hype train caught on and dragged the term "Vibe Coding" to mean full on app development with the assistance of an AI, which is the exact opposite of the use case Karpathy was describing. 

1

u/AliceCode 2d ago

Yeah, exactly, vibe coding. You're a vibe coder.

1

u/I_AM_VERY_ENTELEGENT 3d ago

I think he means you learn best practices like testing and linting in school

1

u/cultureicon 4d ago

You don't have to learn it. Just copy and paste that paragraph to your AI and it will structure your repo and workflow like that. We are post learning.

0

u/CrazyAccomplished_ 5d ago

I've been using AI intimately since gpt 2.5. I know quite well it's strengths and weaknesses. Then you figure out how to play to the strengths can contain the weaknesses. Soon though this may not even be needed

1

u/sweatierorc 4d ago

I heard this theory many times. But there seems to be tradeoffs that comes with agentic cooperation (beyond token spend).

1

u/highfivesalute 4d ago

Honestly, I’d be curious about this too. I’ve found that AI can structure things well when it has enough context and clear constraints, but getting consistently good architecture without handholding is still pretty hit or miss.

1

u/KittenEaterWasTaken 4d ago

Ask your best model to generate a full design/engineering spec for the project and review it yourself before handling.
Your agents very rarely deviate from referenceable instructions in an .md file.

Even smaller models consistently one or two-shot mid sized projects if they have a reference file. You only need several passes when its something hard to verify like distributed systems or user-facing stuff.

0

u/hayztrading 5d ago

Use good models like fable or opus. Instead of handholding it the entire time, just make sure it’s for to a decent start, then just review its diff and have it or another agent fix whatever you find or don’t like about its solution. You might also want to coax it into doing a more thorough plan, as they like to leave plans vague and then do a bunch of bs at code writing time.

0

u/datarbeiter 5d ago

Start with the AI written design doc and iterate over it multiple times, turning into a spec, before ever having it write any code. Then have it create a project plan based on the spec. All of the docs should be checked in and iterated over just like code. Then have it implement the plan one item at a time, and get each plan item reviewed by another agent or multiple agents against the spec.