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