Imagine that you need to create a game where a character is able to fight. Character should be able to pick a weapon. Different weapon would preform different action. We need the character to be able to use his fists, a knife, and a gun. Every weapon can have its own set of attributes and … Continue reading Strategy Pattern
Orthogonality
When developer works through a particular systems, a variety of modules being developed: user interface, filters, generators, controllers, models, and so on. In this variety and plurality often lies a danger of connecting and making separate modules dependent on each other. There is a healthy degree of dependence where a module can request an object … Continue reading Orthogonality
Don’t Repeat Yourself
Every piece of Knowledge must have a single, unambiguous, authoritative representation within a system From time to time it becomes easy to lower your standard and take a shortcut here and there. For developer that often times means duplicating code instead of encapsulating it in a separate class or even a function. Of course, there … Continue reading Don’t Repeat Yourself
