S Link
The Swift Algorithms Book (50% off)
Written for students and professionals, The Swift Algorithms Book blends modern code, illustrations and computer science to help you pass the interview or build your next app. Perfect for the classroom or the office, the book takes a fresh approach to explain concepts that power search engines, databases and social networks. Use code coupon code THEROBOT at checkout to receive a 50% discount!
Sr. iOS Developer
Redfin in San Francisco is looking for a Senior iOS Developer to join our small, talented team that builds the core functionality of our app to make searching and viewing homes intuitive, addictive, delightful and fun.
Swift Around the Web
If-Let Assignment
While I'm not a big fan of custom operators in general, I LOVE the idea of using ?=
to specify downcasting and assigning the unwrapped value instead of the usual if let
statement to do the same thing. The one liner looks soooo nice! 😍
Favorite Explanations (of things that made my head hurt)
@ayanonagon shares her favorite resources for explaining super complicated Swift concepts, including:
- Associated Types: Using Generics with Swift Protocols
- Should I Use a Struct or Class?
- [weak self] vs [unowned self]
For structs vs classes, I also highly recommend this must-see talk by @andy_matuschak: Controlling Complexity in Swift.
Coding
Turning the iPhone 6s Into a Digital Scale
Last week, I discussed the The Plum-O-Meter: Weighing Plums Using 3D Touch in Swift. But why not use the iPhone 6S as a general scale (for small items of course!). Super clever use of a small spoon to calibrate weight here. Too bad this app was rejected from the App Store! I can imagine a lot more possibilities for cooking once the iPad has 3D Touch as well.
Implementing a Small DSL in Swift
Using NSPredicate
with hard-coded strings always makes me feel awkward (I hate writing code based on hoping it works!). Love this DSL (Domain Specific Language) solution for making a much more explicit and intuitive interface for using NSPredicate
. Great Swift inspiration for improving other parts of the Cocoa API! You can view the full source code on Github here.
Apple News
Slides from @clattner_llvm and @jckarter's LLVM Dev Meeting talk on the Swift Intermediate Language (SIL)
Many Swift developers in the community were hoping Swift would be open-sourced at the LLVM Dev Meetup last week, but unfortunately we're not there just yet. So while we all eagerly await for "the end of 2015" - yes, open sourcing of Swift (including Linux support) is still on track according to @clattner_llvm himself! - check out these slides about Swift from the creators themselves. Videos should be up in the next 1-3 weeks!
"For everyone thinking they’ll just go in & fix things in Swift, reading this should hint at the complexity involved!" - @simjp on Twitter
Xcode 7.2 beta Now Available
In case you missed having two versions of Xcode, the Betas are back!!! No documented Swift changes, but happy to see a few bug fixes and better debugging. You can view the Release Notes here.
Design
When Simplicity Isn’t the Answer
I love the idea of contextual interfaces:
"With this upcoming update, we sought to be contextual, even predictive at times. If noon rolls around, you probably want to see the lunch menu. If you are ordering something from a supplier, chances are you would like to have access to your inventory that’s out of stock."
Apps on the Apple Watch should be leading contextual design.
Other Cool Stuff
29 Wonderfully Cute And Quirky Japanese Mascots
This is one of my favorite parts of Japanese cultures. There's a spirit animal for everything! And they're so cute and huggable! I think my favorite is the hard-boiled egg on skis...
Videos
Library-Oriented Programming
A great distinction between libraries vs frameworks: "You call a library, but a framework calls you". Build great libraries!
DVR: Network Testing in Swift, with Sam Soffes
A super short video (only 10 minutes) on how to use the DVR library (in Swift) for testing JSON responses from the API.
"Easy dependency injection is the main design goal. The API is the same as NSURLSession. DVR.Session is a subclass of NSURLSession so you can use it as a drop in replacement anywhere. (Currently only data tasks are supported.)"
WATCH
Notifications & Productivity
"In our overall assessment this confirms once again that gestures and not screens are the primary user-interface for the Apple Watch and we expect that new watchOS 2.x third-party apps will take advantage of this new metaphor."
Love the results from the Wristly surveys. Make sure to also check out The Apple Watch at the Office section. I personally can't imagine living without the Calendar Complication any more!
Swift Code
- keychain-swift - Helper functions for saving text in Keychain securely for iOS, OS X, tvOS and watchOS.
- Aerial - Apple TV Aerial Screensaver for Mac
- TKSwitcherCollection - An animated switch collection
- QueryKit - A simple CoreData query language for Swift and Objective-C.
- Fluent - Swift animation made easy
- PhoneNumberKit - A Swift framework for parsing, formatting and validating international phone numbers. Inspired by Google's libphonenumber. Blog post here.
Business
High Performers vs. Workaholics: 7 Subtle Differences
Work smarter, not harder! And take care of yourself!
"A high performer knows their self-worth and can thus work with a sense a freedom. This comes from doing periodic self-evaluation of their performance so that they can constantly improve. They create their own feedback loops rather than waiting on feedback from others."
Working Far From Home
I find myself to be more productive on the road. Love these tips! The constraints of wanting to do other stuff, wifi limitations, work space, long travel time (I prefer 7+ hour plane rides vs short ones!) all add up to being focused and efficient. When I'm at home with unlimited time, comfort, and resources, I tend to just procrastinate!
Swift Thoughts
I had an incredible time at SwiftSummit last week! Learned A LOT and got the best gift from @NeoNacho! Sign up on their website (or just keep following my newsletter and Twitter) to get alerted when the videos from the talks come out! Should be around a month or so. Meanwhile, here are austenmc's field notes.
One thing I don't think about too much, but that @kristinathai included in her talk on How to Build A Compelling Watch App is accessibility. She had a slide with this tweet showing how designing for permanent disabilities (such as for someone who has only one arm) can benefit people with a situational disability (a new parent holding a baby in one arm!).
Haven't thought about it this way, but that definitely brings it home. We will all have situational disabilities at some point - thinking of walking through the airport with a hot cup of tea in one hand and rolling my suitcase while trying to use my phone to check my gate!). Thanks @kristinathai for including that in your talk!
Oh, and I hope you had a great Haloween! Thanks @allonsykraken for my costume!