Table of Contents
BackCover
Microsoft Extreme Programming Adventures in C#
Foreword
Introduction
System Requirements
Support
Sound Bites
Extreme Programming
Chapter 1: XML Notepad Stories
Initial Vision
Learn from the Best
Petzold Notepad Version 1
Handling Keyboard Events
Shaping the Release
Stories for Initial Release
Subsequent Iterations and Releases
The XProgramming Format
Chapter 2: Testing with NUnit
NUnit
Setting Up NUnit
Finding a Simple Pattern
Paired Tags
Paired Unknown Tags
Unmatched Tags
What's Left?
A Short Look at Debugging Under NUnit
The Debug Startup Program
Attach to the NUnit Process
Choosing a Technique
Summary
Chapter 3: A Pressing Matter
Handling the Enter
It Didn't Work!
What's Next?
Chapter 4: Extracting the Model
The Basic Plan
The Refactoring
What's Next?
Chapter 5: Expressing Ideas
Commenting for " Clarity "
Commenting Means " Not Done "
We Need Some Tests Here!
Some Additional Tests
The Starting Code
The Current Code
What's Next?
A Little Refactoring: That Ugly Get
Get Rid of the Text Copy
Observations and Conclusions
Reflecting Back
Current Code
Chapter 6: The First Customer Acceptance Test
OK, We Need a Test
The Test Runs!
Imagine a Long Delay...
Test from a File
Test a Lot of Files
Still to Come
Chapter 7: Warts and All
Do You Have a Test for That?
The First Test Worked
There's Only One Thing to Do
We Need an Object
Conclusions for Today
Further Reflection
Upgrading the Code Manager
Chapter 8: The InputCommand Object
Cleaning the Lines
Building SelectionStart
Chapter 9: Story One Is Done!
Cleaning the Code
InputCommand Refactoring
Smaller Details
Conclusions
Ship It!
Iteration Planning
Conclusion
Chapter 10: Find a Bug, Write a Test
Find a Defect, Write Tests
Mock the TextBox
Extract Method
The Scroll Test
Build an Interface
Lessons: Lots of Learning, Not Much Testing
Conclusions
Code Summary
CustomerTest.cs
InputCommand.cs
InputCommandTest.cs
ITestTextBox.cs
MockTextBox.cs
Notepad.cs
TestableTextBox.cs
TestScroll.cs
TextTextBox.cs
TestTextModel1.cs
TextModel.cs
XMLNotepad.cs
Chapter 11: Adding the Section Tag, Part I
Chapter 12: Adding the Section Tag, Part II
The Tests All Run
The Lesson
The TextModel Code
Looking Around
What Do We See Now?
Judgment Call
Enough for Now
Code Summary
Chapter 13: Discovering the Menu
Other Issues
Preparing the Ground
Adding the Menu
Enough For Now?
What's Next?
Chapter 14: Don't Try This at Home
Chapter 15: Climbing Out of the Rat Hole
Chapter 16: Adding the <pre> Tag
Chapter 17: How Do We Do a Test That We Can't Do?
Chapter 18: A Simple Feature Teaches Some Lessons
Shift+Enter Test
New Plan
Lessons Learned
Enough for Now
Chapter 19: Dark Clouds on the Horizon
Chapter 20: Finishing the Shift+Enter Story
Chapter 21: Some Things We Ought to Do
Adapter Pattern
Mediator Pattern
Small Boy with a Patterns Book
Deriving a File Class
Rendering the Text More Effectively
XML Support in .NET
What's the Plan?
Yes, But What's the Plan?
Chapter 22: The Delegate from Troy
Chapter 23: Planning Interlude
Chapter 24: File Save and Load
Chapter 25: Tagging Along
Chapter 26: Menu Arrays
The Plan
Menu Array
The Table
Reviewing Where We Are
TextModel Code
Chapter 27: Displaying the Article
Chapter 28: Oh No! Undo!
The Requirement
Possible Solutions
What About Tests?
Begin with a Test
Using TextModel as the Saved Object
Snapshot Every Time
Building It In
Removing the Experiments
It Gets Weird for a Moment
Are We There Yet?
Review of What Has Happened So Far
The Big Picture
Does This Prove Anything?
Chapter 29: The Final Optimized Undo
Chapter 30: The Long Dark Teatime of the Soul
A Repeated Mistake
Playing with Pain
Design Thinking
Experiments Without Tests
An Initial Attempt
A Second Attempt and a Big Mistake
The Third Attempt
First-Take Excerpt: The Stench of Death
Chapter 31: Project Retrospective
Could We Put This Program into Production?
The Value of Real Customers
Customer Tests
Pair Programming
Trends over Time
Are the Tests Helping Us?
Are the Objects Helping Us?
Did Our Tests and Objects Help Us Enough?
Eat Your Own Dog Food
Code Manager
Coding Standard
Be Ready to Use Advanced Facilities
Is TextModel Too Large?
Premature Optimization
Responding to Pressure
Pressure and Productivity
Pressure and Quality
Debugging Techniques
Design and Code Quality
Would " More Design " Have Helped?
Smaller Questions
The Effect of Illness
Does Incremental Development Work?
Bibliography
Index
Index_A
Index_B
Index_C
Index_D
Index_E
Index_F
Index_G
Index_H
Index_I
Index_J - K
Index_L
Index_M
Index_N
Index_O
Index_P
Index_R
Index_S
Index_T
Index_U
Index_V
Index_W
Index_X
Index_Y
List of Lessons