What do the wizarding and coding worlds have in common? If it’s not something you’ve considered before – but you’re as avid a Harry Potter fan as I am – then read on for a magical perspective.
Earlier this year, Treehouse guest teacher Lacey Williams Henschel gave an enchanting talk at DjangoCon Europe. What was the entirely unique focus of her talk? The wizarding world as a metaphor for the coding world, illustrating the magic of technology and what developers accomplish.
I highly recommend watching Williams Henschel’s talk – particularly to enjoy her in-depth Harry Potter knowledge, awesome resources, and epic GIFs – but here are a few of the key wizarding lessons that should help you excel in the coding world.
So what does magic have to do with code?
The things that you do in your day-to-day life have a powerful impact on how you code. Many of the things we experience – both positive and negative – are non-technical and help us become better developers. They can take many different forms, which is where Williams Henschel brilliantly references the wizarding world and what we can learn from it. Some of these valuable lessons come from parallel between both worlds, others are based on actions and decisions made by our favorite Harry Potter trio: Harry, Ron, and Hermione.
Build an Army of Skills and Knowledge
The strength of collaboration between Harry, Hermione, and Ron is seen throughout their adventures, with help from countless others along the way. But Dumbledore’s Army is the ultimate formation of talents and a perfect illustration of what you can accomplish when you combine shared knowledge and skills. Now, apply those traits to a team of developers. You may be strongest coding in a certain language, while your peers may have valuable experience with others. Together you can problem-solve in ways you may not have been able to do independently. Through working together, you undoubtedly will deliver more impressive and efficient results.
Defeat Trolls Together
In Harry Potter and the Sorcerer’s Stone, the trio face and defeat a mountain troll. The parallel here is straightforward: collaboration and friends can help you defeat trolls. Whether they’re mountain trolls, internet trolls, or even a bug in your code, collaboration and community can help you overcome the challenge. If you’re new to coding, you’ll soon learn the value of building a strong social network among your peers as one of the most effective ways to seek help, collaborate and share code. To paraphrase J.K. Rowling: There are some things you can’t share without ending up liking each other, and knocking out a troll is one of them.
Achieve Epic Pair Programming Victories
Pair programming is an agile development technique when two developers code together at one computer. As a new member of a team, you may pair program with a senior developer as a learning opportunity, or work alongside a teammate on a particularly challenging project. It’s a great way to learn, share and collaborate. So where have we seen pair programming at work in the wizarding world? Think back to the mission to retrieve the Sorcerer’s Stone. Ultimately, it’s just really cool pair programming among our trio of heroes.
Avoid Outsized Consequences
As a developer, usability is always something at the forefront of your work. Ensuring that your app or website is user-friendly should be a consistent priority. In the wizarding world, there are powerful examples of what not to do, supported by the outsized consequences.
For one, the early experience Harry has with the Floo Network is nothing short of inefficient usability. When a simple mispronunciation of “Diagon Alley” is confused with “diagonally,” Harry finds himself in a dangerous alley for the Dark Arts. With bad usability on your site or app, a user can have a parallel experience, and it’s your responsibility to ensure an improved outcome. Give them the opportunity to correct a mistake or make a different decision. Keep navigation clear and ensure your user never finds themselves lost or frustrated. Be better than Floo Powder.
Another example of what not to do is illustrated by Portkeys, which are charmed items that transports people to a predetermined location. Almost any inanimate object can be turned into a Portkey, which can result in a confusing experience for an unsuspecting muggle. As a developer, it’s imperative you ensure your website is easy to navigate and users are able to achieve their desired outcome. Check that the flow through your site is seamless and users are able to find what they’re looking for. In other words, ensure they’re never left a confused muggle.
Share the Magic
Tied closely to the powerful theme of collaboration in the wizarding world is the concept of crowdsourcing information. Through the years at Hogwarts, the students reference spells from past and present wizards and witches. No matter what challenge they face, they eventually track down the right spell for the job. If you parallel code with magic, the same applies to our world as developers. Crowdsource is a term you’re likely familiar with, but have you considered that GitHub is a really epic virtual library of spellbooks and our way of crowdsourcing spells? What’s more, as we learn from the young wizards and witches, there is always the opportunity to add to and improve others’ work. Where wizards and witches leave adapted spells for future generations, developers push updates on GitHub.
Give Your Magical Mind a Rest
In Harry Potter and the Prisoner of Azkaban, over-achiever Hermione uses a Time Turner to meddle with time to facilitate an impossible timetable of classes. The outcome? An exhausted Hermione learns the hard way that a day is structured the way it is for a reason. Developers are also notoriously hard workers, coding for limitless hours to meet deadlines and resolve bugs. But if you want to avoid burning out like Hermione did, learn from her experience. To be productive, you need to spend about ⅓ of your day asleep to recharge your brain. It’s also important that between work and sleep, you spend those precious remaining hours doing something that feeds you mind and relaxes your soul. (My suggestions: reread all of the Harry Potter series or if you haven’t already, take the Patronus Test.)
A big thank you to Lacey for letting me reference her awesome talk. You can watch Hermione Granger and the Wizard Information System here. If you want to see more of Lacey, check out her Python courses: Customizing Django Templates and Customizing the Django Admin.