Firebase
Firebase Auth & Sign in with Apple: support for full name
Good news for all iOS developers who use Firebase Authentication in their apps - you can now easily set the user's display name to the full name you get from the Sign in with Apple API.
The docs and quick start have been updated, and I will record an updated video soon.
Swift
Building DSLs in Swift
General purpose programming languages (GPLs), like Swift, are great tools that can be used to implement almost any kind of software. However, this flexibility often comes with a cost. Particularly for problem domains that are characterised by a very strong structure, you will find that GPLs are not ideal.
If you've ever run into this situation, I recommend checking out Apple's WWDC 21 session about building DSLs with Swift:
Some problems are easier to solve by creating a customized programming language, or “domain-specific language.”
I couldn't put this any better. DSLs are very powerful if used correctly, and can elevate developer productivity on a complete new level.
The most well-known DSL written in Swift is SwiftUI itself (Apple introduced a ton of features to the Swift language to make this possible), and it has made building UIs a lot easier. For a more self-contained example, check out issue issue #31, in which I talked about Setting - a DSL for building Settings screens for iOS apps.
Enabling Upcoming Swift Language Features
We all know feature flags - either because we use them in our own apps, or (and this is likely more common) because we use apps that make use of feature flags. Usually, developers will put new features behind a feature flag, and then gradually roll it out to users of their app.
For the Swift compiler, Apple has implemented something similar, but instead of controlling it from their end (which would be a really bad experience for developers), we get to enable new and upcoming features as we see fit.
In his article, Marcel Voss explains how you can use this to enable some of the upcoming Swift 6 features in the Swift 5.8 compiler.
I love the title of the Swift Evolution proposal that made this possible: SE-0362: Piecemeal adoption of upcoming language improvements - it refers to one of the reasons why the Swift team decided to build this feature:
- Enabling developers to use new features sooner rather than waiting for Swift 6 to ship
- Gathering feedback from the community, and enabling the team to fine-tune the features
- Enabling developers to gradually adopt new features over time, instead of having to migrate large chunks of their code when Swift 6 is released
AI and ML
Creating a SwiftUI Movie Recommendation app with GPT 4
Xoogler Morten Just (of Rotato fame) used GPT 4 to create a movie recommendation app, and is now working through the App Store submission process.
If you're curious, here is the source code, all in one file (Morten said this made his life easier when iterating on the code, copy & pasting it from ChatGPT to Xcode).
Reading the thread, it seems like GPT-4 is a lot better at producing code than GPT-3.5, but you still need to know what you do.
Will AI Actually Mean We’ll Be Able to Work Less?
With AI being able to perform many creative tasks as good as, and sometime even better than humans, it was only a question of time until people started wondering whether their jobs are still safe.
Personally, I think that AI is a tool like any other piece of technology, making it easier for us to do our work.
In this article, Elizabeth M. Renieris writes that most technology that was supposed to allow people to work less eventually resulted in them working the same amount of time (or even more):
Known as Parkinson’s law, it’s the idea that “work expands so as to fill the time available for its completion.” We have all experienced how meetings scheduled to last an hour will stretch to fill the time allotted.
On a related note, a group of OpenAI researchers wrote a paper about the potential impact of GPTs on the labor market (titled GPTs are GPTs: An Early Look at the Labor Market Impact Potential of Large Language Models) and estimated that "approximately 80% of the U.S. workforce could have at least 10% of their work tasks affected by the introduction of GPTs, while around 19% of workers may see at least 50% of their tasks impacted".
Now, keep in mind that impacted does not necessarily mean they will be made redundant. Your job will be impacted even if you use GPTs as a tool to make you more productive, or to inspire your creative work.
Can ChatGPT write better SwiftUI code than you?
This video by Paul Hudson nicely fits with the previous article: he compares the code ChatGPT writes for a simple prompt "implement a working analog watch" with a hand-crafted implementation.
The quality of the ChatGPT implementation is mixed, to put it nicely. The manual implementation works a lot better, and looks more beautiful.
Paul concludes that GPTs are a tool to help you, but not replace you: they can help explore alternatives, explain code, suggest corner cases for tests, etc.
Productivity
Xcode Tip: filter to show modified files only
This is yet another hidden gem in Xcode, and super useful when you're working in a large code base.
It reminds me of Eclipse Mylyn, an Eclipse plugin implementing a task-focused interface: it went beyond just filtering the modified files, and filtered all other parts of the IDE as well (errors, warnings, call hierarchy, inheritance hierarchy, etc.), and - maybe most importantly of all - it knew which other files were related, and included them in the filter as well.
Conferences
Text-based presentation tools
Josh Holtz posted about DeckUI, his Swift DSL(*) for presentation slide decks this week, and it reminded me of some other text-based presentations tools I've tried in the past:
If you're thinking about speaking at a conference, and you don't want to waste a lot of time building a slide deck with Google Slides, Powerpoint, or Keynote, give those tools a try. And if you use a mind mapping tool that can export Markdown (like Mindnode), you'll be able to save even more time.
(*) I just realised this is yet another article in this weeks' issue that would fit into more than one category...
Podcasts
16 Sunsets - A Podcast about the Space Shuttle Program
Kevin Fong, the host of the BBC podcast 13 Minutes to the Moon, is running a Kickstarter campaign to fund a podcast about the Space Shuttle program.
13 Minutes to the Moon is one of my favourite podcasts: it is brilliantly narrated, has amazing audio, features music by Hans Zimmer (!!!), and Kevin has one of the most amazing-sounding voices. I would literally listen to him read the yellow pages.
If you're remotely interested in space, you should definitely consider backing this Kickstarter campaign. The extras sound really cool, too: one of the tiers even gets you a ticket to an in-person listening launch event and after party.
Computer History
Stonehenge of PC design, Xerox Alto, turns 50 this month
It is mind-boggling to think that - even though the Xerox Alto had a graphical user interface and incorporated networking - it wasn't until much later that the first personal computers with a graphical user interface became available to the general public.
This article also discusses the myth that Steve Jobs and some Apple employees dropped into the Xerox PARC one day, to steal Xerox' ideas.
If you ever get a chance to visit the Computer History Museum in Mountain View, make sure to go - not only do they have a Xerox Alto o display, but also an Apple 1.
Comment
I have just returned from Apprise in Oslo, and I am still amazed that this was only the first year this conference ran! It was so well organised, had a really great speaker line-up (with fallback speakers - how smart is that!), and an amazing audience. From my conversations with attendees, it seems like people really appreciate having a conference in Scandinavia. The conference ended with a game night, which was a nice way to socialise and get to know people in a relaxed atmosphere. If you get the chance to attend Apprise next year, you should definitely go.
In other news, the tech industry seems to have gone into AI overdrive (and yes, I am working on some AI features as well - more on that once I can share more about it), and I included some AI-related linked in this issue.
Peter 🔥