In his blog, Dr. Java
gives us 6 tips on how to become a solid developer. He starts the entry with his definition of what it means to be a solid developer.
A solid developer is a person that takes time to structure his or her objects so they accomplish a specific task.
In this list of tips we find;
- Make sure your class represents a single thing
- Early on think about the interaction between classes and their not implementation
- Write methods that are focused on a single task
- Keep your methods no larger than 10 lines of executable code
- Watch your use of exceptions
- Don't try to be fancy, get the job done
The list is followed up with a brief explanation of each point. The first comment made is that Dr. Java has never written a real application because there is no way you can limit methods to 10 lines of executable code. However, the comment does recognize that 2000 lines in a method is a bad idea and goes on to suggest 25 or 50. If you agree that 10 is too few and 2000 is too many, where do you draw the line?