Inspiration

What it does

How we built it## Inspiration

I bombed a coding interview once. Not because I didn't know the solution, but because I had never said it out loud. I'd solved hundreds of problems by typing code into an editor, but nobody had ever asked me "why a hash map?" and waited for an answer.

That's the gap. Real interviews are a conversation with someone who already knows the answer and keeps pushing back. Practice tools give you a code editor, a green checkmark, and a "show solution" button. I wanted something that practises the part that actually happens in the room.

What it does

Dry Run gives you one problem a day. You tap the mic and think out loud. The tutor knows the answer, but it won't give it to you. It asks a counter-question, then shows you a case that breaks your idea, and only then offers the smallest hint that gets you moving. It never says "correct".

Say the problem is Pair Sum with up to $10^7$ numbers, and you start with a nested loop. The tutor won't tell you to use a hash map. It'll point out that's about $5 \times 10^{13}$ pair checks, far too slow, and ask how you could avoid looking at every pair. You still have to find the idea yourself.

When you finish, a separate judge reads the whole conversation and grades it against a human-written answer key: which insights you reached, which approach you ended up with, its complexity. Every credit quotes something you said, so it can't give you credit for an idea the tutor handed you. Then you get the full write-up.

The hybrid part. When you're online, the tutor and the judge run on Gemini in the cloud, called straight from the app through Firebase AI Logic. When you lose signal, or the cloud is busy, phones that support it switch to Gemini Nano running on the device, and the conversation just keeps going. The offline tutor only ever sees the public problem statement, so there's no answer it could accidentally leak, and it never grades you. Each offline reply is labelled, and when you're back online the cloud tutor gets a short summary and picks up where you left off.

How I built it

The app is Flutter on Android. Everything personal (your transcripts, sessions, streak) stays on your phone.

The interesting part was where the AI calls happen. The original version had a server call the model. For this entry I moved every model call into the app, through Firebase AI Logic with App Check on. That way there's no API key anywhere, not in the app and not on a server.

But I didn't want to give up the server's job, which is deciding what the model is told and checking what it says before you see it. So I built a small step protocol. For each turn, the server answers "here are the model calls I need". The app runs them through Firebase and sends the answers back, and the server runs its leak filter and grading checks on them. The answer key only ever travels inside a single call and lives in memory, never on disk.

Gemini Nano runs through a small Kotlin bridge to firebase-ai-ondevice, because Flutter's Firebase plugin doesn't do hybrid yet. Speech-to-text is Groq Whisper, with the phone's own recognizer as a backup.

One decision paid off immediately: the model choice is configuration, not code. Which model, how long to wait, temperature: all of it lives in the server's database and reaches the app with each call.

Challenges

The free tier fought back. On submission day the first model I picked returned "high demand" errors. The next one hit its free limit after a handful of calls. The third rejected one of my settings as an "invalid argument". Because the model is config, each fix was one database update. I never had to rebuild the app.

App Check and sideloading. Judges install the APK directly, and Google's Play Integrity check rejects any app that didn't come from the Play Store. I kept App Check on, using its debug provider with a registered token for the judging build, rather than switching protection off. Keeping the server in charge. Moving the model call to the phone without losing the leak filter took the most design work. The step protocol is how I solved it.

A small model that can't keep a secret. I didn't try to make Nano keep the answer secret. I just never give it the answer.

What I'm proud of

The tutor behaves the same way online and offline, and you can always see which one is talking. Every line of the verdict points back to something you actually said. And anyone can try it: no account, no key, no payment.

What I learned

Hybrid AI is mostly a product question, not a plumbing one. The hard decision wasn't how to call the on-device model. It was what it's allowed to know.model. It was what it's allowed to know.

I also learned to treat model choice as something that changes on a Tuesday afternoon, not something baked into a release.

What's next

Offline grading on the device once Nano can handle it reliably, more problems, more spoken languages, and iOS.

The opening story ("I bombed a coding interview once") is invented to make it read naturally. If it isn't true for you, change it to your real reason, or delete the first paragraph and start at "Real interviews are a conversation…".

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for Dry Run Tutor

Built With

Share this project:

Updates

Submission history