Fun with Learning Technology
LearnCoursesQuestionsTracksToolsNewsExplorePractice
Fun with Learning Technology

A new problem, explained clearly, every day.

Subscribe
Learn
  • Lessons
  • Topics
  • News
  • Tools
  • Courses
  • Career tracks
  • Everything
Site
  • About
  • Contact
  • Support
  • Privacy
  • Terms
Get the daily one

One email per new problem. No spam.

Request a tutorial

Requests shape what gets made next.

© 2026 Fun with Learning TechnologyRSS
Home›Courses›Reasoning›Common Logical Fallacies and How to Avoid Them

Foundations of Reasoning

Common Logical Fallacies and How to Avoid Them

Logical fallacies are errors in reasoning that undermine the validity of an argument. Understanding them is crucial because they can distort your analysis, lead to flawed conclusions, and weaken your problem-solving in technical interviews. You should recognize and avoid these fallacies when evaluating arguments, debugging logic, or constructing your own reasoning during discussions or written responses.

Ad Hominem: Attacking the Person Instead of the Argument

An ad hominem fallacy occurs when someone dismisses an argument by attacking the person making it rather than addressing the argument itself. This is a common but flawed tactic because the validity of an argument does not depend on the character, background, or motives of the person presenting it. For example, if a colleague suggests a solution to a problem and you respond by saying, 'You’re not even a senior developer, so your idea must be wrong,' you’ve committed an ad hominem fallacy. The focus should always be on the logic, evidence, or reasoning behind the argument, not the person. To avoid this, train yourself to separate the argument from the arguer. Ask: 'Does this idea hold up on its own merits?' rather than 'Who is saying this, and do I trust them?' This shift in focus ensures that your reasoning remains objective and evidence-based, which is especially important in technical interviews where your ability to evaluate ideas impartially is being tested.

# Example of ad hominem fallacy in a debate about algorithm efficiency
# Bad: Dismissing an argument based on the person's experience
def evaluate_algorithm_proposal(proposer_experience, algorithm_efficiency):
    if proposer_experience < 5:  # Ad hominem: ignoring the algorithm's merits
        return "Rejected: Proposer lacks experience"
    return "Accepted: Algorithm is efficient" if algorithm_efficiency > 0.8 else "Rejected: Inefficient"

# Good: Evaluating the argument on its own terms
def evaluate_algorithm(algorithm_efficiency):
    return "Accepted: Algorithm is efficient" if algorithm_efficiency > 0.8 else "Rejected: Inefficient"

# Test cases
print(evaluate_algorithm_proposal(2, 0.9))  # Output: Rejected due to ad hominem
print(evaluate_algorithm(0.9))              # Output: Accepted based on merit

Straw Man: Misrepresenting an Argument to Make It Easier to Attack

A straw man fallacy involves distorting or oversimplifying someone’s argument to make it easier to refute. Instead of engaging with the actual point being made, the attacker creates a weaker, exaggerated version of it and then knocks it down. For instance, if someone argues, 'We should optimize the database queries to improve performance,' and you respond with, 'So you’re saying we should rewrite the entire system from scratch?' you’ve created a straw man. The original argument was about query optimization, not a full rewrite. Straw man fallacies are dangerous because they derail productive discussions and prevent real issues from being addressed. To avoid this, always restate the argument in your own words before responding to ensure you’ve understood it correctly. Ask clarifying questions if needed, such as, 'Are you suggesting X, or is your point more about Y?' This ensures you’re engaging with the actual argument and not a distorted version of it.

# Example of straw man fallacy in a discussion about system design
# Bad: Misrepresenting the original argument
def respond_to_design_proposal(proposal):
    if "optimize queries" in proposal:
        return "So you want to rewrite the entire database? That’s unrealistic!"  # Straw man
    return "Let’s discuss this further."

# Good: Engaging with the actual argument
def engage_with_proposal(proposal):
    if "optimize queries" in proposal:
        return "Optimizing queries is a good idea. Let’s analyze the slowest ones first."
    return "Let’s discuss this further."

# Test cases
print(respond_to_design_proposal("We should optimize the database queries"))  # Straw man
print(engage_with_proposal("We should optimize the database queries"))      # Proper engagement

False Dilemma: Presenting Only Two Options When More Exist

A false dilemma, also known as a black-and-white fallacy, occurs when someone presents a situation as having only two possible outcomes when, in reality, there are more. This oversimplification forces a choice between extremes and ignores nuanced or intermediate possibilities. For example, if a manager says, 'Either we deliver this feature by Friday, or the project fails,' they’re committing a false dilemma. There may be other options, such as delivering a partial feature, extending the deadline, or reallocating resources. False dilemmas are problematic because they limit creative problem-solving and can lead to unnecessary stress or poor decisions. To avoid this, always ask, 'Are there other options we haven’t considered?' or 'Is this really an either/or situation?' This encourages a more thorough exploration of possibilities and leads to better outcomes.

# Example of false dilemma in project planning
# Bad: Presenting only two extreme options
def decide_project_fate(deadline_met):
    if deadline_met:
        return "Project succeeds!"
    else:
        return "Project fails!"  # False dilemma: ignores other outcomes

# Good: Considering multiple outcomes
def evaluate_project_outcomes(deadline_met, quality, scope):
    if deadline_met and quality > 0.9:
        return "Full success!"
    elif not deadline_met but quality > 0.8:
        return "Partial success: High quality but late"
    elif scope < 0.5:
        return "Partial success: Limited scope but on time"
    else:
        return "Needs reassessment: Multiple factors at play"

# Test cases
print(decide_project_fate(False))  # False dilemma
print(evaluate_project_outcomes(False, 0.85, 0.7))  # Nuanced evaluation

Circular Reasoning: Assuming What You’re Trying to Prove

Circular reasoning, or begging the question, occurs when the conclusion of an argument is assumed in one of the premises. In other words, the argument goes in a circle, using the conclusion as evidence for itself. For example, if someone says, 'This code is the best because it’s superior to all other code,' they’re engaging in circular reasoning. The statement assumes the code is superior without providing any independent evidence. Circular reasoning is flawed because it doesn’t actually prove anything; it just restates the conclusion in different words. To avoid this, ensure that your arguments provide independent evidence or reasoning that supports your conclusion. Ask yourself, 'Does this premise actually prove the conclusion, or is it just restating it?' If it’s the latter, you need to find a different line of reasoning.

# Example of circular reasoning in evaluating code quality
# Bad: Assuming the conclusion in the premise
def is_code_best(code_quality):
    if code_quality == "superior":
        return "This code is the best because it’s superior."  # Circular reasoning
    return "This code is not the best."

# Good: Providing independent evidence for the conclusion
def evaluate_code_quality(readability, efficiency, maintainability):
    score = (readability + efficiency + maintainability) / 3
    if score > 0.8:
        return "This code is the best based on readability, efficiency, and maintainability."
    return "This code needs improvement."

# Test cases
print(is_code_best("superior"))  # Circular reasoning
print(evaluate_code_quality(0.9, 0.85, 0.9))  # Independent evaluation

Appeal to Authority: Relying on Authority Instead of Evidence

An appeal to authority fallacy occurs when someone argues that a claim is true simply because an authority figure or expert says so, without providing any supporting evidence. While experts can provide valuable insights, their opinions are not infallible, and relying solely on their authority can lead to poor reasoning. For example, if a senior developer says, 'This framework is the best because I’ve been using it for 20 years,' but doesn’t explain why it’s the best, they’re committing an appeal to authority. The problem with this fallacy is that it discourages critical thinking and independent evaluation. To avoid it, always ask for evidence or reasoning behind an expert’s claim. Even if the authority is credible, their opinion should be supported by facts, data, or logical arguments. This ensures that your conclusions are based on sound reasoning rather than blind trust.

# Example of appeal to authority in technology decisions
# Bad: Relying solely on authority without evidence
def choose_framework(authority_endorsement):
    if authority_endorsement:
        return "This framework is the best because an expert says so."  # Appeal to authority
    return "We need to evaluate further."

# Good: Evaluating based on evidence and criteria
def evaluate_framework(performance, community_support, documentation):
    score = (performance + community_support + documentation) / 3
    if score > 0.8:
        return "This framework is the best based on performance, support, and documentation."
    return "This framework may not be the best fit."

# Test cases
print(choose_framework(True))  # Appeal to authority
print(evaluate_framework(0.9, 0.8, 0.9))  # Evidence-based evaluation

Key points

  • Ad hominem fallacies distract from the argument by attacking the person instead of addressing the logic, so always focus on the merits of the idea itself.
  • Straw man fallacies misrepresent an argument to make it easier to attack, so restate the argument in your own words before responding to ensure accuracy.
  • False dilemmas limit options by presenting only two extremes, so always ask if there are other possibilities before making a decision.
  • Circular reasoning assumes the conclusion in the premise, so ensure your arguments provide independent evidence rather than restating the conclusion.
  • Appeals to authority rely on the status of the speaker rather than evidence, so always ask for supporting facts or data before accepting a claim.
  • Recognizing fallacies helps you construct stronger arguments and avoid being misled by flawed reasoning in discussions or interviews.
  • Practicing fallacy detection sharpens your critical thinking skills, which are essential for evaluating complex problems in technical contexts.
  • Avoiding fallacies ensures your reasoning is objective, evidence-based, and persuasive, making you a more effective communicator and problem-solver.

Common mistakes

  • Mistake: Assuming correlation implies causation without further evidence. Why it's wrong: Just because two events occur together does not mean one caused the other; there may be a third variable or coincidence. Fix: Look for controlled experiments, temporal precedence, or mechanistic explanations before concluding causation.
  • Mistake: Attacking the person (ad hominem) instead of addressing their argument. Why it's wrong: The validity of an argument depends on its logic and evidence, not the character or motives of the person making it. Fix: Focus on the argument's structure and supporting evidence, not the arguer.
  • Mistake: Using anecdotal evidence to generalize to a broader population. Why it's wrong: Personal stories or isolated examples may not represent the overall trend or statistical reality. Fix: Rely on systematic data, studies, or larger sample sizes to support general claims.
  • Mistake: Assuming a false dilemma by presenting only two options when more exist. Why it's wrong: Oversimplifying complex issues can ignore nuanced or alternative solutions. Fix: Consider all possible options and evaluate their merits independently.
  • Mistake: Begging the question by assuming the conclusion in the premise. Why it's wrong: Circular reasoning doesn't provide independent support for the claim. Fix: Ensure premises provide new, independent evidence for the conclusion.

Interview questions

What is a logical fallacy, and why is it important to recognize them in reasoning?

A logical fallacy is an error in reasoning that undermines the validity of an argument. It’s important to recognize fallacies because they can make arguments seem convincing even when they’re flawed, leading to poor decisions or misinformation. For example, in reasoning, if someone uses an *ad hominem* attack—criticizing the person instead of the argument—they avoid addressing the actual point. Recognizing fallacies helps us evaluate arguments objectively, ensuring our conclusions are based on sound logic rather than manipulation or emotional appeals. This skill is foundational in fields like philosophy, law, and even everyday problem-solving.

Explain the *straw man* fallacy and provide an example of how to avoid it.

The *straw man* fallacy occurs when someone misrepresents an opponent’s argument to make it easier to attack. Instead of addressing the actual claim, they distort it into a weaker version. For example, if Person A says, 'We should reduce military spending to fund education,' and Person B responds, 'So you want to leave our country defenseless?'—that’s a straw man. To avoid it, always restate the original argument accurately before responding. Ask clarifying questions like, 'Are you saying X, or did I misunderstand?' This ensures you’re engaging with the real point, not a caricature. It’s a key skill in constructive debate and critical thinking.

What is the difference between *correlation* and *causation*, and why does confusing them lead to a fallacy?

Correlation means two things happen together, while causation means one thing directly causes the other. Confusing them leads to the *post hoc ergo propter hoc* fallacy, where someone assumes that because Event A preceded Event B, A must have caused B. For example, if ice cream sales rise with drowning incidents, one might wrongly conclude ice cream causes drowning. In reality, both increase due to hot weather. To avoid this, look for controlled experiments or additional evidence. In reasoning, always ask: 'Is there a plausible mechanism linking these events, or is this just coincidence?' This distinction is crucial in fields like science and policy-making.

Compare the *appeal to authority* fallacy with the legitimate use of expert testimony. When is each appropriate?

The *appeal to authority* fallacy occurs when someone cites an authority figure as evidence for a claim outside their expertise. For example, quoting a celebrity to support a medical argument is fallacious because their fame doesn’t make them a medical expert. In contrast, legitimate expert testimony relies on authorities with relevant, verifiable expertise—like a virologist discussing vaccines. The key difference is *relevance* and *consensus*. In reasoning, ask: 'Is this person qualified in this specific field? Do other experts agree?' Legitimate authority strengthens arguments, but fallacious appeals exploit trust without substance.

How does the *false dilemma* fallacy limit reasoning, and how can you reframe a binary argument to avoid it?

The *false dilemma* fallacy presents only two options when more exist, forcing an artificial choice. For example, 'You’re either with us or against us' ignores neutral or nuanced positions. This limits reasoning by oversimplifying complex issues. To avoid it, reframe the argument by asking, 'Are there other possibilities?' For instance, instead of 'Should we cut taxes or increase spending?' consider: 'How can we balance tax policy with fiscal responsibility?' This encourages creative problem-solving. In reasoning, always challenge binary thinking by exploring middle-ground solutions or alternative perspectives.

Explain the *slippery slope* fallacy and demonstrate how to evaluate whether a chain of events is plausible or fallacious.

The *slippery slope* fallacy argues that a small first step will inevitably lead to an extreme, often absurd outcome without sufficient evidence. For example, 'If we allow same-sex marriage, next people will marry animals' is fallacious because it assumes a chain reaction without logical support. To evaluate it, ask: 'Is there a clear, causal link between each step? Are there safeguards to prevent the extreme outcome?' In reasoning, test the plausibility of each link. If the connections are weak or speculative, the argument is fallacious. Strong reasoning requires evidence for each step, not just fear of hypothetical consequences.

All Reasoning interview questions →

Check yourself

1. A politician argues, 'We must either raise taxes or cut essential services like healthcare.' What is the most likely logical fallacy in this statement?

  • A.Appeal to emotion, because it evokes fear about healthcare.
  • B.False dilemma, because it presents only two options when others may exist.
  • C.Straw man, because it misrepresents the opposition's position.
  • D.Ad hominem, because it attacks the character of those who disagree.
Show answer

B. False dilemma, because it presents only two options when others may exist.
The correct answer is 'False dilemma' because the statement artificially limits the options to two, ignoring potential alternatives like reducing wasteful spending or reallocating funds. The other options are incorrect: it is not an appeal to emotion (though it may evoke fear, the fallacy lies in the false choice), it does not misrepresent an opponent's position (straw man), nor does it attack a person (ad hominem).

2. A friend says, 'I read about a study where people who drank coffee lived longer. So, coffee must make you live longer.' What is the most critical flaw in this reasoning?

  • A.It ignores the possibility that coffee drinkers might have other healthy habits.
  • B.It assumes the study was conducted on humans, not animals.
  • C.It confuses correlation with causation without ruling out other factors.
  • D.It relies on a single study instead of multiple sources.
Show answer

C. It confuses correlation with causation without ruling out other factors.
The correct answer is 'It confuses correlation with causation without ruling out other factors.' The statement assumes coffee directly causes longer life, but the study only shows a correlation. Other factors (e.g., lifestyle, genetics) could explain the result. The other options are partially correct but not the *most critical* flaw: while ignoring other habits (option 1) is related, the core issue is the correlation-causation confusion; assuming the study was on humans (option 2) is irrelevant; and relying on a single study (option 4) is a weaker critique.

3. In a debate, someone says, 'You can’t trust John’s argument about climate change—he’s not even a scientist!' What fallacy is this an example of?

  • A.Appeal to authority, because it dismisses John for not being an expert.
  • B.Ad hominem, because it attacks John’s character instead of his argument.
  • C.Genetic fallacy, because it judges the argument based on its origin.
  • D.Red herring, because it distracts from the actual topic of climate change.
Show answer

B. Ad hominem, because it attacks John’s character instead of his argument.
The correct answer is 'Ad hominem' because the argument attacks John’s lack of expertise (a personal trait) rather than addressing the merits of his climate change argument. The other options are incorrect: it is not an appeal to authority (which would involve citing an expert, not dismissing one), the genetic fallacy would involve judging the argument based on its source (e.g., 'This idea came from a biased group'), and it is not a red herring because it doesn’t introduce an irrelevant topic—it just attacks the person.

4. A company advertises, 'Our product is the best because it’s the most popular!' What is the primary logical flaw in this claim?

  • A.Appeal to popularity, because it assumes truth based on majority opinion.
  • B.False cause, because it assumes popularity causes quality.
  • C.Begging the question, because it assumes the product is the best without proof.
  • D.Hasty generalization, because it draws a broad conclusion from limited data.
Show answer

A. Appeal to popularity, because it assumes truth based on majority opinion.
The correct answer is 'Appeal to popularity' because the argument assumes the product is the best solely because many people use it, without evidence of its quality. The other options are incorrect: false cause would involve claiming popularity *causes* quality (not the case here); begging the question would involve circular reasoning (e.g., 'It’s the best because it’s superior'); and hasty generalization would involve drawing a broad conclusion from a small sample (not relevant here).

5. Someone argues, 'If we allow students to redo this test, next they’ll want to redo every assignment, and soon they’ll expect to pass without any effort!' What fallacy does this exemplify?

  • A.Slippery slope, because it assumes one action will lead to an extreme, unlikely outcome.
  • B.Appeal to tradition, because it assumes the current system is the only valid one.
  • C.False analogy, because it compares tests to assignments unfairly.
  • D.Straw man, because it misrepresents the original proposal about retaking tests.
Show answer

A. Slippery slope, because it assumes one action will lead to an extreme, unlikely outcome.
The correct answer is 'Slippery slope' because the argument assumes allowing one test retake will inevitably lead to a chain of unreasonable consequences (e.g., passing without effort) without providing evidence for this progression. The other options are incorrect: it is not an appeal to tradition (no reference to tradition is made), it is not a false analogy (tests and assignments are comparable), and it is not a straw man (it doesn’t misrepresent the original proposal—it just exaggerates its consequences).

Take the full Reasoning quiz →

← PreviousIdentifying Premises and ConclusionsNext →The Role of Assumptions in Reasoning

Reasoning

36 lessons, free to read.

All lessons →

Track your progress

Sign in to mark lessons done, score quizzes and keep notes.

Open in the app