Intro to Python, Epilogue – Only the Beginning


Congratulations, dear reader, on completing your quest. But be warned, opening the Door was but the first step of your journey. You now have an understanding of all the fundamental programming concepts required to begin making useful things. But what exactly will you do from here on out? Allow me to make a few suggestions:

  • Start working on a programming-related project that you genuinely care about
  • Write a program to automate some tedious task at your job (such as a web scraper)
  • Join a club/meetup group/organization and find a programming project you can work on with others
  • Reinforce what you learned from Demons and Dwarves with some additional resources

I always advocate for getting your hands dirty as soon as possible. Don’t fall into the trap of endlessly taking bits of different programming courses here and there without ever actually building something of your own. You certainly want to reinforce your education with courses and books as needed, but realize that they should not be the focus of your learning efforts. If you can’t think of any projects to do at the moment, don’t be concerned. It may take awhile for you to find something. In the meantime, I recommend checking out the resources page for suggestions or doing some of the programming challenges listed there.

If you have any questions, feel free to leave a comment or shoot me an email. And if you haven’t already, subscribe for the mailing list and let me know what kind of content would be most helpful to you from here on out. In any case, best of luck on your programming adventure, wherever it may take you.


Demons and Dwarves Champion: Ken Mosher

The first person to ever complete Demons and Dwarves and successfully open the Door was Ken Mosher, a.k.a. /u/Specter_Terrasbane.

As the winner, he received $500 to donate to any charity of his choice, which he donated to the Cancer Research Institute, the “world’s leading nonprofit organization dedicated exclusively to harnessing the immune system’s power to conquer all cancers.” At the time of writing CRI has a donation matching program, meaning that a full $1,000 was donated to cancer research thanks to Ken’s efforts.

You can see Ken’s winning code near the end of Chapter 8.

His efforts also unlocked the ending to Demons and Dwarves, an ending which he himself chose and helped write.

An honorable mention goes to Dan Simon, the only other person I’m aware of at the time of writing to make it right to the very end of the puzzle. He completed everything but the final part and came extremely close to getting that right as well. You can see Dan’s code in Chapter 8 alongside Ken’s.


The Answer to the Puzzle (spoilers)

If you made it to the end of the programming portion of the Door’s puzzle, you should have encountered this deciphered text:

In the beginning, the Great Serpent had but one gift to give.
It gave these to numbers, and mathematics emerged.
It gave these to sound, and music filled the air.
It gave these to minds, and consciousness blossomed.
It gave these to raw Magic, and all the wonders of wizardry fountained forth.
What, pray tell, did the Great Serpent give?

The answer to the puzzle, the one word that opened the Door, was…

“Patterns”

If this seems at all like an odd answer, allow me to explain the reasoning behind it, line by line.

It gave these to numbers, and mathematics emerged.

Mathematics is often informally described at the study of patterns. Now of course it’s hard to imagine how numbers could exist without their patterns already in place, but in the given context of creation myths we shouldn’t take things too literally.

It gave these to sound, and music filled the air.

Music is more or less sound which is sculpted according to patterns of mathematical relationships.

It gave these to minds, and consciousness blossomed.

Brains are composed of patterns of structures, most prominently neurons, and thought corresponds at least in part to patterns of electrical activity.

It gave these to raw Magic, and all the wonders of wizardry fountained forth.

Prominent fantasy stories and games, such as The Wheel of Time and Dungeons and Dragons, conceptualize magic as the weaving of patterns of elemental threads. Once a weave is complete, a spell occurs which corresponds to the woven pattern.

In Demons and Dwarves, there are five elements, the fifth element being Logic. Logic was used as a metaphor for programming logic, as programming itself is in some sense just the composition of instructions that generate and manage patterns of bits.

I think the fundamental nature of patterns is well-illustrated by John Conway’s Game of Life. It’s a 2D grid with simple rules that govern which tiles light up at each time step. And yet despite this simplicity people have found that remarkably complex patterns can emerge in this world. The suggestion is that our reality may similarly be based on a handful of simple rules that eventually result in highly complex phenomena.

The Game of Life illustrates the fundamental nature of patterns because that’s all the Game of Life is: patterns resulting from a set of rules and starting conditions. The medium itself (whether it’s digital tiles or numbers or music or neurons or bits) often isn’t nearly as interesting as the common denominator among them.

I suppose that, technically, if the Great Serpent gave something in the beginning, it would have instead been a set of rules and initial conditions for reality. But the inhabitants of the world of Demons and Dwarves conceptualize the Great Serpent as being a little more active in their affairs. And “patterns” makes for a more illustrative answer anyways, I think.