Software design is an art, and like any art it cannot be taught and learned as a precise science, by means of theorems and formulas. We can discover principles and techniques useful to be applied throughout the process of software creation, but we probably won’t ever be able to provide an exact path to follow from the real world need to code the module meant to serve that need. As the needs change, the systems has to adapt quickly, so we need to make the design flexible as the stiff design resists refactoring and the code that was not built with flexibility in mind will be hard to work.
The most basic general technique to design versatile system is by designing all the parts of the system, each and every component - highly cohesive and low coupled.
Design components that are self-contained, independent, and with a single, well-defined purpose.
— The Pragmatic Programmer
The most important skill in programming is problem decomposition. How we view a problem and break it down into pieces so that we can understand the tradeoffs, discreetly and as a whole, and build the solutions relatively independently, and easily, thinking about its maintainability as one of the primary objectives.
Ask me anything https://github.com/anitsh/ama/issues