- Used Books
- Staff Picks
- Gifts & Gift Cards
- Sell Books
- Stores & Events
- Let's Talk Books
Special Offers see all
More at Powell's
Recently Viewed clear list
New Trade Paper
Ships in 1 to 3 days
available for shipping or prepaid pickup only
Available for In-store Pickup
in 7 to 12 days
Other titles in the Addison-Wesley Signature series:
Implementation Patternsby Kent Beck
This is a book about programming—specifically, about programming so other people can understand your code. There is no magic to writing code other people can read. Its like all writing—know your audience, have a clear overall structure in mind, express the details so they contribute to the whole story. Java offers some good ways to communicate. The implementation patterns here are Java programming habits that result in readable code.
Another way to look at implementation patterns is as a way of thinking “What do I want to tell a reader about this code?” Programmers spend so much of their time in their own heads that trying to look at the world from someone elses viewpoint is a big shift. Not just “What will the computer do with this code?” but “How can I communicate what I am thinking to people?” This shift in perspective is healthy and potentially profitable, since so much software development money is spent on understanding existing code.
There is an American game show called Jeopardy in which the host supplies answers and the contestants try to guess the questions. “A word describing being thrown through a window.” “What is ‘defenestration?” “Correct.”
Coding is like Jeopardy. Java provides answers in the form of its basic constructs. Programmers usually have to figure out for themselves what the questions are, what problems are solved by each language construct. If the answer is “Declare a field as a Set.” the question might be “How can I tell other programmers that a collection contains no duplicates?” The implementation patterns provide a catalog of the common problems in programming and the features of Java that address those problems.
Scope management is as important in book writing as it is in software development. Here are some things this book is not. It is not a style guide because it contains too much explanation and leaves the final decisions up to the reader. It is not a design book because it is mostly concerned with smaller-scale decisions, the kind programmers make many times a day. Its not a patterns book because the format of the patterns is idiosyncratic and ad hoc (literally “built for a particular purpose”). Its not a language book because, while it covers many Java language features, it assumes readers already know Java.
Actually this book is built on a rather fragile premise: that good code matters. I have seen too much ugly code make too much money to believe that quality of code is either necessary or sufficient for commercial success or widespread use. However, I still believe that quality of code matters even if it doesnt provide control over the future. Businesses that are able to develop and release with confidence, shift direction in response to opportunities and competition, and maintain positive morale through challenges and setbacks will tend to be more successful than businesses with shoddy, buggy code.
Even if there was no long-term economic impact from careful coding I would still choose to write the best code I could. A seventy-year lifespan contains just over two billion seconds. Thats not enough seconds to waste on work Im not proud of. Coding well is satisfying, both the act itself and the knowledge that others will be able to understand, appreciate, use, and extend my work.
In the end, then, this is a book about responsibility. As a programmer you have been given time, talent, money, and opportunity. What will you do to make responsible use of these gifts? The pages that follow contain my answer to this question for me: code for others as well as myself and my buddy the CPU.
What Our Readers Are Saying
» Computers and Internet » Software Engineering » General