It’s MAGIC!
Often times we utilize learning tools to increase our knowledge on a topic. Hobbies are excellent for studying a subject or skill. One such hobby I’ve found to help me as a programmer is Magic!
For photo credits, click on each image to visit their website of origin
Not actual magic like hocus-pocus, Magic the Gathering, an American trading card game.
I’ve been playing MTG for four years and I can’t get enough! I’ve spent hours building new decks, reading articles (like this one) about strategies, studying new features all to increase my skills and build better decks later on. Can a hobby like this relate to programming?
Absolutely! MTG has helped me better understand various aspects of software development. Take for instance learning a programming language.
There are many other languages, but instead of trying to master all of them, it’s better to find one with which you’re comfortable, build your skills, and branch out later. When I write programs I typically use Java. It let’s me organize my code by separating it into multiple files called classes. This makes it easier to keep track of my program’s features as I write. The Elder Dragon Highlander (EDH) format in MTG helped me learn this about programming through a process called deck building.
Java was also the first language I used to learn object oriented programming (OOP there it is!)
Deck building is, as the name says, building a deck of cards. In the EDH format, players each have a deck with 100 cards every card in a player’s deck must be distinct. Most other formats allow multiple copies of cards in the player’s deck. But what makes EDH unique is that it requires players to select a creature as their “commander” and an additional 99 cards that work alongside the commander to achieve victory. Whether searching for the right cards or choosing a language for a project, it’s all about combining the right features.
I recently created a program for keeping inventory of groceries around my home. I wanted it to prompt for information, accept input, organize it, and store it in a database. I used Java to create the interface and with an additional plugin, the program could incorporate SQLite for storing the information. I combined two languages with capabilities that helped me solve my problem. Though it doesn’t manage groceries, my EDH deck was also made using the same tactics.
In MTG, a cards play style is usually dictated by at least one of five colors. I wanted to build a deck that allowed me to have more cards in my hand than my opponent and steal their resources throughout the game. I chose black and blue colored cards for my deck as they helped the deck satisfy a condition of victory. Though the a deck or program may appear complete, there is more work to be done. There still remains the process of performance testing before declaring it a final product.
My inventory program went through multiple changes since inception. Initially, the program recorded my entries to a text file. While it made storing information simple, it was difficult to retrieve. I later modified the program to work with /Microsoft Excel and store information in a spreadsheet. My intentions were good, but the plugins for working with Excel were outdated and I couldn’t find enough information on configuring them. Currently I am using a plugin that allows the program to work with SQLite to store and retrieve information. This has proved the best method, but I continue to work on it even now. This method of testing and updating is mirrored in MTG as play testing.
As you can see, it’s all about STRATEGIC PLANNING!…
In order to ensure the deck functions as planned, it must undergo play testing or practice games. Practicing helps me to judge how well the deck can perform, check for inconsistencies and optimize the deck to be as synergistic as possible. More synergy means the cards can work with each other to fulfill a specific purpose.
By recognizing patterns between your hobbies and programming, you can build your skills constantly even when away from the computer. It’s like eating healthy when you aren’t working out in order to promote a healthier lifestyle outside the gym. What are some of your hobbies that relate to programming? Let me know in the comments below.
It can be anything, even crocheting! (But THAT would be INSANE!)
Join the mailing list to see updates like this every week!
Coding Fanatic
For photo credits, click on each image to visit their website of origin