Hacker News new | ask | show | jobs
by mcphage 1596 days ago
> The "right" answer here is wrong.

I assume by "right", you mean the answer given? What do you think the correct answer is?

1 comments

For example, the site argues that for the first test, you don't need to flip the yellow card.

Your goal, is to test the application of the rule, not, the card itself. This is specified at:

"You have to ensure that cards have been produced in accordance with the following rule"

The rule is "If a card has a circle on one side, then it has the colour yellow on the other side."

Given a card that is yellow on the other side, you must flip it to confirm that the first half of the statement is true. Why? Because the challenge isn't to test the card, it's to test application of the rule. You can't simply assume that the rule has always worked, otherwise there is no need to test.

A square on one side, with a yellow flip side would violate the rule and thus show a defect.

I get that it's going to be a linguistics argument all the way down> For me, this is a perfect example of "works for me" engineer response vs QA doing actual testing.

How would you phrase a rule that adheres to the logical if-then connective?