Under the Radar

Under the Radar 2: Time for Swift


  welcome to under the radar a show about

  independent app development I'm Marco

  Arment and I'm David Smith under the

  radar is never longer than 30 minutes so

  let's get started so this week we are

  talking about Swift do that lovely

  language introduced about Isis about a

  year and a half ago now two years ago

  yeah almost a year and a half yeah if I

  have a brief confession to make

  I've never written a single line of

  Swift in the last year and a half not a

  single one I think I can say the same

  thing as long as playgrounds don't count

  I wrote a few lines in a playground once

  and that was it

  beyond that I certainly have written no

  Swift code that's gone into an app yeah

  and that's I gotta say I almost feel

  guilty when I say that like it's this

  thing that feels like you know I'm a

  fairly committed Apple platform person

  like I do a lot of development here this

  is where I make my livelihood and this

  is their whole big fancy new thing that

  has in theory a variety of advantages to

  the way that I've developed things in

  objective-c but I've never really felt

  motivated to learn Swift I think that's

  because I don't see how it would make my

  apps as they are today

  any better and that's kind of a strange

  place to find myself that I think my

  apps would be but you know just the same

  using objective-c that I know so well

  but there's always in this back of my

  mind like hmm I should be learning Swift

  that would probably be better but that's

  never happened yeah I kind of feel the

  same way it's it's something that I'm

  not really against I mean there are some

  things about it I don't care for but I'm

  sure I get over them you know in

  practice once I once I was using the

  language full-time and I'm sure there

  will come a time where we will we will

  switch to it and we will start using a

  full time and it will just be normal and

  we'll just deal with it but I don't

  think the time has yet come where you

  need to switch to it if you already have

  a code base in objective-c that doesn't

  really need to be migrated for any

  particular reason or if you already have

  a lot of objective-c knowledge and and

  your primary goal is to to ship apps

  quickly and with little overhead then in

  those cases I think it does make sense

  to do what we're doing so far and it's


  you know wait and see it's not that

  Swift is is never gonna be a part of our

  lives it's just that I don't think

  there's a lot of compelling reasons for

  us to adopt it yet when we you know when

  we already have is this experience and

  wisdom and and toolchains and everything

  all these things everything's built up

  around the other language that we've

  known forever yeah and it's funny I was

  also a things in preparation to what are

  the reasons why I haven't and there's

  obviously like the obvious ones if just

  like the inertia of having do it done

  Objective C for so long and knowing it

  like inside and out knowing all we're

  all the like the quirks are and all the

  problems and when I hit a weird bug I'm

  pretty good at finding them in Objective

  C if they're you know programming

  related rather than logically related

  but the thing that also makes me so

  nervous about Swift is that it keeps

  changing like every time a new version

  of Xcode comes out it seems like there's

  some new thing in Swift there's some new

  syntax there's some new ability there's

  some new approach for the way it works

  and every time I see one of those I

  think of it's like I have this moment of

  relief that wow I'm glad I haven't

  decided to start learning Swift yet

  because it seems like what I would have

  learned every time seems it's constantly

  being like deprecated going forward and

  that makes me so nervous about spending

  the time because the reality is like I

  have so little time to invest into new

  things that aren't just like actually

  working that spending time on something

  that potentially could be completely

  overcome by or not not completely is

  probably an extreme but could require me

  to go back and change the things that

  I've learned or change the code that

  I've written is very discouraging yeah

  because it seems it seems like churn to

  go through this process and you know to

  some accessory in our in our profession

  you know when when Apple changes the UI

  of the entire OS like with iOS 7 and we

  have to recreate or redo or

  reimplemented unlike it never feels

  great to be forced to to repeat work or

  to be forced to throw away something

  that works perfectly well just to do it

  some some new way that you didn't really

  want to do on the flip side of that you

  know a lot of people

  and you know myself included I love

  deleting deleting code that that is no

  longer necessary or you know like once

  there's a new ability to do something

  like a new API comes out from Apple and

  a new OS release that makes a whole

  bunch of my code obsolete

  I love deleting that old code and

  getting rid of it getting it out of my

  life and moving on using the new Apple

  API assuming it works which isn't always

  the case but usually and having less

  code demanding she like that part is

  nice a lot of programmers myself

  included also frequently get the itch to

  rewrite things in a better way and that

  sometimes that is a good idea it often

  isn't it sometimes it's just a big waste

  of time and a way to create all your all

  your bugs all over again but it

  sometimes it is a good idea but I think

  with with Swift coming in for Objective

  C programmers the the motivation is is

  less there at you know and as you said

  it is still changing a lot for most of

  its first year the tools were still

  really immature and we're still having

  lots of crashing and performance issues

  and and that seems to be resolved so far

  from from people who have written Swift

  so far who are really into it more than

  us it does seem like I've been kind of

  like paying attention to what people say

  about it what how people report like oh

  we converted a big project or we started

  that we started and a new project in

  Swift and here's how it went for us and

  in the early days those stories were

  really rough they were the only things

  that were really not compelling because

  everything was still so immature or

  unstable as time has gone on in just a

  year and a half which is pretty quick

  that has settled somewhat and and a lot

  of people are now saying ok now you can

  jump in I've done a project on Swift and

  it was fine for us so it really did I

  think now would be a safe enough time to

  jump in and it wouldn't be too

  unreasonable but again it comes back to

  you know how do we allocate our limited

  time and our limited resources and how

  much time are we willing to devote to

  messing with something that's still new

  and immature and and adapting to it as

  it changes like to me like I've always

  said in the past and we'll talk about

  server-side stuff I'm sure many times

  but I've always said in the past that my

  server-side stuff I want to be very

  conservative with especially as you get

  lower down the application level stacks

  so if you you know if you want to try

  out a new you know Web API

  cool whatever you know a new new

  application-layer thing as you go down

  the stack I don't want to be running a

  cutting-edge Linux distribution I want

  to be running a very conservative OS I

  want to be running a very conservative

  database you know all like as you get

  that low level with like you know the

  data layer and the infrastructure layer

  of these things I don't want to be on

  the cutting edge of anything there

  because the cutting edge is where you

  get bugs and instability and and you hit

  limitations as you move up the stack I

  feel like you have more tolerance for

  things like that like for risk in those

  areas for me the programming language

  that you're writing your code in is

  pretty low level and with Swift you at

  least have the benefit of you can mix it

  in slowly and that is ver that it was

  very wise of Apple to do there are some

  downsides to like things like they

  couldn't make as clean of a jump as they

  as they might have wanted to because

  they have maintained backwards

  compatibility with Objective C libraries

  and stuff but for the most part I think

  that was wise because we can kind of

  wade in slowly when we decide that's the

  right move but at the same time you know

  because of my conservatism in in those

  low-level things I don't really see a

  huge reason to jump in yet because I

  don't want to be programming with a

  cutting-edge language and not only for

  instability reasons and for for having

  to relearn things as they change things

  over time not only for those reasons but

  also right now we don't really know what

  will eventually be known as idiomatic

  Swift an idiomatic Swift API design we

  don't know those things yet those are

  still being worked out a lot of people

  and and I'm not one and I don't think

  you are one either a lot of people love

  being a part of that process of figuring

  out what the idioms should be and and

  creating helping to create them and

  helping to work out how things and

  helping to experiment with like oh maybe

  we should design api's in this way maybe

  the right way to use the language is

  this I am NOT into that at all for me I

  would rather let that let the smarter

  people than me who care a lot more about

  language design and who are better at it

  than I am

  let them figure out the idioms and the

  language of design and the API design

  and then I want to just take the

  finished product and master one thing

  that they have figured out over time and

  apply that into building apps that I

  want so it's like you know I want to

  closer to the product building side not

  the messing with languages side if that

  makes sense yeah cuz I mean the process

  of it sounds vaguely interesting like

  sort of feel oh let's be let's be part

  of the process and you know it seems

  like this Swift team is very responsive

  and that all those things on that side

  seem to be very encouraging in that

  regard if you that were something you

  were interested in but it's just like

  effort going into something that isn't

  making my apps better isn't making my

  customers happier isn't helping me ship

  something more impressive it's like it's

  going into something that is kind of

  intellectually cool but it kind of feels

  it's like the difference between someone

  who is in academic versus like who has I

  think I'll probably make some more

  practical living like I'm very glad

  there are people who enjoy that a more

  academic side of computer science who

  come up with the the new things and push

  boundaries and go down ten sort of dead

  end roads before they find the thing

  that is actually the thing that we're

  gonna want to use in practice like I'm

  really glad those people exist but it's

  a very different thing than with the

  skills and the experience and the time

  allocation that you would want to do if

  you actually have to ship something and

  ultimately especially if that thing at

  the you ship at the end of the day has

  to like make your living then the last

  thing you want to be doing is playing

  around with stuff that isn't quite baked

  or isn't quite to the point that it's

  like it's this is exactly the way you do

  it because I think in Objective C it's

  very established at this point it's an

  old enough language and it's use has

  been so focused in by Apple and its

  benefited from the fact that I think

  Apple is the only people who sort of

  typically use it in a way that like

  language like Java or C has so many

  different uses that it's doesn't quite

  have that same heavy hand that Apple I

  think has been able to bring to it where

  as they've improved and changed the

  syntax and the details of objective-c

  like it is now very finely tuned to go

  along with cocoa and it to go along with

  iOS and to go along with all of the

  things that go into building for apples

  platforms that it's very straightforward

  like there is probably one way to write

  most you know sort of most functions in

  most code and once you learn it and once

  good at it then you know you're doing

  the right thing and the process of

  letting that for Swift just sounds like

  kind of scary until that thing settles

  down and so I'm not really sure what's

  ultimately gonna get me to learn Swift

  like I was thinking about it what could

  Apple do it obviously are doing all the

  right things on the marketing side of

  saying like this is the hot new thing

  all their sample code is in or most of

  their samples code is in Swift to WTC

  all the session videos all the code on

  the slides is in Swift like they're

  pushing it as hard as they can from a

  marketing perspective but my gut says

  until they come out with something that

  says you can only interact with this

  platform or interact with this library

  in Swift I probably won't learn it

  that's just so that's just the practical

  reality like I'd almost wondered if when

  they were announcing things like the

  watch or the TV if at some point they

  would say this is a swift only platform

  and architect like the runtime for it or

  the libraries for it - those types of

  things in such a way that say like this

  is the only language that it's going to

  work and if they did that obviously like

  I'd have to learn I mean it's sort of

  like with the TV OS where you can write

  apps natively or in the TV ml like

  markup language if it said oh we're only

  gonna do T the TV ml stuff then like

  okay if I want to do a TV app I would

  have learned that but it seems like it's

  probably only going to come out of

  necessity rather than out of just like

  the intrinsic desire right yeah I mean

  at some point they are probably going to

  have swift only API is in the same way

  that there are objective-c only api's

  now and originally you could you know

  you could write in C if you wanted to

  you could write a lot of Mac apps only

  and see it in the olden days that's how

  all of them were written and you know

  over time Java C came in and and there

  are there have been to see only api's so

  over time there will be Swift only api's

  eventually you know as Apple add new new

  api's to things but that doesn't

  happened yet and even internally Swift

  is still so young that even internally

  Apple is hardly using it for anything so

  if they can't even work it into their

  workflow in in mass yet then I think

  that shows that we are not yet to the

  and we're not close yet to the level

  where it's a requirement for everybody

  to use that being said you know I think

  if you're starting out fresh if you

  don't know how to program it or if you

  only have a little bit of programming

  knowledge so far orbs have C knowledge

  so far and you and you're looking to

  expand your knowledge it's starting now

  by all means do that in Swift like it

  doesn't I don't think it makes a lot of

  sense to learn Objective C from scratch

  now now that Swift is coming up and and

  being you know being the hotness

  although that being said I think it's

  very likely that any any iOS app will

  probably you will probably need to know

  some you have to see at some point to do

  something similar to how Objective C

  programmers generally like you can get

  along pretty well most of the time but

  occasionally you have to call a C

  function or you have to know how C works

  enough to use some some API that is C

  only so new programmers should

  definitely start with Swift I would say

  just because you you generally don't

  want to start with something that is on

  its way out long term you want to start

  with something that is going to be as

  useful as long as possible yeah and I

  think the funny thing is like I know

  enough Swift at this point that I can

  read it but I can't write it because I

  was like often I'll you know searching

  on Stack Overflow and I'll find an

  answer to something that I was

  struggling with and the answers written

  in Swift and so I need to work out how

  it works and so at this point I know it

  enough to be like the it cert but it's a

  you know it just enough to be like

  read-only but I couldn't ever create it

  out of nothing and I think if you're new

  to some things like your goal is

  probably going to be to learn Swift well

  enough that you can write your programs

  in it and program in it but then no

  objective-c at least well enough that

  you can read it and understand what's

  going on with all the crazy square

  brackets and the general kind of

  structure of it but that's probably all

  you'll ever need to actually you know in

  practical use right exactly and and

  there are certain things about Swift too

  like it isn't it isn't a guarantee that

  if you like objective-c that you will

  like Swift it is it is a different style

  of language it is not objective-c with

  pointers removed like that that isn't it

  it it is not like what all people were

  saying before Swift was unveiled it was

  like oh just just making

  to see without the see and that is even

  how Apple introduced it on this on the

  keynote slide but that really isn't what

  it is at all it really is more like a a

  modern reinterpretation of C++ and so

  this is going to mesh better with some

  people than others for me honestly I

  don't like a lot of it a lot of what I

  know of it at least so far and again I

  haven't used it in a project yet so this

  could change as I use it but a lot of

  the things that that are some of its

  more advanced features like generics I

  don't think I will ever use most of that

  stuff you know there's this is going to

  kind of gel better with some people in

  others and that might influence what how

  early you want to jump into it because

  for me it hasn't done much for me and

  and it it doesn't really appeal to me as

  strongly as as some other changes would

  have or may have then I'm in less of a

  rush but if you're the kind of person

  who you enjoy those kind of language

  features that it's adding or you enjoy

  the kind of formalism that it that it

  imposes that wasn't there before then by

  all means jump in you know it's but

  that's not going to be true of everybody

  and I think that's okay yeah and I think

  it's like I have gradually gotten better

  about having the gate like the Swift's

  guilt of having that feeling like oh I

  really should you'd be learning this and

  it's likely understand it's like at some

  point I'm sure it's in my future I don't

  know when that is it's it's the role

  it's gonna play and my future is also

  going to depend on where Apple takes

  their platforms and what platforms and

  opportunities make the most sense for my

  business like you know I don't know like

  iOS is relatively young and it's also

  relatively old like seven years or so

  for a platform is getting to a point

  that you start to wonder you know is

  something new coming along that is going

  to be you know sort of overtake it

  because you know very few things in

  technology seem to last more than 10 or

  15 years and so we're at least sort of

  towards the middle if not the tail end

  of except of this you know this way then

  you sort of keep your eye out for what's

  which platform and what opportunity is

  going to be the next big thing because

  as we were saying last week about yeah

  but you know market opportunities and

  and you know how to how you can take

  advantage of a market that's like on its

  boom time and then how quickly that

  window Falls

  as it gets more crowded it's the same

  thing with with languages and

  technologies like if you can get in

  relatively early two things now again

  again this is a balance between like

  conservatism and stability versus you

  know how cool it is to try new things

  and whether whether you're the kind of

  person who loves just trying new

  languages for the sake of trying them

  and and you know or whether you're more

  kind of product focused like me and

  David here but I think there's a similar

  kind of window with technologies where

  like as I said like this is you can tell

  that this is big this is the beginning

  of the end of yet to see and it's going

  to be a long way down it's gonna think

  we're gonna it's gonna be here for a

  while yeah we're not talking five years

  we're talking at least ten that is still

  gonna be around and still be relevant I

  mean look at how long I mean look I just

  said like you know see function still

  exists that we still call routinely for

  most efficacy apps and that those have

  been there since the you know since the

  beginning of core foundation which was

  what in the late 80s I mean it's gonna

  be at least until Apple replaces their

  fundamental like OS stress structure

  probably or something like that because

  the Apple isn't gonna rewrite all their

  apps unless they absolutely have to

  right and all the foundation classes I

  mean Swift is still switch has has its

  own you know strings and it's it's own

  arrays but there's so many things in

  Foundation and networking and IO and

  graphics all these things that that

  Swift is still calling the system

  Objective C and C api's to do those

  things so it's not like they threw it

  entire stack in the entire API you're

  just writing things in a new front-end

  language it's not like that whole stack

  is gonna go away in two years or five

  years or even ten years I think that's


  anyway we are sponsored this week by our

  friends at NS screencast and a

  screencast features short focused

  screencasts on iOS development every

  week you're going to find a new

  fantastically produced episode that will

  help you build and enhance your

  development skills now I've been looking

  at these for this past week since they

  came to us with this have you look these

  to David yeah yeah these are great the

  production value on these is really

  really high and they're what I like

  about them is that they're short like

  the idea is it's just one short episode

  a week and you just keep up with it

  and you you can kind of keep up on new

  technologies you can learn new things

  but it's not you don't have to jump in

  and watch like a 45 minute conference

  video just to keep up with what's going

  on or to learn something new it's a nice

  overview with examples and everything

  the production quality I think is great

  have you seen one that that you liked

  yeah I mean I love I've actually

  speaking of what we've been talking

  about it and watching a little bit of

  the ones about Swift just to kind of

  keep an eye on what's going on there

  because like we said it's not something

  I'm at the level where I want to spend a

  lot of time on it but it's really

  helpful to just be able to sit down and

  watch a short like 10 15 minute video to

  get a sense of like what are the all

  these fancy keywords and things I keep

  hearing people talk about and so I can

  sit down and watch you know what's new

  in sort of Swift 2 or Swift new Swift

  optionals they're all the kind of these

  things that are totally new and get a

  very short amount of time understand

  what's happening without you know sort

  of sitting there and just going through

  the documentation myself and so that

  found that to be really helpful you can

  watch these videos on the web on iOS or

  you can even they also have a TV OS app

  they they're already in the Apple TV you

  can watch it right there on the NS

  screencast TV OS app all this costs just

  9 dollars a month or $100 a year with

  team plans available - you can get 30%

  off your first month by signing up at NS

  screencast.com slash first crack and a

  screencast comm slash first crack thank

  you so much to enter screencast for

  supporting this show and all of relay FM

  all right and the last thing I wanted to

  talk about briefly with Swift I thought

  would be kind of an interesting I mean

  it's the best way to call it as a

  thought experiment is I was recently

  trying to think through if in the

  limited amount of time I have to learn

  something if I would be better off it's

  putting that time and energy into

  learning Swift and in you essentially

  embracing the future of iOS or

  diversifying and learning modern Android

  development and when I've sort of posed

  that question to myself the answer

  immediately wasn't obvious because I

  think about it in Swift I'm like okay

  it's the future of the platform and

  that's better

  you know I've you know I'm very

  committed to iOS that's where I make the

  majority of my living but it also means

  that I'm tied in to like you know one

  basket like I'm putting all of my apps

  all my eggs into that one basket and

  there's part of me that wonders if would

  I be better off if

  instead I like took that energy of

  learning something new and put it into

  learning Android in the end I'm

  skeptical if I actually ever would

  because it's so hard to think about

  developing for a platform that I don't

  use on a regular basis but I think my

  gut says at the end of the day I would

  actually probably be more prudent for me

  to know both iOS and Android then to

  know iOS and then iOS plus Swift and

  sort of as I know it now yeah I think it

  really depends I mean obviously I think

  you can learn Swift more easily than you

  can learn Android because you are still

  on the same platform calling it to most

  of the same api's and everything so I

  think it's Swift would be an easier

  transition also Swift would eventually

  replace your objective-c

  slot in your mind you know like so it

  wouldn't you wouldn't it wouldn't be

  like an additional thing that you that

  you'd have to decide where to spend your

  time between on an ongoing basis it

  would be kind of like a one-time big

  transition over you know six months or

  whatever however long it would take you

  to really like master it and really be

  doing it full-time but Android of course

  opens up way more market share I mean if

  you're if you have a handful of apps

  well you have more than a handful but

  suppose somebody has a normal number of


  yep support and and and they have to

  choose whether to you know convert all

  their existing apps from Java C to Swift

  or port them to a new platform obviously

  that the right move there B to Portland

  a new platform because the customers

  don't care what language your app is

  written in so you wouldn't get any

  benefit on the customer side by

  converting to Swift it's more of like an

  investment in your own long-term ongoing

  education long term craft you know long

  term time savings for yourself assuming

  Swift will save you time in the long run

  which I think it probably will over time

  but we don't know that yet really so

  it's a question I mean these are this is

  a great thought experiment I this is one

  reasons why I wanted the podcast with

  you because I you are so good at coming

  up with these these crazy ideas because

  it isn't that crazy like if you think

  about it going on to a new platform is

  probably a better idea than relearning

  the the language on the platform you're

  already on

  that being said if you specialize in one

  of these areas if you specialize and you

  say you know I'm gonna just be really

  really good at making iOS apps and I and

  then and that way you know to do what

  you do to be able to try out a whole

  bunch of ideas to be able to make things

  make new apps quickly and deploy into

  the store quickly if you if you get

  really really good at that one thing

  versus if you if you spread your

  knowledge out into into a more broad

  toolset really so you're able to make

  iOS apps and Android apps and maybe

  after something else maybe Mac apps

  maybe web apps and you know if you

  spread it out and get more wide like

  that I feel like that might be harder

  for one person to be very productive and

  very successful for themselves because

  they're there's so much overhead

  involved in in dealing with these

  different ecosystems different platforms

  different languages different api's I

  feel like you can be better specializing

  in one and being able to just really

  crank out high volume work on one rather

  than spreading yourself out very wide to

  be able to do a wider variety of things

  does that make sense yeah and I think

  ultimately that's probably miss the

  reality if that's where I am that's

  where I have been for the last year and

  a half since this was it would even be

  sort of a thought experiment that could

  exist is ultimately for me and my

  business to run I have to be

  extraordinarily productive in one thing

  and should be in a true expert and be

  able to really you know if I have an

  idea for an app to be able to build it

  very quickly and for me right now that's

  be writing you know iOS apps in

  objective-c like that's something that I

  can really crank out just from by the

  virtue of having so much experience with

  it and I think until such time as doing

  that thing having that expertise and

  having that sort of finely honed of a


  ceases to be the thing that I need to do

  and it becomes like okay now I should I

  need to diversify I need to go somewhere

  else like it isn't working on iOS

  anymore that's probably where I'll

  continue to go and but in this you know

  this is for the same reasons that I

  haven't learned Swift is probably the

  same reasons that I haven't learned

  Android it's that same thing of it's

  like I like and it seems to work well to

  be a true master of one thing and to

  drive that you know sort of driving

  perfect your art in craft of doing that

  one thing is probably better than

  becoming a complete generalist but being

  sort of some more superficial in all the

  different areas and this is obviously

  currently coming from the perspective of

  being independent like if you work in a

  bigger company you may have to be a

  generalist and be working in all these

  different platforms and areas because

  that's just what your boss tells you to

  do but because my boss doesn't tell me

  to do anything

  I came able to sort of go with whatever

  makes sense for me right and that's it

  and I think it makes sense for big

  companies to diversify because you know

  when you look at the way big companies

  structure their engineering departments

  you don't usually have one person who's

  in charge of five different platforms of

  apps and they're the only ones working

  on them usually you have employees who

  were specialized and so the whole

  department might be able to be more

  broad and have an app for iOS and an app

  for Android and even look at Windows

  Phone or Blackberry or whatever else

  comes along but each individual person

  to maximize their efficiency is usually

  only doing one of those things you know

  it makes sense for companies to be able

  to afford to be more broad but for

  individuals to maximize what you can do

  I think it makes the most sense for

  individuals to be specialized yeah and I

  think that's sort of where we're just

  canned up good end up for today's

  discussion that I think Swift ism is a

  powerful useful tool that I'm glad

  exists and glad Apple is pushing the

  platform forward on but I don't expect

  to use it anytime soon I'm sure both of

  us will use it eventually and it might

  even be faster than we think it might

  even be like next year but I'm I'm

  certainly not in any rush to start doing

  it right now but that's fine

  yeah and I think that's probably where

  we'll end it for today thanks for

  listening everyone please tell your

  friends about the show help us spread

  the word recommend us an overcast and

  we'll see you next week see you next