They should never. Old-fashioned, not needed anymore.
To clarify my statement above about all-one and all-zero: This is refering to the host part of Class'd network, meaning e.g. with Class C 192.168.0.x, you cannot use
192.168.0.0
192.168.0.255
With subnetting one bit more, you cannot use
192.168.0.0
192.168.0.127
192.168.0.128
192.168.0.255
The 2^n-2 is not to be applied to the subnet, it is applied to host, for above reason. You need NEVER to exclude subnets. But it is a common misunderstanding.
"If you have 18 hosts, how much subnets can you build" is the type of question where the 2^n-2 rule comes into play. You need 18+2 host addresses (because of all-one and all-zero), that is 20, and the next fitting 2^n is 32, 5 bit.
That's the way to use the rule.