Refactoring
{"all_nodes":"PHASE 1 fill complete; deterministic lint clean (2026-10-12)"}local graph
Refactoring — Martin Fowler
Section titled “Refactoring — Martin Fowler”chapter_01
Section titled “chapter_01”node-book_refactoring-improving-design_chapter-01-refactoring-a-first-example — Refactoring: A First Example
chapter_02
Section titled “chapter_02”node-book_refactoring-improving-design_chapter-02-principles-in-refactoring — Principles in Refactoring
chapter_03
Section titled “chapter_03”node-book_refactoring-improving-design_chapter-03-bad-smells-in-code — Bad Smells in Code
chapter_04
Section titled “chapter_04”node-book_refactoring-improving-design_chapter-04-building-tests — Building Tests
chapter_05
Section titled “chapter_05”node-book_refactoring-improving-design_chapter-05-introducing-the-catalog — Introducing the Catalog
chapter_06
Section titled “chapter_06”node-book_refactoring-improving-design_chapter-06-a-first-set-of-refactorings — A First Set of Refactorings
chapter_07
Section titled “chapter_07”node-book_refactoring-improving-design_chapter-07-encapsulation — Encapsulation
chapter_08
Section titled “chapter_08”node-book_refactoring-improving-design_chapter-08-moving-features — Moving Features
chapter_09
Section titled “chapter_09”node-book_refactoring-improving-design_chapter-09-organizing-data — Organizing Data
chapter_10
Section titled “chapter_10”node-book_refactoring-improving-design_chapter-10-simplifying-conditional-logic — Simplifying Conditional Logic
chapter_11
Section titled “chapter_11”node-book_refactoring-improving-design_chapter-11-refactoring-apis — Refactoring APIs
chapter_12
Section titled “chapter_12”node-book_refactoring-improving-design_chapter-12-dealing-with-inheritance — Dealing with Inheritance
Title Page
Section titled “Title Page”The Addison-Wesley Signature Series
Section titled “The Addison-Wesley Signature Series”“Any fool can write code that a computer can understand.
Good programmers write code that humans can understand.”
—M. Fowler (1999)
REFACTORING
Section titled “REFACTORING”Improving the Design of Existing Code
Martin Fowler
with contributions by
Kent Beck

[!visual-conversion] Two bridges: a green truss bridge and a modern cable-stayed Cropped from the scan (PDF page 001): Two bridges: a green truss bridge and a modern cable-stayed bridge.
SECOND EDITION

[!visual-conversion] logo “P” Cropped from the scan (PDF page 001): logo “P”
[!warning] cover image not recoverable The transcription references an image on the title page that has no matching grounding block; no crop was produced.
[!warning] cover image not recoverable The transcription references an image on the title page that has no matching grounding block; no crop was produced.
Refactoring
Section titled “Refactoring”Improving the Design of Existing Code
Section titled “Improving the Design of Existing Code”Second Edition
Section titled “Second Edition”Martin Fowler
with contributions by
Kent Beck
Addison-Wesley
Boston • Columbus • New York • San Francisco • Amsterdam • Cape Town
Dubai • London • Madrid • Milan • Munich • Paris • Montreal • Toronto • Delhi •
Mexico City
São Paulo • Sydney • Hong Kong • Seoul • Singapore • Taipei • Tokyo
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals.
The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein.
For information about buying this title in bulk quantities, or for special sales opportunities (which may include electronic versions; custom cover designs; and content particular to your business, training goals, marketing focus, or branding interests), please contact our corporate sales department at [email protected] or (800) 382-3419.
For government sales inquiries, please contact [email protected].
For questions about sales outside the U.S., please contact [email protected].
Visit us on the Web: informit.com/aw
Library of Congress Control Number: 2018950015
Copyright © 2019 Pearson Education, Inc.
Cover photo: Waldo-Hancock Bridge & Penobscot Narrows Bridge by Martin Fowler
Lightbulb graphic: Irina Adamovich/Shutterstock
All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For
information regarding permissions, request forms and the appropriate contacts within the Pearson Education Global Rights & Permissions Department, please visit www.pearsoned.com/permissions/.
ISBN-13: 978-0-13-475759-9
ISBN-10: 0-13-475759-9
1 18