Brian Beckman: Don't fear the Monad
Why Hacker News recommends it
HN repeatedly recommends it as the clearest and most correct beginner explanation of monads, with several commenters saying it finally made them click.
What it is
Microsoft's Brian Beckman gives an hour-long, whiteboard-style walk through monads, building from function composition and monoids using school-level math. It is aimed at practicing programmers rather than category theorists.
Recommended by 9 HN commenters across 10 different months, 2012 to 2024.
What Hacker News said
Strong rec kika · 2015-08 · on “Frege: A Haskell-Like Language for the JVM”
To be fair, (I think) you don't need to know category theory to successfully apply FP principles and/or use any functional language. I had a great (GREAT) success at using erlang not only not knowing what monad is, but even not knowing about existence of category theory at all, leave aside monads, monoids, functors, etc. You also don't need to know category theory to understand what monad is [0] This video is all you, as a practicing programmer, need to know about monads and it's just 1 hour long. [0] [this video]
Strong rec kika · 2016-04 · on “Functors, Applicatives, and Monads in Plain English”
I don't know category theory, so I defer to more knowledgeable people here, but that sounds strange: "Functor it understands how to take doStuff and execute it on the value inside itself, then spit out a new Optional. You don't lose the int-ness or optional-ness." So if I map a function, that takes an int and returns a string over an array of ints, this array stops being a functor? Or is it just a Swift thing? And, as always, I urge people spend an hour of their life and get the explanation of all this from someone who knows the math but still able to explain this in plain English: [this video] To the best of my limited knowledge, it's all 100% correct.
Recommends chongli · 2012-12 · on “Monads are a Class of Hard Drugs (2008)”
Apples and oranges. A monad is just an idea; that of storing computations as values. This is useful because these computations can be composed together in a manner not unlike that of a pipeline in shell scripting. Different monads define different ways of composing these computations leading to vastly different semantics. Here's a nice video that explains monads fairly simply: [this video]
Recommends emotionalcode · 2014-10 · on “On becoming an expert C programmer”
> and apparently I'm never going to understand Haskell I found this introduction to the concepts of functional programming (functional composition) to be useful: [this video] Otherwise, it's just a different way of thinking about problems. Instead of building things structurally as an object of objects, and then creating functions that relate, transform, or describe the relationships between the object structures (like taking a pixel object, altering it's x coordinate, and returning the new pixel object with only the x coordinate altered), one has functions that can be composed with other functions to produce more complex object structures. A single base unit with a sequence of functional composi
Recommends l4mbda · 2015-03 · on “Understanding Monoids using F#”
This whole video is worth watching, but a simple monoid overview is here: [this video] It's not a difficult concept.
Recommends zabi_rauf · 2015-05 · on “Monads in Elixir”
I've seen the same video before i knew what a monad was, it helped me in understanding the use case of monad and ultimately monad. Monad is just a generalization of that particular use case. Some resources that helped me in understanding monads 1. Brian Beckman: Don't fear the Monad - [this video] 2. Functors, Applicatives, And Monads In Pictures - [LINK] 3. Three Useful Monads - [LINK] So its been not just one resource but multiple resource before it hit me that it was such a simple concept. So i would suggest to go over them (in order) and also look at other resources (mentioned by others).
Recommends kika · 2016-04 · on “Monads Explained Quickly”
I'd suggest a longer (1 hour) but much more correct explanation. It doesn't use math beyond high (or even may be middle) school. Video, unfortunately. [this video]
Recommends RossBencina · 2016-12 · on “What Is Abstract Algebra? [video]”
In a Group, every element has an inverse element. If you drop this property, you get a Monoid.[0] Functions under function composition form a Monoid (or Monoidal Category). Brian Beckman did a nice intro video to this at MS Channel 9 a few years back.[1] [0] [LINK] [1] "Brian Beckman: Don't fear the Monad" [this video]