Swift Around the Web
The genius of Swift is that it looks familiar at first glance. If you've ever done any programming in a language other than Objective-C, you feel comfortable with Swift. But, as more and more developers are discovering, Swift is actually really hard. Just think of all the advanced concepts you need to understand - functional programming, operator overloading, generics, etc - and combine it with major bi-weekly changes to the language. You have to love learning and being challenged if you're starting with Swift now!
But Should I...Swift?
I love Rob Napier's advice for those who are considering learning Swift. The following quote just really hit home for me: "Today’s Swift is not a language for the easily intimidated. It is a language for the curious and the inventor."
Swift: What does 1.0 mean?
Important: "What everyone can agree on is that iOS 8′s timeline is way too early for Swift, and Apple reserves the right to continue to grow the language in a way that will keep breaking code."
Can You Really Learn Swift by Building an App?
Another reminder that in addition to Swift, there is a ton of learning involved around using the iOS API for beginners. For those who are existing iOS developers, think of how many new APIs we still have to learn for iOS 8!
Apples to apples, Part II
As of XCode 6 Beta 5, Swift is faster than Objective-C according to benchmarking analysis by Jesse Squires.
Swift Lesson of the Day: Properties Aren't Sacred
A reminder that Swift properties are different than Objective-C properties. Oh, and optionals.
Apple News
I've really been enjoying XCode 6 Beta 5 this week. My favorite feature from this beta is the Nil Coalescing Operator aka ?? - it makes working with optionals so much easier!
Balloons!!!!!!
Apple releases the Balloons playground demoed at WWDC for everyone to play with. The only catch is that it requires Xcode 6 (beta 4) running on Yosemite (developer preview 4) or later. I can see these types of playground files being shared among the community for educational purpose in the future (hopefully Apple will give us the ability to create the cool documentation-style comments in playgrounds as well).
Other Cool Stuff
My co-worker @louielouie keeps recommending an app called MobileMeet - it doesn't look that great, but it's an extremely useful app for conference calls. It manages the conference codes for you, and even calls you back when the conference starts. No more elevator music!
As an iOS developer, I can get pretty obsessed about making sure my app looks the best and is the best to the point where I never release anything, but MobileMeet is a reminder that ultimately your app needs to fulfill a massive need. So massive, that people will recommend it regardless of what it looks like.
In Case You Missed It
This week, I started to consciously thinking about Access Controls in my Swift code. I like to keep as many things private as possible, but I also like Unit Tests, and right now, we have to make our classes public for XCTests to work. This should be fixed in later betas I'm sure. Anyway, here are some blog posts I've had a chance to write in case you missed them. Enjoy!
Tutorials
This week, I'm including some great video-based talks in the tutorial section. Enjoy!
- Building the game “2048” in Swift <Realm - YouTube>
- Build Your First iOS Game with Swift <Bloc - YouTube>
- Swift Table View Animations Tutorial: Drop-In Cards <Ray Wenderlich>
- Basic UIView Animation with Swift Tutorial <Ray Wenderlich>
- Getting started with UIKit Dynamics in Swift <Omar Fouad>
Swift + JSON
It seems like the current way of thinking about JSON Parsing in Swift is leaning toward using Functional Programming. I haven't had experience with functional programming, so it's a big learning curve for me, but every time I learn a concept from it, I find it pretty fascinating.
Parsing JSON in Swift: Safe and Easy
I'll be honest and say I don't fully understand the functional programming approach Chris Eidof takes to Swift Parsing in this post, but I definitely want to know more! I'll have to re-read it a few times (and probably purchase Chris' Functional Programming book) before hearing him speak at the Swift Language User Group Meetup in San Francisco in September.
Functional JSON
David Owens writes a more detailed explanation of functional JSON parsing in response to Chris' blog post (above). I highly recommend reading this blog post a few times as well! David also has a shorter, much simper blog post - JSON Parsing Reborn - that is a good starting point for approaching JSON parsing.
Efficient JSON in Swift with Functional Concepts and Generics
Toni DiPasquele from Thoughtbot does a great job of breaking out high-level ideas for approaching JSON in Swift as well as showing great code examples (which just remind me of how much more Swift I need to learn!). I love that he lists resources for Functional Programming at the bottom.
Podcasts
Insulated Perspectives
A great reminder to step back from the bubble we live in and talk to people who are different than us. I love the story at the end about a non-developer's perspective on 2048.
Alexander Stigsen on Realm
Realm is a new mobile database meant to be a replacement for CoreData & SQLite. I'll definitely be tinkering with it in my next personal project that needs CoreData functionality.
We Used To Be Better At This
I just found out about this podcasts, so haven't listened to this episode on Swift just yet, but I though I'd include it anyway.
Swift Code
Mattt Thompson generated a lot of controversy this week by releasing Euler, a library of custom operators for mathematical notation. Mattt includes a clear warning in the README: Please keep in mind that this is not intended or recommended for production. I recommend having an open mind and just enjoy learning from it :)
- Euler - Swift Custom Operators for Mathematical Notation
- AwesomeCache - Delightful on-disk cache
- SwiftImageLoader - Asynchronous Image Loader in Swift
- SFSwiftNotification - Simple custom user notifications
- Design Patterns In Swift - Common Design Patterns implemented in Swift
Swift Thoughts
I can't stop thinking about is JSON parsing in Swift. I'm not completely sold on any of the solutions that are out there, but I can't think of a better solution myself. It makes me feel the same way I feel about good-looking bad design - I know something is wrong, but I can't tell you which pixel is out of place.
Not surprisingly, I'm not the only one. There were several great articles on JSON parsing in Swift this week. I'll start off by including those and some of the older ones to give a fuller perspective of the Swift thinking on the topic.