DEV Community

Discussion on: Coding basics: DRY programming

Collapse
 
_garybell profile image
Gary Bell

True. That's one of those things that comes with time and experience, though. Something which can't easily be taught.

The problem with things like principles like DRY, YAGNI, and SOLID are that they are, ultimately, ideals. It's not always straightforward to keep code adhering to all of those due to time and/or budget constraints, as well as the human element i.e. developers. They are more like guidelines which you should be conscious of when developing, but be aware you aren't likely to stick to them all of the time.