Magic Prepared Me for Programming

Published Tue Jan 30 2024

When I was in middle and high school I did not do very much programming, but I did play a lot of Magic: The Gathering. Looking back I wonder about how some of the understanding required to play Magic overlaps with models of understanding required for programming.

The first immediate example is the stack. In Magic the stack behaves exactly how a call stack functions. Abilities or spells are placed on top of the stack when cast; once everything has been cast the stack resolves in LIFO order. Beyond this the battlefield holds many objects that each have independent lifecycles. Through gameplay you build familiarity with not just your own deck, but with opponents and their strategies. Learning where to insert yourself and deny their strategy forces you to understand how their deck (or code) works.

I’m sure board games broadly have similar benefits for training your mind, Magic is just the tabletop game I played most. Maybe I’m on the wrong train of thought completely and Magic players are simply more likely to RTFM.

Also I played control