It's rare to find truly self-documenting code. Adam, however, while hunting down a bug, found some.

Adam was trying to understand exactly where some functionality was coming from in a Java program. The code base had some very long inheritance trees, which was an absolute nightmare for maintenance. The mix of overridden methods and mysterious interfaces and dependencies from the lowest levels of the hierarchy all the way back to the top created some of the most spaghettied spaghetti code you could imagine.

While investigating, Adam found this wonderful piece of self-documenting code, sitting right at the top:

public interface NotThatVeryUsefull
{
}

Several base classes implemented this interface, and from them every other class implemented that interface. It was never used for polymorphism, not that doing so would have been terribly useful (just cast to Object at that point). Nothing about this is useful. I'm sorry, "usefull".

[Advertisement] ProGet’s got you covered with security and access controls on your NuGet feeds. Learn more.