<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="381597" data-post-id="381597">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="BartOtten" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/BartOtten/120/25440_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  BartOtten
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="nathanl" data-post="11" data-topic="73899">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/nathanl/48/39891_2.png" class="avatar"> nathanl:</div>
<blockquote>
<p>Also, in my experience, LLMs perform way better on small codebases (or targeted sections of them) than when they must read a large amount of code</p>
</blockquote>
</aside>
<p>Afaik this is due to the context window which may be too small to hold the whole code base ‘in memory’. Hence duplication: some functions are simply not seen.</p>
<p>AI workflows get better so a preprocessor can pick relevant parts of the code for the context and use this subset.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="381597" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/150-000-lines-of-vibe-coded-elixir-the-good-the-bad-and-the-ugly/73899/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-381597" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="381597"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="381598" data-post-id="381598">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="BartOtten" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/BartOtten/120/25440_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  BartOtten
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="garrison" data-post="3" data-topic="73899">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/3bc359/48.png" class="avatar"> garrison:</div>
<blockquote>
<p>Does it matter how many lines of code there are in nobody reads them? Does it matter if logic is duplicated if nobody ever has to change it?</p>
</blockquote>
</aside>
<p>You tell me after the app is hacked and customer data leaked. Tell me and the responsible agencies.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="381598" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/150-000-lines-of-vibe-coded-elixir-the-good-the-bad-and-the-ugly/73899/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-381598" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="381598"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="381607" data-post-id="381607">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>If you care about security, correctness, quality, or craft I don’t think you should be letting these models anywhere near your codebase. I certainly won’t.</p>
<p>But realistically most of the industry stopped caring about those things long before LLMs, and realistically these models have probably already surpassed the security skillset of the average webdev anyway.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="381607" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/150-000-lines-of-vibe-coded-elixir-the-good-the-bad-and-the-ugly/73899/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-381607" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="381607"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="381665" data-post-id="381665">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Implicit in this point, though, is that I expect those things to change. Security and correctness will come easily, probably faster than you think. Honestly probably this year. Models are already good at <em>finding</em> security bugs, so a little adversarial RL will go a long way.</p>
<p>Quality is a lot harder, in part because it’s a matter of where you put the goalposts. My bet is the models will be outputting mediocrity for a while. Because their training set is mediocre, and because it will be hard to RL UX as it’s essentially AI-complete. But we’ve been putting up with mediocre software for decades now, so honestly I don’t expect things to get dramatically worse. If anything it will free up the real programmers to actually spend their time making good things again. Glass half full.</p>
<p>And that gets into the last one. I’m not sure if the models can ever replace “craft”, because to me that’s in the eye of the artisan. And there are still artisans all over the world making things exactly as they have for hundreds of years, industrial revolution be damned. But do not let that analogy distract you from the fact that, unlike physical goods, computer programs can be infinitely copied. The playing field is <em>much</em> more level.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="381665" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/150-000-lines-of-vibe-coded-elixir-the-good-the-bad-and-the-ugly/73899/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-381665" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="381665"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="381746" data-post-id="381746">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="egeersoz" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/egeersoz/120/15704_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  egeersoz
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>For us they were caused almost exclusively by async code spawned by liveviews. When the liveview request completed and we asserted on the results, the test process finished and exited before their async tasks (which we didn’t care about in those specific tests) could finish running. This caused existing database connections from those tasks to get prematurely killed.</p>
<p>I think we handled most of the errors by explicitly rendering the view using <code>render_async</code>. For example:</p>
<p></p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/a/6/a6113991e2c46b96953c081251c7e09334fe7bf4.png" data-download-href="https://forum.elixirforum.com/uploads/default/a6113991e2c46b96953c081251c7e09334fe7bf4" title="image" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/optimized/3X/a/6/a6113991e2c46b96953c081251c7e09334fe7bf4_2_690x362.png" alt="image" data-base62-sha1="nH6abjInH0dpaaZxhA8545NpkPy" width="690" height="362" srcset="https://forum.elixirforum.com/uploads/default/optimized/3X/a/6/a6113991e2c46b96953c081251c7e09334fe7bf4_2_690x362.png, https://forum.elixirforum.com/uploads/default/original/3X/a/6/a6113991e2c46b96953c081251c7e09334fe7bf4.png 1.5x, https://forum.elixirforum.com/uploads/default/original/3X/a/6/a6113991e2c46b96953c081251c7e09334fe7bf4.png 2x" data-dominant-color="1D2325"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">914×480 41.1 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p>
<p>It adds a bit of verbosity but we don’t mind it.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="381746" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/150-000-lines-of-vibe-coded-elixir-the-good-the-bad-and-the-ugly/73899/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-381746" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="381746"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="382033" data-post-id="382033">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="John-BoothIQ" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/John-BoothIQ/120/39714_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  John-BoothIQ
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>That’s a good find!  I’m not sure I’d have thought of that on my own. I’ll add that to my test investigator rule for the future</p>
<p>Thank you!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="382033" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/150-000-lines-of-vibe-coded-elixir-the-good-the-bad-and-the-ugly/73899/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-382033" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="382033"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #16"></div>
  </section>
</div>
    <div class="postbit" id="382076" data-post-id="382076">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Alex66" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Alex66/120/7934_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Alex66
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Great writeup. My experience overlaps but with a different mitigation strategy.</p>
<p>I’m building an FBP (Flow-Based Programming) framework in Elixir — visual pipeline editor, distributed processing, 30+ node types. Using Claude Code daily.</p>
<p>The “AI can’t organize” and “OTP/async is ugly” problems hit me hard early on. My solution: don’t let AI make those decisions at all.</p>
<p>I built MCP servers that enforce architectural constraints at the tool level. AI can’t violate patterns because the tooling prevents it, not because I correct it afterward.</p>
<p>For the OTP blindspot — the FBP node abstraction hides it entirely. Node authors implement <code>handle_message/2</code>, the framework handles GenServers, supervision, message routing. AI doesn’t need to understand process lifecycles because it never touches them.</p>
<p>Basically: constrain the problem space until AI’s weaknesses don’t matter.</p>
<p>The defensive/imperative code issue persists though. Still correcting <code>if/else</code> chains that should be pattern matches.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="382076" data-batch-url="/posts/batch_likers">
                        4
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/150-000-lines-of-vibe-coded-elixir-the-good-the-bad-and-the-ugly/73899/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-382076" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="382076"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #17"></div>
  </section>
</div>
    <div class="postbit" id="382091" data-post-id="382091">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="SyntaxSorcerer" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/SyntaxSorcerer/120/39483_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  SyntaxSorcerer
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Alex66" data-post="18" data-topic="73899">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/alex66/48/7934_2.png" class="avatar"> Alex66:</div>
<blockquote>
<p>The defensive/imperative code issue persists though. Still correcting <code>if/else</code> chains that should be pattern matches.</p>
</blockquote>
</aside>
<p>Curious to how you’re dealing with this. Have you tried proactively using CLAUDE.md/AGENTS.md to advise against this behavior or to encourage using pattern matching instead (where appropriate)? Specifically call it out during code audits? Something else?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="382091" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/150-000-lines-of-vibe-coded-elixir-the-good-the-bad-and-the-ugly/73899/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-382091" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="382091"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #18"></div>
  </section>
</div>
    <div class="postbit" id="382100" data-post-id="382100">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Alex66" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Alex66/120/7934_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Alex66
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Yes, CLAUDE.md has explicit style rules — prefer pattern matching, use <code>case</code>/<code>with</code> over nested <code>if/else</code>, let it crash instead of defensive nil-checking.</p>
<p>Then Credo periodically to catch what slips through, and warnings-as-errors in compilation so nothing sloppy gets past. Not bulletproof but catches most of it.</p>
<p>For context, I’m not running swarms of agents overnight. Single session, supervised, constrained by MCP tooling. The AI implements what I’ve designed, not the other way around.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="382100" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/150-000-lines-of-vibe-coded-elixir-the-good-the-bad-and-the-ugly/73899/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-382100" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="382100"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #19"></div>
  </section>
</div>
    <div class="postbit" id="382152" data-post-id="382152">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="John-BoothIQ" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/John-BoothIQ/120/39714_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  John-BoothIQ
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Anecdotally, the model responds much better to the word “destructure” instead of “pattern match”.</p>
<p>For example, if I tell it to “pattern match in the function head”, it kinda flails.</p>
<p>If I say “destructure the arguments in the function head,” it responds much better.</p>
<p>I attribute this to JavaScript’s object destructuring, but that’s just a hunch.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="382152" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/150-000-lines-of-vibe-coded-elixir-the-good-the-bad-and-the-ugly/73899/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-382152" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="382152"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #20"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/73899/load_more?page=3">Load more posts (2 remaining)</a>
</div></template></turbo-stream>