Skip to content

Commit a123f4c

Browse files
committed
Release post-33
Introducing: "Let There Be Sight" now in beta!
1 parent 886da14 commit a123f4c

File tree

2 files changed

+125
-1
lines changed

2 files changed

+125
-1
lines changed

content/en/posts/post-31/Swift Error Handling: The Problem.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,54 @@ do {
150150
}
151151
```
152152

153-
Unless you explicitly check the error type or use multiple `catch` clauses, you can't immediately know which operation failed.
153+
Unless you explicitly check the error type or use multiple `catch` clauses, you can't immediately know which operation failed. So let's try both these approaches and we'll see how unwieldy and error-prone they are.
154+
#### Multiple `catch` Blocks
155+
156+
```swift
157+
do {
158+
let user = try fetchUserData(userId: "12345")
159+
let posts = try fetchUserPosts(for: user)
160+
let followers = try fetchUserFollowers(for: user)
161+
} catch {
162+
if let networkError = error as? NetworkError {
163+
showNetworkErrorMessage(networkError)
164+
} else if let parsingError = error as? ParsingError {
165+
showParsingErrorMessage(parsingError)
166+
} else {
167+
showGenericErrorMessage(error)
168+
}
169+
}
170+
```
171+
172+
This example floods the code with noise and further separates the error handling from the original call. It also assumes that the error types are known in advance. In Swift 6+ the error type may or may not be typed. In Swift 5 and before, the error is never typed and the error type is effectively always `any Error`. This means that we simply have to hope that the documentation tells us what the error type is, and hope that the documentation is accurate.
173+
174+
#### Separate Catch Blocks
175+
Another option is to use separate `catch` blocks for each error type:
176+
177+
```swift
178+
let user: User
179+
let posts: [Post]
180+
let followers: [Follower]
181+
do {
182+
user = try fetchUserData(userId: "12345")
183+
} catch {
184+
showErrorMessage(error)
185+
return
186+
}
187+
do {
188+
posts = try fetchUserPosts(for: user)
189+
} catch {
190+
showErrorMessage(error)
191+
return
192+
}
193+
do {
194+
followers = try fetchUserFollowers(for: user)
195+
} catch {
196+
showErrorMessage(error)
197+
return
198+
}
199+
```
200+
But as you can see, this approach isn't great either. It creates even more noise. We are forced to declare the variables outside of the `do` block and initialize them inside the `do` block. If an error occurs, we are forced to exit scope using a control flow statement like `return` or else we will have uninitialized variables.
154201

155202
#### Abrupt Control Flow Breaks
156203

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
title: "Introducing: \"Let There Be Sight\" now in beta!"
3+
date: 2025-04-21
4+
topics:
5+
series:
6+
image:
7+
description:
8+
slug: let-there-be-sight-beta
9+
---
10+
11+
# **Introducing the Beta of Let There Be Sight: Alt Text Made Easy**
12+
13+
Today, I'm excited to announce the iOS beta release of my latest project: **Let There Be Sight** — an app that makes it easy to describe any image with text. You can try it for free today via TestFlight:
14+
15+
👉 [Join the beta on Apple TestFlight](https://testflight.apple.com/join/E3uFbmZp)
16+
17+
But before you dive in, let me explain why this app matters.
18+
19+
## Why Alt Text Matters
20+
21+
If you’ve spent any time in communities like Mastodon or Bluesky, you’ve probably seen people talking about the importance of alt text — short textual descriptions of images that make them accessible to people using screen readers.
22+
23+
For those with vision impairments, alt text isn’t just helpful — it’s essential. Without it, large parts of the internet are simply invisible. No one should be excluded from participating in the digital world because of how they experience it.
24+
25+
But the benefits of alt text extend beyond accessibility:
26+
27+
- **Improves discoverability and SEO**
28+
- **Translatable** for international audiences
29+
- **Readable aloud** in text-to-speech apps and article readers
30+
- **Helpful for neurodivergent users**
31+
- **Useful on slow or unreliable connections**
32+
- **Clarifies ambiguous or complex visuals**
33+
34+
In short: alt text makes content more useful, more inclusive, and more future-friendly.
35+
36+
### Alt Text Is Not Just Nice To Have. In Some Contexts It Is Legally Required.
37+
38+
In many jurisdictions, including the United States and the European Union, accessibility isn’t optional — it’s the law. For example, Section 508 of the Rehabilitation Act in the U.S. mandates that federal agencies make their digital content accessible to people with disabilities, which includes providing alt text for images. The Americans with Disabilities Act (ADA) has also been interpreted to apply to websites, especially in public-facing industries.
39+
40+
Failure to comply can result in lawsuits, fines, or reputational harm. But more importantly, it's a moral imperative. Ensuring equal access to information is simply the right thing to do.
41+
42+
## The Problem: Writing Alt Text Is Hard
43+
44+
Despite all those benefits, writing good alt text is still a hassle. It takes time, it requires empathy and nuance, and it’s easy to get wrong. Most of us aren’t trained in how to write it well, and as a result, we often skip it — even when we mean well.
45+
46+
To write truly helpful alt text, you have to think carefully about what information matters in a given context. A picture may be worth a thousand words, but only a few of those words actually serve the reader. The rest can be noise.
47+
48+
The official guidelines (like [these from Section 508](https://www.section508.gov/create/alternative-text/)) show how subtle and context-sensitive great alt text can be.
49+
50+
## Let There Be Sight: Alt Text, Simplified
51+
52+
Let There Be Sight is built to make this easier. The app helps you describe images quickly, accurately, and contextually — without needing to be an expert in accessibility. Whether you're posting to social media, blogging, building a website, or just trying to make your content more inclusive, the app is here to help.
53+
54+
Currently, the app is very simple. You can add an image (from your photo library, camera, or files). Then you can tap a button and in a few seconds, a highly accurate, helpful text description is generated. This text can then be copied and shared to other apps.
55+
56+
But stay tuned — I have some very interesting features planned to make the app even better.
57+
58+
## How Much Is This All Gonna Cost?
59+
60+
The app will be free to install and use. There will be paid premium features. During the beta, the premium features are free.
61+
62+
### How Much Do The AI Models Cost?
63+
64+
Currently, this app uses models from two providers: OpenAI and Google Gemini. In order to use these models, you must bring your own API keys. It's free to get an API key from a provider, but it does cost money to use a model, and you must purchase your credits in advance from a model provider.
65+
66+
But here's a helpful tip: Google Gemini is currently offering "experimental" models for free! You can use these models at zero cost. (Though it is worth mentioning that these experimental models are rate-limited.)
67+
68+
In the future, I hope to offer on-device AI models that will be free, faster, and won’t send your private information to someone else.
69+
70+
---
71+
72+
Try the beta today and help shape the future of accessible content:
73+
74+
👉 [Download via Apple TestFlight](https://testflight.apple.com/join/E3uFbmZp)
75+
76+
Let’s make the web better — for everyone.
77+

0 commit comments

Comments
 (0)