En este Meetup veremos algunas herramientas para que seas mas productivo como desarrollador, sin importar si trabajas con HTML, CSS, Javascript, .Net, Ruby, Java… puedes mejorar cada día aprendiendo "buenas prácticas" de programación.
Conoce algunas de estas buenas practicas y con ayuda de algunas herramientas y de tu editor de desarrollo favorito, practícalas día a día.
Meetup: https://www.meetup.com/TODO1-Colombia/
Event: https://www.meetup.com/TODO1-Colombia/events/239454766/
3. LA ÚNICA
MEDIDA VÁLIDA
de la calidad
de tu código
http://www.osnews.com/story/19266/WTFs_m
“The only valid
measurement of code
quality: WTFs/minute”
Thom Holwerda
4. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
¿BUENAS
PRÁCTICAS?
Crear programas que
funcionen correctamente
y con buena calidad,
robustos, eficientes…
5. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
¿BUENAS
PRÁCTICAS?
Escribir código limpio,
entendible, mantenible y
documentado.
6. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
¿BUENAS
PRÁCTICAS?
Facilitar la comprensión
del código tanto para
nuestro futuro yo como
para otros.
7. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
¿BUENAS
PRÁCTICAS?
“La mejor manera de hacer que
nuestros sitios web se vean y funcionen
correctamente [...] es escribiendo
código limpio y que respete los
estándares”. Eduardo Briceno
8. SIEMPRE
CODIFICA
“Siempre codifica como si la persona
que va a terminar manteniendo tu
código fuera un violento psicópata
que sabe dónde vives”.
Jeff Atwood
https://blog.codinghorror.com/coding-for-violent-psychopaths/
9. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
BUENAS
PRÁCTICAS
Escribe código
limpio
Ejemplo...
Capture Moment
10. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
BUENAS
PRÁCTICAS
Evita el código duplicado.
Ejemplo...
11. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
BUENAS
PRÁCTICAS
Escribe código
simple
Ejemplo...
12. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
BUENAS
PRÁCTICAS
Utiliza nombres
descriptivos
13. BUENAS
PRÁCTICAS
Dejar el campo más limpio que cuando
llegamos. El código siempre puede
mejorar. Si podemos,
refactoricemos/documentemos el
código para dejarlo mejor que antes.
Aplicar la Regla del
Boy Scout
16. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
HÁGASE LA LUZ
Lo primero que
utilizamos fueron
los validadores.
17. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
VALIDADORES
Un validador verifica que el
código se adhiera a las
especificaciones de lenguaje.
Ejemplo de validación con
https://validator.w3.org/
18. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
¿VALE LA PENA?
http://www.canalrcn.com/ https://www.grupobancolombia.com/
http://www.eltiempo.com/ http://www.dian.gov.co/
H T M L C S S
H T M L C S S
19. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
¿Por qué crees que se llaman
buenas prácticas?
¿Vale la pena hacer mejor tu
trabajo?
¿Vale la pena mejorar cada día?
¿VALE LA PENA?
20. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
PERO HAGÁMOSLO
MÁS FÁCIL POR
MEDIO DE LINTERS
Originalmente lint fue el nombre de una herramienta utilizada
para detectar código sospechoso, confuso o incompatible en C
en 1979… En la ACTUALIDAD:
Cualquier
lenguaje de
programación
Complementos que,
en tiempo real,
revisan el código
Aplican reconocidas
buenas practices
y ¡estandarizan!
21. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
HTML
LINTER
https://github.com/SublimeLinter/
SublimeLinter-html-tidy
SublimeLinter-html-
tidy
https://github.com/twbs/bootlint
Bootlin
t
22. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
CSS Linter
https://stylelint.io/
StyleLi
nt
23. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
JAVASCRIPT LINT
http://eslint.org/
E S L I N T
J S L I N T J S H I N T
24. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
TYPESCRIPT
LINT
https://palantir.github.io/tslint/
TSLint
26. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
JAVA LINTERS
Hay más de 40 gratuitos (y sin
contar los comerciales):
Verlos en Java Code Quality
Tools – Overview
28. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
SonarLint
(Free):
http://www.sonarlint.org/
PVS-Studio analyzer
(Commercial)
https://www.viva64.com/en/pvs-studio/
ReSharper (Free for
Students):
https://www.jetbrains.com/resharper/
C# LINTERS
30. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
OTROS LINTERS
https://www.pylint.org/ http://tools.android.com/tips/lint
http://www.sonarlint.org/ https://github.com/realm/SwiftLint
P Y L I N T A N D R O I D S T U D I O L I N T
S O N A R L I N T S L I N T
31. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
EN TODO1
Servidor de revisión permanente de
código (para equipos y empresas).
Más de 20 Lenguajes.
SonarQuebe
https://www.sonarqube.org/
34. B U E N A S P R Á C T I C A S P A R A T U C Ó D I G O F U E N T E
CONTACTO
Gabriel Porras
@gabrielporras @gabrielizalo ghporras@gmail.com
Hinweis der Redaktion
Buenas prácticas para tu Código Fuente
Mejora día a día con las Herramientas llamadas LiNters
Foto:
https://www.pexels.com/photo/code-coding-computer-data-90807/
“10 buenas practicas para escribir código HTML” por Eduardo Briceno: https://hipertextual.com/archivo/2012/08/buenas-practicas-html/
Foto:
https://unsplash.com/search/code?photo=gp8BLyaTaA0
Coding For Violent Psychopaths” por Jeff Atwood: https://blog.codinghorror.com/coding-for-violent-psychopaths/
Foto:
https://flipboard.com/topic/psychopath
Clean, high quality code: a guide on how to become a better programmerBy: Arash Arabihttps://www.butterfly.com.au/blog/website-development/clean-high-quality-code-a-guide-on-how-to-become-a-better-programmer
Foto:
https://www.pexels.com/photo/people-apple-desk-technology-89724/
Técnicas para escribir código fuente legible y mantenibleBy: Juan Carlos Arcila Díazhttp://www.incanatoit.com/2014/12/tecnicas-para-escribir-codigo-fuente-legible-mantenible.html
Foto:
https://unsplash.com/search/code?photo=b18TRXc8UPQ
Types of Duplication in Code 1By: SimpleProgrammerhttps://gist.github.com/simpleprogrammer-shared/b7b1a295cd9bc7216e2ea0f886198a0c#file-types-of-duplication-in-code-1-cs
Types of Duplication in Code 2By: SimpleProgrammerhttps://gist.github.com/simpleprogrammer-shared/d520dc17ce1c7442b0eb2e4e15d11d6c#file-types-of-duplication-in-code-2-cs
Foto:
https://www.pexels.com/photo/close-up-code-coding-computer-374563/
Slide 21 en https://www.slideshare.net/ikercanarias/buenas-prcticas-para-la-construccin-de-software
13 Tips to Comment Your Code: http://www.devtopics.com/13-tips-to-comment-your-code/
Top 15+ Best Practices for Writing Super Readable Code: https://code.tutsplus.com/tutorials/top-15-best-practices-for-writing-super-readable-code--net-8118
Técnicas para escribir código fuente legible y mantenible: http://www.incanatoit.com/2014/12/tecnicas-para-escribir-codigo-fuente-legible-mantenible.html
Ask Stack: Is it OK to split into small functions, even if they’re called once?: https://arstechnica.com/information-technology/2013/08/ask-stack-is-it-ok-to-split-into-small-functions-even-if-theyre-called-once/
Foto: https://unsplash.com/search/code?photo=n8Qb1ZAkK88
What is the difference between a linter and a validator?” por Amy: http://stackoverflow.com/a/34140906/334963
Understanding HTML5 Validation: https://www.impressivewebs.com/understanding-html5-validation/
Al validador HTML5 le tiene sin cuidado el estilo o la lógica.
Foto: https://www.pexels.com/photo/code-coding-computer-data-90807/
Sitios con errores en su codificación pero que funcionan y están entre los más visitados de Colombia.
Referencias
Buenas prácticas para la construcción de software: https://www.slideshare.net/ikercanarias/buenas-prcticas-para-la-construccin-de-software
Express names in code: Bad vs Clean: https://blog.goyello.com/2013/05/17/express-names-in-code-bad-vs-clean/
Golden Guidelines for Writing Clean CSS: https://www.sitepoint.com/golden-guidelines-for-writing-clean-css/
Doce principios de diseño que todo desarrollador debería conocer: https://www.genbetadev.com/metodologias-de-programacion/doce-principios-de-diseno-que-todo-desarrollador-deberia-conocer
Types of Duplication in Code: https://simpleprogrammer.com/2012/05/27/types-of-duplication-in-code/
Violation & Solution for Single Responsibility Principle: https://softwareengineering.stackexchange.com/questions/342051/violation-solution-for-single-responsibility-principle
13 Tips to Comment Your Code: http://www.devtopics.com/13-tips-to-comment-your-code/
Top 15+ Best Practices for Writing Super Readable Code: https://code.tutsplus.com/tutorials/top-15-best-practices-for-writing-super-readable-code--net-8118
Técnicas para escribir código fuente legible y mantenible: http://www.incanatoit.com/2014/12/tecnicas-para-escribir-codigo-fuente-legible-mantenible.html
Consejos y Buenas Prácticas en Programación: http://personales.unican.es/sanchezbp/teaching/faqs/programming.html
Understanding HTML5 Validation: https://www.impressivewebs.com/understanding-html5-validation/
Lint: https://www.wikiwand.com/es/Lint
Usa Linters #programadorIO: https://desarrolloweb.com/en-directo/usa-linters-programadorio-8912.html
A Comparison of JavaScript Linting Tools: https://www.sitepoint.com/comparison-javascript-linting-tools/
Java Code Quality Tools – Overview: https://www.javacodegeeks.com/2012/10/java-code-quality-tools-overview.html
SonarQube And SonarLint difference: http://stackoverflow.com/questions/39828609/sonarqube-and-sonarlint-difference
Foto:
https://unsplash.com/search/thanks?photo=oxjo1IQBK7M