0:00:00Hello, and welcome to Developing Perspective. Developing Perspective is a podcast discussing
0:00:05news of note in iOS development, Apple, and the like. I'm your host, David Smith. I'm
0:00:09an independent iOS developer based in Herner, Virginia. This is show number 64, and today
0:00:13is Friday, July 13th. Hopefully it's not a bad luck episode. As always, Developing Perspective
0:00:19is never longer than 15 minutes, so let's get started.
0:00:22All right, first, a footnote to yesterday's topic, where I was talking about the importance
0:00:26of having side projects.
0:00:28And well, I guess two interesting footnotes to that.
0:00:31The first is I ship my side project.
0:00:33It's called Quick Capture for Cheddar.
0:00:35It's in review right now, and I'll, of course,
0:00:37let you know when it ships.
0:00:39And it's just, like I said, it's a tool for quickly capturing
0:00:42tasks.
0:00:43And it's a tool that I've done before for email-based things.
0:00:46But now that I'm using Cheddar, it
0:00:47was a great little thing that I wanted
0:00:49to use for just kind of brain dumping
0:00:50and doing them, I guess, in a GTD sense.
0:00:52They'd call it a mental sweep or whatever.
0:00:54But anyway, that's-- so I've shipped it.
0:00:56which is always great. But as I was shipping it, it reminded me that I didn't mention one
0:01:00thing that's a very important part for me of side projects. And this is a term or topic
0:01:07that I learned when I used to do Scrum, which is one of the agile methods. And I'm not sure
0:01:12if it's actually related to Scrum or if it was just a term we used in a company where
0:01:16I learned to use Scrum, if that makes sense. But basically, what I learned there was the
0:01:23concept of a time box. And a time box is essentially what you do if you have say you have a classic
0:01:30problem, a pretty standard problem in software development, you say, I want to build X. Well,
0:01:36how long do you think X will take to build? And whether that's in calendar time, man hours,
0:01:41whatever, but it's like, how long does that take? And you know, it's a huge problem. Developers
0:01:47are notoriously bad at estimating how long things take. It's almost impossible to really
0:01:53put some handles on that and say, "Okay, well, this is going to take a day. This is going
0:01:58to take a week. This is going to take a month. This will take a year." I mean, who knows?
0:02:02And so one of the things we used to do for tasks that had many undefines, that were sort
0:02:10of almost, I guess you could say, they're experimental or exploratory, is that rather
0:02:15Rather than taking the usual process of saying,
0:02:18OK, this is a task.
0:02:19I'm going to estimate it at eight hours,
0:02:21put it in the backlog, pick it up.
0:02:23What we would do is we'd say, we're going to do two things.
0:02:27We're going to do a spike on the task,
0:02:30and we're going to time box it.
0:02:31And I'm going to unpack those two terms.
0:02:33So a spike, what we meant is-- you'll often
0:02:36hear people use the word minimum viable product.
0:02:40It's similar to that in some ways.
0:02:41But the goal is to be narrow and deep
0:02:44rather than wide and broad and shallow.
0:02:49And by that, I mean it's really focusing in the concept
0:02:53of what it is you're trying to accomplish
0:02:55and making that so narrow that you can make tremendous process
0:02:59in terms of speed.
0:03:00And as an example, in this application I wrote,
0:03:03in Quick Capture, I--
0:03:05so you make all these-- you just throw away
0:03:07all kinds of things that could distract her
0:03:09and make it more difficult. So I say, OK,
0:03:11I'm not going to do an iPad version now.
0:03:16It'll just be iPhone only.
0:03:18I'm going to punt on a couple of things
0:03:20that could otherwise take more time or be more complicated.
0:03:25So for example, rather than having a Settings app built
0:03:28into my application, I'm going to use a Settings bundle.
0:03:31Perfectly valid, in many ways even more consistent
0:03:33with the HIG and all that.
0:03:36But it means that I just put together a P list
0:03:39but the few notes and entries.
0:03:42And there we go.
0:03:43I got my Settings app in a few minutes.
0:03:46And it's kind of focusing down your efforts
0:03:48into really the core functionality, the problem
0:03:51you're trying to solve.
0:03:53And by doing that, you really help yourself
0:03:55really drive quickly towards the goal of actually shipping
0:03:59something.
0:04:00And then time boxing.
0:04:01And this is probably more important.
0:04:03And the reason I brought it up was this morning
0:04:06when I was in the shower, and I was thinking about what
0:04:08I said yesterday.
0:04:08And I was like, you know, I didn't mention time boxing.
0:04:12And time boxing is a great concept.
0:04:15And basically what time boxing is, is rather than saying,
0:04:18how long do I think this thing will take,
0:04:21it's how much time am I willing to spend on this,
0:04:26which is a different question.
0:04:27It's more a question of the perceived value of your time,
0:04:33the perceived value of the task, and what it accomplishes.
0:04:36And so rather than having it be how long is this going to take,
0:04:40I say, OK, I'm going to give myself a certain amount of time
0:04:43to work on this.
0:04:44And for the purposes of this task,
0:04:46I was like, I'm going to give myself about 16 hours,
0:04:49about two days of regular work.
0:04:53And if I can't get something done in that amount of time,
0:04:56I'll need to re-evaluate.
0:04:58And the purpose of doing that is that it's not so much
0:05:01that you are limiting yourself in what you do,
0:05:05but you're limiting almost your room for catastrophe.
0:05:09You're limiting your ability to get stuck in a rut
0:05:14or stuck in a place where you end up spending
0:05:17way too much time on something.
0:05:19So you kind of end up avoiding going down
0:05:22bunny-- what do you call it?
0:05:23Like rabbit holes or bunny trails
0:05:25or all kinds of things like that, where you say, OK,
0:05:29I'm going to give myself 16 hours to work on this.
0:05:31And that's it.
0:05:32And after 16 hours, I need to either decide if I'm going to keep going, and if I am, I
0:05:36need to give myself another time box.
0:05:38I'll say, "Okay, I'm going to give myself another eight hours, another day, whatever."
0:05:42Or I'll say, "You know, I thought it would be fun.
0:05:44Turns out, 16 hours in, I've got like nothing done, and it's a mess."
0:05:50Maybe this is not for me.
0:05:51I'll just, you know, can the project or put a shell of it or, you know, see what I want
0:05:55to do next.
0:05:56And for me, I found that to be really productive in keeping me focused.
0:06:01It's kind of like the Parkinson's law,
0:06:03if you're not familiar with it, is essentially
0:06:06the time it takes to complete a task
0:06:09will always grow to fill the time allocated to that task.
0:06:13Or put another way, if you give yourself 10 hours
0:06:16to do something, it'll take 10 hours.
0:06:17If you give yourself 20 hours to do something,
0:06:19it'll take 20 hours.
0:06:20And to a certain degree, that's just
0:06:23the way the human nature works.
0:06:26And so by pulling that down and rather than saying,
0:06:28I'm going to start this project and I'll be done when I'm done,
0:06:31you say, "I've got 16 hours. I've got two days. I better get working. I better make
0:06:35a lot of progress on this very quickly. Otherwise, I'm going to be stuck. Or otherwise, I'm going
0:06:39to have to abandon it." And that urgency is great. And in this case, it's like, I worked
0:06:44on shipping an app. It took about 16 hours. I think I've maybe gone slightly over. I think
0:06:4816 hours happened, maybe two hours before I shipped. But at that point, it was mostly
0:06:52the time I had left was sort of the marketing stuff, taking the screenshots and trimming
0:06:57them and writing the copy for the website and things.
0:06:59So it wasn't like-- there weren't development tasks in that way.
0:07:03And so at that point, I was like, well, I'll just give myself the next two hours, which
0:07:06that's the point.
0:07:07The goal is not that I'm cutting myself off then, but it's being mindful of that so that
0:07:12it's not like in two weeks from now, I'm like, huh, maybe this wasn't the best use of my
0:07:17time.
0:07:18Maybe I've kind of gotten sucked into something.
0:07:20And you can apply time boxing to a lot of concepts where it can be to small tasks, it
0:07:25It can be to projects, it can be to an update.
0:07:28It can even be on really small things.
0:07:29Sometimes I do it-- and this is kind of borrowed
0:07:32from the Pomodoro technique, which if you're not
0:07:34familiar with it, just search Pomodoro technique, which
0:07:37is very much you kind of focus your time in,
0:07:39I'm going to work for 25 minutes and then take a break, 25
0:07:41minutes and take a break.
0:07:43And what often I find works really well for me
0:07:45is sometimes I'll be like, I think this feature is worth it.
0:07:48I think this feature is fun.
0:07:50I think people would like it.
0:07:51Maybe I'll give myself a couple of hours and just try it
0:07:54and focus on just getting the barely working
0:07:58and then see if it is actually fun to see if it is actually useful like
0:08:01matchy per my phone and play with it
0:08:03and this is a reason i often really don't get into a lot of like photoshop
0:08:06pixel perfect mock-ups and all those kinds of things that a lot of
0:08:10some people like
0:08:11for me it's like
0:08:11i'd just want to feel it and touch it and often to say okay
0:08:15you know i think this new feature would really work i think people would really
0:08:18like this maybe i'll just throw together
0:08:20and time box and say hey i'm gonna spend an hour on this and in an hour i look at
0:08:24at it and I'm like, "Wouldn't you? Now I can make a better decision." Because the goal
0:08:28is that at the end of it, I have more information to make a better decision about how I spend
0:08:32my time. So anyway, those are just a few footnotes on side projects. If you didn't listen to
0:08:37yesterday's show, "63 Side Projects of Internationalization," definitely give it a listen. I'll have a
0:08:43link in the show notes to it or just developingperspective.com or search "Developing Perspective 63." And, okay,
0:08:50So the second topic I was going to talk to today is iCloud and iCloud syncing.
0:08:57And specifically talking a little bit about a process that I'm about to begin for my recipe book of taking the app and making it sync across servers.
0:09:07And it's a core data-based application, sort of my first gut.
0:09:12And when I first started this, my initial thought was, "Oh, I'll just do this with iCloud. That's what iCloud's for.
0:09:18this great thing and I was at WWDC and he was like, add three lines of code to your
0:09:23persistent SOAR coordinator and you're done.
0:09:26I'm like, sweet, that's great.
0:09:28You plug it in, you kind of, even you obviously realize actually it's not
0:09:32three lines of code, you have to do a bunch of other stuff, but you get it all working
0:09:35and it's kind of a mess and it sort of works and sometimes it doesn't and then you read
0:09:40blog posts and you go to talks by people who are smarter than you, spend a lot more
0:09:44more time on it and all the trouble they're having with core data and iCloud. iCloud seems
0:09:51like if you can do all your syncing in the key value store, you're golden. The key value
0:09:57store is, works perfectly and flawlessly. And I've done that in my applications. I've
0:10:01done some stuff, you know, preferences syncing, a little bit of data syncing, but not really
0:10:05like data, just sort of user information. All that stuff works amazingly on core data.
0:10:09It's ridiculously fast. It never seems to get out of sync, doesn't really seem to have
0:10:14any problems. And I think a large part of that is that it has a server reference model
0:10:21rather than a sort of this weird transaction log approach that they use for core data where
0:10:29they're like replaying logs from side to side, from side to side. Anyway, but that's not
0:10:34really the point. The point is that at this point I'm kind of weary to go down the path
0:10:39using iCloud for my core data sync for my users.
0:10:45And this is where I think the more interesting part--
0:10:47Apple, I'm a freeloader in that model on Apple.
0:10:53Apple is the one who's building this infrastructure
0:10:55and building this platform and this way for users
0:10:58to sync information back and forth.
0:11:00And that's great.
0:11:01And I'm glad they provided, and that's cool.
0:11:05But the problem is Apple's not my customer in that.
0:11:08my end user is Apple's customer, and I'm doing this thing via Apple that my customer is going
0:11:15to rely on, but if something goes wrong, they're going to blame me, not Apple, but I can't
0:11:20fix it, only Apple can. And so that's a bit of an awkward situation. And it's got me thinking
0:11:26about two other products. There's one called Parse, and there's one called Simperium. Again,
0:11:31I'll have links in the show notes. And their business, their businesses who exist for the
0:11:37sole purpose of taking iOS applications and helping you sync data between them. Parse
0:11:43does a bit more than that. That's pretty much all Simperium does. And they charge you for
0:11:46it. They'll charge me a couple hundred dollars a month or whatever it is. And I like that.
0:11:51I like that I'm not a freeloader there. I'm a customer. If something's wrong, I call up
0:11:56Simperium and say, "Hey, I do this, this, and this, and I don't get the right data out."
0:12:02or this merge fails in a weird way, why is that?
0:12:05And it's their job, and their existence and their success
0:12:09is based on them giving me a really good answer to that,
0:12:12for why does it do that?
0:12:13Oh, huh, that's a bug.
0:12:15Or, hm, you're doing it wrong.
0:12:16Let me see your code.
0:12:18In a way that Apple just isn't.
0:12:20I'm not Apple's customer.
0:12:22I'm a freeloader there, in a true sense.
0:12:24I don't mean that in a derogatory sense of, oh,
0:12:26I'm freeloading.
0:12:27But that's just the reality of it.
0:12:29I'm not Apple's customer.
0:12:32I'm just kind of taking advantage of something they do.
0:12:35And so for something like Data Sync, for something--
0:12:39there are so many different problems that can go wrong.
0:12:41I mean, there are hundreds of things
0:12:42that can go wrong with Sync.
0:12:45That makes me feel really nervous.
0:12:47And I feel like I'm going to use Core Data,
0:12:48and I'm going to use iCloud in my syncing solution.
0:12:53But it'll be like I'll use iCloud
0:12:54to sync super simple things.
0:12:57Like I have a collection of images
0:12:59that you-- sort of each recipe, for example,
0:13:01can have some pictures associated with it.
0:13:04Perfect thing for iCloud sync.
0:13:06They're all uniquely identified by the MD5 of the file name
0:13:11of the file.
0:13:12Perfect.
0:13:13Just throw those in, make them share documents,
0:13:15and as best I understand, iCloud should sync them.
0:13:17If somehow they don't sync, if a file ends up missing,
0:13:20OK, not great for the user, but not the end of the world.
0:13:24It's not like corrupting data in the same way.
0:13:26But anyway, those are just some thoughts
0:13:28had that I was kind of like, huh.
0:13:31I had this anxiety about using iCloud for syncing.
0:13:35And I think it was a sort of-- it crystallized in my head
0:13:37that's like, I'm not Apple's customer for this.
0:13:40I'm using this very complicated, sophisticated networking system
0:13:45that has really no accountability.
0:13:49That there's no one at Apple who I can call and be like, hey buddy,
0:13:53I'm paying you a bunch of money.
0:13:54You better make this work.
0:13:55And if you don't, I'm going to take my business elsewhere.
0:13:58There's nobody I can do that with.
0:14:00And so that's just kind of-- it kind of makes me nervous
0:14:03and kind of makes me worried.
0:14:04And so that's where I'm going to be going.
0:14:05I think I'm going to start with Simperium and try it.
0:14:07If that doesn't work, I'll go to Parse probably.
0:14:10But it's kind of great.
0:14:12And there's all these other options and things
0:14:14that it could potentially open up by doing this.
0:14:17A lot of these things have web APIs that if I wanted to,
0:14:21I could also write a web application that
0:14:22ties into the same data, or all kinds of other things
0:14:25that are just not possible within Apple's closed model.
0:14:28So anyway, a few thoughts.
0:14:29I hope you have a good weekend.
0:14:32That's it for today's show.
0:14:34As always, if you have questions, comments, concerns, by all means hit me up on Twitter.
0:14:40I'm @_davidsmith on Twitter.
0:14:43And the Twitter feed for this show is @devperspective.
0:14:47And otherwise, I hope you have a good weekend.
0:14:49I'll see you next week, and happy coding.
0:14:51Bye.
0:14:52[BLANK_AUDIO]