Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Clean Code / Clean Architecture

Clean Code / Clean Architecture

Avatar for Arkadius Jonczek

Arkadius Jonczek

February 06, 2026
Tweet

More Decks by Arkadius Jonczek

Other Decks in Programming

Transcript

  1. … a high-level programming language is a programming language with

    strong abstraction from the details of the computer. https://en.wikipedia.org/wiki/High-level_programming_language
  2. Any fool can write code that a computer can understand.

    Good programmers write code that humans can understand. Martin Fowler
  3. Clean Code is code that's easy to read, maintain, understand

    and change through structure and consistency yet remains robust and secure to withstand performance demands. https://www.sonarsource.com/solutions/clean-code/
  4. Code is clean if it can be understood easily –

    by everyone on the team. With understandability comes readability, changeability, extensibility and maintainability. All the things needed to keep a project going over a long time without accumulating up a large amount of technical debt. https://www.planetgeek.ch/wp-content/uploads/2013/06/Clean-Code-V2.2.pdf
  5. Single Responsibility Principle • V1: A module should have one,

    and only one, reason to change. • V2: A module should be responsible to one, and only one, user or stakeholder. • V3: A module should be responsible to one, and only one, actor. • Vx: Gather together the things that change for the same reasons. Separate things that change for different reasons. https://blog.cleancoder.com/uncle-bob/2020/10/18/Solid-Relevance.html
  6. Open Closed Principle • V1: A software artifact should be

    open for extension but closed for modification. • Vx: A Module should be open for extension but closed for modification. https://blog.cleancoder.com/uncle-bob/2020/10/18/Solid-Relevance.html
  7. Liskov Substituion Principle • V1: What is wanted here is

    something like the following substitution property: If for each object o1 of type S there is an object o2 of type T such that for all programs P defined in terms of T, the behavior of P is unchanged when o1 is substituted for o2 then S is a subtype of T. • Vx: A program that uses an interface must not be confused by an implementation of that interface. https://blog.cleancoder.com/uncle-bob/2020/10/18/Solid-Relevance.html
  8. Interface Segregation Principle • Vx: Keep interfaces small so that

    users don’t end up depending on things they don’t need. https://blog.cleancoder.com/uncle-bob/2020/10/18/Solid-Relevance.html
  9. Dependency Inversion Principle • Vx: Depend in the direction of

    abstraction. High level modules should not depend upon low level details. https://blog.cleancoder.com/uncle-bob/2020/10/18/Solid-Relevance.html