Enviar búsqueda
Cargar
Código limpio
•
1 recomendación
•
946 vistas
Anallely Olivares
Seguir
Básada en el libro de Clean Code: A Handbook of Agile Software Craftsmanship
Leer menos
Leer más
Software
Denunciar
Compartir
Denunciar
Compartir
1 de 27
Descargar ahora
Descargar para leer sin conexión
Recomendados
Ejercicios con Python parte 3
Ejercicios con Python parte 3
Facultad de Ciencias y Sistemas
Ejercicios Python parte 4
Ejercicios Python parte 4
Facultad de Ciencias y Sistemas
Hola mundo
Hola mundo
ariadnitaa
Clean code capitulo 4("Comments ")
Clean code capitulo 4("Comments ")
David Pineda Moncada
Clean code
Clean code
Luisa Castaño
SOLID - ¿Cómo lo aplico a mi código?
SOLID - ¿Cómo lo aplico a mi código?
Juan José Fuchs Cerdeña
Improving as a developer through code reviews
Improving as a developer through code reviews
Anallely Olivares
Api craft notes
Api craft notes
Anallely Olivares
Recomendados
Ejercicios con Python parte 3
Ejercicios con Python parte 3
Facultad de Ciencias y Sistemas
Ejercicios Python parte 4
Ejercicios Python parte 4
Facultad de Ciencias y Sistemas
Hola mundo
Hola mundo
ariadnitaa
Clean code capitulo 4("Comments ")
Clean code capitulo 4("Comments ")
David Pineda Moncada
Clean code
Clean code
Luisa Castaño
SOLID - ¿Cómo lo aplico a mi código?
SOLID - ¿Cómo lo aplico a mi código?
Juan José Fuchs Cerdeña
Improving as a developer through code reviews
Improving as a developer through code reviews
Anallely Olivares
Api craft notes
Api craft notes
Anallely Olivares
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Más contenido relacionado
Destacado
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Destacado
(20)
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Código limpio
1.
Clean Code Anallely Olivares
(@tsunllly)
2.
Un día cualquiera
... Obtener camas bloqueadas * Devuelve una List<Cama> * Params: ● Fecha desde ● Fecha hasta ● Folio área enfermería ?
3.
4.
Antes/Después Difícil léctura ○ Scroll
a la derecha ○ Hay que leer los comentarios ○ Muchos posibles flujos
5.
6.
Día a día Escribimos
código Leemos código !! buen código / mal código
7.
Buenos nombres
8.
Significativos public List<int[]> getThem()
{ List<int[]> list1 = new ArrayList<int[]>(); for (int[] x : theList) if (x[0] == 4) list1.add(x); return list1; }
9.
Significativos public List<int[]> getFlaggedRows()
{ List<int[]> flaggedRows = new ArrayList<int[]>(); for (int[] row : gameBoard) if (row[STATUS_VALUE] == FLAGGED) flaggedRows.add(cell); return flaggedRows; }
10.
Algunos nombres genymdhms -
Impronunciable i, j - No encontrable badgesList - Amarrado a un tipo getActor / findActor - No coherencia
11.
Recomendaciones Verbo + Sustantivos registerUser
getMax countWords Como preguntas isValidPassword Declarativos markAsInactiveUser
12.
Funciones
13.
Una sola cosa
bien hecha ● Facilita pruebas ● Facilita reusar código EsBloqueoDeCama EstaDentroDeLasFechas EsDelAreaRequerida CrearCama
14.
Funciones honestas Sin efectos
secundarios
15.
Funciones pequeñas
16.
Niveles de abstracción ●
EsMenorEdad(User u) ● DiasTranscurridosDesde(Fecha fecha) ● DateTime, Now, millis, days, (-)
17.
Leer de arriba
a abajo
18.
Argumentos Ningún argumento :)
19.
Argumentos Flag render(boolean isSuite) * renderForSuite() *
renderForSingleTest()
20.
Principio DRY Don’t Repeat
Yourself DUPLICATION may be the root of all evil in software
21.
Cometarios Explain yourself in
code
22.
Sugerencias de formateo *
Las variables deben ser declaradas lo más cerca posible al lugar dónde se usan
23.
Sugerencias de formato Agrupar
por afinidad ● Más cerca mientras más relacionados estén ● Separar con líneas en blanco diferencias en la lógica
24.
Sugerencias de formato Identación ¿Dejar
todo en una sola línea? El equipo dicta las reglas metodo { …. } metodo { …. }
25.
Pruebas assert assert assert assert Pruebas pequeñas Un assert
por prueba
26.
No vivir con
las ventanas rotas
27.
Finally
Descargar ahora