6 ms·
The only excuse for such a monstrosity would be that it's machine-generated and follows some scheme that prevents name collisions. If you look at the other cla
by brazzy 14y ago
The only excuse for such a monstrosity would be that it's machine-generated and follows some scheme that prevents name collisions.
If you look at the other class names in that package, it seems pretty clear that the name was in fact the result of a bug that duplicated prefixes. It almost certainly should have been InternalFrameTitlePaneMaximizeButtonPainter, which is admittedly pushing it but can be justified.
- ericHosick 14y agoI would argue that the reason why we end up with really long or short names is of no importance: they exist. The only important factor of variables names is that they help with "documenting" the source code. I just wanted to point out that it goes both ways.
- zxcdw 14y agoIndeed. However, I personally do see that variable names/naming is really something where some people tend to over-engineer things. Say iterating over an array. Why on earth would anyone bother with using "index" instead of "i"? What does it add, other than unnecessary bytes? Another example would be using "Input" and "Output" as argument names instead of simply "In" and "Out". Unnecessary bytes, repetition, noise for no stronger signal. No new information, just noise.
- ericHosick 14y agoTrue that. Now where is that quote (just for fun): "There are only two hard things in Computer Science: cache invalidation and naming things." - Phil Karlton