0:00:00Hello and welcome to Developing Perspective. Developing Perspective is a podcast discussing news of note in iOS development, Apple, and the like.
0:00:07I'm your host David Smith. I'm an independent iOS developer based in Herndon, Virginia. This is show number 95 and today is Friday, November 16th.
0:00:15Developing Perspective is never longer than 15 minutes, so let's get started.
0:00:19Alright, so this is, as I said in the last show, I'm going to be talking, kind of working through a question and answer series for a little while.
0:00:26So again, I'd encourage you, I thank you for all the response that I've received, and encourage
0:00:30you if you have thoughts or things you want me to talk about, just reach out to me on
0:00:33Twitter or App.net or email, and I'll be happy to kind of put them on the list, see what
0:00:38kind of shakes out, and go from there.
0:00:41So today I'm going to be answering a question from Mark, who emailed me asking about this,
0:00:46and I'm probably just saying, if you contact me on Twitter or App.net in a public way,
0:00:51I will use your name.
0:00:52If you email me, I will just use your first name unless you explicitly say otherwise.
0:00:57So this is Mark via email.
0:00:59All right, so basically he was asking how I decided to go with Dark Sky Weather API
0:01:04and check the weather.
0:01:06How do you decide if you're going to use a third-party API?
0:01:08How do you decide kind of the costing for that?
0:01:11Obviously a lot of these services have ongoing costs or per-use costs and things.
0:01:16And so how do you kind of balance that as you're developing an application?
0:01:19And when do you break from kind of rolling your own versus using something that someone
0:01:25else sort of has built and uses and you pay for on an ongoing basis?
0:01:29And I think it's a great question and it actually is very timely for me.
0:01:33I'm working on a big update to my recipe book, my recipe book manager.
0:01:37And one of the things I'm doing is Cloud Sync to sync recipes between the applications.
0:01:42There'll be no iPhone versions, a few things like that that I'm working on.
0:01:46And the key thing in this, though, is I've been struggling on it basically since, I guess
0:01:52for the last 18 months or so.
0:01:54When iCloud was first announced at WWDC last summer, not this past one, I mean about the
0:02:01full 18 months ago, I was like, "Oh, that's great.
0:02:03I've been thinking of doing a sync option for my recipe book, and I think this will
0:02:06be great.
0:02:07I'll try to use iCloud."
0:02:08I tried to use iCloud, and it was kind of just a nightmare.
0:02:13I use core data, and there's in theory core data iCloud support, but it's temperamental
0:02:18and buggy and all kinds of things that went wrong.
0:02:20That's why I got discouraged and didn't work on it.
0:02:23That was unfortunate because the feature and the functionality would have been really great
0:02:27to have given to my users 18 months ago.
0:02:29That would have been awesome.
0:02:30But I just got discouraged from trying to implement a third-party library and API into
0:02:36it to do it.
0:02:38Imperium came out, which is a third party thing for syncing that looked really promising,
0:02:43and I've tried it and it worked pretty well, but it kind of frustrated me a little bit
0:02:48on pricing.
0:02:49It's a little bit expensive for the number of users that I expect to have.
0:02:52But it also just kind of frustrated me.
0:02:55Whenever you're working with something that's a third party, you're always kind of struggling
0:02:59with it's never going to fit exactly what you want to do, and there's going to be these
0:03:02little holes.
0:03:03There's going to be these little problems that you're going to have to be working around.
0:03:06It's fine most of the time.
0:03:08Generally, you just kind of make that work and you just kind of adapt, but it can be
0:03:12very frustrating.
0:03:13And the same thing with capitalist and periodic.
0:03:16I got like 80, 90 percent of it working, and the last 10 percent was just a really big
0:03:20sort of challenge for me.
0:03:21And so I kind of lost interest and moved on, which are other things, developed and created
0:03:26and launched Check the Weather.
0:03:28In the meantime, without exaggeration, I started working on Cloud Sync, I got stuck, and that's
0:03:33part of what motivated me to work on Check the Weather is that I was kind of looking
0:03:37for an escape. And that's not a good place to be. I mean, it's never going to be a good
0:03:40thing if I'm discouraged from making my product better because of some of the drawbacks of
0:03:45the third-party API that I was going to be thinking about using.
0:03:49And so what I'm ultimately doing is I'm going to be rolling it myself. I've built from scratch
0:03:54in a relatively short amount of time a Rails sync application that will do all the syncing
0:03:59for me. And it's actually been really exciting and really fun. And like you may have noticed,
0:04:04there's only going to be one show this week. That's partly because I've really enjoyed
0:04:07this process. It's really interesting to build this thing from scratch that's tailored to
0:04:12exactly my needs. It does exactly what I want. It's fun to make it performant and stretch
0:04:19myself a little bit. I hadn't done a lot of Rails work recently, and it's great to kind
0:04:22of get into that. Again, it's kind of fun and it works. I have it working in about a
0:04:26week. You know, this sort of end-to-end sync solution that works dynamically across multiple
0:04:31devices and so on is great. And the thing that's remarkable to me about that is rolling
0:04:36myself and rolling it myself in this case was really good. I've been excited about it,
0:04:41I've got the feature implemented, I think it's going to be ready soon, it's great, it'll
0:04:45be much more cost effective than a lot of other options because I rolled it myself,
0:04:49I just put it on Heroku or some other Rails web server and it cost me something but it
0:04:55won't be an insane amount of money by any means, but it's always a struggle.
0:05:01And I ran into this again with weather APIs.
0:05:03You always have this tension where I could pull the raw source data from a lot of systems,
0:05:09combine them together, analyze them, process them, do a whole bunch of stuff, and use that.
0:05:15I mean, all Dark Sky does.
0:05:16You can read it on their website.
0:05:18Dark Sky takes the standard National Weather Service radar maps and processes them with
0:05:24their own proprietary super genius algorithm to estimate expected rainfall.
0:05:29That's all they do.
0:05:30That is in theory something that I could do.
0:05:32That is something that I could replace.
0:05:33That is something that I could sort of get into and do myself.
0:05:36But for the case of dark sky, it doesn't make sense.
0:05:39And I've been kind of struggling with this all week since I got this question from Mark.
0:05:43Was what do I, how do I make that decision ultimately?
0:05:47Because it's really kind of a hard thing to know.
0:05:49Where is this value that is worthwhile
0:05:54to outsource something to somewhere else?
0:05:58And when is that value to keep it to yourself?
0:06:01I think where I've ended up on
0:06:04is that you want to outsource the things
0:06:06when someone else is doing it a lot better
0:06:09than you could ever do.
0:06:12And that applies to almost any circumstance.
0:06:15And it's a theme I've talked about
0:06:17certainly on the show before.
0:06:15I outsource the creation of the icons for my applications, because I'm not an artist.
0:06:20I'm not an illustrator.
0:06:25And they do a job that's 10 to 20 to 100 times better than what I could ever do.
0:06:26So I'm always going to outsource that.
0:06:33In this case, there's a certain amount of sophistication that goes into building a weather model,
0:06:35that goes into managing that.
0:06:40That is something that I don't think I have the expertise to get into,
0:06:41nor do I think it would be wise for me to gain that expertise.
0:06:44I know a bit more about weather forecasting
0:06:46than I did before I started the project,
0:06:48but I don't expect to ever be an expert in meteorology
0:06:52or should have done the study needed to get into it.
0:06:55And so it makes a lot of sense for me to outsource
0:06:57the cost of that.
0:06:59So the second part of what Mark was asking,
0:07:01which is something that I think is important to think about,
0:07:04is how do you manage the cost of that?
0:07:06A lot of these things are really tricky for an app.
0:07:09and the way app pricing tends to work.
0:07:12So typically, I get an upfront amount of money from my user.
0:07:15They buy it, whatever they get.
0:07:17I get $1.40 if it's a $2 app or something like that
0:07:19after Apple's cut.
0:07:20I get that $1.40 from them.
0:07:22Now, that has to theoretically support
0:07:26all of the ongoing costs that are
0:07:28going to be associated with that user
0:07:30and also obviously leave me with some profit.
0:07:33Otherwise, there's no point.
0:07:35And so the way that I think about this--
0:07:38And it's definitely a struggle.
0:07:39You kind of look at these things and you say, I'm going
0:07:42to be spending so many hundreds of dollars a month, or
0:07:44so many thousands of dollars a month, on hosting, on
0:07:47external resources, on all the things that go into it, on
0:07:50support even.
0:07:52And so every user kind of has a cost.
0:07:54And the only way that I've been able to sort of do this
0:07:57rationally-- and it seems to work really well, so I'm going
0:07:59to kind of walk through it here.
0:08:01When you're thinking about using a third party API and
0:08:03you want to kind of judge way away all these different
0:08:05things is you have to be able to calculate cost per user.
0:08:09If you can't do that, you're going to be
0:08:11kind of floundering around.
0:08:12And so you have to be able to say, this is roughly what it
0:08:15costs for a user of my application.
0:08:18A typical user costs this much per month, this much per
0:08:21year, the intervals don't really matter.
0:08:24What matters is that you can say, this is what it costs.
0:08:28And I did a lot of this analysis for my weather APIs.
0:08:31So they have different pricing structures.
0:08:33A lot of them, like the one I'm on right now, is based on I get 500,000 hits a day for a
0:08:39certain amount of money, and I can then look at the number of hits I get per user.
0:08:47For an average user, I get so many hits that hit costs me so much.
0:08:51That's my average cost per month per user.
0:08:53And I can reverse my way back into that.
0:08:56And that gives me a number, and that number is vitally important, because having a number
0:09:00lets me kind of work out if that's going to work financially.
0:09:04And so the way that I do with a lot of these things, I'll take the cost per user and work
0:09:09out what my cost per year per user is and look at the purchase price and compare the
0:09:14two.
0:09:15Because for me, I think I have somewhat of a responsibility to support an application
0:09:21for about a year.
0:09:22Beyond that, I think you have a fairer expectation
0:09:27that that user may need to give you some extra money.
0:09:32That's not to say that you necessarily will,
0:09:36but from a planning perspective,
0:09:39I look at it as a one-year timeline.
0:09:40That from when you gave me your $1.40,
0:09:42I'm going to support you for a year.
0:09:45And so if all the API and server costs
0:09:47and all the things that go into that work,
0:09:49work out to be, say, they're 50 cents,
0:09:49Say they're $0.60, say they're $0.80, whatever that is,
0:09:52you can then look at the two and you can balance them.
0:09:55And that's a really important thing from a pricing
0:09:57perspective.
0:09:58Say it's going to cost you $0.70 a year to have that user.
0:10:04That means your app really can't be $0.99.
0:10:07It just can't.
0:10:08You'll break even on every sale, and that's kind of pointless.
0:10:12And so it's really important to have a good grounding on that
0:10:16and to see, does this make sense?
0:10:19Does it work?
0:10:20And I ran the math for Dark Sky, for my weather API,
0:10:23for my server hosting, all the things that go into it.
0:10:25And it's like, the math works out, this makes sense,
0:10:27I'll run with it.
0:10:28But if you don't have the number, you just can't do these.
0:10:31And so that's kind of the way I balance
0:10:33those types of things.
0:10:34And sort of to loop back to what I was talking about first,
0:10:37and I'll finish off on that tack,
0:10:39is it's important to understand that
0:10:42the tools you use to build something
0:10:47dramatically impact the quality of the thing,
0:10:52and not just because of the intrinsic properties
0:10:55of the service you're using,
0:10:57but in terms of how that changes you as a developer.
0:10:59And this is something that I sort of knew before,
0:11:03but has definitely been made clear to me
0:11:07with this my recipe book sync situation,
0:11:09is I had been so apprehensive, so resistant,
0:11:13so reluctant to work on this problem,
0:11:16because every time I tried to do it
0:11:18using someone else's tools,
0:11:20I would go great for a couple of days,
0:11:24get it to look like it was working,
0:11:25and then the wheels would come off the wagon
0:11:27when I was doing some testing.
0:11:29And there'd be some problem that I either couldn't solve,
0:11:32or in order to solve, I had to make some strange compromises
0:11:35or do some really hacky, weird things.
0:11:38And that just frustrated me,
0:11:40and so I wasn't working on the problem.
0:11:42And so that meant that that service hasn't existed
0:11:46for these users for a long time.
0:11:48And that's kind of a sad thing.
0:11:50I'm kind of bummed that that is the way it ended up working out.
0:11:52But I'm glad I went through that experience,
0:11:55because otherwise I wouldn't have known what I was missing.
0:12:00I wouldn't have known that about myself,
0:12:03that I like solving problems.
0:12:06I like working with sharp tools.
0:12:09And if a tool turns out to not be sharp,
0:12:14if I am working with it,
0:12:18and it seems like no matter what I do,
0:12:20I'm always running into frustrations or problems,
0:12:22that's going to really limit my ability
0:12:25to make an excellent product.
0:12:27And so from working on any API
0:12:29or integrating with anything,
0:12:31it means that you need to be really comfortable
0:12:32with what that is.
0:12:35And sometimes you're going to roll your own.
0:12:36And rolling your own is,
0:12:34but you want to avoid, to some degree,
0:12:37the kind of the not invented here syndrome kind of problem
0:12:40where you're always inventing your own thing
0:12:42because you have no,
0:12:44like you're suspicious of other people's work
0:12:46or you're kind of a control freak or things.
0:12:48That's certainly something you want to be careful of.
0:12:51You can definitely get caught up in that
0:12:52and reinventing too many wheels,
0:12:55but some wheels are worth reinventing.
0:12:57Some wheels are things that you will have a better product
0:13:00for going through and working on
0:13:03you would if you just sort of use all,
0:13:06it's combining something from off the shelf components.
0:13:08It's making something custom that solves your problem
0:13:10perfectly is often really good.
0:13:13And you want to do whatever motivates you.
0:13:15If you're, like I don't really have an interest in
0:13:18being a meteorologist and making a weather model,
0:13:20so I'm going to outsource that to someone else.
0:13:22But I do enjoy making somewhat sophisticated web systems
0:13:27that handle syncing and finding clever ways to do caching
0:13:30to do smart updates and all kinds of stuff.
0:13:33Those are interesting problems.
0:13:34And so solving those is fun, and that's what I've been doing.
0:13:40That's a little bit of a round-to-round answer.
0:13:42But basically, you got to work.
0:13:43You got to know there's two costs whenever you're
0:13:46going to be doing something.
0:13:47There's the cost that's physical,
0:13:48like the monetary cost, and you have to balance that.
0:13:51And then the second cost is the cost of your time
0:13:54and your effort and, more importantly, your motivation
0:13:57to use whatever that is.
0:13:58And so keep those two things in mind,
0:14:00I think you'll be pretty good when you're going to be working on a new product or going
0:14:04to be thinking about a new service that you're going to integrate with that isn't going to
0:14:08make sense financially and isn't going to make sense from your motivation and enjoyment
0:14:13perspective.
0:14:14All right, that's it for today's show.
0:14:16As always, if you have questions, comments, concerns, complaints, I'm on Twitter @_davidsmith
0:14:21and I'm on app.net @davidsmith.
0:14:22As always, like I've been saying, if you have questions, this is a great time to hit those
0:14:27those out to me. I'll be accumulating them if they don't get your question, I'm
0:14:29sorry, but I'll just be kind of working through them as makes sense, and
0:14:32otherwise if you guys have a great weekend, great week, and I'll talk