O'Reilly logo

Prefactoring by Ken Pugh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A.1. Guidelines

The following subsections list the guidelines that are introduced in this book. Some guidelines are repeated in multiple chapters, as they can be applied in multiple contexts.

A.1.1. Big Picture

Don't Reinvent the Wheel

Look for existing solutions to problems before creating new solutions (Chapter 2).

Think About the Big Picture

Decisions within a system should be congruent with the big picture (Chapter 3).

Document Your Assumptions and Your Decisions

Keep a journal for retrospectives (Chapter 3).

Don't Repeat Yourself (DRY)

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system (Chapter 3).

Plan Globally, Develop Locally

Incremental implementations should fit into a global plan (Chapter 4).

A.1.2. Extreme Abstraction

Splitters Can Be Lumped More Easily Than Lumpers Can Be Split

It is easier to combine two concepts than it is to separate them (Chapter 2).

Clump Data So That There Is Less to Think About

Clumping data cuts down on the number of concepts that have to be kept in mind (Chapter 2).

When You're Abstract, Be Abstract All the Way

Do not describe data items using primitive data types (Chapter 2).

Strings Are More Than Just a String

Treat String as a primitive data type. Describe attributes with abstract data types, instead of as Strings (Chapter 2).

Never Let a Constant Slip into Code

Use a symbolic name for all values (Chapter 2).

To Text or Not to Text

Use text between programs, not within programs (Chapter ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required