the world needs more recreational programming.
like, was this the most optimal or elegant way to code this?
no, but it was the most fun to write.
the world needs more recreational programming.
like, was this the most optimal or elegant way to code this?
no, but it was the most fun to write.
@foone I'm in it for the bits that make my head explode. I try to keep that stuff away from work. But exploding heads, especially mine, are fun.
@foone my favorite IOCCC (obfuscated C code competition) entry is the flight sim that's in the shape of an airplane.
@foone This is me when I get to manipulate the DOM with vanilla JS.
document.getElementbyId()?
element.classList.add()?
element.addEventListener("click", doThing)?
Yes pls let me chew on this juicy, logical, non obfuscated code! 🤤
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.
@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.
@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.
@foone Did you follow the Bob Ross Game Dev Twitter account? It was fantastic, and ended too soon.
@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 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 Not sure if this it what you had in mind with recreational programming, but I enjoy the Tsoding streams/videos a lot.
@foone I miss _why :(
But I also liked watching interview with Joe Armstrong. He seemed like the friendly uncle of programming languages.
@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 me doing code golf knowing I'm not going to win, so just amusing myself with the inherent whimsy of making a little tiny code block.
i started an Algorithmic Art meet-up in London and I found it was wildly popular - it grew from zero to over 4700 members in 2 years!
people did it for many reasons but a common theme was an antidote to the developer day job
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.
@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. 😵💫
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.
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 to me this feels like an argument for tools that do a lot of that work for you. I'm of course talking about languages
@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!
@foone
* 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.
I wish it was that easy on the Ops side.
we often say that programming is more an art than a science, but we need to treat it like one too.
Sometimes you need to paint a sunset not because someone paid you to paint a sunset, but because it'd be fun to paint a sunset.
@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
This is one reason I started a creative coding meetup a few years ago.
No expectations, no unit testing, no code reviews, no bugs, just pure fun and some luck.
Some called it the antidote to their day job.
Others said it felt like their first steps at coding as a child.
@wolf480pl yeah, but thrilling things are fun because they're done for fun. Your boss isn't making you skydive, usually
@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
I was doing some AWS CDK today. Sure I could have done it a lot faster, but I spent couple hours playing around and just chilling.
@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 this is how I feel about #CreativeCoding ...
@foone however, we recommend against making a physically accurate raytracer for sunsets
we tried to do that one weekend
the primary thing we learned was not to try to make a physically accurate raytracer for sunsets
@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 it is officially an art form as demoscene is an intangible cultural heritage in some countries.
https://www.unesco.de/en/culture-and-nature/intangible-cultural-heritage/demoscene-culture-digital-real-time-animations
@foone https://thecodingtrain.com/ is maybe a little more Levar Burton in tone but is about making something so I associate it with Bob Ross
@foone I wish I could do this, but I'm no good at "patter", especially while I'm coding.
I also use a font size that I have been told is "insanely small", and I suspect video compression will make it unreadable.
But, I don't mind showing off my ~~mistakes~~ happy little syntax trees and I've (re)started coding for myself several hours each day.
I really should find an PeerTube instance or something and start streaming; I can work on video quality and viewer interaction later, I guess.
@foone
Programmer: *creates a variable*
Me: nice
Programmer: *creates a second variable*
cause everybody needs a friend
Me: *holding back tears* nice
@foone Watching Andreas Kling work on SerenityOS in his FIXME Roulette or Browser/OS/Language/Etc Hacking series is giving me the same vibe.
@foone maybe it's Daniel Shiffman... In used to say I wanted to be like Dan Shiffman when In grew up.
We already have one. It's Uncle Bob.
PS: Not a joke. There's a really good, popular programmer whose nickname is Uncle Bob. He's the "Clean Code" guy. He's my Bob Ross.
@foone With the world full of AI shit code in a couple of years, I’m sure there will be a need for it. 😏
@foone AK’s hacking videos kinda fall under that category https://youtube.com/@awesomekling
@RavenWorks
@foone Come now.
Programming is an engineering discipline! There are very few happy little accidents. You want code that does exactly what you intended it to.
Everyone understandably loves Bob Ross, I do too, but he isn't a good example for programmers, engineers, surgeons, or airplane pilots to follow.
@foone Oh, we've got one: https://www.youtube.com/channel/UCvjgXvBlbQiydffZU7m1_aw
@foone TBH I think there are people like this in the shader art community. Nobody has Ross's great hair though!
@foone He doesn't stream every week but @mconley does The Joy of Coding regularly, episode guide here: https://mikeconley.github.io/joy-of-coding-episode-guide/
@foone @shanselman
I'm a Ross, and my middle name is Robert...
🙋🏻♂️ I volunteer as tribute!
@foone
His name is Thor.
@foone
"Look at this nice but lonely method here. Let's make a beautiful little coroutine so it's got a friend..."
@foone Are you familiar with Sebastian Lague? https://youtube.com/@SebastianLague?si=4Ncu4Fm9_7Z-J9dn
@foone a litte bit of a loop here and a new Variable there
Look at this beautiful code
Now we need a new class here *now is code ugly*
@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
Yeah, but We have javidx9 aka one lone coder
https://m.youtube.com/@javidx9
@foone https://youtube.com/@TsodingDaily?si=G1ukK8kBqoZLCGzw Tsoding Daily
@foone it's @shanselman
@foone Inigo Quilez fits the bill pretty well for graphics programming
https://youtu.be/BFld4EBO2RE?si=hDjTs5CrvzsuzVEb