I would like to know what your hoppy coding project are. It doesn’t really have to serve a purpose, but what are you coding on in your free time that just is fun to you and you enjoy working on?
As a background: I am an experienced programmer and do earn my money with it. In my free time I always enjoyed trying out new stuff related to technology, learn new things and improve my skills by doing so. But lately I recognise that I just have no clue what I should do or what a fun toy project I could work on. I really have no ideas. My head just feels completely empty whenever I open my IDE.
So please, tell me what you are coding on for fun.
Building automation to play SpaceTraders as well as tools to aid in board game design
I read about this hobby project yesterday and thought it was very inspiring. This guy wrote a scraper that compares the prices of groceries and it made a big political splash too. https://mastodon.gamedev.place/@badlogic/111071396799790275
Personally, I also wanted to try some new tech, and created my first android app for my daughter to practice her basic math operations many years ago.
Another option for you would be to find a FOSS project you like and contribute there (fediverse? Hint, hint).
Current main side project is a web music player, using WASM for the UI, because everything else is no fun.
I also have an own, tiny OS automation framework that I’ve been meaning to continue dicking around with.
Then I’ve got a minimalistic note-taking helper program. (My note system is just a bunch of loose text files, and that program helps create those files according to a scheme and allows me to search them.)
Planned projects, requiring larger and larger levels of megalomania:
- A musical keyboard application, where I can type on my normal keyboard and it’ll play like a piano. Potentially integrating LV2/VST plugins in future.
- A physics-based game, integrating concepts from general relativity and quantum physics and such. Kind of to help (me) visualize these concepts better.
- An own Git forge, with ForgeFed integration, WASM UI etc…
Why do you prefer WASM over JavaScript (which is suppose is your alternative for the UI work)? I build a lot of web stuff but haven’t tried WASM yet.
Well, I’m mostly a backend dev, so my favorite part is that I don’t have to write JavaScript. 🙃
You might be more adept at navigating it, but that language is just a minefield of unexpected behaviour and has a massive, complex ecosystem.
I’m using Rust to compile to WASM (has the most mature tooling for that, as far as I’m aware) with Leptos as the UI framework.
You write your HTML and CSS like normal, but JS is replaced with Rust code.
And well, one big advantage is that since my backend is in Rust, too, I can use the exact same models, constants etc. in backend and frontend. If they drift apart, that’s a compile error.
(You do get this advantage, too, if you use NodeJS for the backend.)But aside from me not liking JavaScript, there’s lots of little things that make Rust a pleasure to use here.
Rust’s sum types (Option, Result etc.) match really nicely with the infos you need for crafting a UI. Like, just yesterday I simply wanted to load a list of songs (Vec
) and thought, I’ll do the error handling later, but Rust’s paradigms still eventually left me with aResult, Error>
(contains either the song list or an error message).At that point, I could have still just told it explode, if there’s an error, but then I realized, oh yeah, if I can’t load the list of songs, that
Error
is precisely what I want to show to the user.And then you don’t have to deal with horrid ternaries. Instead you get full pattern matching, so my UI code now looks roughly like this:
let song_list_result = load_song_list().await; match song_list_result { Ok(song_list) => Err(cause) => <span>{cause}</span> }
I did leave out quite a bit of the boilerplate there, so this isn’t valid code, but point is, it’s a hundred times better than passing data and error in separate variables, separately checking, if they’re non-null and never quite knowing what all the legal states are, since both could be intentionally null or uninitialized null or unintentionally null or both non-null. It’s so much complexity that you just don’t have.
And ultimately, yeah, I chose the word “fun” quite intentionally there. You get the cool parts of frontend, i.e. lots of visual feedback and something to show, while leaving out most of the downsides, i.e. fugly code.
There is, of course, different downsides to the WASM/Rust/Leptos stack, like it simply being a very new ecosystem. You can’t yet pull in dozens of component libraries and so may have to build things more often yourself. And it isn’t yet as tried-and-tested as some of the bigger frameworks, plus Leptos is still going through breaking changes.
So, yeah, maybe don’t yet switch over everything at your dayjob, and of course, if you know Rust already, that’s quite the advantage, but overall, I do quite recommend it and feel like it’ll become a lot more relevant in the future.