Design Patterns · Junior · Question 31 of 75

What does the DRY principle mean?

Explanation

Don't Repeat Yourself is about duplicated knowledge, not just similar lines. If an email validation rule is duplicated in three places, it's easy to miss one when it changes. But prematurely merging code that's similar yet different is harmful too.

Further reading

Problem with a question

Design Patterns · Junior · question 31

Test yourself

Take the Design Patterns · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz