首页 > 其他分享 >Abstraction, intuition, and the “monad tutorial fallacy”

Abstraction, intuition, and the “monad tutorial fallacy”

时间:2023-01-30 15:25:29浏览次数:44  
标签:intuition Abstraction people monad about monads Joe

While working on an article for the Monad.Reader, I’ve had the opportunity to think about how people learn and gain intuition for abstraction, and the implications for pedagogy. The heart of the matter is that people begin with the concrete, and move to the abstract. Humans are very good at pattern recognition, so this is a natural progression. By examining concrete objects in detail, one begins to notice similarities and patterns, until one comes to understand on a more abstract, intuitive level. This is why it’s such good pedagogical practice to demonstrate examples of concepts you are trying to teach. It’s particularly important to note that this process doesn’t change even when one is presented with the abstraction up front! For example, when presented with a mathematical definition for the first time, most people (me included) don’t “get it” immediately: it is only after examining some specific instances of the definition, and working through the implications of the definition in detail, that one begins to appreciate the definition and gain an understanding of what it “really says.”

Unfortunately, there is a whole cottage industry of monad tutorials that get this wrong. To see what I mean, imagine the following scenario: Joe Haskeller is trying to learn about monads. After struggling to understand them for a week, looking at examples, writing code, reading things other people have written, he finally has an “aha!” moment: everything is suddenly clear, and Joe Understands Monads! What has really happened, of course, is that Joe’s brain has fit all the details together into a higher-level abstraction, a metaphor which Joe can use to get an intuitive grasp of monads; let us suppose that Joe’s metaphor is that Monads are Like Burritos. Here is where Joe badly misinterprets his own thought process: “Of course!” Joe thinks. “It’s all so simple now. The key to understanding monads is that they are Like Burritos. If only I had thought of this before!” The problem, of course, is that if Joe HAD thought of this before, it wouldn’t have helped: the week of struggling through details was a necessary and integral part of forming Joe’s Burrito intuition, not a sad consequence of his failure to hit upon the idea sooner.

But now Joe goes and writes a monad tutorial called “Monads are Burritos,” under the well-intentioned but mistaken assumption that if other people read his magical insight, learning about monads will be a snap for them. “Monads are easy,” Joe writes. “Think of them as burritos.” Joe hides all the actual details about types and such because those are scary, and people will learn better if they can avoid all that difficult and confusing stuff. Of course, exactly the opposite is true, and all Joe has done is make it harder for people to learn about monads, because now they have to spend a week thinking that monads are burritos and getting utterly confused, and then a week trying to forget about the burrito analogy, before they can actually get down to the business of learning about monads. (Of course, certainly not all monad tutorials are like this, and I don’t even have any particular ones in mind, just a general impression left over from reading many of them, but if the shoe fits…)

What I term the “monad tutorial fallacy,” then, consists in failing to recognize the critical role that struggling through fundamental details plays in the building of intuition. This, I suspect, is also one of the things that separates good teachers from poor ones. If you ever find yourself frustrated and astounded that someone else does not grasp a concept as easily and intuitively as you do, even after you clearly explain your intuition to them (“look, it’s really quite simple,” you say…) then you are suffering from the monad tutorial fallacy.

标签:intuition,Abstraction,people,monad,about,monads,Joe
From: https://www.cnblogs.com/zzqdeco/p/abstraction-intuition-and-the-monad-tutorial-falla.html

相关文章

  • 来看看几种 Monad
    来看看几种Monad当我们第一次谈到Functor的时候,我们了解到他是一个抽象概念,代表是一种可以被mapover的值。然后我们再将其概念提升到ApplicativeFunctor,他代表一种......
  • Java: Abstraction
    Abstractioncanbeachievedwitheither abstractclasses or interfaces.The abstract keywordisanon-accessmodifier,usedforclassesandmethods:Abst......
  • 《Programming Abstractions in C++》总结目录
     1.C++基础 C++程序结构变量数据类型表达式语句 2.C++抽象函数库接口字符串类流类集合类类的设计 3.算法递归回溯排序时间复杂度 4......
  • haskell 学习笔记——关于monad
    前言:haskell真是一门让人又爱又恨的语言,学习起来的难度也是相当之大,重点在于理解概念与每一步递归的进行,即使学了一月有余我依然被各种syntaxerror所折磨,而且对于一些深入......
  • 范畴论玩具:什么是单子 (monad)?
    对于上了计概课的同学们,相信大家都有很多问号,什么是monad捏?monad就是自函子范畴上的一个"幺半群"(?)我们来尝试理解一下这句话在说什么,首先这里的"幺半群"......
  • Cost function - deeper intuition
    Costfunction-deeperintuition标签(空格分隔):ML目录Costfunction-deeperintuition1.costfunctionwhere\(\theta_1=0\)2.costfunctionwhere\(\theta_1\neq......