Remix.run Logo
stickfigure 4 days ago

I actively use AI to refactor a poorly structured two million line Java codebase. A two-sentence prompt does not work. At all.

I think the OP is right; the problem is context. If you have a nicely modularized codebase where the LLM can neatly process one module at a time, you're in good shape. But two million lines of spaghetti requires too much context. The AI companies may advertise million-token windows, but response quality drops off long before you hit the end.

You still need discipline. Personally I think the biggest gains in my company will not come from smarter AIs, but from getting the codebase modularized enough that LLMs can comfortably digest it. AI is helping in that effort but it's still mostly human driven - and not for lack of trying.

fooker 4 days ago | parent [-]

Have you tried this in the last few months with an expensive model? (Claude 4.6 opus high, for example)

You might be pleasantly surprised if you haven’t yet.

stickfigure 4 days ago | parent [-]

I'm using Opus 4.6, "Effort level: auto (currently high)". Used it a fair bit this week. Results are still pretty mediocre.

It's useful, but not "give it a two sentence prompt" useful.

fooker 4 days ago | parent [-]

Are you using the planning mode?

That's the way to get it to plan an exact set of actions, given a two sentence prompt.

stickfigure 4 days ago | parent [-]

No, but I will definitely try it. Thanks.