Working through a book on modding Minecraft with the kiddo. It knows its target audience: the first few lessons are all about explosions!
It’s written for 1.8, which is a problem because a lot of the structure has changed between then and 1.12, but a decent IDE with auto complete and a sense of common naming schemes has made it relatively easy to adapt the simple lessons so far. We’ll see how well that works as they get more complicated.
Back when I was comparing social media archives, I considered resurrecting my old LOLspam project as a Mastodon bot. I never quite got around to it, partly because I was able to do most of what I wanted to automate using IFTTT, so I stopped investigating that last 5%.
Last night, I threw together a quick and dirty bot to post a random item from a text file in about 20 minutes.
Then I spent three hours going through the Twitter archive for @LOL_Spam, pulling out jokes that are too dated or cringeworthy. (I hope I didn’t miss any. It was midnight by the time I finished, and I was really tired!)
This morning I modified the script to take a second file as a queue for new items.
- I can add new items to the queue file as I find them.
- It’ll post from the queue on a schedule (using cron).
- When it uses up the queue, it returns to posting random posts from the archive.
If you’re interested in funny/odd spam subjects (and you’re OK with swearing and occasional lewdness), check out @LOLspam@BotsIn.Space. You can follow from any Mastodon or other Fediverse account.
The script itself is called fedbotrandom. I wrote it in Perl, using text files, so I could just put it in cron on any *nix box instead of worrying about language/database support or installing a runtime or DB engine. I’ve made it really simple on purpose, and while I do plan on writing some better error handling when I have time, It’s already more complex than I wanted it to be!
You can find me on Mastodon at @KelsonV@Wandering.shop.
Kiddo’s been wanting to learn programming, with the ultimate goal of modding Minecraft. We’ve done some Ruby, but he’s impatient, so last night I we started Java with a simple program that repeats a
println X times.
He wanted to pass it the integer limit.
After a few minutes, I suggested we watch a movie and check back later.
After dinner, he decided to stop it and we timed some shorter runs.
I think he has a better understanding of scale now!
There’s nothing like finding an edge case for a program you’ve written, thinking “Oh no, I didn’t take that into account!”…then checking the code and realizing that you already did.