The Two Generals’ Problem

  • Loading...
  • Published on:  Monday, August 12, 2019
  • Time to tell a story about idempotency, computer science, and the Night of the Multiple Orders. • Sponsored by Dashlane —try 30 days for free at: BASICS: by Sean M Elliott and Tom ScottDirected by TomekGraphics by Mooviemakers mix by Haerther Productions to Dashlane for sponsoring the video! If you're techie enough to watch this video, you should be using a password manager. Get a 30-day free trial at'm at https://tomscott.comon Twitter at Facebook at on Instagram as tomscottgo
  • Source:


  • Tom Scott

    Tom Scott

     28 days ago +2633

    Yes, I had help with the graphics for this series. There's no way I'd have animated that myself! On that note, thanks to Dashlane for sponsoring and helping me hire an animator: their free trial link is

  • Kinetik07


     7 days ago +3677

    So it's like double posting by accident?

  • Putin did nothing wrong.

    Putin did nothing wrong.

     7 days ago +336

    See you all in 2023 when this video gets recommended again

  • z beeblebrox

    z beeblebrox

     7 days ago +209

    idempotency: when you're able to have children, but just the one time.

  • Brian Certain

    Brian Certain

     7 days ago +212

    1:24 Spelled out "Tom" with the semaphore flags! ( ͡° ͜ʖ ͡°)

  • Philip Melchert

    Philip Melchert

     7 days ago +231

    Everyone else: Goes to bed a reasonable time
    Me: Stays up all night trying to solve the unsolvable general problem with 0 knowledge of computer science

  • Kinetik07


     7 days ago +3702

    So it's like double posting by accident?

  • Voodoomancer


     7 days ago +130

    Moral of the story: If you want to be a programmer, learn to cook.

  • MarbleSwan666


     7 days ago +106

    I find the idea of two armies going one by one through a valley sending acknowledgments back and forth until everyone is dead hilarious
    Just imagine the army in the castle being confused.

  • Dominykas Turčinavičius

    Dominykas Turčinavičius

     6 days ago +74

    "A single human error is never the root cause"
    A single human error: I'm about to end this man's whole career

  • Ikis DragonFist

    Ikis DragonFist

     7 days ago +93

    -"So what are we having? Chinese? Mexican?"

  • Romi


     7 days ago +5259

    Oi nothing wrong with ordering the exact same things 5 times in a row I have my reasons

  • Maldus Alver

    Maldus Alver

     7 days ago +50

    "Would you like to pay again?"
    Sounds like everything is working as intended to me.

  • Anders Hwang

    Anders Hwang

     7 days ago +38

    Science: impossible
    Engineering: shoot a message over

  • Paul Nikonowicz

    Paul Nikonowicz

     6 days ago +3

    "idempotency". One of the sexiest words in computer science that no one really knows how to pronounce.

  • Derpyyy


     7 days ago +29

    One evening in late 2018, our neighbours came over and gave us free pizza saying they received more than they ordered, but we never knew why or what happened. Funny that this video seems to have solved that mystery haha

  • Sean O'Brien

    Sean O'Brien

     7 days ago +3741

    Nobody would put a castle in a valley between two perfectly good hills, therefore the entire video is invalid.

  • EEVblog


     7 days ago +48

    I'm surprised there is no mention about Byzantine Faults (a.k.a the Byzantine generals problem), and there are solutions that claim to be "Byzantine compliant" or "Byzantine fault tolerant", and this is a big thing in the cryptocurrency space right now.

  • Fabian Lauterbach

    Fabian Lauterbach

     7 days ago +41

    And that's how you do a sponsorship. Don't just be a talking billboard but actually do something with it. Great work (as always), Tom!

  • Digeridude


     7 days ago +20

    A hill would make more sense than a valley. It would explain why they can't see each other.