Hacker News new | ask | show | jobs
by whoomp12342 1887 days ago
yarp. we dont love clean code for the user, that should be obvious for anyone who has written a medium amount of code. we love clean code for the fact that some day, we are going to have to read our code, trace it for a bug... etc.

You can feature bloat something up to a certain point and then.... kaboom goes the rewrite. Hopefully into clean code, but usually not since clean code is a culture and mindset, not a code base.

2 comments

Exactly. Code quality is not an intrinsic good, but it is a technique for accomplishing the actual intrinsic good, which is whatever the function of the software is.

This is like saying “no one cares about training for a marathon, they only care about running a faster time”

Well, sure, but up the WAY you run a faster time is to train. You need a technique and strategy to accomplish the actual goal.

yea, but isn't the obvious logical conclusion that clean code allows you to more easily and more quickly do things that the customers do want?

this is like telling a mechanic that people don't want them to maintain their cars, they just want a reliable car that won't leave them stranded

also, why does a php and jquery app mean it isn't clean? the better takeaway is that customers don't care about your stack

It's not quite that simple: it is not unusual for an overall-clean solution in response to new requirements to require refactoring the existing codebase, even if that is a clean and minimal solution for the requirements up to that point.

Even if you had anticipated that these additional requirements were likely, preparing in advance for their possibility would often mean over-engineering for the initial requirements, which would likely delay the initial release.

If there wasn't a genuine conflict of interests here, we would not still be wrestling with it.

The problem with over-engineering is also that it makes other refactoring harder at later stages, or just discourages change. Some degree of shittiness actually improves agility, and encourages change.
Amen, I have been guilty of this as well. It is a hard line to walk between over engineering and future proofing something.