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

Clean code FTW

Clean code FTW

Writing code is easy. Writing human understandable code is difficult. Writing boring, easy to understand code is the aim. This, along with importance of testing and a good architecture, is what the talk was mostly about.

Gurpreet Singh

December 15, 2018
Tweet

More Decks by Gurpreet Singh

Other Decks in Technology

Transcript

  1. Why clean code and proper architecture matters Moving to a

    cleaner world GurpreetSK.com Gurpreet Singh Android @ Kite Learning Functional & Reactive programming and clean code, Knows nerd talks @imGurpreetSK
  2. 1. Untestable / very hard to test code 2. Tight

    coupling - Code is rigid and fragile
  3. 1. Untestable / very hard to test code 2. Tight

    coupling - Code is rigid and fragile 3. Doesn’t follow any of the SOLID principles
  4. 1. Untestable / very hard to test code 2. Tight

    coupling - Code is rigid and fragile 3. Doesn’t follow any of the SOLID principles 4. Unreadable
  5. 1. Untestable / very hard to test code 2. Tight

    coupling - Code is rigid and fragile 3. Doesn’t follow any of the SOLID principles 4. Unreadable -> unmaintainable & non-extensible
  6. 1. Untestable / very hard to test code 2. Tight

    coupling - Code is rigid and fragile 3. Doesn’t follow any of the SOLID principles 4. Unreadable -> unmaintainable & non-extensible 5. Hard to refactor
  7. 1. Untestable / very hard to test code 2. Tight

    coupling - Code is rigid and fragile 3. Doesn’t follow any of the SOLID principles 4. Unreadable -> unmaintainable & non-extensible 5. Hard to refactor 6. You’re not in control of what happens
  8. 1. Untestable / very hard to test code 2. Tight

    coupling - Code is rigid and fragile 3. Doesn’t follow any of the SOLID principles 4. Unreadable -> unmaintainable & non-extensible 5. Hard to refactor 6. You’re not in control of what happens
  9. Engineering practices Rx* Immutability Functional paradigm Reactive paradigm Persistence as

    single source of truth Clean SOLID State Good architecture
  10. S - Single Responsibility Principle O - Open/Closed Principle L

    - Liskov Substitution Principle I - Interface Segregation Principle D - Dependency Inversion Principle
  11. 1

  12. 2

  13. 1. Untestable / very hard to test code 2. Tight

    coupling - Code is rigid and fragile 3. Doesn’t follow any of the SOLID principles 4. Unreadable -> unmaintainable & non-extensible 5. Hard to refactor 6. You’re not in control of what happens Checklist
  14. 1. Untestable / very hard to test code 2. Tight

    coupling - Code is rigid and fragile 3. Doesn’t follow any of the SOLID principles 4. Unreadable -> unmaintainable & non-extensible 5. Hard to refactor 6. You’re not in control of what happens Checklist
  15. 1. Untestable / very hard to test code 2. Tight

    coupling - Code is rigid and fragile 3. Doesn’t follow any of the SOLID principles 4. Unreadable -> unmaintainable & non-extensible 5. Hard to refactor 6. You’re not in control of what happens Checklist
  16. 1. Untestable / very hard to test code 2. Tight

    coupling - Code is rigid and fragile 3. Doesn’t follow any of the SOLID principles 4. Unreadable -> unmaintainable & non-extensible 5. Hard to refactor 6. You’re not in control of what happens Checklist
  17. 1. Untestable / very hard to test code 2. Tight

    coupling - Code is rigid and fragile 3. Doesn’t follow any of the SOLID principles 4. Unreadable -> unmaintainable & non-extensible 5. Hard to refactor 6. You’re not in control of what happens Checklist
  18. 1. Untestable / very hard to test code 2. Tight

    coupling - Code is rigid and fragile 3. Doesn’t follow any of the SOLID principles 4. Unreadable -> unmaintainable & non-extensible 5. Hard to refactor 6. You’re not in control of what happens Checklist
  19. 1. Untestable / very hard to test code 2. Tight

    coupling - Code is rigid and fragile 3. Doesn’t follow any of the SOLID principles 4. Unreadable -> unmaintainable & non-extensible 5. Hard to refactor 6. You’re not in control of what happens Checklist