Hacker News new | ask | show | jobs
by KronisLV 1090 days ago
> I really don't enjoy the discourse regarding "code cleanliness". A lot of the time it's just about "I prefer writing things this way" rather than the code actually being slower/harder to read/maintain/whatever.

Agreed, that's why I think there's arguments that can be made in favor of both DRY/WET, as well as SOLID/CUPID/whatever, even when those are in contradiction with one another, as well as more freeform approaches and KISS/YAGNI. Whatever works for each team and project.

> There's a billion ways to write something and none of them are outright wrong!

However, when your app is doing 2000 DB calls to render a list with some data because of the N+1 problem, I'd say that the code is definitely written wrong. When you need to jump around 20 different files across 6 layers of abstraction that could have easily fit into half of that, then the code might definitely be wrong and unmaintainable.