Problems with WordPress and Amazon CloudFront

Here’s a fun story. When I originally moved this blog to Amazon Lightsail five years ago, I followed the recommended best practice and installed the AWS for WordPress plugin. I used that to set up an Amazon CloudFront distribution to manage the site’s cache. For several years, everything worked great. Then in September 2022, AWS abandoned the plugin and removed it from WordPress.org. As far as I can tell, they provided no information for users to tell them what to do without it. I continued to use the plugin for sometime, even though this is generally seen as pretty bad security since it’s no longer receiving updates. A few months back, I got tired of my Security scanner blaring at me about this discontinued plugin and deactivated it. The CloudFront distribution still existed and my site continued to work as intended, so I figured it was safe to delete.

As you might guess, there have been consequences. I noticed recently that my site was sometimes caching things too aggressively. I’d write a new blog post and tell Rodd to check it out, but he’d still be seeing the old one for some time. I’m far from a CloudFront expert, but I’ve been looking at my distribution behaviour settings and comparing them to current best practices. This site, for example, recommends using “Origin” for your cache key. My plugin-created distro however uses “Cloudfront-Forwarded-Proto,” “CloudFront-is-Tablet-Viewer,” “CloudFront-is-Mobile-Viewer,” “CloudFront-is-Desktop-Viewer,” and “Host.” For object caching, my distribution had “Use origin cache headers” selected instead of a custom option. Without any documentation from AWS on how their plugin actually worked, all I can theorise is that it must’ve set some sort of header that CloudFront was using, and by deleting the plugin, I’ve mucked up that behaviour.

So what to do? For the meantime, I’ve changed the default behaviour object caching to have a default TTL of 5 minutes. I’ll see if that helps the situation at all. Otherwise I’m going to either have to look at my backups and see if I can reverse-engineer what the plugin was doing, or else figure out how to modify my distribution to work properly without it. Ugh.

Carbon dioxide

Mr. Snook has been after a carbon dioxide monitor for some time now, worried that our new insulated windows are actually killing us. He ordered this one in the Boxing Day sale, and it’s just arrived today. So now he’s walking around the house going “TWELVE HUNDRED IN THE LIVING ROOM! WE NEED TO VENTILATE!” Forecast today is for 33C/91F. Fml. 🤦‍♀️

iOS Shortcuts for WordPress Bloggers

You may have noticed I’m posting a lot more lately. It’s partly because I’m not working, plus a bit of conscious effort… plus a couple effort-saving shortcuts I’ve set up.

In the past, I used to share images to Instagram and then had an IFTTT applet run to post those images to WordPress as blog posts. I wanted to flip that model and instead first post to my own site, and THEN have the option of sharing to Instagram or other social networks. The solution I’ve landed on is to use an iOS Shortcut as a Share Sheet action. That means I take a photo, click the Share button, and then click the Post with Pic shortcut.

iOS Shortcuts

The Shortcut first prompts me for a Post Title, Post Content, and Image Alt Text. It then converts the image to a JPG and uploads it to the WordPress Media API along with the title and alt text. Next, it creates a new post with the title and content, and sets the newly uploaded image as the Featured Image for the post. It also copies the Post Content to the clipboard and reopens the Share Sheet in case I want to then post the image to Instagram or any other social networks. Lastly, it opens my site so I can see the new post.

Post with Pic ShortcutAs you can see, it’s a pretty lengthy Shortcut. You can download a blank version for yourself from here. There are a few places you’ll need to tweak and customise for your own setup. (I recommend doing that on your laptop rather than trying to do it on the phone directly.) You’ll first need to set up an Application-Specific Password for your WordPress User. There’s a Text action where you’ll need to put in your WordPress username and that application-specific password for authentication. There are also three places where you need to replace [yourdomain] with the URL to your own site. Once you’ve got it updated, click the Info icon and make sure you’ve checked “Show in Share Sheet.” Then you should be good to go! (I built this based on Chuck Grimmett’s Shortcut and helpful blog post.)

And yes, I know that Shortcuts has a “Post to WordPress” action built in. However, I could not get the damn thing to work! I suspect it’s because it uses XML-RPC, and I have that locked down for security. This version with the Rest API works just fine.

Upload Images to WordPress ShortcutThere’s a second Shortcut in the Share Sheet above: Upload Images to WordPress. This is for when I have a number of images I want to use in a post. You can upload through the WordPress iOS app, but I’ve found it clunky and slow. It also defaults to uploading at full resolution too. This shortcut works a lot better. I simply select several images in the Photos app, hit Share, and then the relevant Shortcut. It converts each one to JPG and resizes to 1000px wide before uploading. You can grab it here. Again, you’ll need to put in your username and application password. You’ll also need to put your domain name in for the API URL. You may also need to give it some permissions the first time you run it. Depending on how powerful your server is, you may need to limit how many photos you try to upload at once. Note: this one doesn’t do any titles or alt text. But this is for bulk uploading, and I then add in the metadata when I’m composing the post itself.

I hope you find these useful!

ZX Spectrum games

There’s a Metafilter post today about the Sinclair ZX81, which reminded me of one of my Twitter threads from 2020 that got deleted when I shut down my account. We were packing up the house for the move to Germany, which meant Rodd was cleaning out his office. And suddenly he unearthed this rack of cassette tapes…

ZX Spectrum games

It turns out that Rodd’s sister’s partner Chris was a big ZX Spectrum enthusiast back in the day, to the extent that he became a reseller of local and imported software for it. (For the youths, the Spectrum was introduced in 1982. Instead of disk drives, software was saved onto and loaded from cassette tapes.) Chris eventually gave his old Spectrum to Rodd with a lot of cassettes. Rodd later gave the computer back, but he kept the tapes for some reason. There were some absolute gems in there.

Planetoids

Planetoids! (And also Missile.)

Cassette for Planetoid game

“PLANETOIDS – an exciting, real-time reactive machine-code game in which you must destroy and avoid the passing planetoids in space. Beware of the lurking alien ship which can destroy you with its cluster bombs. In full high-resolution colour with sound effects.”

3D Tunnel

3D Tunnel. I love the artwork here. It looks like something a kid would draw on their notebook in biology class. Also, wow, $25 AUD would have been a fair bit back then!

Cassette for the 3D Tunnel game

“Another fast moving 3D game from the author of the 3D Monster Maze and Defender for the ZX81. Flapping bats, scurrying rats, leaping toads, crawling spiders all appear live in the 3D Tunnel. The last object is . . . . . . . . . . . . . . !”

Inca Curse

Adventure B: Inca Curse. I’m guessing Raiders of the Lost Ark had made quite a big impression on a lot of kids.

Inca Curse cassette

“In this adventure you find yourself in a South American jungle near an as yet undisturbed Inca temple. Your aim is to get out of the temple with as much treasure as you can and your adventure is complete when you have returned to the jungle clearing.”

JGC Presents Famous People Play Poker

JGS Presents Famous People Play Poker. I think the crappier cover art here is reflected in the bargain price.

Poker Game instructions

Here’s the instructions. I really wish it had listed who the “famous people” were!

General Election

And now we come to the more niche games: General Election.

General Election Instructions

I am trying to imagine the person who would have been excited by this game.

Collector's Pack

Collector’s Pack. This one isn’t a game; it purports to be actual useful software!

Collector's Pack cassette

“This comprehensive program allows collectors of stamps etc to hold e.g. 1500 records of up to nine items on one cassette and keep the details up to date, examine the details held and keep the records sorted into order.” On the other hand, I can exactly imagine the person who would be excited by this application.

Biorhythms

Biorhythms. Hilariously, one of the first programs I ever wrote for myself was a biorhythm calculator on my TI-85 calculator in high school.

Biorhythm cassette

“When will you be at your peak physically, emotionally and intellectually? Find out all about biorhythms through this easy to follow computer explanation. Get your computer to work out your biorhythms and those of your friends.”

Biorhythm instructions

You don’t get a lot of installation instructions on these cassettes. I do like that they tell you it takes nearly a full minute to load each program!

The Hobbit game

And here is the jewel in the collection: THE HOBBIT. “The Hobbit is a super-program that is a milestone in computer software. You will face dangers, excitement and adventure in words and graphics. Meet all the characters from The Hobbit and talk to them in ordinary English! The Hobbit program brings you the future in an exciting and challenging fantasy!”

The Hobbit comes with a pretty significant instruction booklet, and I scanned a few of the pages. The developers even invented their own DSL called Inglish that allowed the player to type full sentences. I particularly liked this disclaimer at the end:

Hobbit disclaimer

“Due to the immense size and complexity of this game it is impossible to guarantee that it will ever be completely error-free. A great deal of time has been spent testing this program to ensure it will behave as described within these instructions. If, however, any problems are found we would like to know about them so that future versions may be corrected. We would also like to hear any comments or criticisms you have about the game.”

I found that very charming, and I ended up doing more research about the game on Wikipedia. It turns out that it was produced by Melbourne House, an Australian video game development studio. I noted with excitement that one of the designers was a woman, Veronika Megler. When I looked up her page, I was stunned to see that she’s a data scientist at Amazon. Given that I too worked at Amazon (at the time), I couldn’t help but look her up on the internal directory. And there she was! (She lives in the US now.) So what the hell – I sent her a message on the company Slack. She very kindly replied and was delighted to see my photos of her game as well as the others. She asked what we were going to do with them, and I admitted that we had no idea. She made the excellent suggestion that we could donate them to ACMI (The Australian Centre for the Moving Image), who have an ongoing effort to preserve old video games. We agreed, and she hooked us up with a friend of hers there and we ended up shipping them to Melbourne.

Pretty neat, eh?

YOW! 2024

As you may have gathered from some of my posts earlier in the month, this year I was invited by the folks at YOW! Conferences to come along on the tour as part of the team. I introduced the opening and closing keynotes in each city, hosted a track in Brisbane, and helped fill in with odd jobs where necessary. Along the way, I managed to see almost every single speaker on the agenda this year. I thought I’d share a photo and takeaway from every session I saw, to give you a flavour of the breadth and depth of content at YOW events. (These talks were all recorded and they’ll be up on YouTube in the new year.) We kicked off with Day One in Melbourne…

Nilesh Makwana presenting at YOW

Nilesh Makwana is from Perth and keynoted at all three conferences. His focus is on digital inclusion – how can we ensure that, when we build the glorious digital future, we don’t leave people behind? I was especially interested to hear about his work with the WA government on their Digital Inclusion Blueprint.

Suz Hinton presenting at YOW

I was super excited to hear from Suz Hinton, who I first met at a YOW event back in 2017. Suz always does something interesting, and this time she shared with us her project to use an ant farm to generate entropy for use with encryption. I knew about lava lamps, but ants are next level! One thing I learned is that ants don’t sleep like humans; they just take micro sleeps throughout the day. (As a result, Rodd and I now refer to “taking an ant nap” anytime one of us is tired and needs a rest.) I also learned a fair bit about encryption and how computers generate randomness from her talk.

Giacomo Cavalieri presenting at YOW

Next was my very stylish friend Giacomo Cavalieri, making his first trip to Australia. Giacomo is one of the core developers of Gleam, a new functional programming language. While I’m not a professional (or even amateur) programmer these days, I really liked how Giacomo talked about the importance of having a friendly developer experience. He certainly convinced more than a few attendees to give Gleam a shot!

Andrea Magnorsky presenting at YOW

This was from my friend Andrea Magnorsky‘s session on “bytesize architecture sessions.” I met Andrea not long after she moved to NZ earlier this year and even got a preview of one of her talks, so I knew she’d have a lot to offer the YOW audience. She talked about the difficulties in sharing information across teams, and she pitched her architecture session idea as something that can really help. She gave everyone practical advice for running a session and talked about the importance of having psychological safety and a growth mindset.

Yan Chernikov presenting at YOW

This guy is Yan Chernikov, aka Cherno. He’s a YouTuber and a developer, and right now he’s working on a long-term project to build his own gaming engine called Hazel. He talked us through his goals for the project: to have a fun challenge; to have content to teach people on his videos; and to eventually make his own game. While there are legit reasons for using off-the-shelf software, it can be overly complex and expensive. Yan talked about how he’s able to leverage Open Source libraries and work within constraints to make Hazel faster and simpler than the alternatives.

Ben Sadeghipour presenting at YOW

Ben Sadeghipour also goes by NahamSec, and he’s a full-time hacker, pen tester, and content creator. For the last few years, he’s made over a million dollars from bug bounty programs. Ben introduced us to the White Rabbit Neo LLM and showed us how he uses it to help hack into insecure systems. LLMs can assist with asset discovery, sifting through thousands of subdomains to identify targets. It can also help him generate testing data for Insecure Direct Object Reference bugs, as well as code for exploiting security holes like Java’s “zip slip” hack. It was an entertaining but slightly scary talk, as everyone got a peek at some of the tools being used by both the white hats and the black hats.

Allen Holub presenting at YOW

Kicking off Day 2 in Melbourne was Allen Holub, a software consultant and prolific author. Allen presented with no slides, simply annotating on a shared Miro board as he spoke. He introduced everyone to Larman’s Law, which explains why software companies are inclined to stick to the status quo rather than try new ideas that might benefit them. Allen explained why we need to speak the language of business, which is all about money and risk. Using the example of mob/ensemble programming, he showed how you can build a successful business case for experimenting with it. Big bang adoptions, he warned us, rarely succeed, and it’s impossible to copy and paste process from one org to another.

Pat Kua presenting at YOW

Next for me was Pat Kua‘s session on technical leadership. Pat’s an Aussie living in Berlin, and his focus was on the importance of technical alignment. Tech leadership, he said, is all about aligning people in a technical context, and you can do it regardless of your job title. Important skills are empathy, coaching, and conflict resolution. The best way to get started is to look for misalignment and neglect, which gives you a chance to own the issue and demonstrate leadership.

Joakim Sundén presenting at YOW

Joakim Sundén is one of the creators of the Spotify model for scaling via agile, autonomous teams. Joakim told us the fascinating story of the development of Spotify’s “Discover Weekly” playlist. The challenge was that even with a search engine and millions of songs available to them, many people (“lean back users”) still needed guidance on discovering new music. They had already developed a custom playlist as part of the “Wrapped/Year in Review” feature, so a team set about experimenting with it. Joakim talked about the many different things they tried, like the frequency, length, and cover art. Rolling it out to the entire user base introduced difficult scaling challenges, but the team had enough data to show that the bet was likely to pay off (and it did).

Steve Smith presenting at YOW

Steve Smith gave a deep dive session on Rust, focusing on the borrow checker. Steve said that many folks get excited about Rust but get stuck when it comes to garbage collection. Rust, he says, forces you to do the things you always said you were doing (but weren’t). This one was way over my head as a Rust newbie, but it’s always great to see someone really get deep into the technical weeds on a particular topic.

Edith Harbaugh presenting at YOW

Edith Harbaugh is the co-founder of LaunchDarkly, and her focus was on feature flags and how you can use them at every stage of the software development lifecycle. Feature flags can be used to gauge demand for a new feature, or to give early access for trusted beta users. They’re also useful for controlled release if you have a good feedback mechanism to spot when they are problems (like with the Crowdstrike outage), or to allow customers to opt in/out of bleeding edge deployments.

Holly Cummins presenting at YOW

The closing keynote at YOW Melbourne was from Holly Cummins, who works at Red Hat on the Quarkus team. Holly’s talk was all about efficiency, and how it’s killing both the world (in terms of waste and climate change) as well as us (in the form of burnout). Holly shared simple solutions to reducing waste, such as “LightSwitchOps” – her name for “turning things off when you’re not using them.” This can save you a lot of money and tests your resilience as well. She also spoke about the importance of efficiency in our code, and she pointed out that AI – which promises big efficiency gains – has a bias towards verbosity that can lead to code bloat. I loved the part of her talk about the importance of slack for human beings, which means idle time to rest our brains and sleep. Idle brains solve problems!

David speaking at YOW Brisbane

And then we were off to Brisbane! After the keynote, I went to David Khourshid‘s session on diagrams. David talked about the importance of different diagrams in making complex software more understandable for human beings. He gave a ton of examples and recommended tools, and promised that he wouldn’t traumatise us all with UML. 😂 To make a good diagram, he said, you need to think about the intent (why?), the audience (who?), and the scope (what?). The biggest mistakes people make with diagrams are drawing pointless, unlabelled arrows everywhere, and giving too much or too little detail. If we took nothing else away, he urged us to “LABEL YOUR ARROWS!”

MishManners presenting at YOW

Next I went to the very popular session on skills for the AI age by Michelle “MishManners” Duke. During times of big technological upheaval, she said, people always worry about their jobs. It happened during the Industrial Revolution, and it’s happening now. She said that the skills that will be needed by workers in the future are persuasion and negotiation, decision-making and ethics, adaptability, empathy and EQ, collaboration, creativity, and the ability to learn. The best way to develop career resilience is to use the tools yourself and keep up-to-date with what’s happening in the field.

Thomas playing the piano at YOW

The second AI talk of Brisbane for me was Thomas Vitale‘s highly entertaining “concerto for Java and AI”. Thomas’s side hobby is musical composition, and he showed us an example of building an application to help soundtrack composers using Spring AI. Along the way, he covered topics like mitigating malicious prompt injection, semantic search, vector stores, and retrieval augmented generation. As his finale, he used his application to help generate music for an action movie set on Mars! Very fun.

Rod presenting at YOW

My third AI talk of the day was Rod Johnson‘s on building an AI chatbot using Spring. Since he’s the creator of Spring, I was excited to see that he was mostly doing live coding for the whole session. Enterprise developers, he says, have an important role in making AI actually usable. One really useful tip he gave was to make use of Ollama, which allows you to run open source LLMs locally. He also talked about advisors and showed how they can be used to build a “toxicity guard” to keep your application away from topics you don’t want to address.

Rasmus presenting at YOW

I needed something to counter all the pro-AI talks, so I was glad to attend Rasmus Lystrøm‘s session on “how to lead AI transformation.” Rasmus said leaders need to ask themselves hard questions, like what are we racing towards and why? There’s a lot of FOMO and FUD around. He walked us through the approaches organisations can take towards AI, from waiting it out (your employees will just go around you and leak your data anyway); building your own (a hopeless endeavour as you can’t possibly keep up with the pace of innovation in the industry); creating an AI center of excellence (which is really just creating a new silo in your org); or signing up for a paid service (possibly low ROI and productivity gains). You can’t just announce a new tool, Rasmus said, you have to re-organise your entire company if you want to adopt AI and move towards full-stack, empowered teams.

Theodora presenting at YOW Brisbane

Theodora Bock was unable to travel, but she still delivered an entertaining (live!) presentation from her home in the US. She said that games are very good at education, and that learning is often an unintended consequence of play. She explained to us a project she worked on to create a gamified experience to teach astronauts how to use an ultrasound wand for the upcoming Artemis missions. It’s more interactive than reading a manual, and allows you to craft a progression curve as people learn. This was a fascinating topic, and she gave us several demos of the game she worked on. Very cool!

Lu presenting at YOW Brisbane

Lu Wilson had one of the most entertaining sessions on the whole agenda, starting with an explanation of how computer interaction models always seem to start with text and then move to a graphical canvas. But how will LLMs move to the canvas? Lu showed us many demos and experiments from their work at tldraw, like drawing a UI and then turning it into a working prototype with only the click of a button. Lu showed us all that we don’t really know yet what AI will look like beyond chat, but there’s a lot of fun stuff to get excited about.

Runar presenting at YOW Brisbane

Next were the talks that I track hosted. First up was Rúnar Bjarnason, who hails from Iceland but lives in Boston. Rúnar introduced us to Unison, a “friendly programming language from the future.” He talked about some of the challenges of Microservice architectures, like complexity of orchestration and deployment, added latency, and protocol versioning. Most of Microservice architecture work, he says, is not coding, but rather managing the “meta infrastructure” of builds and deployments. Unison, by contrast, describes complete computation and has dependency resolution baked in via implementation hash. He demoed how to deploy to Unison Cloud, and there was a lot of interest from the audience.

Marty presenting at YOW

Next was Marty Pitt, the creator of Taxi and Orbital. Marty started by talking about integration, and that it always seems to involve a lot of glue code that ends up tightly coupling data producers and consumers. His new approach is to build systems that connect on demand to solve a problem with no glue code. Taxi does this by capturing semantic metadata, allowing you to know that “this thing is the same as that thing.” Taxi can be embedded into API specs, and once it’s published, you can build a graph to figure out how to solve a problem. TaxiQL allows you to use semantics to query data, and Orbital is the query execution engine. He gave us a demo of how this worked, and again it seemed like something that was useful to a lot of the attendees.

Oscar Nierstrasz presenting at YOW

And now for the final city – Sydney! Oscar Nierstrasz is a retired professor in Switzerland who now works for feenk.com. Oscar told us that one of the problems with legacy modernisation is that systems are opaque, and even if you look at the source code or docs, they might not tell you the full story. Instead you need “moldable development,” which is using analysis tools to get the software to “talk to you.” He demoed some of the features of the Glamorous Toolkit, like using the object inspector to expose domain concepts. It’s all about asking questions and doing experiments.

Kris Jenkins presenting at YOW

Next was my friend (and fellow Kris) Kris Jenkins, host of the Developer Voices podcast. Kris’s talk was about types, and how they have a lot of information that can help you talk to your team and analyze your code from multiple perspectives. Kris talked specifically about algebraic data types and gave examples of how they help describe data, relationships, and context. Type signatures give clues to implementation, like revealing structure, flagging problems, and giving clarity of scope. And because they are machine readable, it makes the computer just a part of your team. I really loved Kris’s way of explaining things with lots of examples, and I learned a ton from this talk!

Trisha Gee presenting at YOW

I first met Trisha Gee when she presented at YOW many years ago and brought along her new baby. The baby was back with her this year but is now a pre-teen! 😳 Trisha is an IntelliJ IDEA power user, and her talk showed all the tips and tricks she’s learned that help her be more productive and stay in a flow state. Her talk had an interesting overlap to Holly’s keynote, in that she also talked about efficiency and productivity. I was particularly interested to learn about the SPACE Framework, which helps you to get away from vanity metrics. I also appreciated her rant about AI coding companions and whether they actually help you or just increase cognitive load.

Damian Brady presenting at YOW

In a neat bit of synchronicity, the next talk was from my buddy Damian Brady from Github. Damian started by talking about the evolution of AI-powered coding tools, and how moving from a separate chatbot to having something embedded in the IDE was really the killer app. Damian’s talk touched on many of the same topics as Trisha’s, including the SPACE Framework. He also introduced us to the Good Day Project, which mapped developer sentiment to Github metrics and showed that deep focus time is the #1 thing developers need to feel productive. Damian then showed a lot of examples of how Github Copilot can help developers save time. My favourite example was explaining regular expressions – those always trip me up.

Holly Cummins presenting at YOW

And then, guess what, I saw Holly Cummins present again! One of the speakers had to leave early, so Holly was drafted in to give another presentation. This one was all about optimisation, and getting us to consider the trade-offs in any planned optimisation project. She walked us through a lot of pitfalls and anti patterns, like leaning on intuition and making assumptions, and relying on leading indicators rather than lagging indicators (which are harder to change). She gave practical advice and tools for identifying places for optimisation, and reminded us that performance waste is actually harming the world. (Data centers use 1-2% of the world’s electricity.) So good performance actually makes us good too.)

Johan Janssen presenting at YOW

Johan Janssen is a software architect from the Netherlands, and his talk was a speed run through dozens of Java’s “hidden gems” (aka tools and libraries to make your life easier). He demoed loads of tools to help with testing, implementation, security, and builds. I’m not a Java dev, but if you are, I guarantee there’s something useful for you in this talk.

Unmesh Joshi presenting at YOW

Unmesh Joshi is a principal architect at Thoughtworks and author of the book Patterns of Distributed Systems. Unmesh explained how knowing patterns makes you an expert, and helps you acknowledge essential complexity while avoiding accidental complexity. He walked us through some common problems of distributed systems, like mapping keys to nodes or ordering requests across replicas. Patterns serve as a guide to achieving “platform sympathy,” which means aligning with a system’s design to gain optimal performance.

Josh Long presenting at YOW

And last but not least is my friend Josh Long. Josh is a developer advocate for Spring, and he’s one of the most entertaining presenters I’ve ever seen. He started by introducing us to his dog Peanut, who he described as a “terror,” and then proceeded to build an entire demo around adopting dogs. He went 100mph and had everyone laughing and jotting notes as he raced from topic to topic, including event-sourcing and CQRS. He’s like a virtuoso of live coding, and if you ever get the chance to see him – regardless of whether you’re a programmer or not – I guarantee you’ll have a wonderful time and learn something from him.

Me, Nilesh, and Steffen

Thank you again to Steffen and the YOW! team for inviting me to be a part of the event this year, and to all the speakers and volunteers who helped make the conferences possible. These events are a ton of work, but they’re such a great opportunity for Aussie developers to come together, learn from some of the smartest folks in the world, and build important connections across our industry.

Custom Bluesky and Mastodon usernames with your own domain

I recently went through the process of setting up custom handles/aliases for myself using my domain name on Bluesky and Mastodon. I figure I’ll share the steps here in case anybody else with a similar setup (WordPress on Amazon Lightsail) wants to do the same.

Bluesky

Simply follow the instructions that Bluesky have provided here. In Step 5, you will need to add a TXT record to your domain DNS. If you use Amazon Lightsail, click on the Domains & DNS option and then select the relevant DNS zone (in my case, web-goddess.org).

Lightsail console DNS zone

Then click on the DNS records tab and click the + Add record button.

Lightsail console DNS zone

Change the record type to TXT record and then put in the name and response provided by you by Bluesky. (The “host” is the “Record name,” and the “value” is the “Responds with.”) Click save.

Adding a new TXT record

Wait a little bit — in my experience, 30 seconds is usually sufficient — and then click that Verify DNS Record button in Bluesky. And then you’re done!

In my case, you can now find me at @web-goddess.org on Bluesky.

Mastodon

Mastodon is a slightly more involved process, and it doesn’t change your official server username but rather gives you an alias that you can give out. In my case, my current Mastodon account is @web_goddess@aus.social. However, if I give out an alias instead, then it doesn’t matter if I change servers in the future — you’ll still be able to find me. I was inspired by these posts by Phil Nash and Maarten Balliauw for how to do it.

First, open up a new browser tab and go to this URL, substituting your own Mastodon account values in there:

https://{instance}/.well-known/webfinger?resource=acct:{username}@{instance}

So in my case, I went to https://aus.social/.well-known/webfinger?resource=acct:web_goddess@aus.social. What you’ll get back is a blob of text (JSON). Copy that and set it aside for the moment.

Then go to the Lightsail console and click on the little terminal icon to Connect using SSH to your instance.

Lightsail console

A window with a terminal will appear.

Lightsail terminal

Now you need to go to where the WordPress files are stored for your site. Type in this command in the terminal and hit enter.

cd stack/wordpress/

Important note: The path above is for one of the newer WordPress Bitnami instances. If you have an older instance, the path to where your WordPress files are stored might be different.

Then you’ll need to create a new directory called “.well-known.” (Note the dot in front of the name.) Type in this command and hit enter.

mkdir .well-known/

Then go into that directory. Type in this command and hit enter.

cd .well-known

Now you will need to make a special file called webfinger. Type in this command and hit enter to open a text editor in the terminal.

nano webfinger

This is where you will paste in the blob of JSON text you copied from your Mastodon server. Copy and paste it straight into the editor, and then hit CTRL-X to exit.

The editor will ask if you want to “Save modified buffer?” Type Y for Yes, leave the name as webfinger, and hit enter to save.

You can then exit the Lightsail terminal and close the pop-up window.

exit

If everything worked correctly, you should now be able to go to your own domain and receive the JSON blob back by substituting your domain in this address:

https://{yourdomain}/.well-known/webfinger

In my case, I went to https://www.web-goddess.org/.well-known/webfinger in a browser tab and verified that the JSON was returned.

And that’s it! What does this actually mean? It means I can tell people that my Mastodon username is @kris@web-goddess.org, and if they type that into a search box on Mastodon, it will point them to my official account.

Mastodon search

If I change servers in the future, I’ll just have to update the JSON blob with the correct values from my new Mastodon server, and people will continue to be able to find me from the alias.

Palia on Mac

I’ve been casually playing Palia on my Switch for the past couple months. I’d heard it described as a “cozy” game, and I’m all about the cozy. You are a human in a fantasy realm, and you build a little house and farm. You hunt; you craft things; you cook food; you go fishing. There are some quests and puzzles along the way, but you don’t have to do those if you don’t want to. Nothing attacks you, and if you do manage to kill yourself (like by falling into deep water) it just resets you right nearby with no damage. I’m enjoying it.

Playing on the Switch has some downsides though. Eventually I noticed that in the chat, other players were sharing where special items could be found. But typing messages with a game controller is painful. It seemed like most other people were probably playing on their PCs. But I don’t have a PC. I have a Mac mini, and Palia doesn’t have a Mac client yet.

Palia on Mac launcherBUT! Apparently this is no longer a problem these days? I found some Reddit posts where people mentioned getting it to work on Mac using Whisky, which seemed doable. Then I found this Palia on Mac launcher that handles a lot of the setup for you. I kicked it off and installed Whisky, and followed the steps to setup a “bottle.” First problem: my bottle disappeared. I’m not sure what the issue was, but I tried it several times and they’d just vanish (but I could see the folders in the Finder). Eventually I reinstalled Whisky directly (rather than going through the launcher), and I went into the Finder and deleted the extra bottles. Suddenly my original one appeared. Yay! Then I went back to the launcher to finish the setup and download the game files. Second problem: the downloads would seem to hang with, like, no visual feedback what was happening. It looked like other folks on Reddit had similar issues, and that the key was just to keep restarting the launcher and it would continue where it left off. After leaving it alone for an hour or so today, it managed to get everything and the “Run” button appeared!

Palia on Mac

The game looks fantastic compared to the Switch. Mac mini is a lot more powerful, obviously! I was prepared for some glitchiness, but it was really minimal. I had one crash, but otherwise everything worked really smoothly. Rodd suggested I change it to play in a window rather than full screen, as on my wide monitor it was actually making me motion sick. But I’m going to just try to get used to it, because it looks so gorgeous.

At first I tried playing with keyboard and mouse, which took some getting used to. I just don’t have the muscle memory yet. I could see that it was really great for some things – choosing stuff from your inventory, moving around the map, chatting to other players – but for other things it felt a bit awkward. And fishing sucked – there was so much lag that I lost every fish I hooked. Eventually I hooked up a Bluetooth controller, and that gives the best of both worlds. I can run around and catch fish, but also easily switch over to the keyboard for tasks that need it.

Anyway, if you want to try it out, you can use my “Refer a friend” code and I might get some in-game swag for it. The game is free to play, but apparently you can use real money to buy, like, funky outfits and stuff. (You don’t need to though; I haven’t paid a cent!) Let me know if you start and I’ll friend you in there!

Mac mini + duckyPad

duckyPadWhen I handed back my work laptop a few months ago, it occurred to me that I needed a new computer. My 2015 MacBook Air is still going strong but it’s many, many years old, and I knew it would struggle with streaming or playing games. So off I went and merrily started pricing new MacBooks when I suddenly wondered… maybe I don’t actually need a laptop?!  It was a strange feeling. But I’ve got the Air and an iPad, and it’s not like I need to do work on the road. So I ended up choosing a Mac mini M2 Pro, and so far I’m really happy* with it.

I realised today though that I needed to update my duckyPad. Many of my shortcuts were related to work and therefore obsolete, and I also noticed that a few macros weren’t working anymore. So I downloaded the latest Mac ARM Configurator app and fired it up. Unfortunately it failed to connect to the duckyPad. Hmmm. I went through the troubleshooting and added some permissions, but that didn’t fix it. I also dug around in the official Discord to see if anybody had similar issues. I figured maybe there was some issue with the latest Macs, so my next approach was to plug it into the old MacBook Air, which still had an old version of the Configurator on it. That’s when I remembered that with the old version, you didn’t connect to the duckyPad directly but instead used an SD card reader. D’oh! As soon as I did that, it told me that my firmware was out-of-date. Makes sense.

I went back to the Mac mini and followed the instructions for updating the firmware, which included using Brew to install a utility. That worked perfectly and I was able to then flash the firmware, and as soon as that happened I was able to directly talk to the duckyPad. Brilliant! I was able to remove all the old work macros, set up some new ones, and fix the old ones. (It turns out that I was using “HOLD” in some of them, which has since been replaced by “EMUK.”) The only challenge is that the Configurator is oddly unresponsive when you’re editing. I had to often click multiple times to get it to register or to change focus. Not sure why that is. It works; it’s just super super slow. When I was done, I hit “Save” and the new config was written to the pad.

And incidentally – there’s a new duckyPad Pro coming! It’s got more keys, and knobs. I don’t really need it, but it looks cool.

* My only complaint about the Mac mini is that without a Mac laptop or keyboard, I don’t have Touch ID. That gets really annoying when typing my long master password into Strongbox. I’ve seen a few folks though that have hacked a standalone Touch ID button though… A project for another time. 🙂

Video games I loved recently…

I’ve been on a real gaming tear this year. Back in January I wrote about Dave the Diver and Unpacking, and I thought I’d mention a few more Nintendo Switch games that I’ve been playing lately and really enjoyed:

  • Yoku’s Island Express – Rodd found this one recommended on Reddit for people who like no-stress platformers. You play a little bug postman who pushes a ball around an island, and it’s like a platformer crossed with pinball, two things I LOVE. The artwork and world building is really cool too.
  • Steamworld Dig 2 – Another fun platformer where you play a little robot exploring a (mostly) underground world, digging minerals and trying to solve a mystery. There were one or two places were I got stuck and had to look up how to solve something, but I managed to defeat the end boss today all on my own. Good times!
  • Palia – Anybody else playing this? I literally just rolled a character tonight. I’ve heard good things about it…

We also spent some time playing Breath of the Wild (a friend lent it to me) and I can see why it won so many awards. It just wasn’t for me, though. I struggled with all the different mechanics, and every time I picked it up I had to relearn how to do everything. There was just too much. I like something a bit more casual and low stress. If you’ve got recommendations, please share them!