IntroductionWhat is Software Design?Technical DebtThe Different Layers of Software Design


  • Software design can refer to two things: the structure and implementation of a piece of software, and the plan how to structure and implement a piece of software.
  • Technical debt refers to the future cost of reworking a solution that was chosen because it was faster and easier to implement instead of making it more flexible from the beginning.
  • When software is not well-designed, technical debt accumulates.

InstructionsLayer 1: Instructions


  • There are lot of easy to follow recommendations that make your code instantly easier to read and understand (and thereby maintain).
  • Writing high-quality code is the first step towards good software design.

Organizing Code


  • Functions can be used to structure code.
  • Code that is better organized is easier to understand and maintain.
  • Duplicate code should be avoided.

Structure and OrganizationLayer 2: Structure and Organization


  • Dependencies need to be managed as well as the code itself.
  • Coupling refers to what extend the components of a piece of software are connected. Ideally, the components are loosely coupled so that if one component is changed, the others do not have to be changed as well.
  • There are many techniques and best practices to achieve loose coupling, information hiding, abstraction, and the Single Responsibility Principle are some of them.

Components and ServicesLayer 3: Components and Services


  • The basic principles discussed before apply for components and services as well.
  • Loosely couple your components and services.
  • Use standards when possible.

General RecommendationsSome General Recommendations


  • Every line of code you write should have an intention, a reason it is being written and not just copy-pasted without being understood.
  • Be consistent in every aspect of your programming.
  • Document what is most important to you first and then go from there.
  • Follow the conventions of your community.