Trends over Time

Early on in the project, we were mostly struggling with C# and Microsoft Visual Studio. We were discussing how to say things in the language and how to use collections, strings, events, and the like. Later on, we had found ways to do most things, and we were working primarily within the objects that we had created and a few standard patterns of use that we had found to work. Although it took a long elapsed time to write this book, most of the chapters represent only about two to four hours of programming. Thus, in the equivalent of a few weeks of full-time working with C#, with no experts around to help us, we have come a long way in our understanding and ability to make progress.

You can see places where programming by intention enables us to create objects and methods that really seem to help with solving the problem. The objects become representative of our ideas ”abstractions if you will. When we program this way, it really helps.

We also see places where we never got around to creating an object. The interface between Form/TextBox and TextModel is an example. We just kept passing the lines, the selection start, and the selection length around. Worse yet, we kept doing it in three separate steps, like this:

 private void GetText() { 
model.SelectionStart = textbox.SelectionStart;
model.SelectionLength = textbox.SelectionLength;

I still don t see what would be better than what we did, so long as we have the separation between the TextBox and the TextModel. This code may be trying to tell us that we should move away from that structure. However, that structure has served us pretty well, so the code isn t speaking loudly as yet.

Sometimes we see projects that program only in terms of the base classes of the language, ints and strings and arraylists and the like. They never build abstractions of their own, like the TextModel or the SingleCharacterSnapshot. Especially as projects get larger, building our own abstractions is a very important technique to keep us going quickly and reliably. One key technique is to ask whether our tests and objects are helping us.

Extreme Programming Adventures in C#
Javaв„ў EE 5 Tutorial, The (3rd Edition)
ISBN: 735619492
EAN: 2147483647
Year: 2006
Pages: 291

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: