Skip to content
0:00 / 0:00

#monads#haskell#functionalprogramming

Brian Beckman: Don't fear the Monad

jasonofthel33t

11K subscribers • 8 videos on Hallway

YouTube
  • Recommended by 15 people: 9 on Hacker News, 1 on Lobsters, 3 in engineering communities and 2 curated lists.
  • A classic. People kept recommending it from 2012 to 2024.
  • Presented by Brian Beckman, physicist and software engineer

Intermediate. Assumes working knowledge.

415K views13 years ago15 recommendations

Computer scienceProgramming languagesFunctional programmingMath for programmers

Brian Beckman explains monads from first principles using function composition and monoids on a whiteboard.

Cross posted from msdn's channel 9. Functional programming is increasing in popularity these days given the inherent problems with shared mutable state that is rife in the imperative world. As we march on to a world of multi and many-core chipsets, software engineering must evolve to better equip software engineers with the tools to exploit the vast power of multiple core processors as it won't come for free as it did in the recent past which was predictably based on Moore's law. Of course, learning new ways to think about programming semantics and code patterns are not always straight forward. For example, most imperative programmers (which include most of us who build software for a living...) are somewhat perplexed by the notion of functions as first class data structures that can be combined to create powerful and composable systems. Languages like Haskell are pure functional languages and require programmers to think in a different way, often in a precise mathematical fashion where composing and chaining functions is "the Way". Dr. Brian Beckman, a Channel 9 celebrity, astrophysicist and senior software engineer thought it would be a very good idea to address the complexity of monads in an easy to understand way: a technical conversation at the whiteboard with yours truly for Channel 9. This video interview is the result of Brian's idea that he can in fact remove the fear of monads from anybody who pays attention to his explanation. Of course, you can't just cover monads in a vacuum (category theory is not really addressed here) so the context is functional programming (Brian covers functions and composable functional structures (function chains) and of course monoids and then monads). Tune in. There's a lot to learn here and only Brian can make monads easy to understand for the rest of us!

Why it's here

15 people recommend this, 1 disputes it

What people say. Highly recommended as one of the clearest and most intuitive explanations of monads for programmers.

SeanTAllenon Lobsters • Recommends

Don't fear the Monad

kikaon Hacker News • Recommends

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 link to this video

kikaon Hacker News • Recommends

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: link to this video To the best of my limited knowledge, it's all 100% correct.

u/jsyeoin r/haskell • Recommends

Brian Beckman: Don't fear the Monad

u/cipmarin r/scala • Recommends

Brian Beckman: Don't fear the Monad

programming-talkscurated list on GitHubRecommends

Under “Functional Programming”

Don't fear the Monad 01:07:11 by **Dr. Brian Beckman** (2012)

awesome-talkscurated list on GitHubRecommends

Under “Functional Programming”

Don't fear the Monad by **Dr. Brian Beckman** (Channel 9 2012) 1:07:10

chonglion Hacker News • Recommends

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: link to this video

emotionalcodeon Hacker News • Recommends

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: link to 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…

l4mbdaon Hacker News • Recommends

On “Understanding Monoids using F#”

This whole video is worth watching, but a simple monoid overview is here: link to this video It's not a difficult concept.

zabi_raufon Hacker News • Recommends

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 - link to 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).

kikaon Hacker News • Recommends

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. link to this video

RossBencinaon Hacker News • Recommends

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" link to this video

mitchtyon Hacker News • Recommends

On “Monads for functional programming (1995) [pdf]”

…lance 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: link to 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…

omginternetson Hacker News • Recommends

On “The Lazy Monad”

link to 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.

lkutyon Hacker News • Recommends

On “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" link to this video