,

Refactoring

Improving the Design of Existing Code

Gebonden Engels 2018 2e druk 9780134757599
€ 70,66
Op voorraad
Voor 23:00 besteld, morgen in huis
Gratis verzonden

Samenvatting

Fully Revised and Updated–Includes New Refactorings and Code Examples

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” - M. Fowler (1999)

For more than twenty years, experienced programmers worldwide have relied on Martin Fowler’s Refactoring to improve the design of existing code and to enhance software maintainability, as well as to make existing code easier to understand.

This eagerly awaited new edition has been fully updated to reflect crucial changes in the programming landscape. 'Refactoring, Second Edition', features an updated catalog of refactorings and includes JavaScript code examples, as well as new functional examples that demonstrate refactoring without classes.

Like the original, this edition explains what refactoring is; why you should refactor; how to recognize code that needs refactoring; and how to actually do it successfully, no matter what language you use.

- Understand the process and general principles of refactoring
- Quickly apply useful refactorings to make a program easier to comprehend and change
- Recognize “bad smells” in code that signal opportunities to refactor
- Explore the refactorings, each with explanations, motivation, mechanics, and simple examples
- Build solid tests for your refactorings
- Recognize tradeoffs and obstacles to refactoring

Lezersrecensies

Wees de eerste die een lezersrecensie schrijft!

Inhoudsopgave

Foreword to the First Edition xi
Preface xiii

Chapter 1: Refactoring: A First Example 1
The Starting Point 1
Comments on the Starting Program 3
The First Step in Refactoring 5
Decomposing the statement Function 6
Status: Lots of Nested Functions 22
Splitting the Phases of Calculation and Formatting 24
Status: Separated into Two Files (and Phases) 31
Reorganizing the Calculations by Type 34
Status: Creating the Data with the Polymorphic Calculator 41
Final Thoughts 43

Chapter 2: Principles in Refactoring 45
Defining Refactoring 45
The Two Hats 46
Why Should We Refactor? 47
When Should We Refactor? 50
Problems with Refactoring 55
Refactoring, Architecture, and Yagni 62
Refactoring and the Wider Software Development Process 63
Refactoring and Performance 64
Where Did Refactoring Come From? 67
Automated Refactorings 68
Going Further 70

Chapter 3: Bad Smells in Code 71
Mysterious Name 72
Duplicated Code 72
Long Function 73
Long Parameter List 74
Global Data 74
Mutable Data 75
Divergent Change 76
Shotgun Surgery 76
Feature Envy 77
Data Clumps 78
Primitive Obsession 78
Repeated Switches 79
Loops 79
Lazy Element 80
Speculative Generality 80
Temporary Field 80
Message Chains 81
Middle Man 81
Insider Trading 82
Large Class 82
Alternative Classes with Different Interfaces 83
Data Class 83
Refused Bequest 83
Comments 84

Chapter 4: Building Tests 85
The Value of Self-Testing Code 85
Sample Code to Test 87
A First Test 90
Add Another Test 93
Modifying the Fixture 95
Probing the Boundaries 96
Much More Than This 99
Afgekapt op 62 regels

Managementboek Top 100

€ 70,66
Morgen in huis
Gratis verzonden

Rubrieken

Producten

    Auteurs

      Trefwoorden

        Artikelen

          Refactoring