Want to create interactive content? It’s easy in Genially!
Clean Code
Camilo Herrera
Created on March 3, 2024
Start designing with a free template
Discover more than 1500 professional designs like these:
Transcript
By Camilo Herrera
Clean Code (SOLID) Workshop
Content of workshop
What is <C. C.> and why is so important?
Second Principle (O)
Instalation material
About Pyhton, libraries and Tkinder
10
Code Test exercise
Techniques and methods
11
About POO, TDD and Def
Conclusions
What is SOLID?
Tips / Suggestion
12
First principle (S)
References
WARNING!
Becareful, there will be some questions in any time in the workshop, so pay attention.
What is <C. C.> and why is so important?
Clean Code
It refers to an approach to writing code that seeks to produce high-quality software, easy to understand and maintain. The central idea behind the concept of clean code is that the source code should be expressive, readable, and understandable, both for the writer and for other developers who may work on it in the future.
"A Clean code always looks like it was written by someone who cares"
Robert C. Martin
TDD
bad written code
VS
VS
TDD
bad written code
Example (Bad written code)
Example
Quiz Time!
1. What is Clean Code? 2. Mention two pillars of clean code and explain them.
Rules
1. Spin the roulette wheel to select participant.2. If his or her answer is wrong, it´ll spin the roulette again. 3. If his or her answer is well, you´ll get a prize.
Remember!
It refers to an approach to writing code that seeks to produce high-quality software, easy to understand and maintain. The central idea behind the concept of clean code is that the source code should be expressive, readable, and understandable, both for the writer and for other developers who may work on it in the future.
Techniques and methods
Techniques and methods
Clean architect
DDD
SOLID
What is SOLID?
SOLID Method
SOL ID
ingle Responsibility
pen/Closed
iskov substitution
nterface segregation
ependency Inversion
Quiz Time!
Mention two techniques and methods about code design.
First principle (Single Responsability)
Single Responsability
A class must have only reason to change, in other words, a single job to do.
SOLID
Bad written code
VS
Example
Bad written code
SOLID
Bad written code
Second principle (Open/closed)
Quiz Time!
1.Explain a little bit about SOLID and what is the objective of Single responsability.
Open/Closed
Objects must be open for their extensions, but closed to modifications
SOLID
Bad written code
Quiz Time!
What´s the objective of Open/closed and mention one of method you can use in the second principle?
About Python, Libraries and Tkinder
About Python, libraries and tkinder
About Def, POO and TDD
DEF
POO
TDD
Test Driven Development
Why is important?
Clean Code is the key, refactor code with such a good principles.... If you don´t...
Tips / suggestion
Quiz Time!
1. What´s the meaning of TDD and why do you think it´s so important to the Code or project?
2. Mention the three cycles of TDD and explain a bit about them
Code Documentation...
DRY!
Installation Material
45%
90%
10
Code Test exercise
Final quiz!
1. What do you think Clean Code is so important and you think is one of the best option to implement in a project with TDD and tell us why?
Dojo Clean Code (S)
Let´s try to pass a bad written code to clean code with first principle (Single responsability)
Comparison
VS
Now, it´s you turn!
References
https://www.ionos.es/digitalguide/paginas-web/desarrollo-web/clean-code-que-es-el-codigo-limpio/https://softwarecrafters.io/python/principios-solid-python https://www.hostgator.mx/blog/clean-code-codigo-limpio/ https://www.sonarsource.com/solutions/clean-code/#:~:text=Clean%20Code%20is%20code%20that's,value%20out%20of%20your%20software. https://www.geeksforgeeks.org/domain-driven-design-ddd/ https://arbems.com/introduccion-a-ddd-domain-driven-design/#:~:text=en%20el%20software.-,Clean%20architecture%20y%20DDD,dise%C3%B1o%20y%20desarrollo%20de%20software. https://elprogrameitor.wordpress.com/2016/04/10/bpp-buenas-practicas-de-programacion/