# 65 : Perspective Shift: Viewing the Developer's Dual Identity Through the Airport Debate

Published on

Get weekly handpicked updates on Swift and SwiftUI!

Weekly Comment

I spent the weekend catching up with several friends, one of whom is currently involved in managing the construction of a new airport. During our gathering, we had a lively discussion about the future of our city’s airports.

My city has a unique setup—the existing airport sits in the heart of the urban area, no more than 10 kilometers from any of the main districts. This ideal location has long made travel remarkably convenient for residents. However, this very location has become a constraint on the airport’s growth: for the past decade, the airport has been running at full capacity, with little room to open new routes. Meanwhile, dense residential zones surrounding the airport limit its runway classification and potential expansions.

The new airport under construction is the largest offshore airport in the world. It promises a higher runway classification, greater operational capacity, and a fully planned airport economic zone, incorporating logistics, warehousing, and other complementary facilities. From a strategic urban development perspective, the significance of this new airport is undoubtedly monumental.

Still, despite the fact that the new airport’s distance to the city center is noticeably shorter compared to other airports of similar scale, it’s undeniably farther out than the current setup—making many frequent flyers uneasy. They look forward to the growth opportunities the new airport could bring, yet they also wish to preserve the old airport’s convenience.

Ten years ago, when I used to fly dozens of times a year, I absolutely would have supported keeping the old airport. But as my flight frequency has gone down, I now firmly back the government’s decision to close the old airport and fully develop the new one. This shift in my perspective has been particularly enlightening.

Our perspectives often depend on where we find ourselves. As developers, we hope users will understand a product’s shortcomings and grant us time and space to improve it. But when we switch to the user’s viewpoint, we naturally expect a flawless product experience.

Perhaps this constant role-switching and the resulting collision of perspectives is precisely what drives continuous product improvement and industry advancement. If we, as developers, regularly step into our users’ shoes during development, our products will likely become more aligned with user needs, more responsive to their concerns, and ultimately help guide the entire industry toward a better future.

Recent Selections

Understanding _VariadicView

At WWDC 2024, enhancements to ForEach and Group provided developers with direct access to ViewBuilder subviews, making custom container construction more convenient. However, such functionality has existed since the inception of SwiftUI. In this article, Kyryl Horbushko deeply explores the hidden _VariadicView family and its related protocols, showcasing how these internal APIs enable dynamic layouts. Additionally, he provides practical examples for adapting to earlier system versions by combining old and new APIs.

Using Copilot to Write a Raindrop Audio Synthesizer Using AVAudioEngine

Matt Gallagher explores the capabilities of VSCode + Copilot through a raindrop audio synthesizer project. The article meticulously documents the entire process, from crafting prompts to optimizing code, and critically evaluates the utility of AI programming assistants. Gallagher highlights Copilot’s strengths in working with unfamiliar SDKs, cross-language code migration, and algorithm implementation. However, he also points out significant issues with code quality, including redundancy, lack of abstraction, and poor adaptation to platform-specific requirements.

How to Keep Your macOS App’s Menu Bar Item Running after Quitting the App

By default, macOS applications developed with SwiftUI fully terminate upon quitting, including their menu bar items. Pol Piella Abadia shares how to retain a menu bar item even after closing the app’s main window. The article details how to use the applicationShouldTerminate method in NSApplicationDelegate and configure TerminateReply to prevent the app from fully exiting. It also explains how to properly manage the Dock icon and app switcher visibility to ensure intuitive user behavior and a better experience.

Swift’s Hidden Gem: Understanding the @retroactive Keyword

With the introduction of SE-0364 in Swift 6, developers may encounter compiler warnings when adding protocol conformances to non-owned types. Using @retroactive explicitly can avoid conflicts and ensure code safety. Omar Elsayed demonstrates this feature through an example of adding Identifiable conformance to UIImage and discusses its use cases and best practices.

Concurrency Step-by-Step: Stateful Systems

In the third article of the “Concurrency Step-by-Step” series, Matt Massicotte uses a realistic example to delve into critical aspects of Swift concurrency. He focuses on managing reentrancy and the resulting logical races when using Actors to avoid data races, providing insights and practical strategies for stateful systems in concurrent programming.

Getting Started with MongoDB in Swift using MongoKitten

MongoDB is a popular NoSQL database that stores data in flexible, JSON-like documents. MongoKitten, developed by Joannis Orlandos, is a pure Swift MongoDB driver built on Swift NIO, offering type-safe queries and Codable support. In this article, Orlandos explains how to integrate MongoDB into Swift projects using MongoKitten, covering database connection setup, BSON data handling, and common database operations.