Law Of Stubs

Any stub code you leave in a release binary that you figure the user will never be able to execute no matter what, will be run, likely in front of the important customer.

The LawOfStubs is usually broken by every programmer at least once in his career before a cute debug message like, "Oh, shit!!! This is never supposed to happen!" appears before his respective clients.

This is related to the LawOfDemos.

Yes, ObjectiveComputerSystems had a rather nasty legal dispute with a client after they found exactly the shit you mention above in some not-entirely-refactored code back in 1999. Such terminology is no longer considered a valid part of the SevenPillarsOfCred Java coding standard.

I've seen this even with code that is executed rather often. Cute debug messages are a CodeSmell. Always code like it's OpenSource.


See "Watch Your E-Mouth" in WarStories.


EditText of this page (last edited July 31, 2014) or FindPage with title or text search