<?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: kshitiz Tiwari</title>
    <description>The latest articles on DEV Community by kshitiz Tiwari (@kshitiztiq).</description>
    <link>https://dev.to/kshitiztiq</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%2F4015921%2Fa45eb64b-2922-4740-bc1f-1679d7af4095.jpg</url>
      <title>DEV Community: kshitiz Tiwari</title>
      <link>https://dev.to/kshitiztiq</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kshitiztiq"/>
    <language>en</language>
    <item>
      <title>CodeBuddy — An AI Coding Mentor That Learns From Your Mistakes</title>
      <dc:creator>kshitiz Tiwari</dc:creator>
      <pubDate>Sat, 03 Oct 2026 14:55:04 +0000</pubDate>
      <link>https://dev.to/kshitiztiq/codebuddy-an-ai-coding-mentor-that-learns-from-your-mistakes-4787</link>
      <guid>https://dev.to/kshitiztiq/codebuddy-an-ai-coding-mentor-that-learns-from-your-mistakes-4787</guid>
      <description>&lt;p&gt;What I Built&lt;/p&gt;

&lt;p&gt;I built CodeBuddy, a local-first AI coding mentor for a friend who is learning programming and DSA.&lt;/p&gt;

&lt;p&gt;My friend often gets stuck while debugging code and usually has to ask someone else for help. The problem isn't always finding the correct solution — it's understanding why the code is wrong and how to avoid making the same mistake again.&lt;/p&gt;

&lt;p&gt;CodeBuddy lets them paste their code, select the programming language, and provide an error or describe the expected behavior. Instead of immediately giving them the answer, it guides them through the problem using progressive hints and explanations.&lt;/p&gt;

&lt;p&gt;It can:&lt;/p&gt;

&lt;p&gt;🔍 Identify and explain the problem&lt;br&gt;
💡 Provide hints before revealing the solution&lt;br&gt;
📚 Explain the underlying programming concept&lt;br&gt;
🛠️ Suggest a possible fix&lt;br&gt;
🧠 Remember previous mistakes&lt;br&gt;
🔄 Identify recurring mistakes over time&lt;/p&gt;

&lt;p&gt;I built it specifically for my friend because I wanted to turn the kind of debugging help I was repeatedly giving them into a tool they could use themselves.&lt;/p&gt;

&lt;p&gt;The goal isn't to replace learning with AI. It's to use AI to make the learner better at solving problems independently.&lt;/p&gt;

&lt;p&gt;Demo&lt;/p&gt;

&lt;p&gt;🌐 Live Demo: &lt;a href="https://code-buddy-eight-psi.vercel.app/" rel="noopener noreferrer"&gt;https://code-buddy-eight-psi.vercel.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The demo shows the core CodeBuddy workflow:&lt;/p&gt;

&lt;p&gt;Code → Diagnosis → Hint → Concept Explanation → Fix → Lesson → Mistake Memory&lt;/p&gt;

&lt;p&gt;Code&lt;/p&gt;

&lt;p&gt;💻 GitHub Repository: &lt;a href="https://github.com/kshitiz374/CodeBuddy" rel="noopener noreferrer"&gt;https://github.com/kshitiz374/CodeBuddy&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;CodeBuddy is built as a local-first AI application, with an open-weight AI model running locally through Ollama.&lt;/p&gt;

&lt;p&gt;The main idea is to make the AI model an actual part of the learning workflow rather than simply putting a chatbot interface on top of an AI API.&lt;/p&gt;

&lt;p&gt;Tech Stack&lt;br&gt;
Next.js + TypeScript + Tailwind CSS — frontend&lt;br&gt;
FastAPI + Python — backend&lt;br&gt;
SQLite — local learning history and mistake memory&lt;br&gt;
Ollama — local AI inference&lt;br&gt;
Open-weight AI model — code analysis and learning guidance&lt;br&gt;
How It Works&lt;/p&gt;

&lt;p&gt;The workflow is:&lt;/p&gt;

&lt;p&gt;Code + Error&lt;br&gt;
     ↓&lt;br&gt;
Local AI Analysis&lt;br&gt;
     ↓&lt;br&gt;
Problem Diagnosis&lt;br&gt;
     ↓&lt;br&gt;
Progressive Hint&lt;br&gt;
     ↓&lt;br&gt;
Concept Explanation&lt;br&gt;
     ↓&lt;br&gt;
Possible Fix&lt;br&gt;
     ↓&lt;br&gt;
Lesson to Remember&lt;br&gt;
     ↓&lt;br&gt;
Mistake Memory&lt;/p&gt;

&lt;p&gt;My friend enters their code, programming language, and error or expected behavior. CodeBuddy sends this context to the locally running AI model.&lt;/p&gt;

&lt;p&gt;The model analyzes the problem and produces a structured response containing the diagnosis, hints, explanation, possible fix, and lesson.&lt;/p&gt;

&lt;p&gt;I also built a Mistake Memory feature that stores previous debugging sessions locally. This allows CodeBuddy to recognize recurring mistakes and make future guidance more relevant.&lt;/p&gt;

&lt;p&gt;For example, if a learner repeatedly makes mistakes involving pointers, CodeBuddy can use their previous learning history to help them recognize that pattern.&lt;/p&gt;

&lt;p&gt;The AI isn't just an add-on chatbot — the open-weight local model is at the core of the debugging and learning experience.&lt;/p&gt;

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

&lt;p&gt;Open innovation matters to CodeBuddy because the project is built around learning, local use, and user control.&lt;/p&gt;

&lt;p&gt;My friend shares source code, programming mistakes, and learning history with CodeBuddy. With a local open-weight model, the core AI processing can happen on the user's own machine rather than requiring every interaction to be sent to a closed cloud AI API.&lt;/p&gt;

&lt;p&gt;It also gives me more control over how the AI behaves. I can experiment with different open-weight models, modify the prompts and mentoring approach, and potentially customize the system for programming education without being locked into a single AI provider.&lt;/p&gt;

&lt;p&gt;Another important aspect is offline capability. After the required model and software are installed, the core AI experience can run without an internet connection, and there is no per-request API charge.&lt;/p&gt;

&lt;p&gt;A closed API could provide similar coding assistance, but using an open approach made it possible to build CodeBuddy around local inference, model flexibility, customization, and offline use.&lt;/p&gt;

&lt;p&gt;My Agent Session&lt;/p&gt;

&lt;p&gt;Prize Categories&lt;/p&gt;

&lt;p&gt;Built for a Friend ❤️&lt;/p&gt;

&lt;p&gt;CodeBuddy started with a simple problem:&lt;/p&gt;

&lt;p&gt;“My friend keeps getting stuck on the same coding mistakes.”&lt;/p&gt;

&lt;p&gt;Instead of just fixing the code for them, I wanted to build something that could help them understand why they were stuck.&lt;/p&gt;

&lt;p&gt;That's what CodeBuddy is about:&lt;/p&gt;

&lt;p&gt;Less “Here's your answer.”&lt;br&gt;
More “Here's how you can figure it out.”&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
