That's what we do: we write function and methods. Following the discipline of clean code we must follow the rules and be sure we are proceeding in the right way.Small! Functions must be even smaller than that!Functions must be small! And the other rules is: the must be smaller than thatMaximum 5 rows, 3 rows i... [...]
Read MoreIt's time for an effective refactoring! Extract from long functions (extract until you drop), edit in line, extract methods or new classes. On TDD, after a test is passed, refactoring is the 3rd and probably the most important step of the small cycle red \ green \ blue. Let's explore the refactoring techniques with a sho... [...]
Read MoreWe have the power to assign a name to a variable and it's a great power! We must assign a name to a variable that it must reveal its intents just when I read the name of the variable. If we can assign the right name and understand what the variable will do and its role on the software and on the algorithm, it would be perfec... [...]
Read MoreWhat is bad code? Why we write bad code? Well Uncle Bob ask us many questions and then help us to understand how to improve gradually and start writing clean and maintainable code. We must learn to recognize bad code (code smell) and let us to update and improve existing code without breaking anything (refactoring). Let's st... [...]
Read More