
An Explanation of How Coding Can Bring Happiness
M. Zakyuddin Munziri
@zakiego
Originally written in Bahasa Indonesia.
It sounds strange to most people how coding can be enjoyable and bring happiness. After all, what appears on the screen is just a bunch of weird letters and numbers.
We won't talk about money. We'll discuss how happiness actually works.
Happiness comes with a simple concept: when reality is more beautiful than our expectations.
For example, Monday arrives, and we're about to go to school or work. Since dawn, heavy rain has been falling. By 7 AM, there are no signs that the rain will stop. Our expectation is that the rain won't stop at all, at least for the next three hours. This means we'll have to brave the heavy rain. That's what's in our heads.
Suddenly, a miracle happens. The rain stops, and the sky becomes very bright. We're happy. Why? Because our initial bad expectation—that the rain wouldn't stop—didn't come true. Reality turned out to be more beautiful than what we thought; the day became sunny.
But pause for a moment. What if there had been no rain since dawn? The temperature was just normal. What would our expectation be for the morning? "Oh, it will surely be sunny tomorrow morning." And when morning comes, the weather is sunny, as expected, nothing special, no happiness. Everything is as usual.
That's how happiness works—it occurs when reality is more beautiful than our expectations.
With the concept of happiness understood, let's continue discussing how coding becomes a playground that brings happiness.
The activity of coding is essentially a process of solving problems. We're given a problem and asked to solve it, whether it's fixing an error, improving program speed, etc.
Sitting in front of the screen with a complex problem, we feel, "this won't be easy." Two, three, four hours pass. Our heads get hotter. No solution is found. Dozens of articles have been read. We've contacted colleagues, but we're still stuck. Five hours with the same condition—exhausting, almost frustrating.
Entering the sixth hour, there's a glimmer of hope. After making some small adjustments, and... success. The problem is solved.
For those who have experienced it, they know how happy that moment is. It's as if we are conquerors of the world.
This is where happiness in coding comes from—it exists when we successfully solve a problem. After passing through a dark tunnel of unknown length. But one thing is certain: for those who persevere, there will be happiness at the exit.
Back to the basic concept of happiness: when coding, we expect it won't be easy. Especially when the problem remains unsolved. Our expectations sink to increasingly worse levels. The darker the expectation, the happier it feels when we finally solve the problem.
In coding activities, this cycle repeats every time. This feeling of happiness is what makes some people addicted. And every day, we're always faced with different problems.
Or if there are no problems, sometimes programmers create their own problems by making complicated side projects, or perhaps, learning Rust.
Written in Pelaihari, at 17:26, March 3, 2024


