This Week I Learned #31

Assumed audience: people interested in learning and metacognitive tools.

Here are some of the things I learned this week, in the order I’ve noted them down.

# Chiasmus & Antimetabole

This tweet by Serenity Caldwell taught me a new word: chiasmus. It’s a literary device in which two or more clauses use similar words but in a reversed structure. While reading about it, I also came across another similar concept, antimetabole, which seems to be similar but with a subtle difference that I can’t quite wrap my head around (link).

# Time Zones and Date Formatters in Swift

Every developer comes across a time zone bug some time during their career; and it was my turn last week. While using Swift’s Foundation, I forgot to set the timezone property on the formatter that parses a string into a date, which resulted in different dates in the client and server apps. The fix was quite straightforward:

formatter.timeZone = TimeZone(identifier: "UTC")

# Core Data Concurrency

I finally decided to sit down and fix the myriad Core Data issues that plagued my iOS app. I learned a ton regarding some APIs that I wasn’t familiar with, including perform/performAndWait(link), background contexts, and batch deletions. I recommend checking out Antoine’s blog to learn more about some of these topics.

Have feedback or questions? Drop me a line via the contact form, Twitter, or Mastodon.
Found any typos? Edit the post here.