وبلاگ بلیان

Refactoring in Java : Improving Code Design and Maintainability for Java Developers

معرفی کتاب «Refactoring in Java : Improving Code Design and Maintainability for Java Developers» نوشتهٔ Stefano Violetta در سال 2023. این کتاب در 5 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است. «Refactoring in Java : Improving Code Design and Maintainability for Java Developers» در دستهٔ بدون دسته‌بندی قرار دارد.

Master code refactoring techniques, improve code quality, design, and maintainability, and boost your development productivity with this comprehensive handbook Key Features Get a thorough understanding of code refinement for enhanced codebase efficiency Work with real-world examples and case studies for hands-on learning and application Focus on essential tools, emphasizing development productivity and robust coding habits Purchase of the print or Kindle book includes a free PDF eBook Book DescriptionRefactoring in Java serves as an indispensable guide to enhancing your codebase's quality and maintainability. The book begins by helping you get to grips with refactoring fundamentals, including cultivating good coding habits and identifying red flags. You'll explore testing methodologies, essential refactoring techniques, and metaprogramming, as well as designing a good architecture. The chapters clearly explain how to refactor and improve your code using real-world examples and proven techniques. Part two equips you with the ability to recognize code smells, prioritize tasks, and employ automated refactoring tools, testing frameworks, and code analysis tools. You'll discover best practices to ensure efficient code improvement so that you can navigate complexities with ease. In part three, the book focuses on continuous learning, daily practices enhancing coding proficiency, and a holistic view of the architecture. You'll get practical tips to mitigate risks during refactoring, along with guidance on measuring impact to ensure that you become an efficient software craftsperson. By the end of this book, you'll be able to avoid unproductive programming or architecturing, detect red flags, and propose changes to improve the maintainability of your codebase.What you will learn Recognize and address common issues in your code Find out how to determine which improvements are most important Implement techniques such as using polymorphism instead of conditions Efficiently leverage tools for streamlining refactoring processes Enhance code reliability through effective testing practices Develop the skills needed for clean and readable code presentation Get to grips with the tools you need for thorough code examination Apply best practices for a more efficient coding workflow Who this book is for This book is for Java developers, software architects, and technical leads looking for a comprehensive guide to advancing their skills in software design and refactoring. The book is ideal for experienced Java enthusiasts, quality assurance engineers, and codebase maintainers as it provides practical insights, real-world examples, and essential patterns. Development managers who want to foster clean coding practices by using best practices for efficient workflows will also find this book useful. ]]> Refactoring in Java Contributors About the author About the reviewers Preface Who this book is for What this book covers To get the most out of this book GitHub repository Conventions used Get in touch Share Your Thoughts Download a free PDF copy of this book Part 1: Introduction to Refactoring Chapter 1: What is Refactoring? What do we mean by refactoring? Refactoring and clean code Misconceptions about refactoring Why you should consider refactoring Improving the design of your software Maintainability and scalability Understanding, avoiding, and fixing bugs Faster development When you should refactor The “Rule of Three” Preparatory refactoring for smooth feature implementation Refactoring for bug fixing Comprehension refactoring The “Boy Scout Rule” Planned refactoring Long-term refactoring and “Branch by Abstraction” Refactoring in a code review What you should refactor Impact analysis Risk assessment Value estimation Prioritization matrix Further considerations Refactor or rewrite? Summary Further reading Chapter 2: Good Coding Habits Characteristics of good code Good code is readable Good code is reliable Good code is hard to misuse Good code is modular Good code is reusable Clean Code Why Clean Code? Some principles of Clean Code Write SOLID code Single responsibility principle Open-closed principle Liskov substitution principle Interface segregation principle Dependency inversion principle Side effects and mutability The builder pattern Causes of bad code Deadlines The Broken Window theory No code review process Insufficient domain or technical knowledge Summary Further reading Part 2: Essence of Refactoring and Good Code Chapter 3: Code Smells Duplicated code Long methods Replace temporary variables with query methods Parameter object Replace a function or method with a command Decompose conditionals Split loops Large classes Switches Primitive Obsession Middle man Message chains Feature envy methods Divergent change Shotgun Surgery God object Summary Further reading Chapter 4: Testing Why you should test (often) Identifying and fixing defects Ensuring quality and reliability Customer satisfaction Compliance and standards Security Integration and compatibility Confidence and peace of mind Unit testing JUnit framework Integration testing Mockito Contract testing Be safe – checking and improving your test coverage What is test coverage? A Java code coverage tool – JaCoCo Test-driven development Advantages of TDD Summary Further reading Chapter 5: Refactoring Techniques Writing better methods Extract Method Inline Method Extract and inline variables Combining a function into a class Moving features between objects Moving a method or field Moving statements into/from methods Hiding delegates Removing dead code Organizing data Field encapsulation Replacing primitives with objects Replacing type code with subclasses Simplifying conditional logic Returning a special case instead of null Using polymorphism instead of conditions Removing duplicated conditions Guard clauses Simplifying method calls Avoiding side effects Removing setter methods Using generalization Pull up field Push down field Pull up method Push down method Template method Using enums instead of constants Summary Further reading Chapter 6: Metaprogramming What is metaprogramming? Exploring compile-time metaprogramming tools Lombok MapStruct Exploring runtime metaprogramming tools Reflection Weighing the pros and cons of metaprogramming Summary Further reading Chapter 7: Static and Dynamic Analysis What is static analysis? Code errors or bad practices Security Cyclomatic complexity Exception (mis)handling Automated static analysis tools What is dynamic analysis? Debugging Profiling Fuzzing Symbolic execution Taint tracking Summary Further reading Part 3: Further Learning Chapter 8: Crafting Quality Every Day Code versioning Graph structure Local VCSs Centralized VCSs Distributed VCSs Branching strategies Best practices Code formatting and style Indentation Braces and whitespaces Line length and wrapping Comments and documentation Naming conventions Automated tools Code reviews Email pass-arounds Code review automation tools In-person (or remote) teamwork reviews Pair programming Advantages Disadvantages Styles of pair programming Time management Documentation Requirements Architecture documentation Technical documentation Good practices for documentation A hard dose of reality The importance of knowing what you’re doing Summary Further reading Chapter 9: Beyond Code – Mastering Software Architecture What is an architecture? Development Deployment System operation Maintenance Architectural patterns Layered architecture Microservices Event-driven architecture Reactive architecture Monolith to microservices Bad smells in the microservices architecture Shared persistence Shared libraries Direct communication Summary Further reading Index Why subscribe? Other Books You May Enjoy Packt is searching for authors like you Share Your Thoughts Download a free PDF copy of this book
دانلود کتاب Refactoring in Java : Improving Code Design and Maintainability for Java Developers