Ever since I started using .NET, I\'ve just been creating Helper classes or Partial classes to keep code located and contained in their own little containers, etc.
I just got a copy of Code Complete, and found that there was a section on this.
Although I will still be reading the accepted answer's book, what Code Complete has taught me has dramatically improved the way I think about designing classes.
Before today, I didn't know what an ADT was (abstract data type), and now I know how to develop classes adhering to the encapsulation.
Working Effectively with Legacy Code is one of the best books I have seen on this subject.
Don't be put off the title of the book - Rather than treating Refactoring as a formal concept (which has its place), this book has lots and lots of simple "why didn't I think of that" tips. Things like "go through a class and remove any methods not directly realted to that class and put them in a different one".
e.g. You have a grid and some code to persist the layout of that grid to file. You can probably safely move the layout persisting code out to a different class.
A real eye-opener to me was Refactoring: Improving the Design of Existing Code:
With proper training a skilled system designer can take a bad design and rework it into well-designed, robust code. In this book, Martin Fowler shows you where opportunities for refactoring typically can be found, and how to go about reworking a bad design into a good one.
Refactoring http://ecx.images-amazon.com/images/I/519XT0DER6L._SL160_PIlitb-dp-arrow,TopRight,21,-23_SH30_OU01_AA115_.jpg
It helped me to efficiently and systematically refactor code. Also it helped me a lot in discussions with other developers, when their holy code
has to be changed ...