Book Image

Refactoring in Java

By : Stefano Violetta
5 (1)
Book Image

Refactoring in Java

5 (1)
By: Stefano Violetta

Overview of this book

Refactoring 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.
Table of Contents (15 chapters)
1
Part 1: Introduction to Refactoring
4
Part 2: Essence of Refactoring and Good Code
Free Chapter
10
Part 3: Further Learning

Part 1: Introduction to Refactoring

We will start by defining what is meant by “refactoring” and why it is an important practice in software development. We will also cover the benefits of refactoring and the situations in which it is appropriate to use it. We will delve into the specific areas of code that developers should consider refactoring, providing guidance on how to identify and prioritize areas for improvement.

Then we’ll cover the topic of writing high-quality code by day-to-day habits, which each professional should interiorize. We’re going to start by discussing what distinguishes good code from bad code and briefly explore the concept of clean code. Then we’ll delve into the SOLID principles of software design, the importance of (not using) side effects, mutability, and common causes of bad code.

This part has the following chapters:

...