Simon on Thermodo

Thermodo App Screenshots

We’ve been a fan of the small Danish software company Robocat for some time now, and if the response to their latest creation, Thermodo, is any indication, we’re not alone. The project began on Kickstarter and surpassed the funding goal almost 10 times over. In this latest Realm user interview, we tracked down Thermodo’s lead developer, Simon Støvring, to find out how they went about building this much-anticipated product.

Tim Anglade, VP of Product at Realm: How long have you been at Robocat?

Simon Støvring: I started in February, so half a year? Before that I was doing some freelancing and working for phone companies.

Tim: There’s a lot of good mobile development going on in Denmark. And Robocat is a really freaking nice company. How would you describe Robocat to people?

Simon: Well, it’s just a small Copenhagen-based company with people doing what they love.

T: That’s a good way to put it. You all do a lot of different apps. With Thermodo, you’re also doing some hardware. How does that work?

S: I joined the Thermodo project a little late — I think they had shipped 1.2 when I joined. I kind of took over the development. So I don’t know much about the hardware process.

T: The app and the hardware are about being able to measure temperatures from your iPhone, right? Something very simple, very nice, very necessary, but just a little dongle you can put into your phone.

S: Yes, exactly. It records the temperature. It works on your iPad, your Mac, and Android as well.

T: It plugs right into the phone jack, right? And then it measures ambient temperature?

S: Yeah, the idea originally came from the popular Thermo app that we did many years ago. It just displays the temperature. It loads the temperature for a current location and displays it in a nice graphic that looks like a thermometer. But people were complaining because it didn’t show the actual temperature, like where they were sitting. So someone would open the app and go to the fireplace and the temperature wouldn’t change; go to the freezer and the temperature wouldn’t change. People didn’t understand it. So that’s why we developed the Thermodo.

T: Have you actually started shipping the hardware? Is everything going well so far?

S: Yeah, it is. We’re shipping many Thermodos right now.

T: It’s maybe the rare Kickstarter project that’s actually going ahead on time. [Laughing]

Let’s talk a little bit about the application. So obviously it’s connected to this custom-made sensor that attaches to the device. What more can you tell us about the app? What does it do and how did you build it?

S: All you have to do is plug your Thermodo in, and it starts recording instantly. That was the main goal: It should be really easy to use this app. Then we just evolved it around building a small community of people who use this app and focused more on contextual information — When did you record this measurement? In what environment did you record this measurement? At which location? — and sharing with people. A few months ago we introduced this global heat map where measurements are uploaded, and it’s available online and in the app. You have both your personal and the global heat map. So all the temperatures are uploaded. And that social part is the part we’re focusing more on right now.

T: It looks really cool. The design is amazing. In all your apps, the design makes my eyes pop.

Simon: Yeah, Michael makes things look really great.

T: Keep him happy. Buy him lots of beers. Do whatever it takes. [Laughter] This guy is doing some incredible stuff.

But in terms of feature design and things you have in the application, it’s kind of really amazing. Like, I can see a local curve of temperatures in a particular location I’ve been. I can see a particular temperature where I live and where I actually have been moving around. And it ends up being quite useful, even if I’m not some scientist that needs to be taking measurements everywhere. How do you all come up with those features?

S: We listen a lot to the community. I regularly receive emails about feature requests, and people write us on Twitter and say “Hey, how about this?” We jot everything down and look at the list every once in a while. Then we just kind of figure out what we think would be cool for this app. What would we want?

Simon

T: The number of five-star reviews that you got for this is impressive. It’s a really cool application. How does it work on the inside?

Simon: First and foremost, we have our SDK that anyone can just take and use to record measurements using the Thermodo. And it plugs into the audio jack. We use a lot of audio libraries to record the audio and receive the audio and calculate the temperature from the audio and display it.

T: I highly recommend, by the way, that people check out your SDKs. You have this really nice developer page for Thermodo with the iOS SDK and the Android SDK. I was reading a bit about it and there’s some really cool stuff going on there. Even your app is built on that SDK, essentially?

S: Yes, we don’t do anything that you can’t do with the SDK.

T: Are you using any libraries or anything like that for the app?

S: Yeah, I think that Realm is the most interesting one, actually. We don’t use many. We use some of our own internal ones and Realm and a library, Pusher, for doing real-time updates of the global heat map.

T: I see, so that’s what you use to be able to relate to the servers what the measurements are and power that big server-side heat map that you’re doing? Is that pretty much the architecture?

S: Yeah, exactly. When the measurement is made, we do a push request to our own API and the API informs everyone listening that a new measurement has been made.

T: What kind of data do you put in Realm?

S: We use it to store all measurements. We have measurements and readings. So one measurement is several readings of the temperature, and we store that in the database. If people have taken a photo, we store that in there as well.

T: Are you using any sync on top of Realm?

S: No, we’re not. Part of the reason we migrated to Realm is we wanted to disable iCloud Sync because it was not really working. We used some third-party library to manage the iCloud Sync, which stored the database in a funny way. So I had to migrate away from that to a regular Core Data database. Then I thought, “Why not migrate it to Realm?”

T: Was that a complex process? How much time do you think you spent actually doing the transition to Realm?

S: Funny thing. I know exactly how much time it took because I was doing it on a train ride. It was a three-hour train ride, and that’s how long it took me to migrate the database.

“It was a three-hour train ride,
and that’s how long it took me to migrate the database.”

T: Wow. That’s a new record. That’s pretty nice for an existing application.

I think people see Core Data and they see the mess that it can be and the amount of boilerplate code and knowledge that you have to acquire before you even write code. And they think Realm is probably going to be something on the same scale. I’m very proud of the fact that we’ve worked quite a bit on keeping Realm very simple, very intuitive, very easy to use. If you know how to use in-memory objects, you mostly know how to use Realm. I’m glad to hear it worked out for you.

So, anything on the roadmap for you in terms of adding more features to the app?

S: We’re busy on a lot of different projects right now, and we have some features on the roadmap, but I’m not sure how much detail I can go into.

T: Gotcha. We’ll stay tuned. You all have a really nice website and you’re posting updates on Twitter and elsewhere, so it’s easy to stay up to date.

S: One thing I can say is that we’ve gotten a lot of requests for an alarm when the temperature reaches a certain degree. That’s something we’re looking into right now.

T: That sounds like a really cool addition. And so, just to close the loop on Realm, maybe you could talk about some of the stuff that you really like and don’t like about Realm. Let’s start with the bad side.

S: Well, I had some issues with default property values. Actually, before we started talking, I just fixed a bug regarding that. We had a property with a null value. It had no default value, so Realm would crash.

T: Yeah, that’s a part of our design we’re really working to update. It’s actually in the top three of our list of things we’re working on right now. We designed the database on the principle that allowing null values was a really bad idea. It’s kind of the design school of thought. There’s some truth to it, but at the end of the day, we live in a world of JSON and people being used to doing that in many different languages, and so it’s just not a good design. So we’re working on changing that as quickly as we can.

Anything else that’s been problematic for you?

S: I had some issue with the ignore properties. I had to add a lot of default properties there: hash, short hash, description, count, and so on. They would just crash if I didn’t. And I found that — it must have been on GitHub — this was an issue that others have had problems with too.

T: I actually haven’t seen that one myself. We have our team watching GitHub pretty intently, so we’ll make sure we deal with that. If there’s an issue, GitHub is a good place to go. And of course it never hurts to email us in case it seems like it’s taking more time than it should.

S: Something I’d also like to see is the additional property attributes implemented. I needed some objects to cascade when I delete them. You don’t support that, do you?

T: Not yet. Actually that’s another one of our top three priorities we’re working on right now. We have a good model for that. It’s been in our design, before we even shipped, actually. We thought about some of the stuff we wanted to implement really deeply, probably well into 2015 in terms of features and what the API will look like, and that’s one that we’re very excited about. I think it’s going to simplify a lot of that maintenance, especially for those big object graphs that Realm allows you to do. We’re very excited that people are actually getting to those points where they need these more advanced features.

S: Yeah, I understand that you’re still early in the process. I just wanted to let you know. I’m looking forward to seeing that implemented.

T: That’s good to hear. We’re just like you — we’re completely user-driven. We don’t do anything unless people ask us about it, and we tend to do the things that people ask us about the most.

So tell me about the good side. What do you really like about Realm and the current design and feature set?

S: There’s a lot of good stuff. I think the top reason why we chose to migrate to Realm is the simplicity. It’s really simple to use. I didn’t have to bother with all that Core Data stuff. Core Data is fairly simple, but it has its quirks. I really like that with Realm objects or align objects, they seem to be more or less plain objects. So I can just instantiate them and set properties, and I don’t have to write them to anything. Doing that in Core Data… that’s not easy. You can’t just create an object.

Also, it’s not something we use a lot in Thermodo, but with Realm you could have multiple databases really easily. You can do that in Core Data as well, but again, it’s not as easy.

There’s also the in-memory database, which I actually considered using but didn’t end up using. I might in another update.

T: That one gives you even better performance. It can be really nice when you need extra speed or when you just don’t care about the data being serialized to disk. Are you using it in a multi-threaded scenario at all? Does that factor into your usage of Realm?

S: Not right now. I did do some multi-threading when we were using Core Data, but I didn’t want to throw threads around and start things on a new thread just because I could. I just started out doing everything more or less on the main thread and seeing how that went. And for now it’s fine. I will have to do some of the querying on another thread.

T: Yeah, absolutely. I would definitely recommend that. But yeah, it’s kind of insane how much you can get away with with Realm, just because it’s so much faster.

S: One of my colleagues is actually trying out Realm on multiple threads. We have this app that we’ll launch probably sometime next year. We rely much more on the database than we do in Thermodo. So, Thermodo was a way to try out Realm in a smaller scale before applying it in one of our other apps. We’re still playing a little bit with it in multiple threads. So you might have some more feedback on that soon.

T: Absolutely. Please let me know, and we’re happy to answer any questions. I’m really excited by the apps I see Robocat doing, and we want to hear the good and the bad. We’ll be happy to keep you as happy users for many more apps.

Follow Simon Støvring on Twitter @simonbs.

Ready for Realtime and Scale: Announcing Realm Mobile Platform 1.0

We’re proud to announce Realm Mobile Platform has left beta status and graduated to version 1.0! We’ve been hard at work fixing bugs, polishing rough edges, hardening the code, and adding more than a few new features. Learn more in the announcement post!


Realm Team

Realm Team

At Realm, our mission is to help developers build better apps faster. We provide a unique set of tools and platform technologies designed to make it easy for developers to build apps with sophisticated, powerful features — things like realtime collaboration, augmented reality, live data synchronization, offline experiences, messaging, and more.

Everything we build is developed with an eye toward enabling developers for what we believe the mobile internet evolves into — an open network of billions of users and trillions of devices, and realtime interactivity across them all.