Magic: The... programming?

Mikhael Kates

“Magic: the Gathering” is a very popular game, boasted as the most played trading card game in the world. You might be thinking to yourself: “Hey, isn’t this supposed to be about developmental practices?” I’m glad you asked, voice in my head.

“Magic: the Gathering” is a trading card game in which players will purchase packs of cards, build decks, and play them against one another. Each player starts with 20 life, and the goal of the game is to bring the opponent down to 0 life. The way each deck does this is different, but most of the time, it involves some form of attacking with creatures to deal damage to the opposing player. Once one player has been reduced to 0 life, the other player is declared the winner.

This may not sound anything like development, but the proof is in the pudding, er, programming. The similarities come not in the end result, but in the journey itself. The five colors of mana, or sources, Magic has to pull from are: White, Blue, Black, Red, and Green. Likewise, there are multiple languages that can be used in programming: Javascript, PHP, C#, Ruby, SQL. Also, each color has elements that are similar to each other: creatures, sorceries, enchantments, etc, similar to how each language has data types, syntax, and native functions. The key to being any good at either thing is to learn what to build with and why. What’s the most efficient way to bring my opponent to 0 life? How can I most effectively build a splash page?

Further similarities begin to reveal themselves as you delve deeper. Archetypes in “Magic: the Gathering” can be compared to how each language has a specific purpose. The most common archetypes of Magic are: Aggro, or aggressive play styles that involve playing lots of small creatures and attacking with them; Control, defensive play styles that focus on keeping the opponent from getting too far ahead until they can win; and Combo, unique play styles that revolve around playing a few specific cards to do something that no other deck can beat.

Similarly, front-end development focuses on user experience and interface design, like what needs to stands out and what looks best. Back-end Development focuses on data and page manipulation. You would never use PHP or RUBY to run a client-side function, any more than you would use client-side javascript to access data from the database.

The parallels don’t end there, but this blog does. I hope you’ve enjoyed this little look at how the magic of development can be related to the magic of, well, Magic. That’s all we have today, so untap, upkeep, draw, Fireball you for 20, game