Ask HN: People who enjoy coding in free time, what does your process look like?
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!
20 comments
[ 5.9 ms ] story [ 59.4 ms ] threadMy 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.
I don't do open source contribution a lot so it's mostly my own stuff.
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.
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.
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.
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.
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.
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.
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.
If that doesn't work it is pretty likely you have ADHD.
( the number of "F" varies over time, but tend to reduce... )
[1]https://medium.com/1-one-infinity/discipline-beats-motivatio...
For many years I have had this humorous fantasy of having a bare room with little but natural rock walls and irregular rock paving flooring, a fireplace, and a ceiling consisting mostly of a huge sky light. with only a little desk for furniture as a place to work with no distraction. My contractor is now designing that room to put on the top of my house.
I can't recommend it because I have no idea if it will be the happy place I have always imagined, lol! But I think it will. :)
What I can say is imagining that kind of peaceful natural hermit-able place was one of my visualizations that helped me get into the zone many times in the past.
What code we would write if we all lived in lighthouses?