Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Refactoring in Java
  • Table Of Contents Toc
  • Feedback & Rating feedback
Refactoring in Java

Refactoring in Java

By : Stefano Violetta
5 (1)
close
close
Refactoring in Java

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

Test-driven development

As the name suggests, test-driven development, abbreviated as TDD, is a widely used software development practice in Agile methodologies, especially in Extreme Programming. It is widely regarded as a fundamental technique for achieving higher-quality software.

As the name itself suggests, development is driven by tests, not the other way around. The classic development cycle involves the following:

Figure 4.10 – The classic development cycle involves designing, coding, and then testing

Figure 4.10 – The classic development cycle involves designing, coding, and then testing

This is flipped around. We start with the tests to arrive at defining the design; of course, writing the code in between:

Figure 4.11 – The TDD cycle starts with the tests

Figure 4.11 – The TDD cycle starts with the tests

Attention is given to the functional aspects of the code, specifically the method signatures, before the actual implementation of the code. To start with the tests, you need to take the perspective of the “client” of your...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY