Don’t Repeat Yourself (DRY)

Avoid duplication in code. There should be a single source of truth. There should be one place in our system that deals with the particular problem.

You Ain’t Gonna Need It (YAGNI)

Solve the problems that you know exist, don’t write speculative code. It’s very tempting for developers when writing code, when solving a problem, to add in some extra functionality for something that seems like it might be necessary in the future. But that’s not a great thing to do.Everything you add is code that needs to be maintained, it needs to be tested, it needs to be debugged, and it’s easy for this to lead to feature-creep

Sources:

https://www.linkedin.com/learning/programming-foundations-object-oriented-design-2012/exploring-general-development-principles

Last modified: March 17, 2019

Author

Comments

Write a Reply or Comment