When we announced our Android launch at the end of September, we couldn’t wait to see what new projects developers would take on using Realm. We’ve been keeping a close eye on GitHub, and one app by the name of Anagram Solver caught our attention. We tracked down the creator, Basilis Charalampakis, and he was kind enough to take a few minutes to talk with us about the app and his experience with Realm.
Tim Anglade, VP of Product at Realm: It’s really nice to be able to chat with you. You’re actually the first Android app we’ve seen using us on GitHub.
Basilis Charalampakis: Oh really?
Tim: Yeah. There are a few others, but yours is a full end-to-end app completely open-source, and it was a nice, cool use case. But let’s talk a little more about you first. I saw you’re still a student, in Greece?
Basilis: Yes, I’m studying Computer Science at Ionian University.
T: I made the mistake of looking up where the university was, and I immediately became very, very jealous because it seemed like the most beautiful campus in the most beautiful place in the world. [Laughing] It’s on the island of Corfu, right?
B: Yes.
T: It looks amazing. So you’ve been studying computer science for how many years now?
B: Four — it’s my last year.
T: Oh, cool. So you’re graduating. Are you thinking of doing more studies after that, or just going into the workforce?
B: Yeah, I’m interested in data science. Hadoop or Spark or something like that. Data mining. Data science.
T: Makes sense. And so, I saw the app — Java/Android. Is this your first Android app, or have you done Android development before?
B: No, that was my first project.
T: What drove you towards Realm? How did you hear about us?
B: I saw, I think, a link on Hacker News or Reddit? The app’s previous version was on SQLite, and the user score was very low. Realm reduced the megabytes. I have about one million records, so it was too slow to insert as well. Realm made it possible in half the time.
I have about one million records, so it was too slow to insert as well. Realm made it possible in half the time.
T: That’s good to hear. So, let’s talk about the app a little bit. It’s called Anagram Solver, right? Meaning you give it a word like, “silent,” and it’s going to find other words that use the exact same letters and all the letters?
Basilis: Yes. “Garden” to “danger,” for example. Or “listen” to “silent.” When you type any character, I search about one million records for the anagram on the Realm database.
T: How do you perform the search for the anagram?
B: For the anagram, I have to reorder the search term alphabetically, so I search for collisions. The words “listen” and “silent” give us the same sort if you order them alphabetically, right? So, I have a dictionary, and when I search the database, I made this sorting. So I set them for this order and get all the collisions.
T: I see. So you’re storing the word not how it’s spelled, but with all the letters that it’s composed of in alphabetical order. And you use that to search against the database?
B: Yes, it’s a bit tricky for a tool set.
T: That can get complex very quickly. I remember you being active very early on — actually the day we launched — and asking questions about the encoding, and doing some stuff around the searches. That was great. It really helped us resolve the early issues we had around encoding.
I also wanted to get some of your feedback about Realm so far. Can you tell me a bit about what you wish would be different and what you’re really missing?
B: Yes, I want a CursorAdapter. That would be an amazing feature.
T: Absolutely. I’ve heard that one before.
B: And different interface accommodation will improve adoption of Realm, as in Android DB data error placement.
T: We’ve had that on our radar for a while now. We’ve done some early experiments around that, and hopefully we should be able to give people some more stuff on that front very, very soon. So yes, thanks for bringing that up.
B: And one more: don’t force objects to extend the Realm object. For example, for my application, I had to make four objects that extend the real object. That was a bit frustrating because I could have one class and then made the four tables. It was the same structure, so it seemed redundant.
T: Ah, we do that to generate matching proxy objects. Extending your object from Realm object is what makes it possible for us to have this very simple API.
Basilis: But you can use annotations, for example. It’s a bit easier.
Tim: We used to do the opposite and require an annotation and an extension. And then we realized we could fold the annotation in the extension, but not the opposite. So that’s why we standardized on just the extension, because that way we don’t have to require both.
It’s one of those things that Java and the JVM don’t necessarily make very easy. So that’s a bit of a tradeoff. But that’s good feedback. We’ll stay on the hunt for a way to get rid of the extension. I know some people really like annotations better.
Basilis: Ah, OK.
Tim: And what about the good side? What are some things you really like about Realm?
Basilis: It was easy to use and easy to integrate with my app. And speed. I had no index to my application. And it was free. And well documented.
Tim: Thanks, we’re very conscious of the importance of good documentation. We still have a lot of work ahead of us; I would love it to be even better documented. But thanks for the kind words.
So, the app is out there now. It’s on GitHub for people to check out. Do you have any other projects you’re working on at the moment?
Basilis: I’m developing a movie app with my team. You add movies to your watchlist and get notified when they’re released.
Tim: I’ve noticed that people are advertising movies months and even years in advance, so that sounds useful. Do you get your data from a particular data source?
Basilis: Yes, from the open source IMDB.
Tim: Oh, cool, so you’re just able to grab that and then people can do this local notification list.
Basilis: Yes, but there’s a special feature that I don’t want to share yet.
Tim: Gotcha. How can people keep an eye on what you’re doing?
Basilis: LinkedIn or GitHub for sure.
Tim: Great. Congrats again on having the first app built with Realm for Android on [GitHub](https://github.com/!
Receive news and updates from Realm straight to your inbox