axfelix.github.io

View My GitHub Profile

Recurse Center Blagg – Jan 13, Day 8

Because I love to be utterly, self-defeatingly consistent, we return to the now-enshrined blog schedule of Wednesdays and Fridays!

(Honestly that’s probably excessively critical, even for me; this is just roughly when my brain tends to need to do something else for a while.)

This week has been good again! Last Friday after I wrote my last post I wound up joining the game dev group and it seemed as though my batch was unusually game-curious, and the words “game jam” were thrown around. For all the time I spend thinking about indie games big and small, I have never done one of these, and I honestly hadn’t planned on doing any gamedev at Recurse, but I thought about it, and setting aside a week to just work on a game is actually consistent with my stated goals of getting better at frontend prototyping/inventiveness while I’m here. Plus it leaves open the possibility that I might actually work on something for a whole week – I have been very intentionally scattered so far. But I wasn’t ready to block out the time just yet, so my current plan is for next week to be game week.

In the meantime, this is javascript week. Monday I finally got around to pushing some projects I’ve maintained for a long time to npm; they’re both zerorpc+Python Electron apps, so they were never going to be super useful on their own as js libraries, but just as I hadn’t ever pushed to PyPI before last week, it seemed worth doing from a practice and identity standpoint. I also wound up finishing the RustWASM tutorial that I’d started at the very end of last week, and made a little capture of the result; I’m not sure exactly how much of this will stick given the sort of coding I do normally – I won’t lie, I even had to review what an unsigned integer was – and Rust has a lot of decorator/macro syntax that simply isn’t going to stick in my head without lots more practice, but I loved how easy they made it to add features to pause or change the game state toward the end of the example. I also think I probably have enough Rust by now on my hard drive and in my muscle memory that the next time I’m shipping a really simple CLI tool that needs performance, I can seriously consider it ahead of Python, which is all the Rust I realistically need.

Yesterday I made Fart Map. I don’t know what to tell you.

OK, well, what I actually wanted was to learn how to use js promises more readily, and I hadn’t touched d3 in a while, and I’m much better at motivating myself to learn smart things when doing it in the absolute dumbest way possible. The learning process actually worked out really well – there are a number of examples floating around of folks who used some variation on this US map projection to overlay and colour-coded some data hardcoded into a CSV by state, with an older version of d3. I set to work adding some web audio from this old Onion project (though I have unsuccessfully tried to solicit more fart sounds from friends since), which is also something I’d never really done, which required me to implement queueing to avoid a race condition with the DOM when adding event listeners. Once I had that working, I then got to update d3, and replace the queue timeouts with proper promises that would fire in sequence, as well as replacing the CSV with randomized colour-coding. Pretty good stuff! Educational! And I made a map that farts.

The intro, which you’ll see when you visit that link as of today, was an excuse to experiment with CSS animation keyframes and gradients, which are also pretty bread-and-butter and fun to get up and running with. A number of people at RC have mentioned wanting to get a better fundamental understanding of CSS (and I sat in on a good pairing session yesterday on making a bracket layout, which I almost forgot!), and the consensus seems to be that there are only so many fundamentals to learn, but I feel like I’m in a much better place to experiment than I was even a week ago, and it’s nice to no longer have to worry about that. The map farts, as well.

This morning I had a great coffee chat with Tim Gfrerer about old tech and graphics programming, and I’m going to spend however much of the rest of the week I need porting this app to react-native now that I’ve gone to the trouble of setting up a build environment, even though it definitely doesn’t need a native app, and it doesn’t store any data right now, getting it building feels like the good kind of baby steps, and as of now, there’s nothing else in the app store called Fart Map, anyway.