Today we'll be exploring a design principle called DRY it stands for Don't Repeat Yourself. Of course, a pretty obvious one, meaning you shouldn't type code more than once. The principle states: "Every piece of logic must have a single unambiguous re...

Markdown supported · ⌘↵ to post
Really the first example makes it difficult to understand but the article was very good. Congrats!
DRY principle serves to prevent you from copy/pasting code all around, to reduce code base, and for easier maintenance. I think that the first example is not a really good example of the DRY principle. The other one is totally fine.
Olivia Parker
A great developer is all about getting ahead of everything, minimizing mistakes to achieve efficiency. This tactic promotes easier coding maintenance, which saves a lot of time. Will share this with my fellow developers. Wonderful tip!
Olivia parker, IT BPO OBP IT Solutions