I have always had a habit of having big ideas for programs and working on them in my spare time and then getting bored of them when it starts to get tedious. I used to regard these as failures, but recently, I've started to see it in this light.
Sometimes, people have art books and they just draw in there. Not because they're going to publish a comic or anything, but because they like drawing.
That's what I'm doing with my recreational programming.
@foone I do maintain (exclusively for personal use) a lot of tools I use with this purpose. I don't really need a way to automatically change my wallpaper with a random post from a list of imageboards but... why not? I don't even need it to be cross-platform but... would it be interesting if it was? Its already working, do you need it to be typed Python? No, but wouldn't be a fun way to learn typed Python?
@foone i think recreational programming is a big part of the appeal of programming language development for me. not "what would be the one language to rule them all" but "what would be a good language to code stuff in for fun"
@foone I've recently gotten into writing a couple of mods for Stardew Valley, the main one being a web service that gives other apps realtime info about the game.
Is it elegant? Hell no.
Are there better solutions? Probably.
Am I needlessly reinventing bits of ASP.NET Core for my own amusement and just to say that I can? You bet.
And I doubt anyone other than me will ever find this useful. But it sure has been a fun way to spend the last 2 weeks & I'm learning stuff/refreshing old knowledge.
@foone I've been kinda doing that with my python dice rolling script, but with the added fun challenge of also being able to provide an optional statistics report including the polynomial generating function that gets all the useful probability stats if --verbose is set.
It's more meant to be a fun trip into the math of dice probability than being a useful dice rolling script, but I get a useful dice rolling script out of it as a bonus so hey presto.
@dragonarchitect yeah that's the kind of feature you used to see a lot more of in games and such back in the day.
I think Kris Asick of Ancient DOS Games talked about this once, saying some feature feels like it's just there because the programmer thought it would be fun to add.
Like, is the script complete enough without this? Yeah. Does it really need this? Nope. Did it scratch a fun itch to add it? You bet!
@foone "Like, is the script complete enough without this? Yeah. Does it really need this? Nope. Did it scratch a fun itch to add it? You bet!"
Hell yeah! 😄
I just haven't touched the script in a long, long while, because I've also wanted to have a little fun diving into the wonderful world of OOP in Python, but hoo boy that's an extra level of complexity that fucks with my head a bit. 😵💫
@foone Bash scripting is fun because you know there's no way in hell this contraption of pipes and regex is necessarily "scaleable" or "safe," but it did the thing in an intuitive, lego-like manner.
cause like, yeah, it's good to know how to write optimal code and how to make it elegant and easy to maintain, sure!
but one thing you have to maintain is your brain. If you're constantly driving your programming brain at maximum speed, maximum awareness of all possible caveats and vulnerabilities, always considering "how will I maintain this code in ten years time?" you're going to burn yourself out.
You're associating programming with a high-stress high-attention activity. That's going to make programming something that's categorized in your brain as no fun, never relaxing, never something you do just cause it would be interesting... you're going to start dreading it, even just a little. "oh well, let's get this over with."
That's not a good way to think about it in the long run.
@foone I like this a lot. A project every season? You follow along and you're pointed to learning resources on a PBS landing page for the show. This would be nice resource for resource-strapped schools.
@foone Shit, we could do this on Twitch, but we wouldn't have nearly the audience. Think how many people have broadcast-ready facilities in their homes. Show, round-up show, podcast, learning guides. This could be a big deal.
@foone I've played with Scratch a little with the kid and that could be a fun show, just animating the sprites and interacting in interesting ways. I'm not sure how many episodes you can do, but neither was Bob Ross I'm sure.
@foone misread this as PSB’s Joy of Programming and now I’m looking forward to a public service broadcasting concept album / song cycle about such a thing. I can almost hear the whooshing sound of a reel-to-reel warming up opening the piece …
@foone i know your whole point is that we shouldn't only ever try to be practical, but as an additional bonus, i genuinely think all the hours of code golf i did for fun have made me a better programmer
not that any "normal" code i ever write looks golfed at all, but you learn so much about a language when you're digging into the weeds looking for ways to save bytes
@foone I would watch that show! Although I earned two certificates in programing and database (more than 10 years ago so they are wildly obsolete), I can use basic skills to put together a Wordpress site, but last night I spent over 2 hours trying to get Digital Ocean Ubutnu, Mailgun, Docker, and an open source package from Gitbub to all talk to each other and I just couldn't do it. I gave up. I failed. My skills are far behind basic. I really need training, to be up to date.
@foone there is a practical side to this as well. "Happy trees" code is almost guaranteed to be easily maintained code. Most 'optimised' code I see is optimised to feed the programmer's ego and little else.
But I'm left with a big question: what is the equivalent of beating the devil out of your brush? Should I bash my keyboard against the leg of my desk?
@foone wow! Your phrase summarized it very nicely. It's true because I do programming for the money, but from time in time, I just do things for fun like the Ray Tracer in a boot sector https://youtu.be/Njtn_1jBa9c?si=oW3hqYtjsw0e-aQV and the Bob Ross comparison made me smile, because I thought in adding the happy word to my thinking discourse "wow! We can save a register here if we move this happy register there and we avoid a pop, now the stack looks like a happy stack, and we saved a few bytes. It's the little joy."
@foone This is close to a post in my feed about a news article complaining that the U.S. lost $700 million in productivity over the eclipse. I like what you’re saying, but there is so much messaging from the owners class that insist on defining everything by value produced for them that it takes the fun out of everything (and then they go and complain about how everyone in the workplace is unhappy).
@foone@QuietMisdreavus I mean, there was literally no reason to write a four channel MOD player in Rust for my homebrew computer. I did it anyway. Most of my open source is “I wanted this to exist”, and for no other reason.
@foone This is also a part of why doing it in a corporate setting inevitably leads to burn out. It’s a “high stress, high attention” situation by default
@foone hmm maybe there are two types of fun: the relaxing fun and the thrilling fun? After all, people do all kinds of dangerous things for fun and I don't thimk those are low-stress or low-attention situations...
@foone “…never something you do just cause it would be interesting…”
This is exactly the reason I set aside time every year to do Advent of Code. Fun little daily projects that ultimately don’t matter in the grand scheme of things, yet I do end up learning one of two new techniques or algorithms every year from it. I know I will never see the global leaderboard, but I challenge myself to complete each day before looking up other solutions. #AlwaysLearning
Writing elegant code is fun. Throwing together a bunch of unmaintainable crap because you are on a deadline and management doesn't care is what burned me out.
@foone I feel as if a good way to defuse this is -- given that no program is ever complete, you always return to the code -- to limit yourself to just "How can I code this today so that the next time I see this code it won't make me sad?"
@foone By the same argument, you burn your brain out if you use good grammar.
What actually goes on is this: you learn how to write clear, maintainable code through practice and self-examination, and then it becomes a habit, so it takes no effort at all.
For example, I use assertions quite a lot when I initially write code, just so they go off if something goes wrong. I don't even think about it as I do it. Later, I remove most of them because they're clearly redundant.
@foone I needed to hear this a few years ago, I can't get myself to code anymore. Instant headache when I start. I hope the people who still take joy in coding believe you!
If you have the time, defer things with TODOs. Yes, that's the path to tech debt, that's why I started with "if...".
Write tests, positive and negative, before (TDD), meanwhile and after. As many as you can think of without straining. Real life will provide you with more. Integration tests, for each layers if possible.
Start writing with comments and or pseudocode. If the latter and your programming language is #Python, you're halfway there.