Ask HN: When you code at work, how do you code in your time off?

39 points by john-titor ↗ HN
I love my job as a data scientist, it's incredibly creative and a lot of fun. But at the end of the day I'm pretty much done with staring at code snippets and reading documentations. The same is true for the weekends - ever since I started to code for work, my motivation to code outside of it rapidly fell towards absolute zero.

The problem is that I have a few private projects that I would love to try out. They all need coding. How do you find the motivation to work on such things when you also code for work?

Personally, I think it's probably a healthy thing to pursue completely diverse activities professionally and privately, but at the same time I feel like not honing one's professional skills during your time off is a little bit of a wasted opportunity.

70 comments

[ 3.0 ms ] story [ 123 ms ] thread
As you said in our last sentence, it's good to have a balance of activities throughout your day and week. For me, I try to be consistent on my projects weekly, not daily.

I sometimes will have a month where I don't even want to think about code outside of work. Other times, all I can think about during work is when I can get off and go home to code more on my side projects. These are the two extremes. I am usually somewhere in the middle: I will go take a walk, go to the gym, read science fiction, cook. During these activities, I will randomly have higher-level, free-flowing thoughts about my coding projects. Perhaps even a spark of insight.

When I return to my projects, I feel refreshed and excited. If I don't feel excited about my project, then I won't force myself.

This post is the one that resonates the most with me so far
I usually take a few months off 'coding' outside work, then 'load up' all the side project into my 'RAM', write features etc.. whatever needs to be done, then fire off this years update into github. Maybe that month I will reintroduce caffeine into diet etc to get that extra bump.
A goal to get something done. Like a tool I need or a video/article I want to release.

Will note I'm also single/have no life in that normal sense. But I have hobbies/goals.

Your single-ness isn't the same as you having no life, please don't subscribe to what others might consider a 'normal' sense of having a life. If you are happy with the things you are doing — and I hope you are — and with your hobbies and goals, then that's all you need to concern yourself with.

Also note I might have completely misread your tone here... but saying it just in case.

I just mean I don't have to deal with raising children or something which would take away of your time/energy to do things.
It's pretty clear that the combination of having little social life and being single gives you more time to explore programming in your spare time.

Either one of those things can be very detrimental to programming outside of work. Not saying this is all romantic relationships, but it's very common for a partner to have an expectation that you spend a significant portion of your outside-work time with them. And single people who have a social life also can let socializing monopolize their outside-work time (though of course there are also people who may only talk to friends once or twice a week).

For many (including myself) it's really hard to balance relationships with solitary hobbies.

Yeah in my case being single isn't a direct choice (lol). So I just live with it for the time being.

Although regarding choosing to have kids, is something else, that's commitment, I don't know if I can deal with that, raising someone from a baby to an adult eg. 18 years.

As weird as it is to say I do feel sad at the thought that my genes won't go on but at the same time no guarantee future generations make it.

I do code outside of work, and the kinds of projects I work on are a different realm of interest, for instance solving problems at home, or filling a need. They don't have to be completely different topics though, even tangentially related is good enough to keep the interest going.

Over time some of them have spawned into their own projects, and some have gained a little popularity in the OSS community and have taken a life of their own. Importantly I am keeping them as hobbies and not revenue streams; I know that isn't a common sentiment on HN.

Further, it's not always about coding — it's important to also do non-coding things in between, to break things up. I'm sure you have some of these as well. The non-coding tasks can serve as time to mull over both work and non-work coding tasks in the back of your head.

I don't. Same as you I love coding but after doing it at work all day I don't want to do it in my free time too.
I'm doing a short work-week, coding about 25h/week, mostly fancy CRUD and API work. 25h leave me feeling not burned out at all.

The "time off" coding I do is purely for fun and learning, and it's mostly using different languages, tools, frameworks than my work. It feels so different and it's fun, my current project is a game.

I don't. Days are short, and I'd rather spend time with my kids while they're still around.

If I want to learn something, I read about it (at work or at home), then look for a way to apply it at work (it has to be useful though!).

2 answers:

1. I code on my time off when I'm not coding enough at work because I'm too busy with other tasks such as management, documentation, specification, testing, or just boring development

2. I try as much as possible to "sharpen my saw" at work. For example:

A MR about an API to review? => let review SOLID principles.

A module to refactor? => Let's explore some new design patterns.

A bug to investigate? => maybe this modeling tool I read on HN can be of help...

  > A bug to investigate? => maybe this modeling tool I read on HN can be of help...
Please share any insights you've gleaned from this. I currently have no pending bugs, but good tools are hard to come by.
ATM I'm looking for bugs I can address with either TLA+[1] (hello concurrency) or Alloy[2] (hello design exploration).

Other times I had some linear algebra stuff I was working on, so I learned a bit of Octave[3] to generate test cases with a (hopefully) correct implementation.

I'm still looking for opportunities to try Z3[4] though... (e.g. http://phrack.org/issues/69/4.html#article see "How I Cheat at Maths - Z3 101").

1: https://lamport.azurewebsites.net/tla/tla.html

2: https://alloytools.org/

3: https://www.gnu.org/software/octave/index

4: https://github.com/z3prover/z3

I'm just waiting for a system to describe in TLA+. I've been eyeballing it from afar for years without needing it yet.
I only code outside of work for money, when I do it’s a Saturday night with some wine and music.

It’s much more relaxing than work, I only do things that I’m good at so it flows well. I feel like an artist

I also limit the amount of time that I spend on coding outside of work to 10 hours a week and balance out the rest of my time with non coding activities

At work, I do things "the right way" (tm), we have high standards, and I (try my best to) write clean, easy to read code that follows whatever we deem best practice.

At home, I enjoy NOT doing things the right way, one-off stuff, dirty dirty hacks, tricks and kludges.. Whatever makes it work, in whatever language I feel like! I code myself into a corner, or work around refactoring whenever I feel like it, and I enjoy it all the way to the bottom! :-)

I find it enjoyable to have a leg in both "worlds", and they both motivate the other.

You don't.

For me time off is to go ride my bicycle, spend quality time with my kids and/or girlfriend, go to the beach, socialize, cooking, drawing, fixing stuff at home, do stand up paddle or other activities, mostly outdoor.

We are not made to be laboratory rats. We need to spend time outdoor, interact with people. Sure there are a lot of dev/homelab stuff I'd like to do, as well as make music, books I'd like to read. But at some point you have to accept you don't have time for everything and I choose to dedicate that time on healthy and outdoor stuff first over things that involve a screen like coding, video games or netflix.

If I wasn't working in front of a computer, maybe it would be different.

This is interesting, it seems to be one or the other. Personally I like development so I do actively enjoy doing some in my free time, obviously on things I want to. I don't see it as "I've already done 9 hours today so I'm going out for a ride instead.".
Thing is, you probably should, even if you don't want it. Being in front of a screen 9 hours a day is already too much for long term health (cough cough looking myself in the mirror).
This. There are studies that shows there is a pandemia in some countries of heart and other health problems directly associated with the lack of sun time.

And in contradiction to what suncream vendor would say, this can't be solved by vitamin D supplements.

I you love coding you won't stop at your time off. When your motivation is off, your side-projects are not fun anymore. Maybe try a new technology stack which is more fun.
In my time off I only work on something I'm legitimately excited to work on. And it took years to find that thing. But when you're really excited about building something, you find time.
If I start coding in my spare time it is usually a sign that I have reached extreme boredom at work and that my brain needs to do something...
A wasted opportunity in my opinion means wasting a good weather window, not working out, or literally missing a chance to travel. There are times when I've felt missed side projects have been wasted opportunities, but I don't really worry about it much. When I get excited about a new tool or something, which happens rarely, then I'll code in my spare time.
I think my case is definitely not a good example for a healthy work life balance, but going to tell it nonetheless, maybe someone finds themselves in this story. Been coding 60+ hours per week for the last 9 years, usually do programming on both weekends.

I have a partner but no kids, have no idea how it would be possible if I had them. Due to lack of free time and sport injuries my hobbies have mostly reduced to frequent travelling. Since I travel I barely have any friends, so I don't spend any time with them.

I try to exercise regularly, exercise takes time but it pays off for my energy levels and decreases stress.

I have recently self-diagnosed myself with ADHD, sitting idle and just relaxing produces too much anxiety, so I have to jump back into doing things. Another important thing for motivation is feeling that your work is meaningful and that you can influence the product. Being a cog in a big machine implementing what other hand down to me would have brought a feeling of helplessness.

> Been coding 60+ hours per week for the last 9 years, usually do programming on both weekends.

I did the same until I had kids. Now it's rare for me to even touch a computer at the weekend.

My side projects never took off, but they did help me to become the developer who I am today, so I don't consider them time wasted but at the same time I don't feel that I'm missing out now.

Just as a note, you probably don't have ADHD but an anxiety related to underachievement
My self-diagnosis doesn't come from this alone. But you might be right, I constantly feel like I have not achieved enough.
Ambition-driven hyperactivity disorder
I need it to be a challenge. It needs to be something interesting, and usually involving teaching myself something new. And I’m doing it just for the sake of learning, to improve my skill set. Most of that feeds back into my day job which is part developing my startup and part working tech for my key investor’s company. My curiosity and my desire to grow my business are the primary drivers to do the extracurriculars. I am sacrificing family time but I do take time with my wife and daughter. If it teaches my daughter about curiosity and developing a good work ethic, that’s a win IMO.
I'll be honest, I don't. I once had a job that wasn't programming, and I did so in my free time and was prolific. I even found ways to apply that programming to my rather nontech jobs. It was all a blast.

Now that I do it all day, it's the last thing I want to do after 5. I don't even own a computer outside of my work machine.

I code/do technical work outside work for a number of reasons:

1) I have a problem I want to solve- like making Christmas lights synced to music or building a speed camera out of a raspberry pi (although those mostly use prebuilt solutions)

2) I saw something cool I want to try. I never build anything to publish, just to scratch a curiosity itch.

3) it’s advent of code time. I never do more than a few of them, but I find the puzzles fun.

4) My kids ask me to (this happens surprisingly often- Minecraft mods, websites for selling their artwork, coding a simple game with them)

I also maintain a blog that gets a little technical, but so far no code there.

Finally, my work sponsors internal hackathons, which I make time to participate in. The doesn’t really count though as it is done on with time.

I don’t spend a ton of time coding outside work, but it naturally fits into my life at serendipitous moments.

Become a manager, then you'll miss coding (half joking, but this does work)
Seconded. I code outside of work now to keep myself sharp. It needs to be fun though, so I end up delving into things like 8-bit assembly, writing games, fiddling with MIDI or whatever.
It sounds that you have an interesting job and it is consuming your creativity and coding "power". It's pretty good. I was in the same situation as well. But never had time for my side projects. To be honest my side project's really took off, as soon as I got a very boring job (don't suggesting doing it, but the motivation was much higher to work on interesting stuff when the job was frustrating with good wlb).
I code outside of work, because my goal is to one day to run my own business and I want to test my ideas and validate. So the reason why I code is oriented around that goal. My day job is good. I enjoy it. But I choose to pursue my goal. And that goal is enough to get me back on the computer.
I write small video games in my spare time. Doesn't feel like work at all, the challenges are very different. Making interactive things is a kind of instant gratification, too, as you get to play with it during development.
This. My work job (i.e. infrastructure) is very different from my spare time hobby project (iOS and Metal/GPU).

Maybe it also helps that I've gotten good enough at the coding bit that it's not really the main bottleneck. For better and for worse, I'd have to contrive reasons to try out the fancy new features that just came out in Metal 3. I still haven't needed the fancy pipelining in Metal 2. I spend more time in Photoshop and Illustrator than I do in XCode. With that said, I think that Apple's done a really good job with Swift and Metal, which means I get to spend more time with content assets.

I think that at work, the bottleneck isn't really code either. We spend more time making decisions about the code than actually coding. So there's that.

Ultimately, the point isn't really to write more code. The point is to make more product.

(comment deleted)