Good morning, good afternoon, good evening, good night, what they are in common? Yeap, the word βGoodβ. The concept DRY consists in look this and βdryβ your repetitions, after dry could be: Good, morning, afternoon, evening and night. Being thus the word would serve for all, without losing the logic.
Letβs see example in a code:
The same logic but in fewer lines of code. That is one of the philosophies about Ruby on Rails best practices, Ruby (and Rails) is fantastic because of this and others practices, Ruby code is totally readable, simple and powerful. And Rails has MVC organization, Tests, Naming Convention making a clean code, also has Convention Over Configuration and others things. So thatβs it, letβs study and code.
βKnow, understand, modify and create.β
Top comments (0)