Don't Repeat Yourself (DRY)
- The DRY principle states that these small pieces of knowledge may only occur exactly once in your entire system.
- Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
- DRY is a philosophy that packages logic into representations.
- When you find yourself writing code that is similiar or equal to something you've written before, take a moment to think about what you're doing and don't repeat yourself.
Keep it Simple Stupid (KISS)
- The simplest explanation tends to be the right one.
- There are many people involved in the conceptual process, who do not have the technical expertise to make a reliable cost-benefit analysis
You Ain't Gonna Need It (YAGNI)
- Coding is about building things.
- 80% of the time spent on a software project is invested in 20% of the functionality.
- Bad concepts can often be identified by the lack of non-functional requirements.
- Last, but not least, remember the 80:20 rule-of-thumb!
- If you want to be an experienced and business-proofed developer, you have to master the You ain't gonna need it principle. If you want to keep your passion, you have to fight against it every now and then.
Not invented here (NIH)
- "NIH syndrome" as the tendency towards reinventing the wheel (reimplementing something that is already available) based on the belief that in-house developments are inherently better suited, more secure, more controlled, quicker to develop, and incur lower overall cost (including maintenance cost) than using existing implementations
Composition over inheritance
- Composition over inheritance (or composite reuse principle) in object-oriented programming (OOP) is the principle that classes should achieve polymorphic behavior and code reuse by their composition (by containing instances of other classes that implement the desired functionality) rather than inheritance from a base
- Open close principal
- Write programs that do one thing and do it well.
- Write programs to work together.
- Write programs to handle text streams, because that is a universal interface.