<?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: Applex1025</title>
    <description>The latest articles on DEV Community by Applex1025 (@applex1025).</description>
    <link>https://dev.to/applex1025</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3914354%2F4c6ea827-af04-4553-a6ba-d96165359fb9.jpg</url>
      <title>DEV Community: Applex1025</title>
      <link>https://dev.to/applex1025</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/applex1025"/>
    <language>en</language>
    <item>
      <title>I don't want AI to rewrite code I already trust</title>
      <dc:creator>Applex1025</dc:creator>
      <pubDate>Tue, 05 May 2026 17:17:38 +0000</pubDate>
      <link>https://dev.to/applex1025/i-dont-want-ai-to-rewrite-code-i-already-trust-211i</link>
      <guid>https://dev.to/applex1025/i-dont-want-ai-to-rewrite-code-i-already-trust-211i</guid>
      <description>&lt;p&gt;I've built a lot of projects in Python, Go, and Rust.Because of that, I keep reusing the same kinds of code over and over:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;chunked pandas CSV processing&lt;/li&gt;
&lt;li&gt;health check endpoints&lt;/li&gt;
&lt;li&gt;retry wrappers&lt;/li&gt;
&lt;li&gt;validation helpers&lt;/li&gt;
&lt;li&gt;rate limiting&lt;/li&gt;
&lt;li&gt;small bits of glue code that are easy to forget and annoying to rewrite&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The problem is not that I don't have this code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The problem is that it is spread across a bunch of repositories&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So the &lt;strong&gt;real workflow&lt;/strong&gt; usually looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I remember that I solved this before.&lt;/li&gt;
&lt;li&gt;I don't remember which repo it was in.&lt;/li&gt;
&lt;li&gt;I search for it.&lt;/li&gt;
&lt;li&gt;I find three or four similar versions.&lt;/li&gt;
&lt;li&gt;I spend time figuring out which one is the version I actually trust.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;That last step is the annoying one.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Search gives me matches, not confidence
&lt;/h2&gt;

&lt;p&gt;Code search helps, but only up to a point.&lt;/p&gt;

&lt;p&gt;If I search for a CSV process, I might find:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;one version from an old script&lt;/li&gt;
&lt;li&gt;one version that was written fast and never reused&lt;/li&gt;
&lt;li&gt;one version that depends on some project-specific utility&lt;/li&gt;
&lt;li&gt;one version that is probably right, but I need to open more files to be sure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is not a huge problem once.&lt;/p&gt;

&lt;p&gt;It becomes a problem when the same pattern shows up every week.&lt;/p&gt;

&lt;p&gt;I don't really need &lt;code&gt;code that looks similar&lt;/code&gt;.&lt;br&gt;
I need &lt;strong&gt;the version that already survived real usage&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example, if I need to process a huge CSV file, I usually don't want a model to generate a fresh pandas implementation.&lt;/p&gt;

&lt;p&gt;I want the chunked version I already used successfully before.&lt;/p&gt;

&lt;p&gt;Something closer to this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;typing&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Callable&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;process_csv_in_chunks&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;csv_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;chunk_processor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Callable&lt;/span&gt;&lt;span class="p"&gt;[[&lt;/span&gt;&lt;span class="n"&gt;pandas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DataFrame&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="nb"&gt;object&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;chunk_size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;object&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Read a CSV in chunks and return one processed result per chunk.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
    &lt;span class="c1"&gt;# Flow:
&lt;/span&gt;    &lt;span class="c1"&gt;#   CSV reader -&amp;gt; yield one chunk at a time
&lt;/span&gt;    &lt;span class="c1"&gt;#                 |
&lt;/span&gt;    &lt;span class="c1"&gt;#                 +-&amp;gt; empty chunk -&amp;gt; skip it
&lt;/span&gt;    &lt;span class="c1"&gt;#                 `-&amp;gt; non-empty chunk -&amp;gt; process it and collect one result
&lt;/span&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chunk_size&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="nf"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chunk_size&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;chunk_size&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;chunk_size must be a positive integer&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="n"&gt;chunk_iter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;csv_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;chunksize&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;chunk_size&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;chunk&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;chunk_iter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;empty&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;continue&lt;/span&gt;
        &lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;chunk_processor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;results&lt;/span&gt;


&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;to_rows&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DataFrame&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;object&lt;/span&gt;&lt;span class="p"&gt;]]:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;to_dict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;orient&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;records&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;process_csv_in_chunks&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;your_file.csv&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;to_rows&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Not because this code is hard to generate.Because I already have a version I trust.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So why write it again?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  This changed how I use AI for coding
&lt;/h2&gt;

&lt;p&gt;I still use AI a lot.&lt;/p&gt;

&lt;p&gt;For open-ended work, it is great.&lt;/p&gt;

&lt;p&gt;If I'm exploring an API, sketching a feature, or comparing approaches, generation is exactly what I want.&lt;/p&gt;

&lt;p&gt;But for well-defined work, I increasingly want a different workflow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;find the code I already trust&lt;/li&gt;
&lt;li&gt;give that to the model&lt;/li&gt;
&lt;li&gt;let the model adapt it&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That is a much better fit for how I actually work.If I ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;write Python code to process a large CSV in chunks&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I will probably get something reasonable.&lt;/p&gt;

&lt;p&gt;If I ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;find my existing chunked pandas CSV snippet and adapt it to aggregate these columns&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I am much closer to what I actually want.&lt;/p&gt;

&lt;p&gt;That is the difference between generation and retrieval.&lt;/p&gt;

&lt;p&gt;For a lot of day-to-day engineering tasks, retrieval is the more useful first step.&lt;/p&gt;

&lt;h2&gt;
  
  
  The real issue is not storage
&lt;/h2&gt;

&lt;p&gt;This is not just a snippet storage problem.&lt;/p&gt;

&lt;p&gt;Saving code is easy. Most of us already do it in some form:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;old repos&lt;/li&gt;
&lt;li&gt;scratch repos&lt;/li&gt;
&lt;li&gt;notes&lt;/li&gt;
&lt;li&gt;gists&lt;/li&gt;
&lt;li&gt;dotfiles&lt;/li&gt;
&lt;li&gt;random folders called &lt;code&gt;utils-old&lt;/code&gt; or &lt;code&gt;experiments&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The hard part is making that code easy to retrieve later with enough context to trust it.&lt;/p&gt;

&lt;p&gt;For me, that means I need at least:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a short summary of what the snippet is for&lt;/li&gt;
&lt;li&gt;enough tags or metadata to separate similar snippets&lt;/li&gt;
&lt;li&gt;the actual code&lt;/li&gt;
&lt;li&gt;some confidence that this is the version I meant to keep&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without that, I am back to digging through old repos and guessing again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I built AnySnippet
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2i4wowmcnpjw7h29rt9j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2i4wowmcnpjw7h29rt9j.png" alt="How it works" width="800" height="477"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I wanted a desktop snippet workspace where I could keep these trusted pieces outside the repos where they were originally written.&lt;/p&gt;

&lt;p&gt;And I wanted AI tools to be able to search that library through MCP.&lt;/p&gt;

&lt;p&gt;The goal was not "generate more code faster".&lt;/p&gt;

&lt;p&gt;The goal was much simpler:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;when I already solved a problem before, help me reuse that solution instead of recreating it&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is the whole thing.&lt;/p&gt;

&lt;p&gt;Not smarter autocomplete.&lt;br&gt;
Not autonomous agents.&lt;br&gt;
Not replacing engineering judgment.&lt;/p&gt;

&lt;p&gt;Just a better path from:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I know I already wrote this&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;to:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;here is the version I trust, now adapt it to the current job&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What I actually wanted from the tool
&lt;/h2&gt;

&lt;p&gt;I wanted a few very boring things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;one place for reusable code across Python, Go, and Rust&lt;/li&gt;
&lt;li&gt;search that is scoped to code I intentionally kept&lt;/li&gt;
&lt;li&gt;enough metadata to disambiguate similar snippets&lt;/li&gt;
&lt;li&gt;a way for Claude or Codex to retrieve those snippets directly&lt;/li&gt;
&lt;li&gt;a workflow that feels local and practical, not like publishing content to a platform&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is why I ended up with a desktop workspace instead of just another repo.&lt;/p&gt;

&lt;p&gt;A repo is great for versioned code.&lt;/p&gt;

&lt;p&gt;It is less great as a personal retrieval layer when what I want is "find the thing I trust and hand it to the model".&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed after I started using this approach
&lt;/h2&gt;

&lt;p&gt;The main difference is that I spend less time re-explaining old work to myself.&lt;/p&gt;

&lt;p&gt;That is really it.&lt;/p&gt;

&lt;p&gt;I still review generated code.&lt;br&gt;
I still change things manually.&lt;br&gt;
I still throw away bad suggestions.&lt;/p&gt;

&lt;p&gt;But now, for repetitive and well-defined tasks, I can start from code I already believe in.&lt;/p&gt;

&lt;p&gt;That is a much better starting point than a fresh answer that happens to look correct.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you already feel this pain, you probably don't need more generation
&lt;/h2&gt;

&lt;p&gt;You probably need a better retrieval layer.&lt;/p&gt;

&lt;p&gt;That does not have to be AnySnippet.&lt;/p&gt;

&lt;p&gt;Even if you build your own setup, &lt;strong&gt;I think the useful idea is the same&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;stop treating every solved problem as something that should be regenerated&lt;/li&gt;
&lt;li&gt;keep trusted reusable code somewhere deliberate&lt;/li&gt;
&lt;li&gt;make it easy to retrieve with context&lt;/li&gt;
&lt;li&gt;let AI adapt from there&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For me, that has been a better default for real engineering work.&lt;/p&gt;

&lt;p&gt;Especially for the boring stuff.&lt;/p&gt;

&lt;p&gt;And honestly, the boring stuff is most of the work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Question
&lt;/h2&gt;

&lt;p&gt;How are you dealing with this today?&lt;/p&gt;

&lt;p&gt;Are you mostly relying on repo search and memory, or do you already have some kind of personal library for trusted reusable code?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>programming</category>
      <category>devtools</category>
    </item>
  </channel>
</rss>
