Conventions Used in This Book


Code flows with the text, in order to make it part of the conversation. If I refer to code "below," it's the next piece of code as you continue to read; code "above" appears in recent prior text.

Code (below) appears in a non-proportional font:

 this.isCode(); 

Smaller portions of a large block of code may appear in bold. The bold indicates either new code that relates to the current example or code that has particular relevance:

 class B {   public void thisIsANewMethod() {   } } 

Code appearing directly in text, such as this.someCode(), also appears in a non-proportional font. However, the names of classes, such as CourseSession, appear in the same font as the rest of the text.

I often use ellipses in the code samples. The ellipses indicate code that already exists in a class but is not relevant to the current discussion or example:

 class C {   private String interestingVariable;   ...   private void someInterestingMethod() {   }   ... 

The dialog in Agile Java alternates between expressing ideas in English and expressing them in code. For example, I may refer to the need to cancel a payroll check or I might choose to say that you should send the cancel message to the PayrollCheck object. The idea is to help you start making the necessary connections between understanding requirements and expressing them in code.

Class names are by convention singular nouns, such as Customer. "You use the Customer class to create multiple Customer objects." In the name of readability, I will sometimes refer to these Customer objects using the plural of the class name: "The collection contains all of the Customers loaded from the file system."

New terms initially appear in italics. Most of these terms appear in the Glossary (Appendix A).

Throughout Agile Java, you will take specifications and translate them into Java code. In the tradition of agile processes, I present these specifications using informal English. They are requirements, also known as stories. A story is a promise for more conversation. Often you will need to continue a dialog with the presenter of the story (sometimes known as the customer) in order to obtain further details on a story. In the case of Agile Java, if a story isn't making sense, try reading a bit further. Read the corresponding tests to see how they interpret the story.

I have highlighted stories throughout Agile Java with a "storytelling" icon. The icon emphasizes the oral informality of stories.


Your best path to learning the craft of programming is to work with an experienced practitioner. You will discover that there are many "secrets" to programming. Some secrets are basic concepts that you must know in order to master the craft. Other secrets represent pitfallsthings to watch out for. You must bridge these challenges, and remember what you learned, to be a successful Java programmer.

I've marked such critical points with a bridge icon (the bridge is crossing over the pitfalls). Many of these critical points will apply to development in any language, not just Java.




Agile Java. Crafting Code with Test-Driven Development
Agile Javaв„ў: Crafting Code with Test-Driven Development
ISBN: 0131482394
EAN: 2147483647
Year: 2003
Pages: 391
Authors: Jeff Langr

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net