Matt Gerrans
Posts: 1153
Nickname: matt
Registered: Feb, 2002
|
|
Re: The C++ Style Sweet Spot
|
Posted: Oct 14, 2003 9:09 AM
|
|
> For Java, I tend to follow a "rule of ten". Each method > has 10 lines, each class has 10 methods, and each package > has 10 classes. Those are obviously rough guidelines, but > larger ratios make the code difficult to read and > maintain.
So, how would you refactor JFrame in Java, or CWnd in MFC, for example? Or at least, what general approach would you take?
This is something that came up with Scott Meyer's interview and some others, if I remember. I've been trying to get Bill to follow up by asking about refactoring a specific example of a well-known class with a ton of methods, such as either of the two mentioned above.
|
|