Live data from Hacker News

Ask HN: People who enjoy coding in free time, what does your process look like?

news.ycombinator.com

1–10 of 21 posts

Ask HN: People who enjoy coding in free time, what does your process look like?

#1
Do you have particular snacks? Do you take your laptop to a public place with wifi? Is there some kind of ritual that gets you into the mood to write code?

I don't program in my job, so coding in free time has been a wonderful creative outlet. These past few weeks, however, have been a slog to open the IDE; often distracting myself instead with watching edu material on writing better unit tests, binge reading HN, etc.

One new habit which has somewhat worked was inspired by Neil Gaiman's writing process (ie. sitting in a quiet place where the only two choices are to write or do nothing until boredom inspires writing) - I've started sitting at home, without music and with a notebook, where the only two choices are to do nothing or write pseudo code for the immediate next exciting feature.

As you may have guessed, at this moment this new process isn't quite working; curious to hear from anyone who enjoys coding at home / in free time: what does your lifestyle around those programming hours look like? Thanks!

Re: Ask HN: People who enjoy coding in free time, what does your process look like?

#2
I just put on music and write code. I have an excellent personal laptop, but I prefer coding my big desktop.

My key to staying interested is automation of all the things. I mean spending the extra time to finding new ways to perform test automation, automation to keep documentation up to date, adding new lint rules. With better automation in place there are fewer barriers to validating or executing new ideas.

Re: Ask HN: People who enjoy coding in free time, what does your process look like?

#3
I use my desktop for this usually in the evenings a bit before and after dinner. Got music on Spotify running. I use notions to keep a list of small things that I need to do.

I don't do open source contribution a lot so it's mostly my own stuff.

Re: Ask HN: People who enjoy coding in free time, what does your process look like?

#4
I remove frictions. An IDE is a friction, so I'll use the interpreter directly to write snippets of code and play with a library or prototype a feature or something. Small functions. This works just like foreplay or messing around because after a bit of doing this, I'm turned fully on and possessed and banging much more serious and fully fledged code. It gets me fully in the zone, and I regain situational awareness some time after.

This is akin to playing a game in a half-assed way, and before you know it, you take off your jacket to really play. If you were told to come with the proper attire, you probably would have declined or postponed or procrastinated, hence removing friction works.

I recently have tried putting on sounds. Nature sounds. There are tracks that go for more than 8 hours. These cover "Dirac impulse" like sounds in my physical location, which can burst my bubble. I'm fine with noise in a bus (I've coded entire projects while commuting).

One 'hack' to improve productivity is to work disconnected from the internet and with an unplugged charger. I had a laptop that could only hold about two hours, and boy that was greatly motivating to code something up before the laptop shut down. Even with my crurrent laptop, there just is something about working with 'finite energy'. Removing frictions and adding restrictions seems to work.

Re: Ask HN: People who enjoy coding in free time, what does your process look like?

#5
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.

Re: Ask HN: People who enjoy coding in free time, what does your process look like?

#6

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…

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.

Re: Ask HN: People who enjoy coding in free time, what does your process look like?

#7
If you're working on a personal project, which as others have said should give you some drive to get started, don't fall into the trap of making things too complicated too quickly. You'll get side tracked, fail to complete the core behavior and get discouraged at your own lack of progress.

Set a small goal and only when it's finished start working on something else, make a kanban board with small tasks. Don't think too far ahead with "oh, I'd like to add x in the future, so I should architect y so that's possible". Don't endlessly review and refine the code you've already written trying to achieve perfection.

By all means capture these next features in a notebook, but act like you're working on a 'real' project and have an actual deadline. It might also help to make commitments to show other people what you've done, I always work best when I have an audience otherwise I quickly fall into the trap of trying to make the perfect system because I know there's no hard-limit on my time. YMMV obviously.

Re: Ask HN: People who enjoy coding in free time, what does your process look like?

#8

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…

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.

Re: Ask HN: People who enjoy coding in free time, what does your process look like?

#9
One thing I've found helps me not lose my mind is to CMD+Q everything at some point. Nothing better than decidedly stop working. I usually write a note (that does not compile) in the code about what I was doing, and what I should try next. In case it takes me a few days to get back to it.
Post reply on HN