<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rohit</title>
    <description>The latest articles on DEV Community by Rohit (@rohitpd).</description>
    <link>https://dev.to/rohitpd</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4157335%2F4027d8e7-d0a7-4173-a405-8d9351f07124.jpg</url>
      <title>DEV Community: Rohit</title>
      <link>https://dev.to/rohitpd</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rohitpd"/>
    <language>en</language>
    <item>
      <title>CP Hint Coach</title>
      <dc:creator>Rohit</dc:creator>
      <pubDate>Wed, 14 Oct 2026 09:53:05 +0000</pubDate>
      <link>https://dev.to/rohitpd/cp-hint-coach-35gf</link>
      <guid>https://dev.to/rohitpd/cp-hint-coach-35gf</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week2-2026-10-12"&gt;Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;CP Hint Coach is a small app for people practicing competitive programming. You paste a problem and whatever you've tried so far, and it gives you four hints that get more revealing one at a time: a nudge, a key observation, the approach in plain English, and finally a code skeleton with the main logic left blank. The goal is to get you unstuck without handing you the solution.&lt;/p&gt;

&lt;p&gt;I built it for students and self-learners preparing for contests or coding interviews. When they get stuck on a Codeforces or LeetCode problem they usually either stay stuck or open the editorial, and the editorial skips the part that actually teaches them, which is working out the idea yourself. Coaches could also hand it to their students as something that helps without giving answers away. Whether anyone would pay for it is something I haven't been able to find out yet.&lt;/p&gt;

&lt;p&gt;There's also an optional Codeforces lookup. Type a handle and it lists problems you recently got a non-accepted verdict on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;The model runs on the user's own machine, so there's no hosted version to link to. Here's a short screen recording of it working:   &lt;iframe src="https://www.youtube.com/embed/CEViEcBe5o8" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/rohitphani007" rel="noopener noreferrer"&gt;
        rohitphani007
      &lt;/a&gt; / &lt;a href="https://github.com/rohitphani007/CP-Hint-Coach-HBF" rel="noopener noreferrer"&gt;
        CP-Hint-Coach-HBF
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;CP Hint Coach&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;A hint coach for competitive programming that runs on your own computer. You paste a problem and whatever you have tried so far, and it gives you four hints that get more revealing one step at a time. The idea is to get you unstuck without handing you the solution.&lt;/p&gt;
&lt;p&gt;It uses an open-weight model through Ollama, so hint generation does not need a cloud API or an account.&lt;/p&gt;
&lt;p&gt;Built for the Hacktoberfest Week 2 Dev challenge (theme: Side Hustle).&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;The problem&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;When you are stuck on a Codeforces, LeetCode or CodeChef problem, there are usually only two options. You stay stuck for an hour, or you open the editorial (or paste the problem into a chatbot) and see the whole solution. The first costs you momentum and the second costs you the practice, because the part where you work out the idea is the part that…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/rohitphani007/CP-Hint-Coach-HBF" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;It's about 450 lines of Python. The interface is Streamlit, the model runs through Ollama, and the model I used is &lt;code&gt;qwen2.5-coder:3b&lt;/code&gt;, an open-weight code model. The Codeforces lookup uses their public API.&lt;/p&gt;

&lt;p&gt;When you press the button, the app sends the problem, your attempt and your chosen language to the model in a single request. The prompt asks for four hints as JSON. The app parses the reply, with a fallback for when the JSON is slightly broken, and keeps all four hidden. You reveal them one at a time, so each new level only appears after you press the button for it. The coach's behavior lives in one prompt file, and the model name is one line in &lt;code&gt;coach.py&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;A practice session isn't one question. You ask, unlock a hint, try something, get stuck again, unlock another. With a local model none of those requests has a per-request fee, which is what makes a tool like this realistic to give away, or to charge a small amount for, without a bill that grows with every hint.&lt;/p&gt;

&lt;p&gt;It also keeps your work private. Your attempts and code never leave your machine, and after the model is downloaded, hint generation works with no internet. The one exception is the Codeforces lookup, which is optional, needs a connection, and only sends the handle you type.&lt;/p&gt;

&lt;p&gt;The third thing is control. Because I run the model myself, I can change how much each level reveals, or swap in a different model and compare the results, by editing one file. A closed API would let me change the prompt but not the model underneath it.&lt;/p&gt;

&lt;p&gt;Open doesn't mean the same thing for every model, though. Ollama lists the 3B model I used under the Qwen Research License, not a fully permissive one, so if I were really selling this I'd have to read those terms carefully or choose a model with a clearer license. I also didn't compare against a closed model, and a larger one would probably do better on hard problems. What the open model gave me was a tool that costs nothing per request, keeps data local, and lets me change anything.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>python</category>
      <category>codeforces</category>
    </item>
  </channel>
</rss>
