top | item 40765090

(no title)

khold_stare | 1 year ago

And the code is godawful. Just look at this mess for internationalization: https://github.com/i365dev/LetterDrop/blob/main/app%2Fsrc%2F... . The code is unmaintainable by a human - there is a ton of unnecessary duplication, a gigantic html string instead of something like tsx, etc etc. I don't know how the OP can trust this output - I certainly don't.

discuss

order

anonzzzies|1 year ago

I am in a (large) project currently that has been running since 2016; it has 100k+ files like this. The team (I am there to write a code quality report ;) of humans has 0 problems maintaining it. This weird ‘all code must be pristine’ attitude on HN is interesting; I do a lot of these types of code audits and more than 80% of mission critical code I encounter at large companies / institutions is like this or worse and is happily maintained by humans. Take some Spring projects started somewhere in the 2000s with the original team gone: I see 10000s of lines added in jsps files because it was faster/easier to do than actually understanding the structure and properly writing the classes etc.

braza|1 year ago

> And the code is godawful

You would be surprised on how big corporations are running on not so elegant code and generating revenue all over.

I used to be more principled around code best practices and having things well written, but with the LLMs I just discovered that unless your in a very critical domain where performance or maintenability is a hard requirement, the LLMs with bad code just solve the problem and everyone can be happy.

latexr|1 year ago

Everyone, that is, except for the customers dealing with buggy slow products that will eventually be breached and leak their data. And the good developers who now have to hunt for dumb bugs without clues for where to look because the person who generated the code can’t help either.

croes|1 year ago

Are these the same companies we hear about because the got hacked because of security holes in their code?

garylkz|1 year ago

Aren't that basically all those web framework that we've been using (except that it's worse and less maintainable)?

The code generated is very hard to be maintained by human unless you're very knowledgeable and knows what specific things to change (since generally we only interact on framework level unless there's some specific requirements, like how the author proposed to "modify the prompt" instead of the generated code)

That said, I don't think that the so called "prompt based" cough cough engineering is viable at current state, or anytime soon.

gavmor|1 year ago

At least using a framework like React would expose these HTML blocks to the typechecker.

gavmor|1 year ago

Wow, CSS in a style tag in a string in try block in an anonymous function all declared right there in index.ts—no units, to say nothing of tests!

Would be a huge nuisance to maintain.

Closi|1 year ago

Huge nuisance to manually maintain, but the suggestion is that you maintain it with an LLM.

Is the code bad? Sure.

Could I build this in 10 hours without an LLM having no experience with cloudflare workers and typescript? Probably not.

Could I build this in 10 hours with an LLM? Probably.

mvdtnz|1 year ago

Yikes. Best of luck adding a new language or updating your templates without introducing bugs or discrepancies.