Legacy Code

Bringing Complex Legacy Software Under Control — C Edition

Art for Legacy Code Check Out A Preview

By Mike Hill

Do you work with CRRAP: Code Requiring Remedial Attention Promptly? Legacy code is everywhere, so it helps to learn how to work with it effectively. Experience how experts use proven patterns to conquer legacy code challenges and then practice your skills on an extensive, real-world exercise.

Highlights

Legacy Strategies
Legacy Strategies: Tame your legacy code via expert strategies and guidance from genuine gurus. Learn more...
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
  • 80 pages
  • 6 Videos
  • 3 Exercises
  • Solution code and videos
  • Support for Visual Studio
  • Support for Eclipse CDT
  • Uses embUnit

Contents

You Are Here 3
What Is Legacy? 4
Why Care About Legacy? 5
The Top Three Activities With Legacy Code 6
Testability 7
Hurdles To Microtesting 8
How To Proceed? 9
A Chicken And Egg Problem? 10
The Legacy Stance 12
Element One: Stop Digging ← Click to Preview 13
Element Two: Start Stepping 14
Element Three: More Microtests! 15
Some Important Non-Technical Techniques 16
Developer Sign-off 17
Lunch and Learn (Study Group) 18
Lunch and Learn (Lottery) 19
The Big Visible Chart 20
Refactoring Budget 21
Now, Back To Your Regularly Scheduled Technique 22
Extract and Override: The Universal Pliers 24
The Context: An Awkward Chunk Of Code 25
The Technique: Isolate And Test Around 26
How Much Code To Extract? ← Click to Preview 27
Why You Should NOT Use Extract And Override 28
Why You SHOULD Use Extract And Override 29
Order Processing 31
Download Starting Code 32
Investigation Time 33
Make OrderTest Fast! 34
Extract And Override Solution ← Click to Preview 35
Welcome To CRRAP! 37
A Typical Piece of CRRAP 38
Brief Overview Of The Output 39
The Cheat Sheet 40
The Rules Of The Game 41
Start with the Universals 43
Step 1: Reformat and Commit 44
Step 1: Our Version 45
Step 2: Eliminate the Noise 46
Step 2: Our Version 47
Step 3: Get To Testability 48
Crazy Mike Hits A Dead End! 49
Legacy Pattern: Mini-Scoop It! 50
Legacy Pattern: Maxi-Scoop 51
Pindown Tests 52
Installing Our Plugin 53
Where to from here? 55
The Mission ← Click to Preview 56
Technique: Control Your Namespace ← Click to Preview 57
Technique: Think Small 58
Technique: Keep Tests Excellent ← Click to Preview 59
The Cheat Sheet Again 60
Getting Started 61
Hints Page 62
Hints Page 2 63
What is Static Cling? 65
A Class With Static Variables 66
Unexpected Test Failure 67
A Bad Solution: Reset Shared Data 68
A Better Solution: Remove Side-Effects 69
Creation Complexity 70
Solution: A Factory 71
Exercise: Static Cling 73
Problems! 74
A Close Look At The SongPlayer Class 75
Test Failures 76
Different Failures? 77
Your Mission 78
Conclusion: Where to Next? 80

Related Items

Volume Licensing

Have Any Questions?

Highlights

Legacy Strategies
Legacy Strategies: Tame your legacy code via expert strategies and guidance from genuine gurus. Learn more...
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
  • 80 pages
  • 6 Videos
  • 3 Exercises
  • Solution code and videos
  • Support for Visual Studio
  • Support for Eclipse CDT
  • Uses embUnit

Contents

You Are Here 3
What Is Legacy? 4
Why Care About Legacy? 5
The Top Three Activities With Legacy Code 6
Testability 7
Hurdles To Microtesting 8
How To Proceed? 9
A Chicken And Egg Problem? 10
The Legacy Stance 12
Element One: Stop Digging ← Click to Preview 13
Element Two: Start Stepping 14
Element Three: More Microtests! 15
Some Important Non-Technical Techniques 16
Developer Sign-off 17
Lunch and Learn (Study Group) 18
Lunch and Learn (Lottery) 19
The Big Visible Chart 20
Refactoring Budget 21
Now, Back To Your Regularly Scheduled Technique 22
Extract and Override: The Universal Pliers 24
The Context: An Awkward Chunk Of Code 25
The Technique: Isolate And Test Around 26
How Much Code To Extract? ← Click to Preview 27
Why You Should NOT Use Extract And Override 28
Why You SHOULD Use Extract And Override 29
Order Processing 31
Download Starting Code 32
Investigation Time 33
Make OrderTest Fast! 34
Extract And Override Solution ← Click to Preview 35
Welcome To CRRAP! 37
A Typical Piece of CRRAP 38
Brief Overview Of The Output 39
The Cheat Sheet 40
The Rules Of The Game 41
Start with the Universals 43
Step 1: Reformat and Commit 44
Step 1: Our Version 45
Step 2: Eliminate the Noise 46
Step 2: Our Version 47
Step 3: Get To Testability 48
Crazy Mike Hits A Dead End! 49
Legacy Pattern: Mini-Scoop It! 50
Legacy Pattern: Maxi-Scoop 51
Pindown Tests 52
Installing Our Plugin 53
Where to from here? 55
The Mission ← Click to Preview 56
Technique: Control Your Namespace ← Click to Preview 57
Technique: Think Small 58
Technique: Keep Tests Excellent ← Click to Preview 59
The Cheat Sheet Again 60
Getting Started 61
Hints Page 62
Hints Page 2 63
What is Static Cling? 65
A Class With Static Variables 66
Unexpected Test Failure 67
A Bad Solution: Reset Shared Data 68
A Better Solution: Remove Side-Effects 69
Creation Complexity 70
Solution: A Factory 71
Exercise: Static Cling 73
Problems! 74
A Close Look At The SongPlayer Class 75
Test Failures 76
Different Failures? 77
Your Mission 78
Conclusion: Where to Next? 80

Related Items