Hacker News new | ask | show | jobs
by aristofun 1880 days ago
Coding by nature is nothing like a regular hobby, like dancing or playing guitar, or skiing...

There is no inherent pleasure in the process itself.

In solving puzzles - yes, in overcoming obstacles - sure, in seeing final product working and not failing - of course.

But coding itself is a boring but inevitable process of reaching some goal(s).

Thus the only reliable and long lasting source of motivation is a specific idea (product) in mind you want to create (no matter how small or simple).

This what can drive you no matter whats snacks or laptop or wifi you have. Without any rituals.

But pushing yourself to code without a good goal is a waste of time.

3 comments

> There is no inherent pleasure in the process itself.

Speak for yourself. I find pleasure in writing code inherently, playing around with different languages, data structures and algorithms that may not have any definite end goal in mind.

Me too for very different but similar reasons.

I tend to take my time adding code, anything from a few lines an hour to a few lines a month. So the moments where I do are like adding a few careful brush strokes to a painting and seeing its character change immediately.

In between, I read about things related to my problem, I think on walks, waking up and going to sleep, and during more active times I have worked on a problem in my dreams all night.

The mornings after "dream work" always feel magical. I realize how repetitive and grindy dreams are. Seems that my mind goes over the exact same ground dozens of times, without any normal daytime fatigue, then figures something out like finally seeing a gem after scraping away meters of rock.

From the sound of it you find pleasure in exploring something new (dopamine kind of pleasure).

Whould you enjoy writing code with same language, same data structures & algorithms for a long period of time?

If not => you don’t really enjoy coding itself.

Agreed. This is what I always recommend to those who are looking to learn how to (better) code: find a personal, meaningful project that fills a want or need for you. Not only will it provide you with realistic problems to solve, they will be personally meaningful, helping you stay motivated.

The OP issues may also be related to procrastination, where having accountability to others may be one (among many) solution, e.g., having a pair-programming partner (or a mob), or, what has worked for me, programming live on Twitch.

It's easy to get into flow when writing (like I am right now) or reading, or nearly any hobby. Heck it's easy to get into flow doing many menial jobs. But coding is very difficult, which is perhaps why flow and "deep work" is valued so highly.