5 ms·
"Rules" often contradict each other. For example, in software development, "keep it simple" often directly conflicts with "dont repeat yourself" as it takes in
by methodsignature 5y ago
"Rules" often contradict each other. For example, in software development, "keep it simple" often directly conflicts with "dont repeat yourself" as it takes increased complexity to achieve reuse of code. I often see keeping it simple take a back seat in newer developers as they slavishly follow the don't repeat yourself trail. The end result is routinely a brittle, rigid, and overly complex solution.
- layoric 5y agoDon’t repeat yourself or making code “DRY” sounds/sells so much better than tightly coupled.
- q-big 5y ago> For example, in software development, "keep it simple" often directly conflicts with "dont repeat yourself" as it takes increased complexity to achieve reuse of code. KISS and DRY are different paradigms, i.e. come from different schools of programming.
- jackcviers3 5y agoKISS - Most people would not recognize simple code if it hit them I'm the mouth. KIES (keep it easy, stupid) is what they mean, and that means following idioms, frameworks, that are familiar.
- ludamad 5y agoDRY I would argue doesn't conflict nearly as much with a nuanced approach. "Apply Aggressive Compression to Your Code" certainly flies in the face of many other nice features of code as a working body, though My more nuanced take I guess is "don't duplicate logic, except if it may in fact be mutable data". It does take some forward thinking to think that this e.g. list of 10 rules should be unrolled and not compressed by meaningless helpers, etc
- beckingz 5y agohttp://thecodelesscode.com/ http://thecodelesscode.com/
- valand 5y agoDRY and KISS talks about different things. DRY is about knowledge management. The intention is to not avoid duplication of code which is a knowledge representation of the same thing. It does not mean every coincidentally similar looking code must be made into a function, as it would result in a premature abstraction, etcetera etcetera. It's why "minimum three duplication" principle is effective, because it filters which duplication represents the same knowledge and which does not. KISS is (ironically) a more complex topic. C2 wiki talks about this in an interesting way. https://wiki.c2.com/?KeepItSimple https://wiki.c2.com/?KeepItSimple