This is Part 6 of 7 part series inspired from the book Pragmatic Programmer, read Part 5 here:
- Use Exceptions for Exceptional Problems: Exceptions can suffer from all the readability and maintainability problems of classic spaghetti code. Reserve exceptions for exceptional things.
- Minimize Coupling Between Modules: Avoid coupling by writing “shy” code and applying the Law of Demeter.
- Put Abstractions in Code, Details in Metadata: Program for the general
case, and put the specifics outside the compiled code base.
- Design Using Services: Design in terms of services—independent,
concurrent objects behind well-defined, consistent interfaces.
- Separate Views from Models: Gain flexibility at low cost by designing
your application in terms of models and views.
- Don’t Program by Coincidence: Rely only on reliable things. Beware of
accidental complexity, and don’t confuse a happy coincidence with a
- Test Your Estimates: Mathematical analysis of algorithms doesn’t tell
you everything. Try timing your code in its target environment.
- Design to Test: Start thinking about testing before you write a line
- Don’t Use Wizard Code You Don’t Understand: Wizards can generate reams of code. Make sure you understand all of it before you incorporate it
into your project.
- Work with a User to Think Like a User: It’s the best way to gain
insight into how the system will really be used.
Please read part 7 of 7 part series inspired from the book Pragmatic Programmer here.