Episode 27: Spring Loaded Zoom Zoom
Welcome to Code Completion, Episode 27! We are a group of iOS developers and educators hoping to share what we love most about development, Apple technology, and completing your code!
Follow us @CodeCompletion on Twitter to hear about our upcoming livestreams, videos, and other content.
Be sure to also sign up to our monthly newsletter, where we will recap the topics we discussed, reveal the answers to #CompleteTheCode, and share even more things we learned in between episodes.
You are what makes this show possible, so please be sure to share this with your friends and family who are also interested in any part of the app development process.
⭐️ This Week's Topics
- Join the Code Completion Club at https://codecompletion.io/jointheclub!
- Indie App Spotlight, with three apps for you to check out:
- We review Apple's Spring Loaded event:
- New iMacs
- Potential future iMac Pro
- Where Apple will take the M1/M2/M1S/M1X
- AirTags
- New iPad Pros
- The new Apple TV 4K
- Mac mini bumped with 10Gbase-T ethernet option
- Lavender iPhone 12
- Podcasting subscriptions
- Apple Card Family and shared credit
🚧 #CompleteTheCode
This week's #CompleteTheCode:
In which order would Swift prioritize the following overloaded methods??
1 2 3 4 5 6 7 8
func processValue<T: BinaryFloatingPoint>(_ value: T) // 1 func processValue<T: BinaryFloatingPoint&Decodable>(_ value: T) // 2 func processValue<T: Decodable>(_ value: T) // 3 func processValue(_ value: Double) // 4 func processValue<T: Numeric>(_ value: T) // 5 let value: Double = 3.14 processValue(value) // Which order would the swift compiler rank these methods in?
Be sure to tweet us with hashtag #CompleteTheCode if you know the answer!
⚠️ Compiler Error
This week's theme: Ultra-wideband!
- Ultra-wideband, or UWB for short, is a specific technology for short-range, low-energy, high-bandwidth communication over a large portion of the radio spectrum.
- Apple’s U1 chip can accurately position another U1 device within an omnidirectional field of view as long as the devices are within 100 feet of each other.
- Formerly known as pulse radio, UWB works by generating radio energy at specific time intervals over a large bandwidth, where the polarity and timing of the pulse determine the data being transmitted.
- Despite these devices not having a U1 chip, AirTags are compatible with iPhone SE, iPhone 6s or later so long as they are running iOS 14.5 or later.
Compilation Results
This time, Fernando went first, followed by Ben. Let's see how they did!
4. Despite these devices not having a U1 chip, AirTags are compatible with iPhone SE, iPhone 6s or later so long as they are running iOS 14.5 or later.
Dimitri basically spoiled this one mid episode, making this an easy code completion!
1. Ultra-wideband, or UWB for short, is a specific technology for short-range, low-energy, high-bandwidth communication over a large portion of the radio spectrum.
No one was led astray by this basic definition, since it was also a code completion!
2. Apple’s U1 chip can accurately position another U1 device within an omnidirectional field of view as long as the devices are within 100 feet of each other.
Everyone trusted this to be fact, despite it being the compiler error all along! The U1 can't have an omnidirectional field of view, otherwise it wouldn't be able to tell where another device is! Not to mention it is only usable over much shorter distances…
Which means…
3. Formerly known as pulse radio, UWB works by generating radio energy at specific time intervals over a large bandwidth, where the polarity and timing of the pulse determine the data being transmitted.
Both Fernando and Ben were led astray by such simple physics, because this one was a plain old code completion!
Learn More →
🎁 Sponsor
This week's episode of Code Completion is brought to you by Swiftly Built's Advanced Data Display course. Buy your ticket now on Eventbrite for one month of live iOS instruction starting on May 1st!