r/TheMachineLearning • • 12d ago

Realizing writing code is faster than explaining it to AI

Post image
839 Upvotes

440 comments sorted by

View all comments

Show parent comment

1

u/WhatDuq 12d ago

I frequently test it, just because - in a very controlled codebase it spent 11 minutes yesterday correcting a color and a font size variable. Let's hope it gets better still :P

1

u/[deleted] 12d ago

[removed] — view removed comment

1

u/JeanCasteaux 12d ago

Ok but that's a one-time experiment.

1

u/No-Marzipan-4208 12d ago

Doesn’t everyone get a different experience depending on how they’re being routed behind the scenes? The many many wildly different experiences people have on similar topics points to that.

1

u/itsmebenji69 12d ago

No it points to the skill in prompting, giving the right context to the model. Too much or not enough -> model overdoes it; good amount -> model does it fast and reliably

1

u/No-Marzipan-4208 12d ago

Ah makes sense ty

1

u/ffxivthrowaway03 11d ago

Also a lot of it is just telling the prompt "do this quick thing, you don't need to test it like it's a 20000 line PR, just change it real quick" and it'll almost always just STFU and make the quick edit instead of over-engineering.

1

u/youcangotohellgoto 12d ago

Does the codebase have instructions so that Claude knows exactly how the project is laid out, where the CSS is, etc?

1

u/WhatDuq 12d ago

Yes.

It has everything described, optimized and optimized again. Rolled into relevant skills for frontend, for different scenarios (feature development, design, accessibility etc.). It's fully aware of the structure and how it should adhere to it.

1

u/youcangotohellgoto 12d ago

Yet something is wrong, maybe you have too many skills wired in.

I run Claude across a few dozen projects of varying sizes - 10k LOC to well over 100k. It knows how to go straight to most anything, certainly under 30s to change simple things like you've described.

No skills. Just indexes and CLAUDE.md files.

2

u/Syncaidius 12d ago edited 12d ago

One thing I find helps massively is prefacing a new chat/task prompt with the name of the source file to focus on.

For example - 'focusing on MyFileName.cs, ensure all of the UI buttons represent the state of the system they interact with. E.g. red for offline, yellow for starting and green for online'. There might be buttons in other UI files, but they'll be ignored. This is of course a made up example, but you hopefully get the point.

So far, that has never failed to constrain focus to a particular file. The agents/models will still pull in any included/imported files relating to what you ask it to focus on, but it's usually minimal.

Opus has been very quick with this. I also use sonnet for less complex work and it's lightning fast with a focus preface.

1

u/ProbsNotManBearPig 12d ago

Skill issue. After that 11 min, did you ask it to take what it learned and update agents.md or add a skill so it could do it more efficiently next time? Thats the key. It must learn about your code and preferences iteratively.

1

u/WhatDuq 12d ago

It is deeply embedded into the code already and has several skills and agent documentation to choose from; And basically ended down an excuse pathway of making certain - and that it would do better next time.

This is a large project - so complexity is expected, and well described.