One of the habits developers bring over from procedural programming is writing long methods. The longer the methods you write, the harder it is to understand them. You should strive to create methods that are only a few lines long and only do one thing at one level of abstraction. Call other methods on your object or methods on other objects to get the work done. If it's done right, you should be able to understand the method at a quick glance. In a well design system, the majority of methods should be one line or two line methods and virtually all methods should be under ten lines of code. If you keep your methods short, your system will be more understandable, better factored, and easier to change.
Download