3 ms·
The fact that everyone can come up with his own definition of what "clean" is supposed to mean regarding code, tells us something very important about it: It h
by usrbinbash 5y ago
The fact that everyone can come up with his own definition of what "clean" is supposed to mean regarding code, tells us something very important about it:
It has no intrinsic, defined meaning in the context of code.
Saying code is "clean" is like saying food is "tasty"...its a personal opinion, not a defined term.
- RangerScience 5y agoStrong disagree. It's defined meaning in the context of code is a subjective experience of the coder of "clean", which carries elements of "satisfying", among other things. Maybe: It has no intrinsic, defined meaning in the context of the computing machine.
- usrbinbash 5y ago> is a subjective experience of the coder of "clean" My subjective experience of grapefruits is that they are yucky. That tells others that I don't like grapefruits, but it tells them nothing about the grapefruit. It tells them nothing about, what exactly in the interplay between the chemical composition of grapefruit juice, the genetic programming behind my tastebuds, and the personal experiences which shaped my individual perception of "tastyness vs. yuckyness", makes them "yucky" for me.
- TameAntelope 5y agoBut there is agreed-upon tasty food, so there is some kind of intrinsic, shared meaning of the word, which is also true of code. It's not objective, but there is a consensus among peers. Honestly, it is like art, but these analogies kind of fall flat since we're not all "artists" in the traditional sense, usually. The reality is, for a painter, there are things that come close to objectively "good" works, a lot more so than for the layperson, and an experienced painter can walk you through all the different "types" of "good" art, just like an experienced coder can walk you through all the different "types" of "good" code. Just because we can't write down in a few pithy words what "clean code" is doesn't mean it doesn't exist, it just further confirms something we've all known for a long time now; code is art.
- rootlocus 5y agoAnd yet we all agree, spoiled food tastes terrible.
- usrbinbash 5y agoYes we do, but "this tastes terrible" still doesn't tell me what that means without additional context. It could be terrible because its spoiled. It could be terrible because the person doesn't like that food. Same with "clean code". I think alot of people would agree that a 10000 line program where all the code lives in the main function is not "clean". But that doesn't mean this is what someone means when he says "this isn't clean code".
- maximus-decimus 5y agoBut not all food that tastes terrible is spoiled.