by satyanash · 4y ago · 0 comments
YAGNI is not a principle. It is a contextual thumb rule. A codification of expert intuition. Exceptions to thumb rules are quite the norm. Conflating thumb rules with principles is a sign of sloppy thinking. Often engineers will misuse terminology thinking that it "doesn't matter". But it does. Think twice before claiming that something is a principle. The words you use highly influence your thought process[0].
Multiple dictionaries and thesauruses would disagree with you there. Rule of thumb is often defined in terms of "rules, procedures, principles, or... ...derived from..."
Some sources say that "rule of thumb is a principle or procedure...""
So, you know, going straight to "sloppy thinking" reminds me of OldManYellsAtCloud.jpg.
Anyway, I'm really not sure what difference you perceive - principles are often derived from experience, as well as theory, and they often have exceptions too.
Many people have a principle of not committing violence, for example. _Except_ when (multiple clauses follow).
Rules and procedures are a further watering down of the original idea, where even the rule-of-thumb's justification isn't paid attention to or even has been lost over time.
But people are entirely able to derive their own rules of thumbs, if we hark to the common definition that a rule of thumb is a principle/procedure/process derived from practical experience.
For example, I rapidly developed a rule of thumb when dating post-divorce that any person who said "I hate drama" in their dating profile is in actual fact the source of any drama, but it took me a couple of disastrous dating attempts to develop that rule of thumb.
[0]: https://en.wikipedia.org/wiki/Right-hand_rule#Electromagneti...
[1]: https://en.wikipedia.org/wiki/Fleming%27s_left-hand_rule_for...
DRY often has exceptions to the "rule"/"principle" too though. And people often blog on these exceptions.
And pragmatism and dogmatism aren't a xor, they're just convenient labels for the -X and the +X ends of the axis.
(Admittedly, the fact that I've seen more "It's okay to have exceptions to DRY" blog posts than "It's okay to have exceptions to YAGNI" indicates you're right about their relative weighting on that axis.)
In fact, the ultimate defining characteristic of a "principle" is that it has exceptions and should not be used as the "ultimate word of God".
Even in Physics, where most would think a "principle" means something "without exception", they are only ever currently without exception according to current evidence. There has been countless times where there has been a scientific principle only to be disproven later on.
Lastly, you link Sapir–Whorf, which, quite ironically, is considered a "principle" yet has had much criticism over time, which contradicts your own argument.
However, I will agree with you that one should always be careful of the language they use since it can affect how others view your thoughts, feelings, and intentions.
Given that the article is literally about exceptions to YAGNI, and explicitly calls out that there are probably more, their use of the term "principle" doesn't appear to have caused them any harm.
> The words you use highly influence your thought process[0].
Yet in the very article you link it says (emphasis mine)
> The strong version, or linguistic determinism, says that language determines thought and that linguistic categories limit and determine cognitive categories. This version is generally agreed to be false by modern linguists.[3] > The weak version says that linguistic categories and usage only influence thought and decisions.[4] Research on weaker forms has produced positive empirical evidence for a relationship.[3]
Your use of 'highly' would suggest a strong relativity, but that's discredited. Signed, a disgruntled linguist who's tired of people banging on about Sapir-Whorf.
The contract is called CongressAuthorizesInvadingCountry(country :Country): Invasion
Congress made a thunk with Iraq in it, so despite the lack of any real connection to Recent Events, the White House called it in 2003.
Try writing destroyKiev instead and see what happens.
A blogpost/article about YAGNI manages to suggest a rather nuanced feature should always be included, that isn't needed, right up front.