Programmers and technology students were trained in Clean Code and Refactoring with Kaizen through a new Tech Training.
The fifth Tech Training of the year was carried out, an initiative of Smart Talent that promotes technology training by working hand in hand with companies in the sector. This time it was the turn of Kaizen Softworks, a company that since 2014 works for small and medium-sized customers in the US market, always with processes based on agile methodologies. The team develops on Angular, React and .NET, and works in Machine Learning, Big Data, and Artificial Intelligence.
Fabian Fernandez, CEO & Co-Founder of the company, received the guests at their offices accompanied by Bruno Bologna and Pablo Marcano, who were responsible for carrying out the training focused on Clean Code and Refactoring.
"How can I improve the code I am doing wrong?" Was the triggering question of the activity. Since computer programming is the process of designing, coding, debugging and maintaining the source code of computer programs, we need the latter to be written as best as possible. A badly written code leads to wasting time, it becomes difficult to understand, it affects the programmer and the client, and it can even make us replicate the incorrect logic to solve bugs. "We read almost ten times more code than that we write," Bruno said.
However, there are sometimes when we can afford to use low-quality code. These are the MVP (Minimum Viable Product), cases where we make a product to go to the market as soon as possible investing as little as possible in order to validate an idea. The specialists gave some tips to have a clean code: consider naming, avoid misinformation, use pronounceable names and avoid prefixes if possible. It is ideal to be able to "leave it cleaner than we found it", as the Boy Scout rule says.
As for Refactoring, Bruno and Pablo introduced the Interface Segregation Principle, which proposes that, when we want to create abstractions, consider the visibility and the life cycle of that abstraction. "Avoid saturating interfaces. We promote the diversity of abstractions by thinking about the relationship that a class has with its environment ", they recommended.
They also mentioned the dependency inversion principle, a technique by which components that depend directly on another, happen to depend on an abstraction of this component. It is used with the forms of Service Locator (when it is still responsible for obtaining its dependencies) and Dependency Injection (when it exposes dependencies in the constructor).
On patterns, the Kaizen specialists explained why we need them: they are a consequence of Clean Code, abstractions to common problems have been created, and names are given to these solutions so that the software developer community has a common language in which to communicate.