0:00:00Hello and welcome to Developing Perspective. Developing Perspective is a podcast discussing
0:00:04news of note in iOS development, Apple, and life. I'm your host, David Smith. I'm an independent
0:00:09iOS developer based in Herndon, Virginia. This is show number 209, and today is Friday,
0:00:13January 23rd. Developing Perspective is never longer than 15 minutes, so let's get started.
0:00:19All right, before I dive into the main topic I'm going to be discussing today, I just want
0:00:23to have a brief aside about a little update on the As I Learn Watch Kit series that I've
0:00:27I've been doing both my blog, on the podcast, as well as on a YouTube channel.
0:00:31I just wondered if you aren't aware of that, it's something that I've been
0:00:34continuing to do and have been making, I think, some fairly interesting progress
0:00:37and putting out some hopefully useful resources. So there'll be a link to that in the show notes
0:00:41if you aren't aware of that already. The main topic I'm going to be talking about
0:00:46today is a little bit of my storytelling about Swift and kind of where, how my
0:00:54thinking about it has evolved over the last, I guess, almost a year now, eight months,
0:01:01something like that, since WWDC, and why I'm in the position I am now with my use of Swift.
0:01:09And I won't ruin the ending with exactly what that looks like. But let's get started with
0:01:13the story. So I remember quite clearly sitting in the WWDC keynote last year, you know, just
0:01:20sitting there, they had gone through kind of a few things about iOS 8, what we're going
0:01:24to expect there.
0:01:25And then right at the end, they jump out and they say, OK,
0:01:29we have this one other thing, and it's called Swift.
0:01:32And it's this brand new language,
0:01:33and everyone got excited.
0:01:34And we're all kind of like, whoa, that's crazy.
0:01:36This is awesome.
0:01:37They finally did it.
0:01:38They finally came out with something.
0:01:41We can finally put to bed some of the speculation
0:01:44and the talking about where they're going to go next.
0:01:46Is there going to be this next version of Objective-C?
0:01:49Are they going to keep doing what they have been doing,
0:01:51where they keep bolting on other features
0:01:53to the existing language and frameworks.
0:01:56They added Arc, and they added all the cool new modern syntax
0:01:59stuff with the way that they've handled
0:02:03automatic synthesized properties and automatic boxing
0:02:06and unboxing of things.
0:02:07And some of these things that are really cool,
0:02:09they've just been able to bolt onto the language inside
0:02:13of the existing thing just by the way
0:02:15that they've been able to enhance the compiler
0:02:17and taking control of that out of GCC and onto LLVM.
0:02:22So we're all excited.
0:02:23We all see this thing, and it's called Swift.
0:02:25And you kind of have that excitement.
0:02:27And then I remember kind of sitting down and looking
0:02:31at the WWDC schedule and thinking to myself what it was
0:02:35that I was going to do, what I was going to pursue.
0:02:37I have a limited amount of time and energy.
0:02:39During that one week at WWDC, what did I want to do?
0:02:43And there's a whole bunch of new APIs and cool stuff from iOS 8.
0:02:46And there's these whole other track of Swift stuff.
0:02:49And then there's the labs.
0:02:51And I had to decide how I was going to split up my time.
0:02:54And I made the conscious decision at that point
0:02:56to say, you know what?
0:02:57Swift looks cool, but the reality
0:03:00is I need to focus in on shipping updates for iOS 8
0:03:04this fall.
0:03:05That is an absolute requirement for my business
0:03:07to continue to be successful.
0:03:08And so I need to go ahead and prioritize that.
0:03:10Swift is cool.
0:03:10I'll look at it later.
0:03:12And I essentially ended up splitting my time
0:03:14between iOS 8 and between going to labs,
0:03:17talking to people, which is a fairly productive exercise.
0:03:21And so this was pretty cool.
0:03:22I went and did that.
0:03:24I remember on the flight back from WWDC,
0:03:27I sort of read the first chapter of the programming guide
0:03:29that they had put in iBooks.
0:03:31But I hadn't been to any sessions.
0:03:32And Swift kind of looked interesting.
0:03:34But it's also probably worth mentioning
0:03:36that while I have a background in computer science,
0:03:38and I've done the academic stuff in terms of understanding
0:03:43a bit of the language, differences
0:03:46between different languages, ways of approaching things, benefits and disadvantages of different
0:03:50type systems. I'm not a language nut. I'm brutally pragmatic, to a fault. In some ways
0:03:58that allows me to do what I do, but that also can sometimes be tricky when I look at something
0:04:02like this. If it doesn't have a direct and obvious impact and benefit to my work, I'll
0:04:07often disregard it. I'm not going to be clever for clever's sake. I just want to be pragmatic.
0:04:12I want to just build the thing, and whatever tool is going to help me get there faster,
0:04:16even if there were a more elegant solution for whatever version of elegant you might
0:04:20think, I'm probably just going to do whatever is the simple, obvious, easy, basic thing.
0:04:25You know, I'm going to be walking around with a hammer and building stuff that way, and
0:04:29that tends to work.
0:04:31That's kind of how I've been able to keep doing what I'm doing because it tends to be
0:04:34very efficient.
0:04:35You don't tend to go down too many rabbit holes.
0:04:37And by that I mostly just mean that there are elements of Swift that I certainly have
0:04:42no understanding of.
0:04:43I don't really understand all of what's going on there.
0:04:47Not necessarily because I couldn't, but because I haven't tried.
0:04:52The academic part of learning a language like Swift doesn't really appeal to me.
0:04:57I just want to know how this will make my apps better.
0:05:01So let's go back to the story.
0:05:04So I go through the summer working on my iOS 8 updates.
0:05:08I have a lot of apps, and I have a lot of updates to put together and build.
0:05:11And there was some cool stuff in iOS 8
0:05:12we were thinking about, some stuff with extensions,
0:05:14and some of the ways that--
0:05:16other things that we had to do to take advantage,
0:05:17adaptive layouts, things that we kind of had hints
0:05:19that there were going to be bigger screen iPhones,
0:05:21so making sure everything works with that.
0:05:23And so I do that, and I get my updates out.
0:05:25You know, for the most part, I had most of my updates
0:05:28out within the first week or so of iOS 8 dropping,
0:05:30which is always a bit of a task when you have as many apps
0:05:33as I do, but I got it done.
0:05:35Then there's the next round of iOS 8 updates
0:05:38in terms of all the bug fixes to fix the things that I broke
0:05:40I did the first updates and get those done, OK, great.
0:05:44Now what do I do?
0:05:45Should I start working on new features from applications?
0:05:48Things are settling down.
0:05:50And it was around that time that Apple
0:05:53did one of their other keynote events.
0:05:56And I remember in it them having a slide.
0:06:00Probably it was Craig Federighi.
0:06:01I can't remember exactly which executive was talking about it.
0:06:04But one of the executives was up on a stage saying,
0:06:06and here are all the apps that have
0:06:09been shipped with Swift in it already.
0:06:10And they're kind of up on stage in their big marketing event
0:06:13talking about Swift.
0:06:14And then I remember seeing them add a new sort of root site
0:06:19to apple.com that if you go to apple.com/swift,
0:06:23there's this whole big page marketing the language
0:06:25and promoting it and talking about it.
0:06:28And by and large, in general, I tend to--
0:06:31I'm kind of all in on Apple in many ways.
0:06:33And maybe that's a good thing, maybe that's a bad thing.
0:06:35But I'm fairly committed to their platform.
0:06:39It is where the vast majority of my income comes from.
0:06:42I have one Android app that does something.
0:06:45And obviously, I have FeederAngler,
0:06:46which is a service outside of the App Store.
0:06:49But by and large, my income in my business
0:06:50is based around the App Store and around Apple.
0:06:53And so when they are putting a lot of energy and effort
0:06:56and marketing capital behind something, I tend to take notice.
0:06:58I tend to try and get myself on board.
0:07:01And in general, that tends to be sort
0:07:03of the path of least resistance.
0:07:04If I head in the direction that Apple wants me to be heading,
0:07:08I'm unlikely to bump into them and to have problems down the road.
0:07:12And so that's what I was sort of starting to prepare to do.
0:07:14I see all these things.
0:07:16Talking about it in another keynote, making a big page on apple.com,
0:07:20and just generally promoting the language makes me start to think,
0:07:23OK, I don't want to swim against the grain on this.
0:07:25I need to start thinking about Swift.
0:07:28And at the time, I'd shipped most of my updates,
0:07:30so I had some bandwidth and availability to do it.
0:07:33And I was actually, just as a random kind of aside and bit of trivia,
0:07:37I was actually starting to lay the groundwork and working on a series that I was then going
0:07:41to be called, as I learned Swift, which you may have noticed was overtaken by something
0:07:47else, the Apple Watch, because a few weeks after this, Apple announces the Apple Watch.
0:07:55And while at that point we didn't have WatchKit, that didn't ship until later in the year,
0:07:59it became clear that this was going to be also another major thing that Apple was going
0:08:04to pursue another major thing that Apple was going to put marketing behind. And another
0:08:08place that as developers was something that I wasn't sure would make sense for me to focus
0:08:12attention on. And so I kind of abandoned Swift, or at least abandoned learning Swift. And
0:08:19to this day, I still yet to write a line of actual app Swift code. I think I wrote, I
0:08:26opened up a playground when the, you know, in the first version of Xcode after WWDC.
0:08:31And I typed a few lines, and the playground didn't really work.
0:08:34Or at least I didn't understand how to make it work.
0:08:36And that's it.
0:08:38And maybe that's a slight confession.
0:08:40It seems like as an iOS developer, at this point,
0:08:43I probably should have done something in Swift, but I haven't.
0:08:47And the reality is I think I'm OK with that.
0:08:50And that's part of why I decided to do this episode,
0:08:52is for a while I didn't really want to be one of these people
0:08:55kind of being boo-hooing Swift.
0:08:57Because Swift is best to understand.
0:08:59functionally and conceptually is pretty awesome. But from a
0:09:03pragmatic perspective, in terms of in the context of my
0:09:06business, and context of what it is I'm trying to do and build,
0:09:10I'm not sure it has a place for me yet. I'm not sure if it if
0:09:15its benefits, whatever those may be, exceed the time, energy and
0:09:21effort that it would take for me to invest into it. That as I'm
0:09:26building watch kit apps, you know, like I took that as I
0:09:28I learned Swift series and turned it into As I Learn Watch
0:09:30Kit with kind of the preparation and thinking
0:09:32that I'd had around that.
0:09:34That transition was easy and obvious because all Watch
0:09:37Kit is for me is a new device.
0:09:40All the tools, all of the tools both in terms
0:09:43of Xcode and Interface Builder and all those type things
0:09:46are fairly stable.
0:09:47And I understand them, and I work really well with them.
0:09:50And Swift, everything I hear is not quite that same way.
0:09:55It's a different thing.
0:09:57it'll take a lot of time to wrap my head around the right idiomatic way of using Swift. And
0:10:04I just don't think I have the time to do that, that I it's not going to make my apps any
0:10:09better. And that's the tricky thing with a lot of these things. Swift falls into that
0:10:14category as you know, it's kind of like classic refactor, that the balance you have to strike
0:10:20when you're refactoring something of, can I justify the time and the energy that I would
0:10:27take to do this thing that is only relevant technically, that my customer will likely
0:10:33never see? And while I'm sure you could make the argument that Swift will make your app
0:10:38more stable, that it will improve the quality of your software over time, maybe it's more
0:10:41performant, maybe it isn't, but there are things that customers might notice down the road.
0:10:46Everything I see makes me think that most customers aren't
0:10:50going to care that my app was written in Swift,
0:10:53that I'm competent enough as an Objective C developer
0:10:56at this point that I'll be fine just doing what I've
0:10:59been doing in Objective C.
0:11:01And it's also slightly compounded by the hearsay
0:11:04around Swift right now.
0:11:06I kind of hear that the tools and the process of building
0:11:11an app in Swift is a bit more clunky,
0:11:13that Xcode gives you weird error messages,
0:11:16There's things that take-- like compilation
0:11:18seems sounds like it's a bit slower.
0:11:20There's all these things that really don't
0:11:22make the process sound good.
0:11:23I keep hearing the word "optionals" constantly.
0:11:27Honestly, I have no idea what that means.
0:11:29I haven't looked into it.
0:11:30I just-- all I hear is every now and then, I keep hearing these--
0:11:33like, seeing blog posts after blog post in my RSS reader
0:11:36saying, you know, how to work around something with optionals.
0:11:39Optionals this, optionals that.
0:11:41Apparently, optionals are a problem.
0:11:42And like I said, I haven't looked into it.
0:11:45it hasn't made sense for me to have some vague intellectual curiosity about that. But the reality
0:11:50is, if there's some weird issue and problem that developing apps for Swift has now, unless I'm using
0:11:56Swift, it's just sort of wasted cycles in my head to focus attention on that. So I haven't. But
0:12:01apparently, there's these weird little issues, weird gotchas, things that I'd have to spend a
0:12:04lot of time working myself around. And so those things certainly don't make me more and more
0:12:10excited about diving into it.
0:12:12One random note that has also been kind of a frustrating
0:12:15thing since Swift came out is the impact it's
0:12:18had on tutorials, documentation, examples, things like that.
0:12:25Whereas before, anytime I would find a tutorial or an article
0:12:28someone was writing about developing for the iPhone,
0:12:30I could pretty much expect to completely follow the code
0:12:34that they were doing, because it was going to be Objective C.
0:12:37Or if they have an example project, or a library,
0:12:40or something like that, it was going to be in Objective C.
0:12:42And there's this unfortunate bifurcation now
0:12:45in our developer community where a lot of the resources
0:12:48for development are split between Swift and Objective C.
0:12:53And if anything, it seems like a lot of the kind of people
0:12:55who tend to make resources like this, the educators,
0:12:58the people who put that together, seem excited about Swift.
0:13:01And so are building-- it is probably, in some ways,
0:13:03a disproportionate shift in terms
0:13:05of tutorials written in Swift versus actual production code
0:13:08written in Swift.
0:13:09And that's just been kind of frustrating.
0:13:11I just mention that because it's something I've noticed,
0:13:13and it's a really kind of awkward time
0:13:16to find ourselves in as a community.
0:13:19And so that's where I am.
0:13:21And that's sort of where I am right now
0:13:22and where I expect to stay.
0:13:24I will likely continue shipping Objective-C exclusively
0:13:28until there is some compelling reason to switch.
0:13:34There's some new API.
0:13:35There's some new platform.
0:13:36There is something that says--
0:13:38Apple comes up on a stage and says,
0:13:39you now have to learn Swift.
0:13:42You now have to use Swift in order to use something.
0:13:44And at that point, obviously, I would start to use it.
0:13:48But until then, as much as I tend to jump on the bandwagon
0:13:51and just go with whatever Apple wants me to do,
0:13:55I think this is an example of a place
0:13:57that I'm just going to hang out in Objective-C land
0:13:59for as long as I can.
0:14:00Not to be a curmudgeon, not to be just kind of stuck
0:14:05in my ways.
0:14:05but because it seems like that's the thing that is going to benefit my customers the most that that is the most pragmatic solution that it will help me to ship the highest volume and highest quality of applications and write the best code for my people, you know, for my applications right now. And that's kind of a weird place to find myself and if you're new to the platform, if you're new to, you know, iOS development, switch might be a great thing to start with and start learning. But for somebody who shipped a lot of apps who has a lot of existing code, and for whom the process of building an app and objective C,
0:14:35is kind of second nature now, it doesn't make a lot of sense for me.
0:14:39Alright, that's it for today's show. As always, if you have questions, comments, concerns, or complaints,
0:14:43you can email me, david@developingperspective.com, or I'm on Twitter @_davidsmith.
0:14:47We have a great week. Happy coding. Bye.