logoalt Hacker News

zmmmmm • today at 8:19 AM • 7 replies • view on HN

The tendency to over-engineer and over-build is one of the main challenges I'm seeing. When it comes for free, why not build a class hierarchy of 8 classes each with a 200 line unit test? Something I might have previously thought really hard to minimalise down to 30 lines is now bloated out to hundreds or even thousands.

Previously, pretty much everyone all agreed on YAGNI and KISS because code was so expensive to create and more expensive to maintain. Now the code generation is "free" - but at a design level, YAGNI and KISS do still matter. But they are enforced now only by sheer will power. You have to actively restrain the code from being created if you don't want it. Perfectly good code - I can't even fault it. I just know, if it doesn't need to exist yet, it's a mistake to create it earlier than needed.


Replies

lioeters • today at 8:39 AM

Like that quote in Le Petit Prince, real intelligence is knowing what not to build, what can be eliminated until only what's necessary is left.

> La perfection est atteinte non pas lorsqu'il n'y a plus rien à ajouter, mais lorsqu'il n'y a plus rien à retirer.

> Perfection is attained not when there is nothing more to add, but when there is nothing more to remove.

➕ show 2 replies
GoblinSlayer • today at 9:16 AM

I don't think anybody tries into KISS, most software is bloated and LLMs copy it, they fundamentally can't think out of the box.

➕ show 3 replies
MSFT_Edging • today at 1:24 PM

This is so true. I've been seeing LLM generated code that does way too much, yet still cant accomplish the stated goals. "maximally flexible" plugin systems, that are too complicated to reasonably write a plugin for quickly, when one could have just built in the needed functionality in a few hundred lines.

When endless bootstrapping and framing is free, you end up generating the most beautiful scaffold while ignoring the building behind the scaffold.

Fr0styMatt88 • today at 11:31 AM

I think this sorta cuts both ways too. Sometimes AI code has shown me that no, I in fact don't need that big class hierarchy and speculative plumbing that I thought I might need to get the job done.

Keeping the volume of code down is definitely a challenge though.

orbis-tertius • today at 10:18 AM

[dead]

haukebri • today at 10:03 AM

[dead]