Название: Clean Code Cookbook: Recipes to Improve the Design and Quality of your Code (2nd Early Release) Автор: Maximiliano Contieri Издательство: O’Reilly Media, Inc. Год: 2023-04-20 Страниц: 132 Язык: английский Формат: epub (true) Размер: 21.0 MB
Often, software engineers and architects work with large, complex code bases that they need to scale and maintain. With this cookbook, author Maximiliano Contieri takes you beyond the concept of clean code by showing you how to identify improvement opportunities and their impact on production code. When it comes to reliability and system evolution, these techniques provide benefits that pay off over time.
Using real life examples in jаvascript, PHP, Java, Python, and many other programming languages, this cookbook provides proven recipes to help you scale and maintain large systems. Every section covers fundamental concepts including readability, coupling, testability, and extensibility, as well as code smells—symptoms of a problem that requires special attention—and the recipes to address them.
A code smell is a symptom of a problem. People tend to think the presence of code smells is proof that the whole entity needs to be taken apart and rebuilt. This is not the spirit of the original definition. Code Smells are simply indicators of improvement opportunities. A code smell doesn’t necessarily tell you what is wrong; it is telling you to pay special attention.
This book’s recipes provide some solutions to those symptoms. Like with any cookbook, recipes are optional and code smells are guidelines and heuristics, not rigid rules. Before applying any recipe blindly, you should understand the problems and evaluate the cost and benefits of your own design and code. Good design involves balancing guidelines with practical considerations.
Refactoring (noun): a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior. Refactoring (verb): to restructure software by applying a series of refactorings without changing its observable behavior. Refactorings have evolved since Fowler’s definition. Most modern IDEs support automatic refactorings. Automatic refactorings are safe and make structural changes without changing the behavior. This book has many recipes with automatic and safe refactorings and also semantic refactors. You should apply the recipes carefully since they can break your software. If you have good automation coverage you will be confident you won’t break important business scenarios. Most modern organizations have strong test coverage suites in their Continuous Integration/Continuous Delivery pipelines.
Clean code is very important both in evolving systems like traditional Software as Service (SAS) systems and mobile apps. Even now it is more relevant in environments where we cannot push updates as fast as we wish. This includes embedded systems, space probes, smart contracts, mobile apps, and many other applications. Classical refactoring books, websites and IDEs focus on structural safe refactors. This book has some recipes for this like safe renames. But you will also find several recipes related to semantic refactors. You will need to understand the code, the problems, and the recipe to make appropriate changes.
As you proceed through this book, refactoring recipes and the variety of code smells increase in complexity. You will
Understand the benefits of clean code and learn how to detect code smells Learn refactoring techniques step by step Gain illustrative code examples in several modern programming languages Get a comprehensive catalog of common code smells, their impacts, and possible solutions Use code that's straight to the point, favoring readability and learning
Внимание
Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.
Информация
Посетители, находящиеся в группе Гости, не могут оставлять комментарии к данной публикации.