Hacker News new | ask | show | jobs
by gpderetta 1509 days ago
Pragmatism vs Dogmatism. For example DRY vs YAGNI. The first is more dogmatic: refactor everything that can be refactored, while the second is more pragmatic. The refactor is probably not necessary and might turn out not to be necessary. An even more pragmatic rule is the You Aint Gonna Need It Yet.
1 comments

> Pragmatism vs Dogmatism. For example DRY vs YAGNI.

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.)

That is because DRY sets a puzzle for us, how to cleanly reuse some code. YAGNI on the other hand, denies us a puzzle. We like puzzles.
I like your thinking on this