Seth of Cloth
In our second installment of interviews, we spoke to Seth Hein, lead iOS developer at Cloth. Described by The Next Web as “a beautifully designed personal [outfit] diary,” Cloth gives users the ability to save, categorize, and share photos of looks they’ve put together from their wardrobe. Cloth got its start in 2011 and distinguished itself from other fashion apps with its clean interface and practical appeal. Since then, the Cloth team has integrated weather data into the app’s features in a very interesting way. With the release of a new version fast approaching, we can’t wait to see what’s in store for this app.
Tim Anglade, VP of Product at Realm: Thanks for taking the time, man. I was going through your blog and website, and I saw “Lake Ozark, Missouri.” I was like “Holy crap, where is that?” I looked it up on Google Maps and it’s the most fractal-looking, amazing landscape ever. Does it look as good in real life as it does on Google Maps?
Seth Hein: It’s pretty. Yeah, it’s pretty down here.
Tim: It looks really nice, and the lake seems to snake around too, like, everywhere [laughs].
Seth: Yeah, it’s kind of a vacation spot for the region — Kansas City, St. Louis. A lot of people have vacation homes down here. It’s a big lake. I’ve been told that it has more coastline than California.
T: Oh, I can see that. The fractal pattern is amazing. And you’re far enough away from civilization to have some quiet time, I imagine?
S: Yeah, it is a little quieter than St. Louis — St. Louis is where I’m originally from. I’ve been here about a year.
T: What brought you to Lake Ozark? Did you just decide to move there? Is it somewhere you used to visit as a kid?
S: No, I’m also a part-time pastor at my church, and there was a church that was part of our family of churches here at Lake Ozark. The pastor passed away last year, so I came here to relaunch the church at the new location of Jubilee, which is the church I was a part of in St. Louis. So I do that part-time, and I program apps part-time.
T: That makes a lot of sense. I find the iOS community to be very soulful in general. Not necessarily religious in this and that sense, but there’s a lot of intermingling.
So yeah, I’ve heard a little bit about Cloth and it sounds super-interesting. Can you go over on a high level what the app does for the consumer?
S: Yeah, so big picture, Cloth is a tool for people to manage their wardrobe. You can take pictures of your outfits, tag them, put them into categories. Like: “This is evening wear,” “This is what I wear to work,” “This is what I wear every day.” And you can tag it with a particular weather type.
Then we’ve got location tracking that we use to pull the weather for your area so you can see, “Oh, it’s going to be rainy today. What do I have in the closet that I can wear when it’s rainy?” And boom, there are all your outfits. Or “What can I wear when it’s really hot outside?” and there they are.
We just submitted version one to the App Store a couple days ago. Version two we’re adding social features. So then you’ll be able to follow your friends’ wardrobes, see the kind of stuff that they have in their wardrobe, and have a conversation. Message them, “Hey, what should I wear to the party this Friday?” And then your friend can look through your wardrobe and be like “Ah! How about this? I really like this.” And then you’d write back to them, “Yeah, that’s a good idea.” So you’ll have these interactive social features on top of managing your wardrobe.
T: That’s great. I don’t want to give away too much about the app, but I’ve heard that you are doing some pretty interesting crunching as far as figuring out the weather and which clothes are appropriate, recommendations based on what you wear and what your friends are wearing. It’s one of those topics that maybe we don’t see a lot about in tech because the industry is so predominantly male. But there’s some seriously cool stuff going on here. It sounds like a pretty sweet app. I think that by the time people read this they’ll be able to download version one, directly from the App Store.
In terms of data handling client-side, can you give us a sense of what you do and what you’ve used Realm for so far?
S: Yeah, we use Realm for all the local data storage on the phone app. So when you create a new outfit, when you check into an outfit or “wear” the outfit, all that’s going to be stored locally on your phone so you can quickly do what you want without having to pull the image again from the API or whatever. And then we’ve got an API queue that we use for background API processing, so if your phone’s offline you can queue up a new outfit. It just works like normal on the app. The user’s not going to see the difference. But once you do have Internet access, it fires up the update to the API and creates all that.
We use Realm for all the nuts and bolts of the data. Store all your outfits offline, you can search through them: search by category, search by tag, search by weather. Realm takes care of all of that pretty snappy.
“I had recently picked up this big, old, thick Core Data book because I’ve used Core Data for most of my apps. I felt like I knew just enough to get by, and I really needed to take it to the next level. But then I saw Realm and I thought ‘Shoot, man, this looks 10 times easier’”
T: How did you hear about Realm?
S: It’s kinda funny. Several other iOS developers and I have a chatroom going on Skype just to pass around knowledge and questions. You know: “Hey, I found this thing on GitHub,” “Try this,” “Anybody know how to help with this?” And several months ago someone shared a link to Realm. I had just started working on Cloth about a week, two weeks before that. So I checked it out and was like, “Whoa, this looks really cool.”
I had recently picked up this big, old, thick Core Data book because I’ve used Core Data for most of my apps. I felt like I knew just enough to get by, and I really needed to take it to the next level. But then I saw Realm and I thought, “Shoot, man, this looks 10 times easier, and potentially faster from the benchmarks you were showing.” So I thought, “You know, I’ll just take a day, integrate this into Cloth, play around, see if it can hold its own. And then I’ll decide if I want to use it or not.”
Sure enough, I integrated it in. It was pretty straightforward, easy to use. I think aside from just getting my head around a slightly different way of coming at it, it’s been great.
T: Did that take you a day? It’s a question that comes up pretty often from the outside. We know Realm pretty well, so it’s hard for us to judge. But a lot of people say, “I have this app right now and I’m having issues with Core Data, but I don’t have time to learn a new database. I don’t have time to rip out all that code and replace it.” And you know, from our standpoint it feels like maybe a day, maybe two. Unless you’re doing something really crazy.
S: Yeah, it may have gone even quicker, but another developer had started working on Cloth and handed it off to me. So the code base was new to me. But yeah, I integrated Realm into it in a day.
T: Wow, cool. Now, we’ve definitely seen a lot of use cases about caching API calls, but it seems like you all are doing a bit more than that — using it also to keep data persisted across sessions and to do some local search, and some background computations on a different thread for the asynchronous operations. How was that being done before? Was that with Core Data or with another kind of storage stack?
I’m a big database geek and cloud computation geek, and so the one thing I’m always super-excited about is the fact that you can read and write to the same database without having to worry too much about anything. And I’m always wondering if people notice that or care about that as much as I do [laughs].
S: No, I care about that hugely. We had been using Core Data. And like I said, it had just been a couple weeks when I came on to the app. So there was still a lot that needed to be put into place that wasn’t functional yet. The version zero — the version that’s currently in the app store until version one gets submitted — I think that was using some sort of third-party SQLite library. So I’m not sure what was going on with that. I pulled the code because I had to do a data migration from there to Realm for the new version that we submitted and I was like, “What is this? What are they using?”
But even migrating from that, I just pulled over the libraries from the old version and then created the new objects in Realm, and that was way easier than I expected.
“So the code base was new to me.
But yeah, I integrated Realm into it in a day.”
T: Very cool. And enough about the good stuff. The one thing I always want to make sure we hear — and we here spend so much time focusing on, actually — is the stuff that doesn’t work. We’re still at 0.83 and we just released 0.84, so we know we still have a lot of work ahead. What are some of the things about Realm that are not so great right now?
S: One of the biggest hurdles I had was getting my head around notifications and why those are important. Initially, I think I just skimmed the documentation, didn’t really read the stuff about notifications, and then any time I did a commit I would just post a notification to Notification Center and then cache that where I needed it and refresh the data. But sometimes that wouldn’t quite be fast enough, and there would be exceptions that would pop up from stale data. And so there were a couple days of like, “What is going on? Why is my app crashing?” and then I finally saw this stuff about notifications and started getting my head around it. With Core Data, if you have stale data, it doesn’t crash your app. It’s just stale. But with Realm, if you don’t update on that notification, it’s going to crash and have an exception there.
T: Yeah, we do that to make sure people don’t end up having, you know… [laughing] bigger problems. Once they start relying on stale data. But we didn’t get a chance to do as much with notifications as we had wanted to do by launch. We’ve actually been working quite hard on that front. We’re adding fine-grain notifications so you can subscribe to just one object instead of having all those big notifications everywhere. And we’ve also been talking about doing a few more things by not just saying, “Hey, the objects changed,” but telling you, “Here are all the things that changed, in this order,” which will be really useful for animations and games and stuff like that.
We’re also trying to figure out a way to relax this whole object model and staleness. Many of the people here are C++ and database people, and so a lot of it is kind of melding this to the current paradigm those people are comfortable with in iOS. The people here are definitely more comfortable with completely expiring objects and moving on to something else and never having to touch it again. But we’ve been exploring ways to go more with the flow of what’s most typical in iOS and with Core Data, definitely.
This is all good feedback. I’m sorry you had to endure this on the first version of your app, but we’ve been working really hard on fixing things.
S: No, it’s alright. You all have been super helpful in the Google Group. I was amazed. It wouldn’t take long after I’d post a question that someone would be right on there trying to help out or answer the question.
T: Thanks, man. That’s one of the things I’m very proud of. We work very hard on that stuff. So we’re glad people notice. And we also have people in, like, Copenhagen and people in San Francisco, so there’s somebody up and able to help pretty much any time of day. We’re going to try to keep it up even though we’re getting more and more questions by more and more users.
So what’s next for Cloth? You told us about some of the features of version 2. Can you give us a sense of what you’re looking at doing next?
S: I’m pretty focused on version 2 right now for Cloth. We’ve got a September launch coming down and we’re working really hard for that. I’m using Realm for all of that. After that, I don’t have any specific plans for what’s next, but I’m planning on using Realm for future iOS apps for sure.