One of the most important skills you can develop is a little red warning light inside your head that causes you to think, "Wait a minute, this is starting to get messy." When your class gets convoluted, it's time to reexamine the design. Here are some of the warning signs that the time has arrived:
There are bugs because the internal state of an object is too hard to track and fixes consist of adding patches. Patches are characterized by code that looks like: "If this is the case, then force that to be true," or "Do this just in case we need to," or "Do this before calling that function, because it expects this."
There are member functions that do not fit in very well with the class definition.
(See "Object bloat" and "Lost object focus" on page 49.)
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.