Refactoring

The Art of Safely Improving Software Designs — Python Edition

Art for Refactoring Check Out A Preview

By Joshua Kerievsky, Tim Ottinger

Did you ever want to turn a messy, complex software design into simple, safe code? Refactoring provides the tools and techniques for safely improving your software designs. Immerse yourself in Refactoring exercises featuring our "look-over-your-shoulder" technology that gives you expert feedback. Build strong Refactoring skills by learning how to use powerful tools and proven techniques.

Highlights

Expert Videos
Expert Videos: Learn tools & techniques by watching short videos from industry experts. Learn more...
Integrated Forums
Integrated Forums: Ask questions, get expert replies and read fascinating discussions. Learn more...

Includes

  • 4-6 hours of content
  • 79 pages
  • Refactoring Strategies & Tactics
  • 7 Interactive quizzes
  • 7 Videos
  • 5 exercises
  • Support for Pydev
  • Support for PyCharm

Contents

You Are Here 3
Learning to Refactor 4
What Is Refactoring? 6
An Example Refactoring 7
Refactoring Is Revision ← Click to Preview 8
Revision Of The Declaration Of Independence ← Click to Preview 9
What Motivates Us to Refactor? 10
Baby Steps 12
The Hippocratic Oath 13
Refactoring Safely 14
The Rhythm of Refactoring 15
How Would You Refactor This? 16
Two Refactoring Styles 17
Round One 18
Small Steps Quiz 19
Round Two 20
Refactoring Rhythm Quiz 21
When We Say Baby, We Mean Baby 22
Ready For A Challenge? 24
Refactoring a Function ← Click to Preview 25
Finding Refactorings in Code 26
Code Qualities & More Refactorings 27
Finding More Refactorings in Code 28
Automated Refactorings 30
An Exercise To Give You Experience 31
Download the Exercise 32
Exercise Instructions 33
Automated Refactoring Solution 34
The LogParser 36
How Can You Help? 37
When There's No Pep 38
Get The Starting Code 39
Your Mission 40
Part 1 - Solution 41
Refactoring The LogParser: Part 2 43
The __init__ method 44
Lots of Regular Expressions 45
Get The Starting Code 46
Your Mission 47
Part 2 - Solution 48
Improving The Design Of LogParser: Part 3 50
Simplify Regex 51
Don't Forget Efficiency 52
Larger Refactorings 53
Simplify The Aggregator 54
Drop Requirement for Sketchy Lookup 55
Eliminate Speculative Generality 56
Get The Starting Code 57
Your Mission 58
Part 3 - Solution 59
Refactoring Rash 61
Strategy: Graceful Retreat 62
Strategy: Gradual Cutover 63
Strategy: Nesting 64
Narrowed Change 66
Narrowed Change Video 67
Parallel Change 68
Parallel Change Video ← Click to Preview 69
Experiencing Legacy Code ← Click to Preview 71
Poorly Written Driving Directions 72
Directions Deconstructed 73
Simple, Clear & Concise Directions 74
What Directions Will You Take? 75
Urban Blight & Renewal 76
Related Books 78
Conclusion: What's Next? 79

Related Items

Volume Licensing

Have Any Questions?

Highlights

Expert Videos
Expert Videos: Learn tools & techniques by watching short videos from industry experts. Learn more...
Integrated Forums
Integrated Forums: Ask questions, get expert replies and read fascinating discussions. Learn more...

Includes

  • 4-6 hours of content
  • 79 pages
  • Refactoring Strategies & Tactics
  • 7 Interactive quizzes
  • 7 Videos
  • 5 exercises
  • Support for Pydev
  • Support for PyCharm

Contents

You Are Here 3
Learning to Refactor 4
What Is Refactoring? 6
An Example Refactoring 7
Refactoring Is Revision ← Click to Preview 8
Revision Of The Declaration Of Independence ← Click to Preview 9
What Motivates Us to Refactor? 10
Baby Steps 12
The Hippocratic Oath 13
Refactoring Safely 14
The Rhythm of Refactoring 15
How Would You Refactor This? 16
Two Refactoring Styles 17
Round One 18
Small Steps Quiz 19
Round Two 20
Refactoring Rhythm Quiz 21
When We Say Baby, We Mean Baby 22
Ready For A Challenge? 24
Refactoring a Function ← Click to Preview 25
Finding Refactorings in Code 26
Code Qualities & More Refactorings 27
Finding More Refactorings in Code 28
Automated Refactorings 30
An Exercise To Give You Experience 31
Download the Exercise 32
Exercise Instructions 33
Automated Refactoring Solution 34
The LogParser 36
How Can You Help? 37
When There's No Pep 38
Get The Starting Code 39
Your Mission 40
Part 1 - Solution 41
Refactoring The LogParser: Part 2 43
The __init__ method 44
Lots of Regular Expressions 45
Get The Starting Code 46
Your Mission 47
Part 2 - Solution 48
Improving The Design Of LogParser: Part 3 50
Simplify Regex 51
Don't Forget Efficiency 52
Larger Refactorings 53
Simplify The Aggregator 54
Drop Requirement for Sketchy Lookup 55
Eliminate Speculative Generality 56
Get The Starting Code 57
Your Mission 58
Part 3 - Solution 59
Refactoring Rash 61
Strategy: Graceful Retreat 62
Strategy: Gradual Cutover 63
Strategy: Nesting 64
Narrowed Change 66
Narrowed Change Video 67
Parallel Change 68
Parallel Change Video ← Click to Preview 69
Experiencing Legacy Code ← Click to Preview 71
Poorly Written Driving Directions 72
Directions Deconstructed 73
Simple, Clear & Concise Directions 74
What Directions Will You Take? 75
Urban Blight & Renewal 76
Related Books 78
Conclusion: What's Next? 79

Related Items