From Spells to Syntax (Part 2)
The link Between Coding and Writing
Hello again,
Last week I started the journey of explaining how my coding experience changed a little after I started writing. This week I want to delve deeper into the way the foundation and worldbuilding connect to the world of programming.
I won’t hold you any longer than this, so let’s dive in shall we?
If you haven’t read the first part yet, then be sure to start there.
Chapter 4: Achievement Unlocked: Where it all starts 101
I hope you understand why I'm writing this article. If not, I've failed you, and I apologize.
On the other hand, it gives me more to learn from, so please share your feedback in the comments. It would be greatly appreciated. But let me put us back on track and dive into the real meat of the subject.
Logic is the name of the game. Not only for storytelling but even more so in programming. Without logic, there's no coherent story or working program. You could almost call the logic the brains of whatever you're writing or coding. It's like the engine in a car and all the interconnected parts. Everything has to work together based on certain principles; if one fails, all could fail. Sometimes we can omit or overlook logic, but ultimately, the more that's missing or broken, the further a story or program deteriorates.
I hope the car analogy helps you visualize how writing a story or a program entails many moving parts that work together to reach the final destination. Now, let's dive into a new story and start by zooming out to see an overview of the world we'll be working in. Throughout the rest of the article, I'll quote from the story to help you understand the concepts.
haha, you thought it was just for fun, didn’t you? No, I put it there for a reason.
I almost look like an experienced writer now, don’t I? Don’t answer that.
Let's take a bird's-eye view of our new story, an overview of the world we will be working in. The world is where everything happens: where our heroes journey, perform amazing feats, and ultimately defeat the villain. But this has a strong comparison to the PC, or smartphone, that you are reading this on. Substack itself is built with code that lives on a web server, a world of its own, much like the world of our story. It provides a place for the program to live, just like the world does for our heroes. It provides a place for the program to live and access information, just as the world does for our heroes.
Just as a world has many different features, so does a web server. A computer has limitations that constrain a program's functionality. These could be the processor's speed, insufficient memory, or inadequate storage. These limitations affect how a program is written and how it operates.
Comparing this to writing a story, you can quickly see how these two seemingly disparate activities—writing a story and writing a program—can be surprisingly similar. The available hardware is analogous to the limitations of our fictional world. The countries, the magic system, the religions, the landmasses, the wars—all these elements impose limitations on our storytelling.
So all in all, creating a program or an application needs as much of a foundation to build on as a story needs. Now, granted this wasn’t really that spectacular and maybe even a bit boring to some. But wait, there's more!
what am I doing… why these quotes haha
Let's say we have a solid foundation for our story or application. We've established the setting and are eager to dive into the details and start writing. But there's one crucial element we need to consider first.
Purpose!
Chapter 5: What's the Point? (Spoiler: There Should Be One)
We have our setting; now let's dive into writing the best story ever, shall we?
_Yeah, that won’t work, won’t it?_
Let's take it easy, ok? Let's not jump into the writing too fast because we have this one very important, thing to get out of the way. That thing is 'purpose.' Without it, what are we doing? Where will our hero go? What will they try to achieve? Why bother? Without a purpose, we humans are lost, let alone our fictional heroes. I'm not saying that starting to write immediately is never an option. Sometimes you need to capture an idea before it flushes down the drain with the rest of your shower water. Remember that one? If not you probably read that in the shower. I know phones these days are waterproof ;)
I intentionally left out any references to coding just now. The reason for this is quite simple. Everything I just discussed applies to programming as well. Without a goal, why write a program? What do you want to achieve? Who are you creating it for? But beware, not every purpose has to be grand in scale. We don't have to become the next Mark Zuckerberg or George R.R. Martin. Even the goal of learning is can be more than enough. Ultimately, the goal's difficulty depends on your desired level of challenge and the effort you're willing to invest.
Overall, writing and coding often need a clear purpose or goal to achieve a well-written, coherent story. The world we create provides a framework for that goal. The limitations we impose, whether through the rules of our magic system or the constraints of our hardware, significantly impact the goal.
Here's an example that might help paint a clearer picture. Some of you might know it, and some might not, but it will illustrate what I mean by limitations. Take the TV show Dragon Ball Z, a power fantasy and action manga/anime. Throughout the story, the main character grows increasingly powerful, facing ever-stronger enemies with each season. While there seems to be no limit to the characters' power, the author does impose constraints. In this case, he allows characters to transform, gaining new levels of power. The author sets limits on each transformation, requiring characters to train to overcome them. This creates a goal or purpose for the story to progress towards.
And what about Lord of the Rings? The movies and books clearly contain magic, but have you ever wondered about its nature, its limitations, its mechanics? Ultimately, magic's mechanics aren't crucial, as it's rarely used in the story. The limitations are primarily physical, affecting how characters navigate the world and their priorities. Magic is scarce, so a hobbit has no reason to seek it. Gandalf, however, does undergo training to enhance his power later in the story.
I hope these two examples illustrate how limitations in a story can help guide its purpose and the goals of its characters.
Defining a purpose is crucial to a story. Limitations can significantly influence how a story achieves its goal and even determine if the goal is achievable. But let's emphasize this point further, as I believe it is truly important.
The goal, as discussed, can be affected by the limitations of the world or hardware. These limitations, or their absence, can also significantly impact the story's progression and the hero's driving force.
In our newly created world, let's consider something as simple as a stove. We know how they work: connect to gas, turn a switch, and you have fire for cooking. Many people have put many hours in creating something that we all now use with just a few simple steps. But let's change one thing. What if you had magic, specifically fire magic? Would you need pipes for gas or a switch for ignition? No, a snap of your fingers could produce fire for cooking.
The main idea here is that the introduction of magic suddenly makes the evolution of a stove completely irrelevant. This eliminates the motivation for further development. Creating something new often requires an incentive. This usually involves improving something existing or creating something entirely new. For instance, you could start building a streaming platform. But do we really need another one? Or did you find something that would bring streaming to a completely new level?
To conclude my ramblings, everything we do has a purpose, whether it's writing a story, programming an app, learning a coding language, or practicing writing. Even popups have a purpose, though it's usually to annoy people. But don't worry, I'm not using popups... I think.
With the foundation, purpose, and goals established, we can move on to the next section. We can now dive deeper and explore the similarities between application code and the smaller elements within a story that drive its progression..
I hope you enjoyed part 2 and understood all of my ramblings.
Next week we are going even deeper into these connections. There is more to be discovered :)
— Part 2: Building the Foundation <You are here>





