3 ms·
Do you mean that the Jeff Bay essay is a short method cargo cult? Or are you saying that I missed the point? The original article contains several suggestions
by pdubroy 18y ago
Do you mean that the Jeff Bay essay is a short method cargo cult? Or are you saying that I missed the point?
The original article contains several suggestions that address things other than method length. Numbers 3, 4, 8, and 9 enforce extreme encapsulation.
- raganwald 18y agoI mean that the original essay provides an interesting exercise that, IMO, would be helpful to try as an exercise. However, I do not suggest that the resulting software--as a whole--will necessarily be better after the exercise than before. I picked method length as one example, but I think it applies to all of the suggestions. Just because we observe some property of good software, it doe snot follow that software deliberately written to exhibit this property will be good. That's what I was suggesting.
- KiwiNige 18y agoPrograms with short methods are easy to understand. My program uses short methods. Therefore my program is easy to understand. so if follows.... Cats have Eyes. I have Eyes. Therefore I am a Cat!
- raganwald 18y agoHmmm. Actually, I disagree with your statement as written. "Programs with short methods are easy to understand" expresses that the set of programs with short methods is a subset of the set of all programs that are easy to understand. Therefore, every program with short methods is easy to understand, or (easy to understand) if (short methods), or (short methods) -> (easy to understand). I was expressing that it there exists a very large set of programs with short methods that are not easy to understand. To make these statements less subject to procedural wrangling, given a particular working program, the set of all possible permutations and refactorings that produce the same output contains many permutations with short methods that are not easy to understand.