PodSearch

Under the Radar

Under the Radar 22: Version Control

 

00:00:00   welcome to under the radar a show about

00:00:01   independent iOS app development I'm

00:00:03   Marco Arment and I'm David Smith under

00:00:05   the radar is never longer than 30

00:00:07   minutes so let's get started so today we

00:00:09   wanted to talk about version control and

00:00:12   this is this is a great collaboration

00:00:15   tool and therefore the two of us who

00:00:19   work by ourselves are going to tell you

00:00:22   drawing on our vast experience about

00:00:25   using version control with all the

00:00:27   clever things you hear about with like

00:00:29   git and you can have merging and

00:00:31   branching strategies and rebasing and

00:00:33   all the things that thankfully I never

00:00:35   have to deal with because I tend to just

00:00:37   work by myself and I'm collaborating

00:00:39   with myself and so thankfully things

00:00:41   typically and like merge conflicts not a

00:00:44   big problem for me it turns out Hudson's

00:00:46   but still I think version control is a

00:00:48   very important part of like the

00:00:50   discipline of software engineering and

00:00:52   so it seemed like it was something that

00:00:54   was we worth discussing

00:00:55   even if obviously you know jokingly some

00:00:57   of some of them are collaborative parts

00:00:59   of it aren't as relevant for us I mean

00:01:01   for me like I have most of the same

00:01:03   situation in that I'm mostly

00:01:05   collaborating with nobody but there

00:01:07   there have been times where I've seen a

00:01:09   lot of the value of it Ferns I mean you

00:01:10   know I used to work at normal jobs where

00:01:12   I've had other people working with me so

00:01:13   we would do things there but that was

00:01:15   that was back in the subversion days and

00:01:17   it was much simpler and it was still

00:01:20   very small teams and these days you know

00:01:24   I mostly you know don't do any kind of

00:01:27   elaboration however I do have a couple

00:01:30   of open-source projects that I run and

00:01:32   and most of them get no activity

00:01:35   whatsoever but a few of them do get

00:01:37   third-party contributions and I have

00:01:39   done you know get-get pull requests and

00:01:42   merges and stuff like that and those

00:01:44   things so I have minimal experience

00:01:47   there and you and I actually just

00:01:50   started accidentally collaborating on on

00:01:52   something and I don't think that's even

00:01:53   worth mentioning what it is it's it's a

00:01:55   very very narrow need that both of us

00:01:57   happen to have and almost nobody else

00:01:59   does I committed to your codebase the

00:02:02   other day and that was like the first

00:02:04   time I've ever committed to someone

00:02:07   else's iOS codebase and I thought and

00:02:10   you said that was ever the first time

00:02:11   that anyone's ever committed to yours

00:02:12   right

00:02:13   it's been a very long time since like

00:02:15   2011 2012 I think was the last time I

00:02:19   had I had any kind of collaboration so

00:02:21   yes it's it is very much a rare thing

00:02:23   but it was kind of fun like I was like

00:02:25   someone else it's like I have to do a

00:02:26   fetch and have like a pool rather than

00:02:28   just to push this is novel and exciting

00:02:31   yeah I don't know how I would deal with

00:02:33   that in my ABS I probably fix all the

00:02:36   all the style differences which is like

00:02:38   the huge faux pas to like restyle

00:02:40   someone else's commit but like version

00:02:43   control like there is a definitely

00:02:44   collaboration is an important part of

00:02:46   that and there are lots of different

00:02:48   ways to deal with that like obviously

00:02:50   like we're saying for us we don't do as

00:02:52   much from a collaboration perspective

00:02:53   but I've you know I've worked in

00:02:54   companies where it's an important thing

00:02:55   and there's lots of great mechanisms for

00:02:59   this now like this is something that I

00:03:00   think back to I think my first my first

00:03:01   version control system was CVS I think

00:03:04   yep and then I went to subversion and

00:03:06   then to get and in every time like the

00:03:09   tool itself gets better and less awkward

00:03:11   and less cumbersome and I think about

00:03:14   the things that are even things like

00:03:16   github or bitbucket or there's lots of

00:03:18   kind of these online backs or front ends

00:03:21   for the repository which makes them any

00:03:25   of these things so helpful and well I

00:03:27   don't do a lot of it whenever I've had

00:03:28   to do something like that where you have

00:03:30   like you submit a pull request and you

00:03:32   can have notes in code review and a lot

00:03:35   of these things are nice and clear and

00:03:36   obvious rather than just kind of sitting

00:03:38   there at the command line trying to work

00:03:41   out what's going on when someone else

00:03:43   submits code and it crashes into yours

00:03:46   and things are horrible and broken and

00:03:49   so you know can you can do some pretty

00:03:50   powerful things too like I remember back

00:03:52   with Mayor Lee it is a version control

00:03:54   where you had to like you would check

00:03:56   out specific files that you were going

00:03:58   to change and things like that that

00:04:01   would be very cumbersome and you'd be

00:04:02   like every now and then you'd go down

00:04:03   the hall and you know like ask Jim down

00:04:05   the hall hey are you done with that

00:04:07   header because I need to add something

00:04:09   to it for my part of the you know of

00:04:11   this app and things like that which you

00:04:13   know most modern version control systems

00:04:16   can just deal with in terms of Bill you

00:04:18   know you feel that if you add at the top

00:04:19   and he had it's the bottom it just goes

00:04:21   and that's fine and you know the

00:04:22   concerns be problematic if he's changing

00:04:24   something in one way and you're changing

00:04:25   it or another but

00:04:27   you know by and large collaboration is

00:04:29   much easier from a version control

00:04:31   perspective than it used to be because

00:04:34   you can just you have these nice visual

00:04:35   tools and you know mechanisms by which

00:04:38   you can you know each share and share

00:04:41   access into a repository yeah I mean

00:04:43   it's it is so nice to have you know

00:04:46   modern modern conveniences with these

00:04:48   things and modern advancements I mean

00:04:50   you know I - I never did the systems

00:04:52   where checkouts are exclusive to one

00:04:54   person but just basics of like

00:04:57   versioning and merging from it all these

00:04:59   systems are great and you know and

00:05:01   especially like branching became a lot

00:05:03   easier with git and then the DVCS model

00:05:06   and these things I mean it just it just

00:05:08   helps so much when you're working on a

00:05:10   team and also when you're working by

00:05:11   yourself and I think that's what we

00:05:12   gonna talk about too is like even when

00:05:14   you're working alone these systems

00:05:16   provide invaluable help and and I think

00:05:19   every developer this is actually I know

00:05:22   that not every developer who works for

00:05:25   themselves

00:05:26   does version control and I think not

00:05:28   doing it as a huge mistake

00:05:29   yes I don't even know how I mean that

00:05:31   just seems like that's like the wild

00:05:33   wild west where like are you like

00:05:34   copying folders like any time you know

00:05:37   like it's when you have like version 1

00:05:38   version 2 version 3 like that's that's

00:05:42   chilling yes use version control

00:05:44   whatever it is it doesn't like its 20s

00:05:46   it doesn't really matter which one you

00:05:48   choose like if you're a get person and

00:05:50   mercurial person if you want to use

00:05:51   subversion if you want to do something

00:05:52   else like that's fine but you have to

00:05:54   use something because I think at you

00:05:57   that's like the thing that you also can

00:05:58   keep in mind with version control is

00:06:00   like it's a powerful like development

00:06:02   tool like in the way that you and I like

00:06:04   we probably spend most of our

00:06:05   development time in Xcode or in some

00:06:08   ways and like textmate or something for

00:06:10   doing like web programming but the tool

00:06:15   it's the tool of version control is

00:06:17   pretty powerful one in terms of it being

00:06:20   a part of your development process and

00:06:22   allowing you to do things that would

00:06:24   otherwise be really awkward like I love

00:06:26   and get having like branching of being

00:06:28   able to be like I have this idea for a

00:06:32   way to kind of restructure something or

00:06:34   do a big refactor or take like take some

00:06:37   code and you know take it in a different

00:06:39   direction

00:06:39   and I can just branch off from like my

00:06:42   main thing try it for you know a few

00:06:45   days and if I end up it turns out to be

00:06:47   just this complete dead end I can sort

00:06:50   of just like throw that away and go back

00:06:52   to where I started from in a way that is

00:06:54   nice and clean and reliable and isn't

00:06:57   going to break something or if I need to

00:06:58   want to just like cherry-pick part of

00:07:00   that in I can do that in a controlled

00:07:02   way and also just to look at what I've

00:07:05   been doing like sometimes all you know

00:07:08   it's being able to look at the like in

00:07:11   some ways you'd think like the blame

00:07:12   part of version control if you work by

00:07:17   yourself and if you're not familiar like

00:07:18   blame in most version control systems

00:07:20   you can look at any line of code and see

00:07:22   who created it and when that was created

00:07:25   in the history of your project you know

00:07:27   and so this is the classic like if

00:07:28   someone breaks the build you can run

00:07:30   blame on it and see who broke it but

00:07:32   even for myself like when the names are

00:07:34   always me it's often really helpful to

00:07:36   be able to look back and be like why am

00:07:38   I doing this this way and I can go back

00:07:40   and see that comment interesting I added

00:07:42   this as you know at you know two years

00:07:44   ago when I was working on X feature and

00:07:46   that's often really really really

00:07:48   helpful to be able to look back and to

00:07:51   understand my own code even better and

00:07:54   even more so if it's you're

00:07:55   collaborating with with someone else and

00:07:58   even just to be able to like one thing I

00:08:00   always do F as it have in my development

00:08:02   cycle is I look I take the last commit

00:08:07   that like the version that I just

00:08:09   released and whenever I'm getting ready

00:08:11   to submit to the app store like the very

00:08:13   last step in before I hit like actual

00:08:15   archive and submit to the app store is I

00:08:18   always go and run a diff between the

00:08:21   last submitted version and my current

00:08:22   version of the code and I just go

00:08:24   through like sort of line by line in all

00:08:26   the changes and make sure that there's

00:08:28   nothing in there that jumps out it to me

00:08:30   is like whoa why is this still in here

00:08:33   that are like that doesn't seem right

00:08:35   and I've caught several bugs in my

00:08:37   development in my process that way by

00:08:39   having using version control as a tool

00:08:41   to help me write better code yeah I mean

00:08:44   that's the biggest value of it as

00:08:46   independent is that it's it's it's

00:08:48   giving you a tool that can show you what

00:08:51   you've changed and when you changed it

00:08:53   and possibly why you changed it but

00:08:55   that's like just knowing what has

00:08:57   changed whether it's what did I do

00:08:59   today to this one file so I know whether

00:09:01   to even commit this change or not or you

00:09:04   know what's that you know what has

00:09:05   changed in the entire app between this

00:09:09   version which I know worked in this way

00:09:11   and the current version which keeps

00:09:13   having this weird bug that I can't

00:09:14   figure out why it's happening you can go

00:09:16   you can see all right well here's

00:09:17   everything that's different between

00:09:18   these two so the bug is because of some

00:09:20   part of this you know and like it's it's

00:09:23   so it's so useful to know that stuff

00:09:24   everyone can get value out of that you

00:09:27   know it also it helps it helps even if

00:09:29   you have to work on multiple computers

00:09:30   or if you're working on you know for

00:09:32   like if you have a deployment on your

00:09:34   server and one locally and your

00:09:35   computer's you keep those synced up

00:09:37   properly and in a sane way I mean it's

00:09:40   it's just so great I I'm I'm still sure

00:09:43   I'm shocked that anybody still doesn't

00:09:45   use it but fortunately most people do

00:09:47   use I think most people have come around

00:09:48   to do it now so we're mostly mostly

00:09:51   saying in that way in an industry that's

00:09:52   insane and so many other ways we're

00:09:54   mostly saying in that way yeah and it

00:09:56   really helps in that regard that it's

00:09:59   also becomes so much easier to do like I

00:10:02   think of in Xcode like it has like

00:10:04   full-on version control built into it

00:10:06   like in terms of e not even like it's

00:10:08   weird snapshotting thing that it always

00:10:09   asks me when I'm refactoring a project

00:10:11   and it asked me do I want to make a

00:10:13   snapshot and I don't really know what

00:10:14   that means I really don't think I do but

00:10:17   it has it built in like it all of my

00:10:19   projects whenever I'm changing something

00:10:21   like it's really helpful in Xcode to

00:10:23   just see what's changed and like once I

00:10:25   change something it gets a little M icon

00:10:27   next to it that says it's modified or

00:10:28   for the additive fried file to it it's

00:10:30   there and so there's no reason not to be

00:10:33   aware of this type of thing

00:10:34   because the tooling in is in place to

00:10:37   make that just so easy and streamlined

00:10:40   that they could be a fool not to yeah

00:10:44   and what you know whether you do it on a

00:10:45   hosted service like github or bitbucket

00:10:47   or whether you do it just locally like

00:10:49   you know you can almost all these

00:10:51   systems you can have a local server if

00:10:53   you want to and not have it significant

00:10:55   like you know remote slash paid web

00:10:57   service but I recommend if if you can

00:11:00   swing it for you know regulatory reasons

00:11:02   and for for money reasons I recommend

00:11:05   just putting it on github or bitbucket

00:11:07   like put it put it on one of the big

00:11:08   hosts because it just it outsources a

00:11:11   class of problems that you don't need to

00:11:13   deal with anymore and also you get a

00:11:14   whole lot of convenience for having that

00:11:16   be on a hosted system you have the nice

00:11:18   web gooeys you have the ability to

00:11:20   access it from anywhere multiple

00:11:22   computers you have kind of this built-in

00:11:23   backup so it's yeah definitely hosts it

00:11:27   if you can and please please use version

00:11:30   control yeah and that's guessing too I

00:11:32   think then another kind of interesting

00:11:33   aspect to version control which is the

00:11:35   like the backup portion of it yeah like

00:11:38   both in terms of like what you're saying

00:11:40   where like it's another physical backup

00:11:41   like in the same way that you should

00:11:43   have probably a clone of your main

00:11:45   development harddrive running all the

00:11:47   time and like backup in that sense of

00:11:48   like being able to you know not have if

00:11:51   my computer dies that's suddenly like

00:11:54   I'm out of luck and that's it like the

00:11:56   only copy of my code was sitting on that

00:12:00   machine like that that that's terrifying

00:12:03   like you have to have it backed up in a

00:12:05   lot of ways because like the funny thing

00:12:08   about being doing the kind of work we do

00:12:10   like there's no sort of tangible the

00:12:14   only tangible outcome of our work is

00:12:16   like a collection of sort of like text

00:12:18   files and images sitting on our hard

00:12:20   drive and so like the amount of time and

00:12:22   energy and money that goes into creating

00:12:24   those we have to treat them like

00:12:26   incredibly carefully like if we were

00:12:29   it's like we were at coca-cola and we

00:12:31   have to keep you know I imagine like the

00:12:33   recipe for coca-cola is very well

00:12:35   protected and backed up and guarded to

00:12:37   make sure that they can keep making it

00:12:39   because if somehow like it got lost and

00:12:41   they didn't know the recipe anymore that

00:12:43   would be hugely problematic and so as

00:12:45   developers like our source code is that

00:12:47   thing like even if we have a binary you

00:12:51   know an old binary of our app like that

00:12:53   doesn't do us any good we can't change

00:12:55   that and so it's important to back it up

00:12:57   both in terms of that kind of backup and

00:12:59   then something else then I find it I've

00:13:01   found it so helpful for many times to is

00:13:04   it's having this like being able to go

00:13:07   through like so thick you have this

00:13:09   little time machine that you can go back

00:13:10   in time and say what was my Apple like

00:13:13   at a particular time and like you were

00:13:15   saying earlier this is great for

00:13:17   identifying bug like weird

00:13:20   and bugs worth like it worked in version

00:13:22   two but it doesn't work in version 3

00:13:24   like why is that and you can actually go

00:13:27   back and LOL it'll often end up doing is

00:13:30   you know exports the project from my

00:13:33   version control at a particular you know

00:13:35   milestone and you know change the bundle

00:13:37   identifier and i can run them both at

00:13:39   the same time and i can kind of go back

00:13:40   and forth and I can see why things are

00:13:43   different and that kind of snapshotting

00:13:46   is really helpful to be able to look

00:13:49   back and then even one of the things

00:13:50   that I've it's kind of more silly but I

00:13:52   love sometimes being able to go back to

00:13:56   like the verb like version 1 of a

00:13:57   product after it becomes very mature

00:13:59   both to kind of laugh at myself I just

00:14:02   kind of look at it but also just kind of

00:14:04   for nostalgia reasons of kind of looking

00:14:06   at it and it's kind of nice to have a

00:14:07   sense of like wow I've really come a

00:14:09   long way you know this app used to be so

00:14:12   simple and now it's it's it's so much

00:14:13   more robust and I like that's kind of

00:14:15   fun to have this backup of it that sort

00:14:19   of never goes away in that way like I

00:14:20   always like this is why I also version

00:14:22   control all my screenshots that I submit

00:14:24   to the app store yep you don't like like

00:14:26   they're in there for that same reason

00:14:27   that I sometimes is really fun or useful

00:14:29   or like I'm doing a retrospective post

00:14:31   you know like an app has the you know

00:14:33   and when one of my apps hits a milestone

00:14:34   like it's been you know it's oh it's

00:14:36   five years old like if it's hitting a

00:14:38   milestone it's kind of fun like do a

00:14:40   blog post or something like that to kind

00:14:42   of talk about it and show screenshots or

00:14:43   the icon from a long time ago like

00:14:45   version control is a great place to keep

00:14:47   those things so it's all in the same

00:14:49   place and it you know as time marches on

00:14:51   you can keep a nice accurate record of

00:14:54   what's changed alright our sponsor this

00:14:56   week is Braintree Braintree is code for

00:14:59   easy online payments they are a

00:15:01   full-stack payment platform and you know

00:15:04   why make payment integration more

00:15:06   difficult than it has to be brand tree

00:15:08   allows you to accept nearly any type of

00:15:09   payment from any device with just one

00:15:12   integration they support pave how

00:15:13   bitcoin venmo Apple pay Android pay

00:15:16   cards and they will support whatever is

00:15:18   next all with that one integration it's

00:15:20   flexible to your systems needs and

00:15:22   supports most programming languages so

00:15:24   whether using Java Ruby or Python you

00:15:27   will always have a range of server-side

00:15:28   and client-side SDKs available

00:15:31   the Braintree client code supports

00:15:33   Android iOS and

00:15:34   script and all this takes just ten lines

00:15:37   of code to implement Braintree makes

00:15:39   payments and your job a whole lot easier

00:15:42   learn more at Braintree payments comm

00:15:44   slash radar once again that's Braintree

00:15:47   payments comm slash radar thank you very

00:15:50   much to Braintree for sponsoring our

00:15:52   show and all of relay fm

00:15:54   so I think what might make sense for the

00:15:56   rest of the episode is to kind of talk

00:15:57   about how this actually what we would

00:16:00   like what we do in practice like what

00:16:02   the actual tools that we use what that

00:16:04   like goes around because I think there's

00:16:07   there's certainly a degree to which

00:16:08   version control can become a very like

00:16:12   personal thing and some people like

00:16:13   mercurial some people like it some

00:16:15   people maybe even still love subversion

00:16:17   or there's something new and fancier

00:16:18   that I'm not aware of but like the you

00:16:21   end up with these kind of preferences

00:16:22   and at least I know for myself like I

00:16:23   have kind of workflows and things that

00:16:25   I've built up over time and that are

00:16:28   part of this that maybe are helpful or

00:16:30   if you're looking for a different way of

00:16:31   doing it or different tools for it might

00:16:33   be helpful to discuss so what is your

00:16:35   typical like how do you actually

00:16:37   interact with your version control

00:16:38   system so on the server I just do it all

00:16:41   by command line and I use git and I

00:16:43   hooked on github which I would imagine

00:16:46   github is probably one of the biggest

00:16:48   reasons why people choose git and why

00:16:50   it's so popular because github is is

00:16:52   just so convenient in many ways and so

00:16:54   good in many ways and it is it isn't

00:16:56   perfect but it's it's very good I use

00:16:58   github again private everything I pay

00:17:00   for it it's fine it's it's been very

00:17:02   secure for me and totally fine and

00:17:04   honestly if somebody steals my source

00:17:07   code somehow I don't really worry about

00:17:09   that because source code is not very

00:17:11   valuable like if you get somebody's

00:17:13   source code to their entire app what do

00:17:15   you do with that like you can upload it

00:17:17   but that's illegal and they can easily

00:17:19   get it taken down so like you know you

00:17:21   can make your own app again also illegal

00:17:23   from that you can get it taken down so

00:17:25   like the actual value of stolen source

00:17:28   code isn't particularly high for

00:17:30   somebody's random iOS app so anyway back

00:17:33   to how I use it I use the command line

00:17:35   for almost everything I do in general in

00:17:38   development so MySQL I use the command

00:17:41   line interface to that if I'm doing

00:17:43   development with other server-side

00:17:46   demons like memcache or

00:17:47   Redis I will use the command line to

00:17:50   interface with those to set them up to

00:17:52   to do administrative tasks if I need to

00:17:54   ever get I usually don't do that anymore

00:18:00   git is so complicated on the command

00:18:02   line and so tedious on the command line

00:18:06   that I usually just use git tower as my

00:18:10   GUI which is a it's a Mac app it's some

00:18:14   price it doesn't matter it's worth

00:18:16   whatever price they charge it's worth it

00:18:18   I think it's like 50 bucks whatever it

00:18:19   is totally worth it yet because git is

00:18:23   incredibly complicated and it doesn't

00:18:26   need to be most in most use you can get

00:18:30   by and it's it's totally fine and you'll

00:18:32   be fine but sometimes you have to do

00:18:34   something crazy with it or you have a

00:18:36   weird error that you have to overcome

00:18:38   and anything involving branching merging

00:18:42   of branches certain advanced operations

00:18:44   like committing only part of what you've

00:18:46   changed or or discarding only part of

00:18:49   what you've changed you can do all these

00:18:51   things in the command line but it's so

00:18:54   obtuse to figure out how to do that on

00:18:56   get and many times things can be

00:18:58   multiple commands and many times they're

00:19:00   very error-prone if you do them manually

00:19:01   and you and you could actually do some

00:19:03   damage if you do it wrong so typically

00:19:06   now I just use get tower on the Mac and

00:19:09   I just don't do any kind of operations

00:19:11   like that on the server I'm exactly the

00:19:13   same I use guitar for pie like 99% of my

00:19:16   get it just sort of it works it's very

00:19:19   reliable it's straightforward and like

00:19:22   the way that they present it to I've

00:19:24   always found seem kind of works with my

00:19:26   head like sometimes I've tried some

00:19:29   other get clients and they can get very

00:19:32   like they're showing me too much like

00:19:35   they can get has all kinds of crazy

00:19:37   information and metadata and things

00:19:39   about especially when you have lots of

00:19:41   branches like things that are going on

00:19:43   and I they just hurt my head and like I

00:19:46   likened the way that I used the way that

00:19:47   I use get tower like it it's pretty

00:19:49   straightforward like I open it up I open

00:19:51   our repository it's like here's the

00:19:52   things that you've changed and would you

00:19:54   like to commit them and that's like most

00:19:56   of my process is that and if I want to

00:19:58   make a branch I just like pick the

00:20:00   commit I want to branch from

00:20:01   give it a name and now it's created and

00:20:04   so it does a very good job of showing

00:20:06   that to me in a way that's yeah it's

00:20:09   like it's completely it's one of those

00:20:10   essential tools like if I'm setting up a

00:20:12   new computer there's a like in that

00:20:14   first like five things that I will I

00:20:16   will download onto it one of them is

00:20:18   going to be good tower because I really

00:20:20   can't work productively without it which

00:20:23   is probably saying a lot yeah yeah I

00:20:25   mean again like I I really do try to

00:20:28   avoid GUI tools for for developer stuff

00:20:30   where there is a perfectly suitable

00:20:32   command line version but this is one of

00:20:34   those things where it's so worth it it's

00:20:36   it's it is so you know not only does it

00:20:38   save me a lot of time and it makes

00:20:40   certain operations you know less

00:20:41   error-prone that are complex but also it

00:20:44   just gives me a really good view of

00:20:46   what's going on like you know at most

00:20:48   what we mentioned before like a lot of

00:20:49   what we were talking about is like how

00:20:51   source control can can it can can show

00:20:54   you and help you track what you're

00:20:56   changing what you know what has changed

00:20:58   over time how things used to be or how

00:20:59   things are now and get tower is they

00:21:03   just do a really nice job of showing the

00:21:06   diffs showing the various commits and

00:21:08   what was in each commit showing branches

00:21:10   and letting you do that and it isn't I

00:21:12   mean there are certainly there's

00:21:13   something room for improvement in

00:21:14   particular i I think the sub-module area

00:21:18   is it could use some improvement but

00:21:20   that's most of the most of the areas

00:21:22   that I think tower could be improved

00:21:24   including sub-modules I think are at

00:21:27   least partially or or even mostly

00:21:29   because the underlying get feature is

00:21:32   itself complicated and finicky like

00:21:35   sub-modules suck everything about get

00:21:38   sub-modules is horrible and so I can

00:21:41   understand why the implementation of the

00:21:43   mint hour is also a little bit odd and a

00:21:45   little bit finicky but ultimately I

00:21:47   think if I'm going to be using git this

00:21:51   is the way to do it

00:21:52   yeah I agree and I think it's also

00:21:55   probably worth contrasting to you I do

00:21:57   use the version control integration in

00:22:00   Xcode quite a bit but it's for like

00:22:02   totally different things like like I use

00:22:06   the so a it's just useful to be able to

00:22:09   see what's changed and often what I'll

00:22:11   end up doing is if in the US I called

00:22:13   the Navigator view

00:22:15   like the bottom left part of the Xcode

00:22:18   browser you can say like show me only

00:22:20   files that have changed that have like

00:22:23   an active version control status and

00:22:25   that's really helpful often I find when

00:22:27   I'm like working on something and I can

00:22:28   kind of just see the files that are sort

00:22:31   of I've been working on and both it

00:22:33   collapses a big project into a nice

00:22:34   small list and it's also kind of just if

00:22:37   I see something that doesn't look right

00:22:38   like often I'll find like a nib file

00:22:40   that has changed for some reason that I

00:22:43   don't understand like I don't feel I

00:22:45   opened it up once and touched it and

00:22:47   then horrible things happen and being

00:22:49   able to be aware of that earlier in the

00:22:50   process it's helpful but most of what I

00:22:53   do is they're very helpful like version

00:22:55   control I don't even I'm sure they said

00:22:58   have fancy names but like where you can

00:23:00   compare inside of Xcode your current

00:23:03   version to a past version so it's like

00:23:06   if you're in the in the top right corner

00:23:07   of Xcode there's like the three views

00:23:09   there's like the regular view the

00:23:10   companion view and then the version

00:23:12   control view and in that I'm so often in

00:23:15   there when I'm like looking at code and

00:23:17   trying to see like what's changed how is

00:23:19   this different how did I used to do this

00:23:22   like if I have a problem that I used to

00:23:23   solve once before I go in there and

00:23:26   compare them and then like I was saying

00:23:28   earlier right off I would you know

00:23:29   surprisingly often for working just

00:23:31   myself I'll use blame so let's switch it

00:23:33   into blame mode and look through the

00:23:35   source file and say like you know when

00:23:38   did this change when do when did I start

00:23:40   doing it this way what was that around

00:23:42   and those kinds of tools and having them

00:23:45   like built right in to Xcode is really

00:23:49   useful like I go to tower regularly but

00:23:52   it's when I'm done with something or

00:23:53   when I'm getting ready to do a release

00:23:55   or like in these kind of big strategic

00:23:58   operations I love that Xcode has

00:24:01   integration at the tactical level we're

00:24:03   like I'm actually actively coding and in

00:24:06   that process I don't have to contact

00:24:08   switch to some other app to like look

00:24:09   this up I can very easily just be like

00:24:11   huh you know why am i doing it this way

00:24:13   when did this change and that sort of

00:24:16   thing and so I use those tools in Xcode

00:24:18   a lot but I hardly ever commit or any of

00:24:20   those types of operations you know from

00:24:22   Xcode it has them like I'm sure they're

00:24:24   there and you know it I'm glad they

00:24:26   exist in some way so that like out of

00:24:28   the box you can do

00:24:29   version control but in Xcode I find it

00:24:32   really helpful at that like basic like

00:24:34   the actual line of code level and then I

00:24:37   go to tower whenever I want to do like

00:24:39   actual operations like things that I

00:24:41   would go to a command line and type you

00:24:42   know get clone get branch get merged get

00:24:45   whatever I don't actually know what half

00:24:47   of them are because I just used Tower

00:24:49   instead so I didn't even know this

00:24:52   version view was here I just open it up

00:24:55   now and I'm like my mind is blown like

00:24:57   oh my god this is so useful yes so

00:24:59   someone has not been watching what's new

00:25:01   and developer tools sessions index WDC

00:25:04   for the last few years I think I think

00:25:06   we just discovered that live on air does

00:25:08   that surprise anybody I didn't read the

00:25:11   manual this is great this is this is

00:25:13   amazing all I would all I ever really

00:25:15   use an Xcode was the little M indicators

00:25:17   on the sidebar don't know what I've

00:25:18   changed well there you go now you know

00:25:20   that you can do some of these basic

00:25:22   operations live at Xcode and like I said

00:25:25   they're really helpful they're nice

00:25:28   it turns out turns at all right anything

00:25:33   else this week no I think that's it

00:25:35   mostly I guess just to say make sure

00:25:37   you're using version control please

00:25:38   please please make sure you're using

00:25:39   version control it's one of those things

00:25:41   that if you're not for and like

00:25:43   inversion everything like I version

00:25:45   stuff like I mean there's I don't do a

00:25:48   lot of like Photoshop work but when I do

00:25:50   like I just mean I just put my PS DS

00:25:52   into version control oh yeah and it

00:25:54   doesn't do all the cool fancy dipping

00:25:56   it's not fancy in that way but like I

00:25:58   don't care I I can always go back in

00:26:00   time I can always snapshot things like

00:26:02   whatever you're doing try and version

00:26:04   control it like I've version control my

00:26:05   blog I version control anything I can

00:26:07   because once you get into the discipline

00:26:10   and the habit of doing it like it's just

00:26:12   so much better and it's probably worth

00:26:14   saying I'm terrible about commit

00:26:15   messages because I'm just working by

00:26:17   myself

00:26:18   and it's hilarious like I in most of my

00:26:21   commit messages are often just like

00:26:22   stuff kind of works now yeah mmm this

00:26:25   seems to be better fix fix fix okay

00:26:28   that's enough like it cuz I'm still

00:26:31   creating snapshots like I'm not

00:26:33   necessarily communicating as well to my

00:26:35   future self which is maybe you know like

00:26:38   problematic too you know in some ways

00:26:40   but just having it

00:26:42   like just putting random gibberish in

00:26:44   there and just like you'd be better off

00:26:46   if you just say had get take a you know

00:26:48   take a commit snapshot once an hour

00:26:50   would be you know even if you didn't

00:26:52   want to do anything like having just

00:26:54   some kind of resource to be able to go

00:26:56   back in time is so valuable and I think

00:26:58   can make you such a better developer

00:27:00   especially when you use the Xcode

00:27:02   integration tools to understand how yes

00:27:04   if you watch the videos you can really

00:27:06   do some powerful things so I highly

00:27:08   recommend them all right thanks a lot

00:27:10   that's all the time we have this week so

00:27:12   thanks for listening everybody thanks to

00:27:14   our sponsor Braintree and we will see

00:27:15   you next week bye

00:27:19   I can't believe you didn't know those

00:27:20   were there how did you not know there

00:27:27   yeah that's there's a lot of Xcode I

00:27:30   haven't explored yet like there's only

00:27:34   there's only like in the default navbar

00:27:37   like there's only like six buttons

00:27:39   I just never click on those - yeah the

00:27:42   one nice - semi circles the Venn diagram

00:27:44   one the assistant editor I don't know

00:27:45   what that does either that one is mostly

00:27:48   just like useful for if you have an Abe

00:27:50   in one view and like the related file

00:27:52   and the other one okay like it's

00:27:54   designed to have two things compared to

00:27:56   like next to each other so that's useful

00:27:58   if you like dragging outlets or things

00:28:00   you know from who dragging outlets from

00:28:03   India file into a source file I use the

00:28:04   companion one but yeah I know there's

00:28:07   this whole world the version of version

00:28:09   control that's been waiting for you this

00:28:11   is this whole time I'm so glad we

00:28:15   captured that on