Good Coding Habits
In a book about refactoring, I believe it’s necessary to talk about well-written code. These are two obviously closely related aspects that almost overlap. The lack of good code or solid architecture is among the main reasons for refactoring; refactoring is the means through which we aim to improve the writing of a method, a class, a project, or an architecture.
To understand clearly what we’re talking about, it’s important to try to explain what good code is and, by exclusion, what is considered poorly written code. It may seem excessive to try to define what good code is because, in reality, it should be – or should be treated as – something quite intuitive. We should almost have spider senses that tingle when we see code that is hard to understand or overly complicated. If you don’t have spider senses developed yet, don’t worry! They will grow with experience (and this book could help you get there).
Nowadays...