Remix.run Logo
AlecSchueler 13 hours ago

> Its the only model that gets production ready output on the first detailled prompt. Yesterday I used my tokens til noon, so I tried some output from Gemini & Co. I presented a working piece of code which is already in production:

One does often hear that where LLMs shine is with greenfield code generation but they all start to struggle working with pre-existing code. It could be that this wasn't a like for like comparison.

That said I do personally feel Claude to produce far better results than competitors.

piva00 9 hours ago | parent | next [-]

> One does often hear that where LLMs shine is with greenfield code generation but they all start to struggle working with pre-existing code. It could be that this wasn't a like for like comparison.

In my experience working in a large codebase with a good set of standards that's not the case, I can supply examples already existing in the codebase for Claude to use as a guidance and it generates quite decent code.

I think it's because there's already a lot of decent code for it to slurp and derive from, good quality tests at the functional level (so regressions are caught quickly).

I do understand though that on codebases with a hodge podge of styles, varying quality of tests, etc. it probably doesn't work as well as in my experience but I'm quite impressed about how I can do the thinking, add relevant sections of the code to the context (including protocols, APIs, etc.), describe what I need to be done, and get a plan back that most times is correct or very close to correct, which I can then iterate over to fix gaps/mistakes it made, and get it implemented.

Of course, there are still tasks it fails and I don't like doing multiple iterations to correct course, for those I do them manually with the odd usage here and there to refactor bits and pieces.

Overall I believe if your codebase was already healthy you can have LLMs work quite well with pre-existing code.

jacquesm 13 hours ago | parent | prev | next [-]

> One does often hear that where LLMs shine is with greenfield code generation but they all start to struggle working with pre-existing code.

Don't we all?

astrange 2 hours ago | parent | next [-]

I'm better at pre-existing code, if only because empty text files give me writers block.

AlecSchueler 11 hours ago | parent | prev | next [-]

Whether we do or not it's besides the point. The comparison was between Claude, which produced competent greenfield code, and Gemini which struggled with brownfield. The comparison is stacked in Claude's favour.

seba_dos1 12 hours ago | parent | prev [-]

Nope.

ivan_gammel 12 hours ago | parent | prev [-]

Greenfield implementation is not flawless as well.

ajshahH 8 hours ago | parent [-]

The only sources of these “it works flawlessly” I know of are:

- literal Claude ads I see online

- my underperforming coworkers whose code I’ve had to cleanup and know first hand that no, it wasn’t flawless

This kind of sentiment is gaslighting CTOs everywhere though. Very annoying.