Let me start with the honest part, because it's the whole point of this post.
I am not an Android developer. Before this I had never written a line of Kotlin. I didn't know what Jetpack Compose was, or what a widget actually is under the hood. What I had was an idea and a problem: I was smoking about 20 cigarettes a day and I wanted to stop.
I built it for myself. It's on GitHub (Free) now in case it helps someone else: if it helps even one person, that's mission success for me.
Why counting worked when nothing else did
I tried the usual things. Willpower. "I'll stop after this pack." None of it stuck, because I genuinely had no idea how much I was smoking. It was just... a thing my hands did (not sure if I am addicted to the nicotine, the action of mere smoking, or the warmth of the smoke in my mouth, etc..). Research papers are filled with non-correlative or non-convincing conclusions.
The app Pace does one thing: count. One tap, one cigarette. And then it showed me the number I had never actually looked at before.
Seeing "14" at 4pm hits differently than a vague feeling of "I smoke a bit much."
Then I added the second half, which turned out to be the important one: how much time is left until the next one. Not a rule, not a punishment: just a countdown. Tuns out, for me countdown provided the patience and will power to hold on for another 30 minutes. And something about waiting for a timer instead of reaching for a pocket changed the whole thing for me.
The widget that appears on the homescreen is the part that actually changed my habit
This is the bit I want to say properly.
Our phones have become body parts. We look at them every few minutes without deciding to. So I put the counter and the countdown on my home screen as a widget.
Now I don't have to remember to open an app during a craving. I unlock my phone for something completely unrelated and the reminder is just there. "3 today. 22 minutes to go."
It's constant, but it doesn't nag. And honestly, seeing that little card a hundred times a day is the reason my confidence has changed. For the first time I actually believe I will be able to quit.
Finding: Five minutes of distraction gets you past it
Here's the other thing I learned about myself: a craving is not permanent. It's about five minutes long. If I can get through those five minutes, I am fine.
So Pace sends me a notification when a craving is likely, and it opens straight into a chat. Ollama LLM model (with a personality) then tries to distract. Not a lecture, just something to talk about, or a riddle, or one silly specific thing to do for two minutes. The distraction eats the five minutes, and then it passes, and then it's ok.
That's the entire trick. It sounds too simple to work. It worked for me. Sharing it here not for views or stars or collaboration or anything. Even if it helps 1 person, I am happy, thats the purpose of this post.
So how did someone who can't code build an Android app?
I used AI. Specifically Claude Code completely to build the app and improve it.
I want to be clear about the split of work, because I think people oversell this:
What I did: described what I wanted in plain English. Used the app every single day on my own phone. Found the things that felt wrong and said so "the countdown on the widget is frozen", "I tapped it by accident in my pocket and it logged a cigarette I never smoked", "this animation feels sluggish". Made pretty much every decision about how it should behave.
What the AI did: all of the actual Kotlin. The database, the Compose screens, the widget, the notifications, the tests.
What I'm honest about: I do not fully understand every file in that repository. I can read it and follow it, but I couldn't have written it. If a real Android developer looks at the code and finds things to criticise, they're probably right, and I would like to hear it.
The parts I did go through carefully are the ones about my own data: where things get stored, what leaves the phone. (Answer: everything stays on the device. There's no server, no account, no analytics. The AI chat is optional and uses your own API key.)
Where I am now
From ~20 a day to 5–6 a day. Some days 4.
I haven't quit yet. Iam not going to pretend I have. But I'm not where I was, and for the first time it feels like a matter of when rather than if.
If you are in the same boat, the code is here: github.com/ravipurohit1991/pace. It's free, there's nothing to sign up for, and I'm not selling anything.
And if you have got an idea for something small that would make your own life a bit better: I think this is genuinely the moment to try building it. Not knowing how to code used to be the end of the conversation. It isn't anymore.
Good luck. Genuinely.
Top comments (18)
This is genuinely such a thoughtful idea! The home screen widget and countdown sound so simple but efficient. I like your attitude of what you built and what AI built. Going from 20 cigarettes to 5 is already amazing. Wishing you the best with the rest of the journey!
Thank you Sarah :)
Hey Ravi! as a smoker myself, I can relate to what you have written. I am glad you found your motivation to quit by developing an app to fix this problem. This is such a developer approach to do things :)
I had a look at your library, it reads well, and has all the convenient features. A time registrar for your smoking. And the widget that acts as a constant reminder with llm agent nagging you via notification makes it feel bit personal, a good addition.
I am going to fork and give it a try right away. I will post here, if this indeed helps me ;)
Good luck to you as well. Rooting for you and myself.
Thank Ryan :) To be honest, I would not have shared this, until after 10 days of trying I realized that it might actually work. And I agree, the whole motivation to quit started seriously after the app started taking shape. As, I am really trying to solve a problem affecting me, i get a bit more passionate. Hoping to cross the 22 day mark soon. I read somewhere, if you maintain a habit for 22 days or 3 weeks, then you sort of rewire your brain.
I am basically trying to rewire my brain to not accept smoke as a reward for task done, or for boredom. Granted few days its difficult, but the constant reminder of progress keeps me going. I hope you will find some use from this. Would be looking forward to hearing more about your updates :) Until then! Long live and propser
Kudos Ravi. Just wanted to share my immediate feedback: I downloaded your repo, and ran it on my android (pixel phone), works smoothly.
I created a pacing of 2h30min, and to be honest, I have only smoked 8 cigarettes yesterday (from 16 a day), so just wanted to tell you, it works. Good job.
The distractions are great, spent lot of minutes on the puzzle. I did not have cloud ollama, but i used the local ollama, and it works nicely. The periodic notification from the llm model. This is what it sent as notification yesterday, I was laughing:
This just made my day! Thanks Ryan. Good luck, keep at it.
You can also change the personality of the llm chatbot. Mine has a dry humor !!
This is honestly one of the most inspiring things I’ve come across on DEV in a while. ❤️
What makes this so ridiculously good is that you didn’t start with “I’m going to build an app.” You started with a real problem, built something specifically for yourself, tested it relentlessly in the real world, and then had the generosity to put it out there for everyone else.
Going from ~20 cigarettes a day to 5–6 is HUGE. And I absolutely love the honesty around AI here too. You’re not pretending Claude magically did everything—you had the idea, made the product decisions, identified what was broken, tested it every day, and used AI to turn your thinking into working software. THAT is such a compelling example of what AI-assisted development can actually look like.
The widget + countdown + distraction approach is brilliantly simple. No grand promises, no “one weird trick,” just a tiny feedback loop that helps you get through the next craving and gradually change the habit.
And the fact that you kept the data local, made it free, avoided accounts/analytics, and openly acknowledged the limitations of the code makes this even more impressive.
Honestly, Ravi, this is exactly the kind of project the AI era should be producing: personal, practical, humble, open, and genuinely useful.
20 → 5 is already an incredible achievement. I’m rooting ridiculously hard for 5 → 0. 🚀
What a fantastic project. Seriously. 👏👏👏
Thank you Frankie 🫠😍
Kawai
Smoking is one of those things that hooks every smoker in a different way. Some have chemical dependency, some are social smokers, and some have a hand to mouth habbit. Each person also has their "pain" points: health, financial costs, smell, disapproving family. Long story short, there is no single silver bullet. You clearly found something that might work for a certain category of people. Its good to see your solution working for you and therefore a lot of other people. Well done Ravi!
Thank you for the pleasant comment :) I agree with you on "no single silver bullet", just glad I found what works for me, and all i can do is hope that it may help someone else as well :)
It reminds me of Ricky Gervais's books on 'how to stop' and what it does, is actually encourage you throughout reading it to drink/smoke, essentially exactly what your app did, it told you incrementally 'time to smoke' and you keep telling yourself "I'm trying to quit", so when the book says drink/smoke, you choose not to. Keep reading and again... Again... Until the desire to drink/smoke is all but gone. Because you are training yourself to not smoke when told to and ignore your habit. Smart, I imagine alot of people would find it quite helpful
Thank you :) I have never read/heard of that book up until now. Thanks for sharing, I will try to read it ;)
You have potential to be a software engineer. You think about real problems and then apply it in the project. If you like, you can learn to code and make more awesome projects. Also I like your approach. You are honest about AI usage and also about your workflow. You did not oversell your product as if it's the perfect app out there. I also like the discipline to keep it all local for safety. Thanks for sharing this and I hope you can finally quit smoking sooner rather than later!
Thank you Elmar for the pleasant comment and message :)
Surprisingly, I am a software developer (or rather, scientific software developer: the kind that only does data science and inferences). Also, I have zero knowledge of Kotlin or android development. This is where AI has been super helpful for me. I still enjoy the critical thinking process, not the implementation part.
wow!!!! amazed! very cool - kudos to you, I need your app too :D
Thank you Katharina 🫠🐼
Some comments may only be visible to logged-in visitors. Sign in to view all comments.