I’m curious about what practices you do when coding for fun?
For example, I’d use a different desk/space from the one I do my daily work, or work from a coffee shop, or from the sofa with a laptop. I’d also use different tools and languages.
But sometimes I find that even though I want to learn X or play with project Y being on a desk in front of a computer still feels like work.
Do you guys have some practices to make hobby coding fun?
Thx
The fact that you ask that question suggest you already code enough during work hours and you need to do something else after work.
Did you used to code for fun before it was your work? Then maybe it's a good idea to accept that you are not going to find in fun as long as your job is mainly coding (but it might become fun again if you don't mainly code as a job)
Did you drink the kool-aid that a developper is supposed to code for fun after work? Then maybe it's time to question that belief. A lot of professionnal developer that used to do that came to term with the fact that they'd rather do something else from their free time after coding all day.
After 10 years coding professionally, the only times I'm going to consider coding after work is as a mean to an end. There has been some occasions, but I wouldn't consider it "coding for fun". I wanted the results badly enough to dedicate some of my free time to getting that done despite not really enjoying the actual "coding" part.
Most of my free time is now used for anything but coding and I'm cool with that.
It was a path from a very long soul searching effort. After some 18 years of professional career as a SWE I was really tired of anything related to programming. Finally I got to find something that actually motivates me to learn like it was when I was a young kid and programming was a fun and creative hobby.
I got into it after meeting so many incredible people in circus, dance and other performing arts and watching them struggle to make their dream projects come true due to a lack of technical software/hardware skills and lack of money to hire specialists for their projects. It gives me a lot of joy to get into their creative processes and dream together the possibilities, to push my skills to areas I had never worked with and to actually provide value to a community of artists, to be part of a creative process is also pretty magical to me.
Before this I went through a long lull of motivation to code anything outside of work, to study anything related to programming outside of work needs. I don't get any joy anymore from dreaming about apps and products that I could sell, they all just seem like a boring job on top of my job. Actually creating something related to the arts has been very, very refreshing to my soul.
There will be always tedious parts, and there will be always unfun parts in anything worth doing. And it will always feel a bit like work.
About the only hobbies without that is passive ones like watching/reading and partially video games.
I did notice that I change what hobbies I engage depending on what I do in work (I work in ops where maybe 30-40% is coding, but I can go weeks coding, or not touching much actual programming at all), if I get some hard stuff to do in work I usualyl engage with other hobbies than programming and vice versa, when I've been stuck in meetings, planning and deploying at work I engage in programming more.
Keeping on one "stack" of libraries can help. I also have a template for new apps so I'm not held in minutia of writing logging again for the next app.
Such a diverse topic where you can do a lot of stuff, learn a lot of stuff (x86 assembly, reverse engineering, etc) and you can achieve things like free-cameras, spawning npcs, and understanding how the game actually works at a lower level.
With that, I like to experiment with different languages, I started doing it in C++, moved to Rust, but I also tried Zig and Nim, and since they are all 'system programming languages', and you can interact with FFI, it means you can do fun stuff.
One of my latest projects was to spawn lights in a certain games because I know some folks that likes to take photos inside games, and it was such a fun project to understand how the game manages entities, how to spawn entities and how to control them using an injected imgui.
It feels nothing like work and it's very rewarding.
It's a game where you use their API to buy/sell ships, food, goods, structures for profit. You write code to plan trade routes, send out scouts, or whatever strategy you think will make the most money.
They reset the game every week and you can see how you're doing on a leaderboard. Good stuff!
For example I fimd it interesting to write HDL for the nand2tetris but I absolutely hate writing leetcode. But I also know many people enjoy writing leetcode so it's personal. You have to find something you are willing to learn so the fruatration is overcome by the joy.
I dedicate considerable time to "hobby coding", including open source, and once a topic - independently of the topic - reaches a certain depth, it becomes "work", and then, the only difference with the daily job, assuming a healthy work environment, is just the choice of the topic.
Documentation, test suites, orderly repository history are not just corporate frills. Once a project reaches a certain size, the developers are, in a way, users themselves. If an open source project is even mildly popular, chores will need to be performed, which includes taking care of the users (this is actually why a sad amount of open source projects ignores PRs and issues).
So if it feels like work, while I can't say with certainly, I believe that you've just experienced how hobby coding of a certain depth, is in real world.
Ultimately, the only answer I can give, is to choose the topic very carefully - one may find that the topic that really tickle them are fewer than one would think.
- It exposes me to entirely new classes of problems (pathfinding, graphics math, ai, etc), which are much more interesting than the daily CRUD nonsense.
- It forces me to branch out into adjacent interests and areas, like pixel-art, music composition, storytelling, etc.
- It provides a medium for self-expression.
- There's a well-trodden path for monetization (Steam, etc) if you're interested in that.
- It's fun to share with others! Nobody gives a shit about the Unix-y projects I typically work on, but people have actually been interested to hear about my game :)
This has really reinvigorated me. I do recommend checking it out if it sounds interesting to you at all.
* jump straight into the implementation * skip writing tests, CI or documentation * do not overthink stuff, write the simplest code that works * do not account for edge cases
This way, I spend most of my time just churning out code, which is different enough from day to day work .
* https://github.com/doomemacs/doomemacs * https://www.masteringemacs.org/book * https://www.gnu.org/software/emacs/download.html
Some people like to challenge themselves to use it to learn a new language, or do a different language each night. Some people write COBOL, assembler, you name it, there's someone trying to use it to solve the problems.
I'd like to make a distinction here between "fun" and "easy". For me, the best kind of fun is when I'm working on something really important to me. A better word might be "meaningful". Often, the work is really hard, and sometimes it's very frustrating! At those moments, if someone asked me if I was having "fun", I'd be hard-pressed to say yes, but still there is a kind of deep enjoyment that comes from it.
So I guess my suggestion would be to spend a few minutes figuring out exactly what you mean by fun. What are all the different elements that make it up? You mention "using different tools and languages", which would fall under "novelty". New things are typically a lot more stimulating than something we've been staring at for thousands of hours. (This is why travel is so refreshing!)
Programming definitely is work, whether you're doing it for money or for amusement. Communicating your ideas clearly to a computer is one of the most tedious possible kinds of human activity. But when it all comes together, it's also one of the most satisfying :)
The trick, I think, is to be moving in a direction (ie. a project or language) that is important to you. Then the work won't feel like such a drag. At the best of times, you will be making a tremendous effort, but it will feel effortless.
In another form: for the last 30 years, I have consistently spent about 10 hours a week of my own time (easy to do since I have just worked part time for almost my entire career) researching interesting tech, usually AI related. I write lots of small code experiments and a small percentage of these get cleaned up and used as examples in books I write. Again, this is all a lot of fun for me, and my wife participates by being my editor - something she also enjoys.
When to call it quits on hobby coding projects? When it gets to be what a friend of mine calls “negative fun.” An example: on Sunday I was scratching an itch writing something in Chez Scheme on my M1 Mac. It was a minor hassle getting everything installed but an hour later I hit a road block using bindings to sqlite3 - something that should be easy, but my compiled for M1/ARM Chez Scheme code kept trying to find and load Intel/X86 libraries. Could I have sorted this out? You bet I could but the process devolved into “negative fun” so I stopped.
You don't have to do the final 20% if all you're trying to do is learn or prove to yourself that you can do something.
How much polish you apply to side projects is entirely up to you - you are the customer.
As others have suggested, embedded is a really nice area to get into, it is unbelievably easy to get started and it's different enough from day to day work.
The drudgery of my job comes from all of the stuff surrounding the code: tickets, meeting, code reviews, meetings, time cards, meetings. When I work on my hobby code, all of that goes away, and I can just code.
Sometimes it's frustrating. Sometimes I'll bang my head against a problem for a few hours, or a few days, then have a sudden "a-ha" that makes everything work. That is agitating in the moment, but the "a-ha" makes it worth it.
It also helps that the domains of my work and hobby code are completely separate. When I write code for fun, there's no enterprisey stuff going on. Right now I'm working on some code that generates character sheets for an RPG. There's no database, no Keycloak, hell, there isn't even a server. It feels a lot more like the toy code I wrote in college than the professional code that pays my bills.
If your hobby code doesn't bring you that kind of joy, you might be better off finding a different hobby? We don't need to chain ourselves to an IDE 24/7.
For me, what separates work from fun is being able to focus on what makes you happy. When you work, you have constraints on both time and quality so your fun projects should feel liberated from those constraints.
If you like software craftsmanship and elegance, work on a project you can pamper and grow. Make it extensively testable and tested, optimize hot paths, implement a full CI/CD pipeline with blue/green deployment, architecture for extensibility,...
Or if you are like me and have a million things you want to try, pick one topic/use-case and aggressively strip its surroundings to a bare minimum. For example, when I want to play with a frontend framework I emulate the backend by hard-coding JSON responses. (When I can't do that anymore, a FastAPI server with no DB is very good for quick iterations.)
I often use browsers + javascript because you very quickly get a result. I have some pipelines to convert data formats ready though.
I am not a talented painter, but with some training everyone can put out decent images.
My other hobbies are all basically the same, even if they aren't productive at all. There are parts I enjoy, and, parts I don't. I try not to worry about it too much, and just enjoy the parts I can, and work through the parts I don't to get to more of the good stuff.
I think it's really hard to separate "hobby coding" and "work coding" because they're both coding and I enjoy both. There's more stress for work coding because I'm being told I have to do things I don't agree with, or under a time crunch, but they're still both enjoyable. I don't think sitting at a different desk or location would change that.
I stay away from things I associate with frustration. E.g. no cmake. My home stuff used to be written in C and Python, now it's C, Lua, assembly and lisp. Tools that bring me joy that noone seems inclined to pay me to use.
Finally I write things I want as opposed to what anyone else wants. I really like a test framework I built years ago that noone else has any interest in. I like constraint solvers and expect to be the only user of my one. I've also spent days on very precise optimisation with no credible return on investment because perfect brings me more joy than adequate.
Feels just like playing computer games used to. Same feedback loop, same puzzle solving.
It's more rewarding to me, and easier to show off to non-coders.
I love teaching, I always have fun doing it. So the hobby coding ends up being fun and rewarding. Sometimes they'll come up with an idea that I quite like, so the aded outside creativity also makes it fun. Some ideas recently we might even release at some point, this also adds a bit of excitement.
I just choose a low-pressure project, but hopefully valuable to me or someone. Usually some kind of convenience or automation.
I have some "dashboards" with different key information on them. I like building those, scraping data from various sources, and winding up with this cool spot to look at everything.
I want to get into displaying things in the terminal, maybe the same dashboards. I really like running things on the command line; I've felt that way more than half my life now, hasn't gone away. Not sure why I've done so little programming for it.
Nothing important is purely fun. You'll find the "work" in the thing, and your brain will get testy.
- I built a nutrition app during the pandemic so I could learn more about nutrition and track my activity.
- I started practicing Qi Gong and Yoga and I hacked together a little handheld controller so that I could learn the movements more efficiently. I used it to rewind/fast forward, A/B repeat sections, speed up/slow down, etc.
- I built a trail companion app for a backpacking trip that helped me plan my hikes.
- I made an app for my grandma to share photos with her on her Kindle device.
I think when you apply coding to other things you're passionate about it brings new life to it.
For example, one of my favorite online compos, js13kGames, is about writing small video games really fast. You pretty much have to reject all of the "best practices" from your typical working environment to have a shot at this: can't use established libraries (size restriction), very little time to do proper testing and CI, code compactness is more valuable than CPU cycles... The entire mindset is completely different.
For a person working in gamedev all of this would probably feel like work. Lucky bastards.
>being on a desk in front of a computer still feels like work
Ultimately I couldn't get past this, even for gaming. I got a Steam Deck instead and mostly just use that and/or a tablet with a holder in my bed now.
Think quiz/reaction time/mario party type minigames
Doing pcb design, soldering, network communication and state management between microcontrollers, 3d-modeling and printing, (to protect the bare pcbs), etc. is new to me. Also creating expansions or twists on existing games keeps my mind going and does not feel like work.
At one point in the game i had to implement a sorting function or something like that and i noped out because it very suddenly felt like work.
If you work at home you should invest in a good office chair set up properly. I did, a bit too late. You should then use it for fun too. My solution was separate logins for each use and have distinctive desktops, which tricks your brain into feeling it's somewhere different.
You can build your side CRUD project easily.
1. sprints 2. minimum documentations 3. no test cases 4. only one git branch 5. run on barebone VM
I don't want agile + code review + PRs + git merges + container. I want the least amount of friction between me finishing typing code to running that in prod.
Instead of using different tools and setup, try picking different projects or domains you love. For example, if you're a web developer by trade you may write compilers, games, or text editors for fun.
adventofcode.com
Good time to ask this