Reasoning by Analogy:
- A powerful learning, problem-solving, and debugging technique with a four-step process: have a question, translate to a similar understood thing (analogue), solve for the analogue, and translate back.
- Used all the time to leverage past experience to solve new problems.
- Grade school math example: Solved a problem about Alice and Bob's apples by simplifying to a similar problem with fewer apples and realizing it was an addition problem. Then applied the same to the original problem.
- Parameterized Html and List types example: Confused by Elm's parameterized
Html
type, used intuition about the parameterizedList
type to construct an experiment. Found thatsomeHtml : Html a
must be static likesomeList : List a
must be empty. - Weakness - false analogies: Important to be careful in step 2. If the analogue is not similar, the solution won't translate correctly, leading to wrong conclusions. For example, in grade school math, a wrong simplification led to the wrong operation.
- Other applications: Great for debugging like in a random generators stack overflow bug and as a general problem-solving tool when stuck writing complex JSON decoders.
- Related reasoning techniques: Has roots in classical philosophy including deductive reasoning (big to details), inductive reasoning (details to big), and process of elimination. There's a whole article on using classical reasoning techniques for debugging including reasoning by analogy.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。