# 7 : Let a thousand programming publications bloom

Published on

Weekly Comment

Last week, Tony Stubblebine, the CEO of Medium, published an article titled Let a thousand programming publications bloom on Medium. In the article, he announced the temporary suspension of the highly acclaimed publication, Better Programming, in order to make room for other programming publications, as the title suggests.

Better Programming is popular on Medium and is one of the most subscribed technology publications. Some of the articles I have published on Medium have been accepted and recommended to more readers through Better Programming. However, as the IT field continues to specialize, Better Programming’s readers are receiving many excellent articles that are not directly relevant to their interests. This not only disperses the readers’ attention but also hinders the formation of closer connections between readers and authors.

Stubblebine points out that Medium is going through some changes and believes that these changes will ultimately benefit authors, readers, and publications. He mentions that Medium has always had publications similar to collective blogs and sub-sections that help set quality standards and provide feedback on articles. He encourages some readers to create their own publications and provides some guiding principles for doing so. For authors, this means there will be more publications available for submission on Medium.

After the closure of Better Programming, Michael Long told me that he created a new publication focused on Swift and SwiftUI called The Swift Cooperative. Therefore, last week I published an article about ViewThatFits in this new publication.

As a Chinese blogger, my initial purpose of publishing English versions of my articles was simple: to test whether my sharing of Swift and SwiftUI in the Chinese world is equally valuable in the English world (or a larger readership). In order to make my articles accessible from the beginning, I chose the Medium platform, which has the potential to attract readers without the need for promotion. Starting from April this year, I gradually translated and published articles that were previously published on my Chinese blog on Medium. With the help of publications such as Better Programming and ITNEXT, this week I reached a milestone of over a thousand followers on Medium. The increasing number of readers and views has given me more motivation and allowed me to meet many new friends.

Currently, I am restructuring my Chinese blog. Starting from 2024, I will be publishing bilingual versions of my articles on it(I will continue to sync updates on Medium until April 2024). In the next blog post, I will share some insights on paired programming with AI that I gained during the recent blog restructuring.

Originals

Mastering ViewThatFits

fatbobman

In iOS 16, SwiftUI introduces a new adaptive layout container called ViewThatFits. As the name suggests, its purpose is to find the most appropriate view among a given set of views and use it. For most people, this is a simple and easy-to-use container. However, this article intends to thoroughly analyze it, including rule details, the meaning of ideal size, usage examples, and more. Lastly, we will create a replica version of ViewThatFits to deepen our understanding of it.

Recent Selections

Introducing Inferno: Metal shaders for SwiftUI

Paul Hudson

At WWDC 2023, Apple added several new modifiers to SwiftUI. With these modifiers, developers can easily apply Metal Shaders to views. However, in practical applications, we find that although they are convenient to use, most developers do not write shaders, and the available resources and materials for reference are relatively limited.

To improve this situation, Paul Hudson created the Inferno project, an open-source collection of fragment shaders. Now, even without experience in writing shaders, we can easily apply shaders to our own applications. With this project, Paul also provides two videos: one is an introduction video, and the other is about creating custom shaders. Additionally, he has developed a new Shader course specifically for subscribers of HackingWithSwift.

Debugging SwiftUI views: what caused that change?

Antoine van der Lee

Almost all developers using SwiftUI will encounter a problem where the frequent redraw of views due to multiple triggers leads to decreased application performance, abnormal animations, and difficulties in troubleshooting. In this article, Antoine van der Lee not only reveals the nature of this problem but also provides clear examples and solutions to help you avoid falling into the trap of “Massive SwiftUI Views.” Whether you are a beginner or an experienced developer in SwiftUI, this article can bring new perspectives and skills to your development work.

Macro Bonanza

Point-Free

The macros in Swift have received widespread acclaim since their introduction. Point-Free has also applied them to their four popular libraries: CasePaths, ComposableArchitecture, SwiftUINavigation, and Dependencies. In this article, the author demonstrates how Swift macros greatly simplify and enhance the capabilities of these libraries, including: simplifying code structure, improving the intuitiveness and usability of APIs, enhancing functionality and flexibility, and improving testing and debugging. Although these libraries originated from The Composable Architecture (TCA), they are also applicable to applications using other architectures. Even if you don’t use TCA, these libraries will be of great help in your development.

Questions about the data to create LLMs for embeddings

Joseph Heck

In this article, Joseph Heck discusses the data sources and performance issues of large language models (LLMs). He first expresses concerns about the data sources used to train these large language models, which has made him hesitant to apply the results to open-source projects due to a lack of confidence in the sources. He also shares his views on the relationship between model size and performance, as well as the challenges of data management and model updates. Lastly, Heck expresses his desire to find LLMs based on “clean data sources,” acknowledging that the collection and organization of multilingual data is a more demanding task than utilizing the data itself, requiring resources from academic institutions, companies, and even society as a whole.

The issue of the legitimacy of LLM data sources has long remained unresolved and unconfirmed. With the sudden removal of OpenAI CEO Sam Altman, this issue will once again receive attention from society.

ObservationBP

winddpan

In the second issue of the newsletter, we introduced the ObservationBP project created by onevact. This project brings the capabilities of the Observation framework to lower versions of SwiftUI. However, in the current implementation, developers need to explicitly wrap each view that accesses properties of an Observable instance.If the view contains other Lazy views, a second wrapping is also required, which increases the burden on the user. Building on onevact’s work, winddpan has made adjustments, and now developers can use the ObservationBP library in lower versions of SwiftUI in a way that is close to native Observation (just by adjusting or adding a property wrapper).

Get weekly handpicked updates on Swift and SwiftUI!

Fatbobman(东坡肘子)

I'm passionate about life and sharing knowledge. My blog focuses on Swift, SwiftUI, Core Data, and Swift Data. Follow my social media for the latest updates.

You can support me in the following ways