DRY — Don’t Repeat Yourself

RailsGyn — RGSoC 2017
2 min readJul 7, 2017

--

DRY Spongebob

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

--

--

RailsGyn — RGSoC 2017

We are two women(Amanda and Juliana), developers from Brazil and we are participating in this AMAZING initiative that is Rails Girls Summer of Code.