Fatbobman's Swift Weekly #047
Societal Progress Through the Lens of Driver's License Medical Examinations
Weekly Comment
Societal Progress Through the Lens of Driver's License Medical Examinations
A week ago, I received a notification from the Traffic Police App informing me that it was time to renew my driver's license. A decade has passed since my last renewal, during which both the regulations governing licenses and the methods for conducting medical examinations have undergone significant changes.
In recent years, the traffic police department has been actively promoting contactless self-service medical examination systems. Influenced by the COVID-19 pandemic, this examination method has gradually become mainstream. In my city, there are now about 20 self-service examination stations, while only three traditional manual inspection points remain.
However, self-service examination equipment cannot fully accommodate the needs of all drivers. Due to my color vision deficiency, I can only opt for manual testing. Although Chinese traffic regulations allow individuals with color vision deficiency to hold a driver's license (only red-green color blindness is disqualified), as a veteran driver with 28 years of experience, I often had to repeatedly explain my condition to doctors during past examinations (as color blindness test cards were the only available testing method) to prove that I could correctly distinguish colors. I expected similar trouble this time, but after understanding my situation, the doctor simply brought out a bunch of colored pencils and asked me to pick out the red and green ones. This seemingly small change delighted me. It not only reflected a more nuanced implementation of the law, improved the examination experience for specific groups, increased efficiency, but also eliminated the possibility of power rent-seeking - truly killing multiple birds with one stone.
On my new license, the next renewal (medical examination) date is marked as 20 years later. This is because by then, I will have reached the age threshold requiring annual examinations. At first glance, annual checks seem troublesome, but upon careful consideration, given the rapid development of autonomous driving technology, the regulations, testing methods, and approaches are bound to undergo revolutionary changes in 20 years.
In a few years, we may witness a major transformation of the driver's license system: shifting from the current classification based on vehicle size (function) to one based on the vehicle's autonomous driving capabilities. Meanwhile, the medical examination method might evolve from the current specific self-service equipment to convenient testing based on personal smart devices. Imagine a future where we can complete a comprehensive driving adaptability assessment through smartphones or wearable devices, offering both convenience and real-time monitoring of driver conditions to ensure road safety.
Renewing a driver's license may seem like a small matter in life, but through this tiny window, we can glimpse a microcosm of social change. In recent years, the comprehensive digitization of various documents such as ID cards, driver's licenses, and medical insurance cards has quietly transformed our ways of living, working, socializing, and traveling. These changes have brought tangible conveniences to people's lives.
I eagerly embrace these advancements while looking forward to seeing more humane adjustments like this color vision test. In today's rapidly developing technological era, we should not forget to focus on the needs of each individual, ensuring that social progress is imbued with warmth and human care.
Previous Issue|Newsletter Archive
If you appreciate my work and want to promote your product to the Swift and iOS developer community, sponsoring my platform could be an excellent opportunity for you.
Your support through Patreon, or Buy Me a Coffee helps keep this newsletter and blog running. Thank you for finding this content helpful!
Recent Selections
Update: Mastering TipKit
At WWDC 2024, the TipKit framework was significantly enhanced. This series of articles (including the Advanced Edition) has been thoroughly revised based on the latest updates. In addition to introducing new features such as TipGroup and network data synchronization, it further clarifies some fundamental concepts, such as the identifier-based Tip recognition mechanism (Tip reuse) and the independence of events from Tips.
Why We All Love the Gucci App on VisionPro
It has been half a year since the launch of Apple Vision Pro, and developers have been continually exploring and creating applications that cater to the nuances of this platform and user needs. Among many trials, the Gucci app stands out with its unique design and narrative approach, setting a new benchmark for fashion and lifestyle applications. Puffinwalker deeply analyzes the allure of the Gucci app in two articles (the second part) and compares it with other similar applications on the market, discussing why users often refer to "Gucci" as a high standard when experiencing other excellent apps.
Impress at Job Interviews by Inspecting their App Bundle
The .ipa
file is the packaging format for iOS applications, short for iOS App Store Package. After developing an iOS app, developers typically package all related files into an .ipa
file and upload it to Apple's App Store or distribute it through other means. In this article, Jacob Bartlett explains in detail how to obtain and analyze .ipa
files and optimize them. He believes that mastering these skills can help developers showcase their expertise during technical interviews, thereby making a lasting impression on interviewers.
In last week's article Profiling App Size on iOS, Alexey Alter-Pesotskiy demonstrated methods for detailed analysis of the size of apps or SDKs using other tools.
Send Data Between iOS Apps and Extensions Using Darwin Notifications
Darwin notifications provide a system-wide communication mechanism on iOS devices, particularly suited for transferring information between apps and their extensions. Unlike NSNotificationCenter, which is limited to intra-app communication, Darwin notifications can work across processes but do not support sending notifications with additional data (like a userInfo dictionary). In this article, Rizwan Ahmed not only explains in detail the workings and implementation of Darwin notifications but also highlights their importance and practicality across the app ecosystem.
Using Custom Symbols in iOS 18's Control Center Widgets
iOS 18 introduced the ability for apps to create their own Control Center widgets. Quentin Zervaas discusses how to use the SF Symbols system to convert ordinary icons into system-compliant custom symbols. This involves using specialized tools (like SwiftDraw) and setting up the proper asset directories for the correct integration and display of symbols. Through these steps, developers can offer a more personalized and dynamic visual experience for their Control Center widgets.
Init() to Win It
The declarative nature of SwiftUI often misleads developers into overlooking the necessity of custom view type initializers, thus fostering a notion that view type initializers are superfluous. In this article, Danny Bolella addresses this misconception and delves into the complexity of SwiftUI view type initializers. The article emphasizes that even within the streamlined framework of SwiftUI, properly managing initializers and state is crucial for building efficient and fully functional apps.
Working with UDP in SwiftNIO
UDP is a simpler protocol than TCP, as it does not perform delivery confirmation, thus providing higher speed in data transmission, though it may result in data loss. In this article, Joannis Orlandos thoroughly explores the differences between TCP and UDP and guides how to build a UDP server using SwiftNIO. The article demonstrates how to implement a simple UDP echo server that receives data packets, reads string content, and sends it back to the client reversed.
肘子的话
从驾照体检看社会的发展
一周前,我收到 12123 交警 App 的提醒,告知我需要更换驾照了。距离上次换证已经过去了十年,这期间,无论是有关驾照的法规还是驾照体检的方式,都发生了显著的变化。
近年来,交警部门大力推广非接触式自助体检系统。受新冠疫情的影响,这种检验方式已经逐渐成为主流。在我所在的城市,目前约有 20 个自助式体检站,而传统的人工检查点则只剩下了三个。
然而,自助体检设备并不能完全适应所有驾驶员的需求。由于我患有色弱,只能选择人工检测。尽管中国的交通法规允许色弱者持有驾照(仅红绿色盲不符合要求),但作为一个已有 28 年驾龄的老驾驶员,在过去的多次检测中,我常因颜色辨别问题而需要反复向医生解释( 因为仅有色弱测试卡一种检测手段 ),以证明自己能够正确分辨颜色。本以为这次检测还会有类似的麻烦,但医生在了解我的情况后,直接拿出了一堆彩色画笔,让我从中挑选出红色和绿色即可。这个小小的变化让我感到欣喜,它不仅体现了法律执行层面的精细化,改善了特定群体的检测体验,提高了效率,更杜绝了权力寻租的可能,可谓一举多得。
在我的新驾照上,下次换证(体检)日期被标注为 20 年后。这是因为届时我的年龄已达到了每年一检的门槛。乍一看,每年一检确实很麻烦,但仔细一想,随着自动驾驶技术的迅猛发展,20 年后的法规、检测方式和手段一定会发生革命性的变化。
再过几年,我们或许将见证驾照体系的重大转型:从现今基于车辆尺寸(功能)的等级区分,转变为依据车辆自动驾驶能力来划分。与此同时,体检方式也可能从当前的基于特定自助设备,演变为基于个人智能设备的便捷检测。想象一下,未来我们只需通过智能手机或可穿戴设备,就能完成全面的驾驶适应性评估,既方便快捷,又能实时监测驾驶员状态,确保道路安全。
更换驾照看似生活中的一件小事,但透过这个微小的窗口,我们可以窥见社会变迁的缩影。近年来,身份证、驾驶证、医保卡等各种证件的全面电子化,悄无声息地改变着我们的生活、工作、社交和旅行方式。这些变革给人们带来了实实在在的便利。
我欣然拥抱这些进步,同时也期待看到更多类似本次辨色能力检查这样的人性化调整。在科技飞速发展的今天,我们不应忘记关注每一个个体的需求,让社会的进步更具温度和人文关怀。
如果您发现这份周报或我的博客对您有所帮助,可以考虑通过 爱发电,Buy Me a Coffee 支持我的创作。
近期推荐
更新:掌握 TipKit
在 2024 年的 WWDC 上,TipKit 框架功能得到了显著的增强。本系列文章(包括进阶篇)已根据最新的更新进行了全面修订。除了新增了 TipGroup、网络数据同步等内容,还进一步阐明了一些基础概念,如:基于标识符的 Tip 识别机制(Tip复用)、事件与 Tip 的独立性等。
🪜 为什么大家都喜欢 VisionPro 上的 Gucci 应用 ( Why we all love Gucci app on VisionPro )
自 Apple Vision Pro 发售以来已过去半年,开发者们在此平台上不断探索并创造出更适合这种设备和用户需求的应用。在众多尝试中,奢侈品牌 Gucci 的应用因其独树一帜的设计和叙事方式而显得格外突出,为时尚和生活方式应用设立了新的标杆。Puffinwalker 通过上下两篇文章(下篇)深入分析了 Gucci 应用的魅力,并与市场上其他类似应用进行了对比,探讨了为何用户在体验其他优秀应用时常会以“Gucci”作为高标准的参照。
🪜 在求职面试中通过检查他们的应用程序包来给人留下深刻印象 ( Impress at Job Interviews by Inspecting their App Bundle )
.ipa
文件是 iOS 应用程序的打包格式,全称为 iOS App Store Package。开发者在完成 iOS 应用的开发后,通常会将所有相关文件打包成 .ipa
文件,并上传到 Apple 的 App Store 或通过其他方式分发。在本文中,Jacob Bartlett 详细介绍了如何获取和分析 .ipa
文件,并进行优化。作者认为,掌握这些技巧可以帮助开发者在技术面试中展示其专业能力,从而给面试官留下深刻印象。
在上周的另一篇文章 Profiling app size on iOS 中,Alexey Alter-Pesotskiy 展示了使用其他工具对应用或 SDK 大小进行详细分析的方法。
使用 Darwin 通知在 iOS 应用和扩展之间发送数据 ( Send data Between iOS Apps and Extensions Using Darwin Notifications )
Darwin 通知为 iOS 设备上的不同进程提供了一个系统范围内的通信机制,特别适合于应用和其扩展之间的信息传输。与仅限于同一应用内部通信的 NSNotificationCenter 不同,Darwin 通知能够跨进程工作,但它不支持发送带有额外数据(如 userInfo 字典)的通知。在本文中,Rizwan Ahmed 不仅详细介绍了 Darwin 通知的工作原理和实现方法,还强调了它在整个应用生态系统中的重要性和实用性。
在 iOS 18 控制中心小部件中使用自定义符号 ( Using Custom Symbols in iOS 18's Control Center Widgets )
iOS 18 引入了允许应用创建自己的控制中心小部件的功能。Quentin Zervaas 在本文中介绍了如何利用 SF 符号系统将普通图标批量转换成符合系统要求的自定义符号。这涉及到使用专门的工具(如 SwiftDraw)和设置适当的资源目录来实现符号的正确集成和显示。通过这些步骤,开发者可以为他们的控制中心小部件提供更加个性化和动态的视觉体验。
🪜 赢在初始化 ( init() to Win It )
SwiftUI 的声明性特征常常误导开发者忽略自定义视图类型初始化器的必要性,从而产生了一种观念,认为视图类型的初始化器是多余的。在这篇文章中,Danny Bolella 针对这一误解进行了澄清,并深入探讨了 SwiftUI 视图类型初始化器的复杂性。文章强调,即使在简洁的 SwiftUI 框架中,正确地管理初始化器和状态对构建高效且功能完善的应用来说仍然至关重要。
使用 SwiftNIO 处理 UDP ( Working with UDP in SwiftNIO )
UDP 是一种比 TCP 更简单的协议,它不执行送达确认,因此在数据传输上能够提供更高的速度,虽然这种方式可能会导致数据丢失。在这篇文章中,Joannis Orlandos 深入探讨了 TCP 与 UDP 的区别,并指导如何使用 SwiftNIO 构建一个 UDP 服务器。文章中展示了如何实现一个简单的 UDP 回声服务器,该服务器接收数据包,读取字符串内容,并将其反转后发送回客户端。