Today I officially started my journey into the world of JavaScript.
Many people start by writing
console.log("Hello World")
but I decided to take a step back. Before speaking to the computer, I want to understand how it thinks.
The heart of the machine: CPU and RAM
To write efficient code, we must understand the two main actors:
CPU (Central Processing Unit): It's the brain. It executes calculations and the instructions that we write in our code. Every line of JavaScript I write will become a task for it.
RAM (Random Access Memory): It's the short-term memory. When we create a variable in JavaScript, we are occupying a little space in the RAM. It is fast but volatile: when we close the browser, everything vanishes.
Why is this important for JavaScript?
JavaScript runs in the browser. Understanding how the CPU handles processes and how the RAM stores data will help me, in the future, to avoid writing code that slows down the user's computer or consumes too much memory.
Foundations are everything. Without understanding the hardware, software feels like magic. But I donβt want to be a magician; I want to be an engineer.
What about you? Did you jump straight into coding, or did you study the hardware first?

Top comments (0)