After trying to get 3 “big” software engineering words to stick, I wrote a similar post:
My brain often mixes up transpiling and compiling. As I picked up TypeScript, I wasn't always clear on how they affected runtime. I needed to get them straightened out!
What is the best way to solidify that information? Research, write it down, and share it! Maybe my interpretation will help you get more clarity, too.
I previously wrote about two of the items we’re going to talk about today, from the perspective of TypeScript, specifically:
But today, let’s cover these three topics - transpiler, compiler, and runtime - more broadly. Shall we?
Here, we’ll cover:
📖 Compiling
🧑🏽🍳 Transpiling
🔥 Runtime
Warning, you may get hungry reading this. I was hungry when I wrote it. Ready?
I was trying to think of a good way to describe and/or remember the differences. I love analogies. And I love to eat. So, let’s talk food.
Hear me out! 🤣
Let’s pretend we’re making something warm. I’m in the mood for some ramen.
We have a recipe in front of us (our code) 📖 that we want to combine and turn it into a delicious bowl of soup (something that will work in a browser or on a computer). 🍜
📖 Compiling
First, let’s change the recipe from one language to a completely different language.
So, our recipe is currently written in Japanese (TypeScript), but we need it to be in English (JavaScript) so that other people who don’t understand Japanese can read it and enjoy this delicious ramen recipe, too.
Compiling is essentially translating code from one language to another!
This could also look like translating C or Rust to machine code.
🧑🏽🍳 Transpiling
Okay, great! But, now we want to rewrite it to make it simpler English.
Maybe we used words that are too fancy or went into way too much detail about some steps. We care a lot about this ramen!
Maybe someone new to cooking wants to make some, too! But, they want a simpler version. Pretty please?
Let’s rewrite the recipe from those detailed, fancy words (modern JavaScript after we compiled our TypeScript) and reduce that to more basic instructions (older JavaScript). We’re still using English this time, but making it simpler.
Transpiling transforms code into a simpler version of the same language; it’s easier to understand.
This can also look like a transformation of JSX files to JavaScript or Sass to CSS.
🔥 Runtime
Finally, let’s actually use this recipe we’ve worked so hard on! We’ll cook the ramen!
Our computer is following the recipe we’ve made and generating our ramen!
Actually, it’s running your code, but if you had a project that took a ramen recipe input to make an image or something of ramen (in the browser or Node with our JavaScript example), then you will have made ramen in a sense! 🤔
However, it’s important to remember that if something goes wrong (like missing ingredients because they were out at the store or steps out of order because we thought we already did the step before), we may find ourselves in a runtime error. We should handle those!
Runtime is when a computer is running the code we wrote.
This can also look like Python running in the Python interpreter or Java running on the JVM (Java Virtual Machine).
🍜 Yay! We finally made it!
I hope that these breakdowns are helpful.
Are any other terms, concepts, or phrases tripping you up or wasting your precious time Googling/asking AI again because they’re not sticking? Let me know!
For more stuff from me, find me on LinkedIn / YouTube or catch what else I'm up to at mindi.omg.lol
Thanks for reading! Did I miss anything, or would you like to add anything? Let me know! I appreciate constructive feedback so we can all learn together. 🙌
Okay, this article absolutely nailed it. I’ve read a lot of explanations about compiling vs transpiling vs runtime, but this one just clicked. Probably because it used food—and I mean, who doesn’t think better when hungry?
The analogy of turning a ramen recipe into a working dish was so perfect. It broke everything down without the usual jargon overload. Here’s how it hit for me:
• Compiling = Translating a recipe from Japanese to English so others can follow it. That’s your TypeScript to JavaScript moment.
• Transpiling = Taking that same English recipe and simplifying it for beginners. Less flair, more clarity. Think modern JS to old-school browser-friendly JS.
• Runtime = Actually making the ramen. This is when the computer’s like, “Got it, chef,” and executes your instructions.
It’s not just a clever metaphor—it’s sticky. I’ll remember this every time I debug a runtime error like I forgot to buy noodles. 🍜
Huge props for turning something abstract into something delicious. If you’re ever stuck explaining this stuff, this is the version to send.