Skip to main content

4 posts about CLEAN CODE

Clean code: refactoring

It'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......

Clean code part 3: functions

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......

Clean Code part 2: variables names

We 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......

Clean code: bad code

What 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......

This website and/or any sub domains use cookies to understand how you to improve your experience.