Very Long Methods

Similar to LongFunctions, but applied to programs written using ObjectOrientation.

I've seen methods with more than 20 thousand lines (yes: 20000 = 2 * 10^4 lines).

What did these methods do? Most programs don't even have 20,000 lines, why would you need a method that long?

To protect the innocent, I will just say that the method was the central masterpiece in a non ObjectOriented system used for message interchange. On the plus sie, it was a PluggableArchitecture, so most functions could be plugged into it, the only problem was that since it was not ObjectOriented, the central masterpiece had to know all the plugged modules, meaning a high rate of coupling and a central function that was very easy to break. And it was touched on a daily basis, so getting a good build was not easy.

An easy solution would be to use ObjectOrientation. But transforming a 2*10^4 lines method into a well refactored ObjectOriented code is not easy.


EditText of this page (last edited April 25, 2004) or FindPage with title or text search