Bitsmi Blog
Asciidoc - Reference
2.- Meaningful names
Simple rules for creating good names
Choosing good names takes time but saves more time than it takes.
The name of a variable, function or class should answer all the big questions: why it exists, what it does and how it is used.
As an example, if we want to be evoked of a date name by the specification of how it is being measured and the unit of that measurement we can use names like these:
int elapsedTimeInDays
int daysSinceCreation
We have to be sure that we acquire the implicity of the code: the degree to which the context is not explicit in the code itself.
About the implicity of the code of a variable as an example, we need to know the answers to questions as:
-
What kinds of things are in variable x?
-
What is the significance of the value x?
-
How would I use the x variable being returned?
1.- Clean Code
Anyone reading this book:
- Is a programmer.
- Is a programmer who wants to be a better programmer.
After reading this book:
- We will be able to tell the differences between good code and bad code.
- We will know how to write good code.
- We will know how to transform bad code into good keeping its business requirements.
0.- Introduction
Summary
These group of posts pretend to be a quick summary to check when required to gather and review the most important concepts of the book.
It is recommended to read the book to get more detailed information about the topic that the reader wants to review.
Introduction
For coding is not enough to gain knowledge of principles, patterns, practices and heuristics.
It requires a continuing try and failure because Clean Code is a hard work process to learn from it.
The book has been split in three main parts:
-
The first part describes the principles, patterns and practices of writing clean code.
-
Study cases with different complexity. It will be an intense and demanding part. Main reason why is that each case analysed is an exercise in cleaning some code that has problems and transforming it into a code with less problems than the original version.
-
Heuristics and Smells. It is related to the relationship between the heuristics and the discrete decisions made while doing some clean up of the source code.
As a general rule, it is recommended by the author to read the WHOLE book and practice as much as possible to gain a much richer understanding of these principles, patterns and heuristics.
Tabla de Códigos ASCII – American Standard Code for Information Interchange
Estándar Americano de Codificación para el Intercambio de Información
Pronunciación: as-ki
ASCII es un estándar de representar caracteres y símbolos en forma electrónica. Emplea estándares incrementando la eficiencia y elimina errores. Utilizar estándares requiere disciplina y a veces restringe la creatividad.
Sin embargo, es muy útil para la comunicación entre usuarios. Internet requiere aún más enfoque en estándares porque en muchos casos, se trata de usuarios de idiomas diferentes.
Las personas que tuvieron la visión de Internet, establecieron una plataforma de comunicación global. El uso de los estándares es una manera de cumplir con este objetivo.
IntelliJ Hotkeys Cheatsheet
Tabla de códigos HTML
Tabla de ASCII estándar, nombres de entidades HTML, ISO 10646
, ISO 8879
, ISO 8859-1 romano 1
con soporte para todos los navegadores.
Ubuntu - Referencia de comandos útiles
Docker - Referencia de comandos
Validation groups
jakarta.validation.groups
allow us to configure the constraints to be validated depending on the context.
For example, in some situations may have sense only to validate certain constraints when a domain entity is being created (not managed)
and not when is updated (managed), the ID and creation / update timestamps for example.
In that case we can define the constraints that will be executed in each case using different groups