Speed Up Firebase Cold Starts with Firestore REST Calls
One of the benefits of using a serverless backend is that you only use resources when you actually need them. When using Cloud Functions, this means you need to ensure your code can start up as quickly as possible, which means you should trim down your dependencies as much as possible.
The Firestore Admin SDK in Cloud Functions now has a flag (
preferRest) that allows you to use HTTP/1.1 REST instead of gRPC. Since gRPC is a pretty heavyweight dependency, this significantly reduces startup times. This comment in the respective PR explains this in more detail.
The team at Ayrshare have put together a quick sample to show how this works. Neat!
If you use Cloud Functions in your app, give this a try and send us your feedback.
SF Symbols for GitHub, Mastodon, and Discord
Last week, I shared an article by David Smith about how to create your own SF Symbols. Jeremie Berduck created SF Symbols for GitHub, Mastodon, and Discord, and they look amazing!
Observing the content offset of a SwiftUI ScrollView
Even after more than 3 years, there are areas in SwiftUI that aren't fully scoped out yet, and this article by John Sundell couldn't be timelier - I am working on an app in which I need to observe the current offset of a scrollview.
AI and ML
A Trip to TikTok + ChatGPT’s Origin Story + Kevin Systrom’s Comeback - Hard Fork
Some very interesting insights into why the launch of ChatGPT became "a moment of catastrophic success", as Casey Newton puts it.
New AI classifier for indicating AI-written text
In issue #25, I shared two articles about detecting text written by an AI, and OpenAI has now released their very own AI classifier. Given this is an early release, it does have a few limitations, such as potentially labelling human-written text as being written by an AI, and not being able to work well on non-English texts. That being said, it seemed to work well on a few texts that I presented it with.
These things will become more and more important in a world in which anyone has access powerful AI tools.
Houston AI - an AI assistant for Astro
The Astro team is experimenting with a GPT-3 powered AI assistant that can answer questions about Astro. I find the idea of using highly specialised AI assistants very compelling, as training an AI based on the SDK documentation and other developer material allows teams to have some control over the assistant's knowledge base.
Would you use an AI assistant to get your programming questions answered? Would you consider this a useful thing for Firebase?
Vale.sh - A linter for prose
If you create written content - be it a book, a blog post, or documentation for an SDK - you will be aware that some outlets might have a formalised style guides (like this one by Google)
Others might not (like your personal blog), but that doesn't mean your personal blog wouldn't benefit from having a style guide!
Vale is a linter for prose. It doesn't teach you how to write (there are other tools for that), but it rather focuses on the style of your writing, and helps to ensure consistency across multiple authors (or even to be consistent with yourself).
Too learn more about how Vale can help you, check out Introducing Vale, an NLP-powered linter for prose by Joseph Kato.
The Xcode editor extensions in EditKit Pro by Aryaman Sharda look super useful, and definitely like something the Xcode team should consider integrating.
It seems like this was a rather slow week for iOS/Swift related blogs (I did see a couple of folks write about setting up their blogs or changing their blog engine, but that's not the kind of material I felt worth sharing with you).
Just the other day, Vincent launched a "video newsletter" - essentially a live stream in which he reads and explains a couple of blog posts. I think it's an great idea for diving deeper into a topic or explaining it to a different audience. On the other hand, a written newsletter has the advantage of being easily skimmable.Peter