Advent of SvelteKit highlights and rate limiting
Hello! I’ve got two new posts to share with you this week, capping off my most productive blogging month… ever? We’ll see if I can keep it up.
First, over on the ol’ blog I finally published my Advent of SvelteKit 2022 wrap up. I had been meaning to publish this for a while so that I had a record of this project outside of my tweets/toots, but writing something up about each of the 17 demos was an intimidating bit of writing. However, late last week I cracked it – why not just write up a few of my favorites, and link to the others at the end?
So that’s what I did. It’s still rather long, but hopefully I was able to focus on the more interesting parts and relegate the other ones to a bulleted list at the end. Among the demos I went more in-depth on are:
- a progressively enhanced search form (which shares a lot of the concepts from my last post) with a debounced submission
- safely using random numbers with SSR and hydration to light up a Christmas tree
- a media player that works with and without JS
- using details/summary for a joke punchline reveal
Lemme know what you think!
The other post I wrote last month (though it was published February 1) was a guest post for Upstash, a serverless Redis host I’ve written for in the past. I showed how you can rate limit a SvelteKit form action using their @upstash/ratelimit
package. Rate limiting will limit the number of calls users can make to your server, which is especially important if your endpoint does intensive work or calls an external API that charges you based on usage. Give it a read here.
Reading list
Here are some articles I’ve enjoyed lately.
I vaguely knew that you shouldn’t abuse details/summary for accessibility reasons, but “A details element as a burger menu is not accessible” from Gerardo Rodriguez is a great overview as to why. It links to this also-great post from Melanie Sumner with even more… details 🥁.
Josh Comeau, Clever Code Considered Harmful: “In the context of a shared codebase, good code is simple code. Code that doesn’t do anything fancy. Code that makes minimal use of abstractions. Code that you’d use to explain fundamental concepts to novices.”
A decade-old post from Brad Frost that’s still relevant, On Personal Branding: “Establish what things you truly care about, and use those as the way you introduce yourself to the world. You’ll be amazed how quickly you find yourself engaged in conversation with people who care about similar things.”
Cory Doctorow on Tiktok’s enshittification: “Here is how platforms die: first, they are good to their users; then they abuse their users to make things better for their business customers; finally, they abuse those business customers to claw back all the value for themselves. Then, they die.”
Finally, the yearly game music festival MAGFest is releasing performance videos from the most recent event. The 8-Bit Big Band’s performance is well worth a watch/listen if you like game music, jazz, or just fun music.
Cat update
No cats this time, just the destruction they caused at 2 in the morning, when I heard a loud crash followed by two cats running away as fast as they could.
Until next time! As always, you can find me on Mastodon, Twitter, and my personal site!