Design: Philosophy - marian13/convenient_service GitHub Wiki


  • The lower amount of if statements, the easier to understand the code.

  • The lower amount of rules to remember, the easier to maintain the code.

  • The higher level of automation, the fewer processes to control manually.


  • Practical SOLID.

  • Tell, Don't Ask.

  • Hard to write a test - refactor. Hard to add a feature/fix - refactor. Hard to refactor - refactor.

  • Move the complexity from the runtime into the build time.


  • Whenever any behavior peace is modified, at least one test must fail.

  • Unit and integration tests are parts of a single whole.

  • Mocking is always the last available solution, never the first one.


  • Learn once, use everywhere.

  • Accumulation effect.


  • Expose why the code is written, and hide how it is written.

  • Separate the code that changes frequently from the code that almost never changes (separate business logic from utility code).

  • Extract utility code immediately, since there is no time to search for it in the future (mark it with TODO at minimum).


  • Organize the flow in a way that helps to achieve the goal in a quicker, simpler more effective way, do not introduce new stumbling blocks instead.

  • Convenience via quality.

  • The library should predict its possible(reasonable enough) use cases.

  • The library should provide the complete interface.

  • The library should cause minimal negative effects when used against author's idea.


  • The more universal the code is, the safer (paranoic) it should be.

    The opposite is also valid.

    The more isolated(low-level) the code is, the freer (more lose) it can be. (TODO: find a more expressive word than "loose")