HackerTube

Brian Beckman: Don't fear the Monad

jasonofthel33t9 HN recommenders · recommended in 10 months, 2012–2024
YouTube
lecture · intro · evergreen · 2012–2024 on HN

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.

HN repeatedly recommends it as the clearest and most correct beginner explanation of monads, with several commenters saying it finally made them click.

12 comments from Hacker News

@kika2016-04 · in “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.

Strongly recommends View on HN
@kika2015-08 · in “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

Strongly recommends View on HN
@lkuty2024-06 · in “Monads are like burritos (2009)”

Good tutorial I think and I also appreciated reading the beginning of link and watching "Don't fear the Monad" ▶ this video

Recommends View on HN
@omginternets2022-06 · in “The Lazy Monad”

▶ this video I found Brian Beckman's video Don't Fear the Monad was extremely helpful for understanding monads as a practical user. I now use them everywhere. I don't know the first thing about category theory.

Recommends View on HN
@mitchty2018-05 · in “Monads for functional programming (1995) [pdf]”

Thats me here too! >.< Yeah the hidden subtext here was my presumption in that suggestion was someone was learning monads in Haskell and has at least a basic understanding of Haskell. Sorry if those papers threw you into the deep end. Monads really were thrown into play due to trying to make a pure functional programming language useful. I found the more mathematical explanation a lot easier than any analogies involving say burritos or pipes etc... At first glance to imperative programmers I will admit all of this just looks like a bunch of navel gazing. I thought the same thing, but once you let go of thinking of computation as a series of steps and at a bit of a higher abstraction this makes a lot more sense. For a more soft introduction to the concepts this channel 9 video is probably a bit better: ▶ this video Another option might be to just get the haskell programming from first principles book: link Does a good job grounding you up to monads and gives copious amounts of reference material. Even though I already knew haskell when I read the book it helped clear up some gaps I didn't know I had. But monads are going to be really weird no matter if all you've ever seen is imperative programming. Despite the fact that you already use them and have probably discovered them without knowing you did. Much like learning stack based programming languages, sometimes the only way up is to climb off the computational hill you're familiar with to learn another way to the other hill side

Recommends View on HN