Obviously there are syntactical differences between YAGNI and KISS but I can't see any semantic differences between them. Are they really in essence just the same thing?
YAGNI (You aint gona need it) refers to over analyzing and implementing things that may or may not be needed. Sure algorithmic elegance is nice and all but most situation you dont need it. In general engineering terms you should be carefull not to include your own requirements so that you dont taint your customer needs with your own ideas that end up costing the project with little impact for the client.
KISS (Keep it simple stupid) refers to the fact that easy systems are easier to manage. Keeping things simple is not nesseserily less work (like YAGNI is) since it requires more knowlege to implement. They are sometimes similar but grow from different needs.
YAGNI grows from a too much future anticipation, overzealous workers if you may. KISS is a strategy that tries to counteract human tendency for design creep.
Short: Yagni states you need to cut off the code you don’t need right now, KISS is about making the remaining code simple. Here’s how it can be visualized:
read more here
YAGNI (You aint gona need it) refers to over analyzing and implementing things that may or may not be needed. Sure algorithmic elegance is nice and all but most situation you dont need it. In general engineering terms you should be carefull not to include your own requirements so that you dont taint your customer needs with your own ideas that end up costing the project with little impact for the client.
KISS (Keep it simple stupid) refers to the fact that easy systems are easier to manage. Keeping things simple is not nesseserily less work (like YAGNI is) since it requires more knowlege to implement. They are sometimes similar but grow from different needs.
YAGNI grows from a too much future anticipation, overzealous workers if you may. KISS is a strategy that tries to counteract human tendency for design creep.
KISS Keep It Simple Stupid. This principle says about to make your code simple. Avoid unnecessary complexity, keep in mind a simple code it’s easier to maintain and easier to understand.
YAGNI stands for You Ain’t Gonna Need It. This principle says that you should not create features that it’s not really necessary.
Ron Jeffries, one of the co-founders of the XP, said:
Always implement things when you actually need them, never when you just foresee that you need them
The main difference, YAGNI remove unnecessary functionality and logic, and KISS focus on the complexity.
YAGNI, KISS, and DRY are code reductions. YAGNI is about removing code that the user doesn't need. DRY is about removing repetitive code. KISS is about removing hard code (long methods that are hard to read, etc.)
In my opinion, the last principle is the closeness of SRP to SOLID.
© 2022 - 2024 — McMap. All rights reserved.