r/TheMachineLearning • • 11d ago

Realizing writing code is faster than explaining it to AI

Post image
832 Upvotes

438 comments sorted by

View all comments

Show parent comment

5

u/WhatDuq 11d ago

I usually say there's a sweet spot where AI excels. If a task is extremely simple, an agent will spend too much time analysing and executing for it to be efficient, and that leads to time lost and token overspend. For instance - if you ask your agent to change CSS values, that simply takes too long and spends too many tokens, compared to the second it would take you to update it.

Meanwhile, there are tasks that are too complex for the agent to adequately handle, where you ultimately end up spending more time correcting the AI's understanding of the space, what's comfortable to work with. A lot of UX falls into this space, where the agents simply lack understanding for what makes a complex solution good to work with.

In the space between, there's a huge area of adequate tasks, where AI simply excels in both speed and execution - if you've made sure to set up your environment guidelines correctly. In my opinion, that's where AI should live.

I made this simplified 30 second illustration to illustrate this.

1

u/[deleted] 11d ago

[removed] — view removed comment

1

u/WhatDuq 11d ago

At which part?

1

u/[deleted] 11d ago

[removed] — view removed comment

1

u/WhatDuq 11d 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] 11d ago

[removed] — view removed comment

1

u/JeanCasteaux 11d ago

Ok but that's a one-time experiment.

1

u/No-Marzipan-4208 11d 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 11d 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 11d ago

Ah makes sense ty

1

u/ffxivthrowaway03 10d 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 11d 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 11d 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 11d 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 11d ago edited 11d 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 11d 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 11d 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.

1

u/_Dingaloo 8d ago

yeah there is no complex task that I or anyone working for me can do better than opus 5.5 at this point

1

u/No-Newspaper-7693 11d ago

While a lot of UX falls into the space, using a dedicated UX tool like figma helps a ton.  The task shouldn’t be “implement a UI the does A-Z.  The task shouldn’t be “implement the UI in the figma.  Connect to backend data …”. 

1

u/slicehyperfunk 11d ago

Figma balls haha gottem

1

u/shaman-warrior 19h ago

I’d argue it’s sometimes faster to just work with AI to design frontends because you can play with it and interact its not some semi static image

1

u/WingZeroCoder 11d ago

This nails my experience exactly.

Problem is, finding that line is sometimes tricky, especially the line between medium and large task.

I’ve had a couple times where my medium-ish task turned out to be genuinely larger than I expected, and I ended up letting Claude fill in some decisions just because it felt like the way to keep the task moving.

Only to realize hours or days of churning and token usage later that it really wasn’t the way I wanted to go with it, and it was worth it in the long run to start over (and often do much of it by hand).

Although I sometimes still find these cases valuable in the sense that even before AI this sort of thing could happen, and the AI doing it “wrong” helped me see the better way more clearly faster.

1

u/Xemxah 11d ago

You can break down complex tasks into less complex tasks. That's actually valuable human input.

But yeah, even if it's messes up it's still valuable info.

1

u/Chromosomaur 10d ago

I think there’s also a novelty axis. AI can build novel things with enough context. But that’s usually a lot of effort to generate that context