<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>svnscha - coding</title>
    <subtitle>automating annoying tasks, sharing tips, and embracing less frustration</subtitle>
    <link rel="self" type="application/atom+xml" href="https://svnscha.de/tags/coding/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://svnscha.de"/>
    <generator uri="https://astro.build/">Astro</generator>
    <updated>2025-10-27T00:00:00+00:00</updated>
    <id>https://svnscha.de/tags/coding/atom.xml</id>
    <entry xml:lang="en">
        <title>The Passenger Seat Developer</title>
        <published>2025-10-27T00:00:00+00:00</published>
        <updated>2025-10-27T00:00:00+00:00</updated>
        <author>
          <name>Sven Scharmentke</name>
        </author>
        <link rel="alternate" type="text/html" href="https://svnscha.de/posts/the-passenger-seat-developer/"/>
        <id>https://svnscha.de/posts/the-passenger-seat-developer/</id>
        <summary type="html">Here's what nobody tells you about AI-assisted rapid prototyping: Every prototype feels like success, but success is measured by shipping, not building.</summary>
        <content type="html" xml:base="https://svnscha.de/posts/the-passenger-seat-developer/">&lt;h2 id=&quot;the-great-prototype-experiment&quot;&gt;The Great Prototype Experiment&lt;/h2&gt;
&lt;p&gt;Here's what nobody tells you about AI-assisted rapid prototyping: After six months and nearly 100 projects, I had to face an uncomfortable truth.&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Every prototype feels like success. But is it really?&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;why-you-ask&quot;&gt;Why, You Ask?&lt;/h2&gt;
&lt;p&gt;Picture this: Me, armed with Claude, spinning up project after project like I'm some kind of coding machine gun. A productivity suite here, a file manager there, throw in some web scrapers, automation tools, data processors - you name it, I've probably built a prototype of it in the past six months.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Nearly 100 projects.&lt;/strong&gt; The dopamine hits were insane. Every idea that popped into my head, no matter how half-baked, could become a working prototype in hours instead of weeks. The velocity felt otherworldly.&lt;/p&gt;
&lt;p&gt;The result took me too long to acknowledge: &lt;strong&gt;out of nearly 100 prototypes, only one reached production.&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;One. Literally. One.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That project? &lt;a href=&quot;/posts/ai-meets-windbg/&quot;&gt;mcp-windbg&lt;/a&gt;. And guess what made it special? It's the only one where I spent those classic, grinding hours sitting there, actually understanding every line of code, debugging the edge cases, and wrestling with the gnarly implementation details.&lt;/p&gt;
&lt;h2 id=&quot;the-dopamine-factory&quot;&gt;The Dopamine Factory&lt;/h2&gt;
&lt;p&gt;Let me be real with you about what those early days felt like. I'd wake up with some random idea - &quot;What if I built a tool that automatically organizes screenshots by content?&quot; or &quot;I need a better way to manage my development environments&quot; - and by lunch, I'd have a working prototype.&lt;/p&gt;
&lt;p&gt;Six months ago, I was writing about &lt;a href=&quot;/posts/vscode-vibe-coding/&quot;&gt;vibe coding&lt;/a&gt; like I'd discovered fire. The euphoria was real - watching AI refactor entire codebases, generate complex implementations, solve architectural problems in seconds. I was living in that perfect state where &quot;the barrier between thinking and implementing just got so much thinner.&quot;&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Me: Build me a screenshot organizer that uses OCR to categorize images&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Claude: *Generates Python app with OCR integration, file management, GUI*&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Me: This actually works perfectly!&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The rush was incredible. Idea to implementation in hours. No tedious boilerplate. No debugging mysterious dependency issues. No wrestling with documentation. Just pure, frictionless creation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I felt like a goddamn wizard.&lt;/strong&gt; Every prototype that worked felt like validation that I'd cracked some secret code of productivity. Friends would ask what I was working on, and I'd rattle off a dozen projects like I was running a software factory.&lt;/p&gt;
&lt;p&gt;That euphoric beginning? It was exactly six months ago. Time has a funny way of providing perspective.&lt;/p&gt;
&lt;h2 id=&quot;the-reality-check-why-nothing-shipped&quot;&gt;The Reality Check: Why Nothing Shipped&lt;/h2&gt;
&lt;p&gt;After several months, my project folder had grown to nearly 100 directories, but I still had not shipped anything.&lt;/p&gt;
&lt;p&gt;Why? Because &lt;strong&gt;prototypes aren't products.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Every time I'd come back to one of these AI-generated prototypes to actually finish it - to handle edge cases, add proper error handling, write tests, or make it production-ready - I'd hit the same wall: &lt;strong&gt;I had no clue how the thing actually worked.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The code looked familiar. The structure made sense at first glance. But when it came time to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Debug why it crashed with certain file types&lt;/li&gt;
&lt;li&gt;Add a feature that required understanding the data flow&lt;/li&gt;
&lt;li&gt;Optimize performance bottlenecks&lt;/li&gt;
&lt;li&gt;Handle edge cases the AI hadn't considered&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I was lost. Completely, utterly lost.&lt;/p&gt;
&lt;h2 id=&quot;the-one-that-made-it-mcp-windbg&quot;&gt;The One That Made It: mcp-windbg&lt;/h2&gt;
&lt;p&gt;So why did mcp-windbg succeed when 99 others failed? It wasn't because I spent months on it - it was a small weekend project. But I approached it differently.&lt;/p&gt;
&lt;p&gt;I started by vibe-coding with Claude, just like the other prototypes. Got the basic structure working, had it generating and parsing WinDBG commands. But then - and this is the crucial difference - I actually went back and reviewed what the AI had built. Debugged the edge cases myself. Traced through the subprocess communication to understand how it really worked.&lt;/p&gt;
&lt;p&gt;When pytest failures popped up, I didn't just ask Claude to fix them. I sat there and figured out why they were failing. When the CDB interaction got weird with certain commands, I debugged it manually until I understood the communication protocol.&lt;/p&gt;
&lt;p&gt;The result? A weekend project that actually solved a real problem in my daily work. Something I could confidently maintain, extend, and explain to others.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I owned the code because I'd taken the time to understand what Claude had built.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&quot;the-brutal-truth-about-ai-generated-prototypes&quot;&gt;The Brutal Truth About AI-Generated Prototypes&lt;/h2&gt;
&lt;p&gt;Those 99 failed projects weren't failures because the code was bad. Most of them actually worked pretty well for their basic use cases. They failed because I'd delegated understanding to AI instead of using it as a tool to support my understanding.&lt;/p&gt;
&lt;p&gt;Here is what was happening:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Week 1&lt;/strong&gt;: &quot;Holy shit, look at this amazing prototype!&quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Week 2&lt;/strong&gt;: &quot;I should probably clean this up and ship it&quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Week 3&lt;/strong&gt;: &quot;Hmm, there are some edge cases I need to handle&quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Week 4&lt;/strong&gt;: &quot;Why is this crashing? Let me ask Claude to fix it&quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Week 5&lt;/strong&gt;: &quot;The fix broke something else. This is getting messy&quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Week 6&lt;/strong&gt;: &quot;Maybe I'll just start a new project instead...&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Sound familiar? This cycle repeated so consistently I could set my calendar by it.&lt;/p&gt;
&lt;h2 id=&quot;the-sitting-there-hours-why-they-matter&quot;&gt;The Sitting-There Hours: Why They Matter&lt;/h2&gt;
&lt;p&gt;You know those classic hours every developer has experienced? The ones where you're just sitting there, staring at code, trying to figure out why something isn't working the way you expect? Those moments when you're debugging line by line, tracing execution paths, and slowly building up a mental model of how everything fits together?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Those hours aren't wasted time. They're investment time.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When you skip those hours - when you let AI generate the solution and just accept it - you never build that intimate knowledge of your own system. You become a tourist in your own codebase.&lt;/p&gt;
&lt;p&gt;With mcp-windbg, I didn't spend weeks wrestling with it - it was just a weekend project. But during that weekend, when I hit issues with subprocess communication or weird CDB behavior, I actually debugged them myself instead of immediately asking Claude for fixes. I took the time to understand why certain commands failed and how the debugging session management worked.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;That weekend of actually understanding what I was building made the difference between prototype #99 and shipped product #1.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&quot;the-false-productivity-trap&quot;&gt;The False Productivity Trap&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;I felt productive while building those 99 prototypes.&lt;/strong&gt; Each working demo felt like progress, and my GitHub activity supported that impression. It did not mean I was finishing useful products.&lt;/p&gt;
&lt;p&gt;But productivity isn't about how much code you generate. It's about how much value you ship. And by that metric, I had a 1% success rate.&lt;/p&gt;
&lt;p&gt;The problem was not AI itself, but how I used it. I treated it as a replacement for understanding instead of a debugger or knowledge base that could help me learn faster.&lt;/p&gt;
&lt;h2 id=&quot;how-i-use-ai-now&quot;&gt;How I Use AI Now&lt;/h2&gt;
&lt;p&gt;I still use AI regularly, but now I treat it like any other development tool.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;AI as a knowledge base&lt;/strong&gt;: &quot;How does subprocess communication work in Python?&quot; &quot;What are the edge cases for file parsing?&quot; &quot;Show me different approaches to error handling.&quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;AI as a debugging partner&lt;/strong&gt;: &quot;Here's my stack trace, what could be causing this?&quot; &quot;This function isn't behaving as expected, help me trace through the logic.&quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;AI for the boring repetitive stuff&lt;/strong&gt;: Boilerplate code, test scaffolding, documentation generation, refactoring patterns I've done a million times.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;AI as a code reviewer&lt;/strong&gt;: &quot;Does this implementation handle edge cases properly?&quot; &quot;Are there performance issues with this approach?&quot;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The key difference: &lt;strong&gt;I use AI to accelerate my understanding, not replace it.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For anything I might ship, the rule is simple: &lt;strong&gt;If I can't explain how the core functionality works without looking at the code, I don't ship it.&lt;/strong&gt; AI can help me get there faster, but it can't get there for me.&lt;/p&gt;
&lt;p&gt;This isn't about being a purist or rejecting AI assistance - it's about maintaining professional competence and shipping software you can actually support.&lt;/p&gt;
&lt;h2 id=&quot;what-success-actually-looks-like&quot;&gt;What Success Actually Looks Like&lt;/h2&gt;
&lt;p&gt;After six months of this experiment, here's what I've learned about successful AI-assisted development:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Delegate the repetitive stuff&lt;/strong&gt;: Boilerplate generation, test scaffolding, documentation, refactoring patterns you've done before.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Use it as a knowledge multiplier&lt;/strong&gt;: Research APIs, explore different approaches, get explanations of complex concepts, debug tricky issues.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Keep the understanding&lt;/strong&gt;: Architecture decisions, core business logic, data flow design, system integration points.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Invest in the sitting-there hours&lt;/strong&gt;: For anything you plan to ship, spend the time to truly understand how it works.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;AI is similar to a good debugger or profiler: it can make you more effective, but it does not replace understanding the system you are building.&lt;/p&gt;
&lt;h2 id=&quot;the-uncomfortable-question&quot;&gt;The Uncomfortable Question&lt;/h2&gt;
&lt;p&gt;Here's the question that keeps me up at night: &lt;strong&gt;How many developers are building careers on AI-generated code they don't understand?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is also a matter of professional responsibility. If you own a piece of code, you should be able to explain, modify, and debug it, especially when a production issue occurs and the AI assistant is unavailable.&lt;/p&gt;
&lt;p&gt;I don't have a good answer to that question. I just know I don't want to be that kind of developer.&lt;/p&gt;
&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;
&lt;p&gt;After six months and nearly 100 AI-assisted prototypes, only mcp-windbg shipped. The difference was that I used AI to speed up my learning instead of asking it to replace that learning.&lt;/p&gt;
&lt;p&gt;Remember that uncomfortable truth from the beginning? Every prototype feels like success, but success is measured by shipping, not building. The dopamine hits from rapid prototyping are real, but they're not the same as the satisfaction of maintaining code you actually understand.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The lesson isn't to use less AI. The lesson is to use it better.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;AI is like having a brilliant research assistant, debugger, and code reviewer all rolled into one. Use it to explore ideas faster, understand concepts deeper, and eliminate the boring repetitive work that burns you out. But don't delegate the understanding itself.&lt;/p&gt;
&lt;h2 id=&quot;next-steps&quot;&gt;Next Steps&lt;/h2&gt;
&lt;p&gt;If this resonates with you, here's what I'd suggest doing right now:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Audit your current projects:&lt;/strong&gt; Look at your recent work. Can you explain how the core functionality works without looking at the code? If not, spend some time diving into those systems.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Set a new rule:&lt;/strong&gt; For anything you plan to ship, implement the &quot;explain it without looking&quot; test. If you can't walk someone through how it works from memory, you're not ready to ship.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Change how you prompt:&lt;/strong&gt; Instead of &quot;Build me X,&quot; try &quot;Help me understand how to build X&quot; or &quot;What are the key concepts I need to know for X?&quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Embrace the sitting-there hours:&lt;/strong&gt; When you hit a bug or weird behavior, resist the urge to immediately ask AI for a fix. Spend 15-20 minutes trying to understand it yourself first.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Someone still needs to own the code. AI can help you move faster, but it cannot take that responsibility from you.&lt;/p&gt;
</content>
    </entry>
    <entry xml:lang="en">
        <title>Vibe Coding is So Damn Real</title>
        <published>2025-04-27T00:00:00+00:00</published>
        <updated>2025-04-27T00:00:00+00:00</updated>
        <author>
          <name>Sven Scharmentke</name>
        </author>
        <link rel="alternate" type="text/html" href="https://svnscha.de/posts/vscode-vibe-coding/"/>
        <id>https://svnscha.de/posts/vscode-vibe-coding/</id>
        <summary type="html">Because watching GitHub Copilot refactor files with a single prompt is the most satisfying thing you'll see today.</summary>
        <content type="html" xml:base="https://svnscha.de/posts/vscode-vibe-coding/">&lt;h2 id=&quot;why-you-ask&quot;&gt;Why, You Ask?&lt;/h2&gt;
&lt;p&gt;Ever had that moment when your coding flow is so perfect it feels like you and your tools are in some kind of cosmic alignment? That's vibe coding. It's when the friction between thought and implementation practically disappears. And let me tell you, with GitHub Copilot and VS Code, this isn't just a fleeting sensation-it's a consistent reality.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I'm tired of writing about theoretical capabilities. Let me show you something concrete.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&quot;a-childhood-dream-come-true&quot;&gt;A Childhood Dream Come True&lt;/h2&gt;
&lt;p&gt;Let me share something personal: since I first started coding, I've had this recurring dream. A dream where I could simply talk to my computer, tell it what I want in plain language, and watch as it translates my intentions into working code. No syntax gymnastics. No hunting for semicolons. Just pure, frictionless creation.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&quot;Hey computer, refactor this module to use dependency injection instead of globals.&quot;&lt;/li&gt;
&lt;li&gt;&quot;Computer, optimize this database query, it's running too slow.&quot;&lt;/li&gt;
&lt;li&gt;&quot;Add translation support to all user-facing strings in this module.&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For decades, this remained firmly in the realm of science fiction-something for Star Trek episodes where they casually ask the computer to &quot;reconfigure the deflector dish&quot; and it just... happens.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;DAMN, we're just there now.&lt;/strong&gt; Not in some distant future, not as a tech demo, but as a practical, everyday reality in my development workflow.&lt;/p&gt;
&lt;h2 id=&quot;real-world-context-nofidoc&quot;&gt;Real-World Context: Nofidoc&lt;/h2&gt;
&lt;p&gt;A little context: In my free time, I've been pushing the boundaries of what's possible with AI-assisted coding-well beyond just casual experiments. While I also use these workflows at work, Nofidoc has become my personal playground for exploring how far I can take this technology. It's a space where I can try things that aren't always ready for the spotlight, but the results have been too compelling not to share (even if I'm keeping things a bit low-key for now).&lt;/p&gt;
&lt;p&gt;The codebase uses Qt for the UI components, has a wizard-based document import flow, and handles various document formats with a focus on PDFs. It's exactly the kind of mid-sized C++ project where refactoring used to be tedious and error-prone.&lt;/p&gt;
&lt;h2 id=&quot;the-perfect-pairing&quot;&gt;The Perfect Pairing&lt;/h2&gt;
&lt;p&gt;VS Code with GitHub Copilot doesn't just assist your coding-it transforms it. No more wasting precious brain cycles on trivial tasks. No more tedious refactoring operations that make you question your career choices at 2 AM.&lt;/p&gt;
&lt;p&gt;I recently needed to refactor the document import workflow to remove direct database dependencies in the wizard component. Why having that in the first place? Well, getting something proof-of-concept-ish is the answer. Anyways, this is a classic case of improving architecture by decoupling components, but it typically requires careful changes across multiple files and understanding the entire call hierarchy.&lt;/p&gt;
&lt;h2 id=&quot;see-the-entire-workflow-in-action&quot;&gt;See The Entire Workflow In Action&lt;/h2&gt;
&lt;p&gt;I've recorded a full ~6-minute video showing the entire refactoring process from start to finish. You'll see me:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Prompt Copilot with my refactoring requirements&lt;/li&gt;
&lt;li&gt;Watch the initial code changes being proposed&lt;/li&gt;
&lt;li&gt;Hit compilation errors (because real-world code is messy!)&lt;/li&gt;
&lt;li&gt;Provide additional guidance to Copilot&lt;/li&gt;
&lt;li&gt;Get a complete, working solution&lt;/li&gt;
&lt;/ol&gt;
&lt;video class=&quot;cast&quot; src=&quot;/casts/2025-04-27-vibe.webm&quot; controls&gt;
  Your browser does not support the video tag.
&lt;/video&gt;
&lt;p&gt;What's remarkable here is not just that Copilot could make the changes, but how the entire interaction feels like working with a senior developer who deeply understands your codebase.&lt;/p&gt;
&lt;h2 id=&quot;the-real-example-documentimportwizard-refactoring&quot;&gt;The Real Example: DocumentImportWizard Refactoring&lt;/h2&gt;
&lt;p&gt;Here's a snapshot of what happened in the video. I needed to update the DatabaseWidget class to use the new API of our DocumentImportWizard that we had refactored to remove direct database dependencies.&lt;/p&gt;
&lt;p&gt;Copilot analyzed the code and came up with this solution:&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;cpp&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A9955&quot;&gt;// Before refactoring, direct database dependency:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color:#4EC9B0&quot;&gt; DatabaseWidget&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;onDocumentImportWizard&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;    auto&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt; importWizard&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt; DocumentImportWizard&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;_database&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;    importWizard&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;exec&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A9955&quot;&gt;// After refactoring, using callback approach:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color:#4EC9B0&quot;&gt; DatabaseWidget&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;onDocumentImportWizard&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;    auto&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt; importWizard&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt; DocumentImportWizard&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;    importWizard&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;setGetDocumentTypesCallback&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;([&lt;/span&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;]() {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;        if&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; (!&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;_database&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;            return&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt; QList&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#4EC9B0&quot;&gt;DocumentType&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;&amp;gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;            &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;        auto&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt; docTypeService&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;_database&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;getDocumentTypeService&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;        if&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt; (!&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;docTypeService&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;            return&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt; QList&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#4EC9B0&quot;&gt;DocumentType&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;&amp;gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;            &lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#C586C0&quot;&gt;        return&lt;/span&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt; docTypeService&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;getDocumentTypes&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;    });&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#9CDCFE&quot;&gt;    importWizard&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;exec&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;();&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Copilot explained its reasoning:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&quot;I've updated the onDocumentImportWizard() method in DatabaseWidget to use the new refactored API of our DocumentImportWizard class. The key changes were:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;1. Removed passing the _database parameter directly to the DocumentImportWizard constructor&lt;/em&gt;
&lt;em&gt;2. Added a call to setGetDocumentTypesCallback() with a lambda that:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Checks if _database is valid&lt;/li&gt;
&lt;li&gt;Gets the document type service from the database&lt;/li&gt;
&lt;li&gt;Returns the document types list from the service&lt;/li&gt;
&lt;li&gt;Returns an empty list if any step fails&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;This completes the refactoring work by updating all the calling code to use the new API. The change maintains the same functionality but with a cleaner design that removes direct dependencies on the database pointer.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The implementation follows modern C++ practices by using a lambda to encapsulate the specific functionality needed (getting document types) while keeping the rest of the database access logic out of the wizard class. This makes the code more maintainable and easier to test.&quot;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is exactly the kind of architectural improvement that typically takes deep understanding of both the codebase and software design principles. Yet Copilot produced it in seconds.&lt;/p&gt;
&lt;h2 id=&quot;the-key-lesson-human-ai-collaboration&quot;&gt;The Key Lesson: Human-AI Collaboration&lt;/h2&gt;
&lt;p&gt;My main takeaway is simple: &lt;strong&gt;AI tools work best when you bring your own domain knowledge.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Just before that, I was debugging a frustrating issue with field registration in that document import wizard. The fields weren't passing values between pages correctly. I asked Copilot to help fix the bug and it initially proposed an overly complex workaround that would have been a maintenance nightmare.&lt;/p&gt;
&lt;p&gt;So I gave it a hint:&lt;/p&gt;
&lt;p&gt;&quot;I think there's an issue with the registerField calls for 'importSuccessCount' and 'importErrorCount'. The implementation doesn't specify the property name correctly.&quot;&lt;/p&gt;
&lt;p&gt;And just like that, it had an &quot;aha!&quot; moment. It immediately identified the real issue:&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;cpp&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A9955&quot;&gt;// Before (buggy implementation):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;registerField&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;importSuccessCount&quot;&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A9955&quot;&gt;// After (Copilot's correct fix):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;registerField&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;importSuccessCount&quot;&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#569CD6&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt;&quot;importSuccessCount&quot;&lt;/span&gt;&lt;span style=&quot;color:#D4D4D4&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This simple fix resolved the entire issue. The fix works because it properly uses the Qt property system (third parameter) as the remaining code and pages expected, whereas Copilot's initial workaround was mega ugly - setting properties directly with setProperty() calls. With just a small hint about the actual problem, we were back on track. This perfectly illustrates why domain expertise remains critical - AI tools can suggest solutions, but knowing which ones make sense in your framework requires human judgment.&lt;/p&gt;
&lt;p&gt;Sometimes AI tools need a gentle nudge in the right direction, and then they're off to the races again.&lt;/p&gt;
&lt;h2 id=&quot;not-always-perfect-magic&quot;&gt;Not Always Perfect Magic&lt;/h2&gt;
&lt;p&gt;Let me be real with you - it's not all sunshine and rainbows. AI assistance sometimes misses the mark, and when it does, you need to steer it in the right direction. But I've found that:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The initial attempt is usually close&lt;/li&gt;
&lt;li&gt;AI is exceptionally good at understanding feedback&lt;/li&gt;
&lt;li&gt;With the right hints, it can quickly recover and find the optimal solution&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The collaboration workflow is what makes all the difference. Instead of wrestling with a tool, it feels like having a junior developer who's eager to learn and quick to adapt.&lt;/p&gt;
&lt;h2 id=&quot;what-i-learned&quot;&gt;What I Learned&lt;/h2&gt;
&lt;p&gt;This isn't just about saving time (though I saved HOURS). It's about changing how we think about coding. When you can express your intent in natural language and have it accurately translated into code changes, you're no longer programming computers-you're conversing with them.&lt;/p&gt;
&lt;p&gt;The barrier between thinking and implementing just got so much thinner.&lt;/p&gt;
&lt;h2 id=&quot;getting-this-setup-yourself&quot;&gt;Getting This Setup Yourself&lt;/h2&gt;
&lt;p&gt;Want this superpower? Here's what you need:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;VS Code&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GitHub Copilot&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A clear understanding of your codebase&lt;/strong&gt; - To craft effective prompts&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That's it! No complex configuration, no elaborate plugin chains.&lt;/p&gt;
&lt;p&gt;Oh, which model? Right now I am using Claude 3.7 - it's so good.&lt;/p&gt;
&lt;h2 id=&quot;where-this-is-going&quot;&gt;Where This Is Going&lt;/h2&gt;
&lt;p&gt;You know that saying about technology and magic? This is it. We're witnessing the early days of a transformation in how software gets built. The tools are evolving to understand not just the syntax of our code, but the intent behind it.&lt;/p&gt;
&lt;p&gt;Could I have written a complex bash script to do some of this refactoring? Maybe.
Could I have used search-and-replace with regex? Probably.
Would either approach have understood the semantic meaning of my code well enough to know which strings need translation? Absolutely not.&lt;/p&gt;
&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;
&lt;p&gt;Vibe coding isn't just some feel-good developer term. It's that perfect state where you and your tools are in sync, where expressing your intent feels natural and immediate. With GitHub Copilot and VS Code, I'm experiencing this daily while building Nofidoc.&lt;/p&gt;
&lt;p&gt;If you're still doing manual refactoring in 2025, you're not just missing out on productivity-you're missing out on the pure joy of frictionless development.&lt;/p&gt;
&lt;p&gt;Try it. Feel it. Vibe code.&lt;/p&gt;
</content>
    </entry>
</feed>
