& (ampersand), 187, 212, 293, 402
* (asterisk), in test code, 25
^ (caret), 293, 410, 423, 431
^ (hat character). See caret (^)
accelerator keys, 214, 215, 313, 357, 377, 395. See also Alt+S; MenuForAccelerator method
acceptance tests. See Customer Acceptance Tests
ActionForCommand method, 385
Adapter pattern, 246, 250
AddOldLines method, 470
AddRange method, 61, 62, 6465
Alt key, 18182, 326, 430. See also accelerator keys
Alt+P, 111, 202, 203
Alt+S. See also AltS method; AltS test; AltSWithText test
as accelerator key, 182, 187, 188, 211
adding to GUI, 148
beeping sound, 148, 18182, 188
vs. Ctrl+S, 148
vs. Enter, 188
implementing, 14851, 234
testing, 14849, 20916
AltS method, 173, 174, 175, 343
AltS test, 318, 319, 340, 343, 350, 385
AltSWithText test, 31819, 340, 35152
ampersand (&), 187, 212, 293, 402
ArrayInput test, 73, 76, 78, 80
ArrayList class
AddRange method, 61, 62
vs. arrays, 36, 43, 54, 60, 63, 88, 93, 99, 159, 169, 173, 176, 484, 490
Count property, 60, 93, 94, 160
creating object, 16970
defined, 54, 60
line cleaning and, 9495
lines, 412, 413, 414, 415, 416, 439
menu array and, 37880
newlines and, 6364, 66
arrays
vs. ArrayList, 36, 43, 54, 60, 63, 88, 93, 99, 159, 169, 173, 176, 484, 490
empty, 65, 163, 164
Enter and, 36
skip tags as, 32021
storing
string, 57, 60, 63, 64, 88, 92, 93, 99, 16970, 322, 329, 333, 334, 337, 345, 348, 378, 484
TextBox and, 43, 54, 56, 59
ArrayToEnd method, 103
articles
displaying on Web site, 395404
generating with XSLT, 395
AssertEquals method, 20
assertion
backing out code, 85, 8889, 99, 44647. See also code manager
BackOfCursorLine method, 224, 225, 228
backslash, 25
Beck, Kent, xxiii, 51, 95, 474
BeforeLines method, 450
blank lines, 160, 161, 22223
blank projects vs. built-in projects, 5
book reviews, estimated time to improve XProgramming.com Web pages, 271, 275
breakpoints, 26, 27, 29, 225, 29899, 421, 435
browsers. See Internet Explorer
built-in projects vs. blank projects, 5
Button, Brian, 182
C#
adding empty projects to Visual Studio .NET solutions, 4
adding new files to projects, 4
method syntax, 21
property syntax, 21
regular expressions and, 18
C# Refactory, 257
CallModel method, 261, 289, 290, 303, 315
caret (^), 293, 410, 423, 431
Cascading Style Sheets (CSS), 399
ChangeToH2 method, 180
class adapters, 246
classes
subclassing, 48485, 490
test fixtures as, 20
CleanLines method, 84, 92, 9395, 100, 107
CleanTheLine method, 9596
CleanTheLines method, 95, 107
ClearModel method, 279
code. See also code summaries; duplication; refactoring
backing out, 85, 8889, 99, 44647
comparing
copying and pasting, 31718
desk checking, 100, 109, 221
lack of testability, 86
reuse issue, 284
code manager. See also backing out code
copying files to archive, 8889
need for autorun tool, 103
storing deleted code, 109
summary, 483
upgrading, 8990
code smells, 182, 318, 439, 474. See also refactoring
code summaries
CustomerTest.cs, 12628, 36971
InputCommand.cs, 12829
InputCommandTest.cs, 129
ITestTextBox.cs, 130
MockTextBox.cs, 130
Notepad.cs, 13031
TestableTextBox.cs, 131
TestScroll.cs, 13132
TestTextBox.cs, 13233
TestTextModel.cs, 13334, 36569
TextModel.cs, 6770, 13436, 15557, 16769, 17880, 36265, 39094
XMLNotepad.cs, 13638, 35762
coding standard, as Extreme Programming practice, xxix, 484
COM objects, 397, 400401, 402, 404
command interpreters, 74, 7677, 145, 215, 241, 29394
Command metaphor, 102. See also InputCommand.cs
Command object, 245, 378
Command pattern, 24546
Command Test, 108
commands
adding to interpreter, 29394
enumeration and, 34148
comments
adding to code, 5051
in ScrollHappens test, 119, 120
as weakness, 5154, 62, 267
when not to use, 5154, 62, 267
when to use, 143
CompareOutput method, 75, 243
comparing code line-by-line, 465, 467
compiling C# programs in Visual Studio .NET, 4
Compose Method, 88, 106
console applications, 4, 26
ConsoleHelloWorld project, 4
Console.WriteLine statement, 26, 181, 185, 491
constructor. See XMLNotepad.cs
control
ControlP. See Ctrl+P
ControlS method, 14647
ControlS test, 14546
ControlTwo test, 144
Cooper, James W., 245, 247
copy and paste programming, 31718
copying, estimated time to implement feature, 271, 273
Count property, 60, 93, 94, 160
Craig, Philip, 18
{% if main.adsdop %}{% include 'adsenceinline.tpl' %}{% endif %}
cruft buildup, 99
Ctrl+O, as openfile shortcut, 293
Ctrl+P, 10, 12, 34, 35, 44
Ctrl+S. See also Alt+S; ControlS method; ControlS test
vs. Alt+S, 148
defining, 14445
as savefile shortcut, 293
Ctrl+Z, 41720, 43032, 435, 458. See also LineContainingCursor method; Undo
cursor
BackOfCursorLine method, 224, 225, 228
determining location, 3536, 37, 38, 96, 98, 209
file operations and, 3013
FrontOfCursorLine method, 224, 225, 228
InputCommand and, 91100
LinesAfterCursor method, 61, 62, 109
LinesBeforeCursor method, 450
LinesThroughCursor method, 61, 62, 109
NewModelLineContainingCursor method, 450
placing between paragraph tags, 83
PositionOfCursorInLine method, 224, 225, 228, 229, 456
scrolling to keep on screen, 11112, 11516
splitting line containing, 22326
testing, 5759
vertical bar character, 83, 84, 94, 98, 209, 423, 425
cursor count, 329
CursorLine method, 3536, 37, 38, 4546, 5354
CursorLocation method, 84
CursorPosition test, 225, 410
Customer Acceptance Tests. See also CustomerTest.cs
code summaries, 37173
creating for first story, 63, 7180
as Extreme Programming practice, xxvixxvii
for file operations, 290301
for inserting <pre> tags, 2024
for inserting section tags, 14445
lessons learned, 47980
for menu implementation, 32328
for ordered lists, 354
vs. Programmer Unit Tests, 77, 97, 144, 146, 219, 241, 421
project cycle and, 7172
for running GUI, 20716
scripting language for, 7376
for Shift+Enter, 23944
for Undo, 409, 42125
writing, 7280
customers. See also Customer Acceptance Tests
business value and, 10, 217
collaboration and, 15
defined, 12
envisioning product features, 1314
needs of real users, 400, 47879
vs. programmers, 77, 97, 144, 146, 219, 241, 421, 47879
role in scheduling programmer learning time, 25152
stories and, 2
CustomerTest.cs
ArrayInput test, 73, 76, 78, 80
ArrayToEnd method, 103
code summaries, 12628, 36971
Command metaphor and, 102
CompareOutput method, 75, 243
creating class, 7374
DirectInput test, 80, 104
DirectMenu test, 212, 291
FileInput test, 7879, 141
InsertAfterPara test, 141, 372
InsertOL test, 372
InsertPara test, 141, 372
InsertUL test, 373
overview, 24243
ParaAfterPara test, 141, 372
as programming by
revised code, 36971
similarity to InputCommand, 1023
StringInput test, 76, 77, 78, 161, 291
TestAllFiles test, 7980, 162, 21213, 291, 294
testing Undo capability, 42125
TestInput test, 80
Trivial test, 140
CustomerTestPutText method, 267, 431
cutting, estimated time to implement feature, 271, 273