A dichotomy is a set of two mutually exclusive, jointly exhaustive alternatives. Dichotomies are typically expressed with the words "either" and "or", like this: "Either the test is wrong or the program is wrong."
A false dichotomy is a dichotomy that is not jointly exhaustive (there are other alternatives), or that is not mutually exclusive (the alternatives overlap), or that is possibly neither. Note that the example given above is not mutually exclusive, since the test and the program could both be wrong. It's not jointly exhaustive either, since they could both be correct, but it could be a hardware error, a compiler error and so on.
A false dichotomy is typically used in an argument to force your opponent into an extreme position -- by making the assumption that there are only two positions.
Examples:
This last might not be such a good example. "The enemy of my enemy is my friend" is just a pithy way of saying that you and your enemy's enemy have a common interest, and therefore you can probably work out some way to cooperate even if you have other differences. (For example, it doesn't (necessarily) matter if you oppose your common enemy for different reasons.) Tell that to your enemy's enemy.
One way to shatter false dichotomies is to look at what both sides might have in common -- and I don't mean "extremism." Sometimes you'll find a commonality so important that the two "opposites" will look like brothers.
Some false dichotomies depend on a misunderstanding of one or both positions, such as the theory vs. practice dichotomy, or the moral vs. practical dichotomy, or the mind vs. body dichotomy. These are all popular false dichotomies. A theory is only good to the degree it resembles practice... morals are a type of theory, so impracticable morals and immoral practicality are both very dangerous... a mind without a body is a ghost, while a body without a mind is a corpse...
I think there is another name for the argument where somebody makes a list and tries to say that your answer "has to be on the list." I think the name of that fallacy would have nothing to do with the length of the list. A FalseDichotomy is an attempt to force a person into choosing one of two seeming opposite extremes, not just one of two arbitrary answers. That is why "If you're not with us, you're against us" is a FalseDichotomy -- because the two alternatives are presented as opposite extremes. But "He lives in either New York or Boston" is not. Giving the options as extrema is not part of the fallacy (though that is how it is often used used); the fallacy is trying to represent an entity as a boolean value when the relevant domain is not boolean-valued. (Trying to represent an entity with an inappropriate type would be just as much a fallacy, but False Dichotomy is a canonical form to which the more general case can be reduced.)
And here's the link with programming: avoid false dichotomies in your if-statements. The code
if ("a".equals(someInput)) doStuffRelatedToA(); else doStuffRelatedToB();could give unexpected results when other values besides the expected "a" and "b" are used for input. It's better to do it like
if ("a".equals(someInput)) doStuffRelatedToA(); else if ("b".equals(someInput)) doStuffRelatedToB();And yes, I know that a switch/case statement would be better but isn't always availabe (in Java before version 7 you couldn't switch on Strings), and a general doStuff(someInput) doesn't illustrate the point I was trying to make. In Java you would switch on the hash value of the string, but that point is probably moot in this case.
Currently, I prefer to include else clauses for all options. In the above example, an if sentence always should end like:
if ("a".equals(someInput)) doStuffRelatedToA(); else if ("b".equals(someInput)) doStuffRelatedToB(); else throw new IllegalArgumentException("Don't know how to handle: " + someInput);Note that it's important to include the input value in order to make the exception message useful.
See BifurcationFallacy and other FallaciousArguments