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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="gregvaughn" data-post="21" data-topic="66162">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/gregvaughn/48/954_2.png" class="avatar"> gregvaughn:</div>
<blockquote>
<p>My core takeaway was to separate the pure logic that can be easily tested from the side-effects that had to be wrapped in a monad. It’s about separation of deciding what to do from actually doing it. I’ve found it a useful distinction.</p>
</blockquote>
</aside>
<p>Yes, always. That’s what those who abuse DI and all other buzzwords keep missing; they are just tools and should be used sparingly because those in particular reduce a lot of code readability.</p>
<aside class="quote no-group" data-username="gregvaughn" data-post="21" data-topic="66162">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/gregvaughn/48/954_2.png" class="avatar"> gregvaughn:</div>
<blockquote>
<p>Fascinating. I find LSP a “nice to have” and have never let it affect how I design my code. Perhaps that reveals too much about me though <img src="https://forum.elixirforum.com/images/emoji/apple/grin.png?v=15" title=":grin:" class="emoji" alt=":grin:" loading="lazy" width="20" height="20"></p>
</blockquote>
</aside>
<p>I don’t use those features extensively BUT on the rare occasion I want to go 5 layers deep into function definitions and have proper autocompletes and read docs right inside my editor, LSP has been absolutely indispensable. It’s IMO not about getting narcotics-level dependent on it, it’s about allowing it to empower you and save you time and brain cycles, allowing you to focus on your end task, not on 100% of the logistics.</p>
<aside class="quote no-group" data-username="gregvaughn" data-post="21" data-topic="66162">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/gregvaughn/48/954_2.png" class="avatar"> gregvaughn:</div>
<blockquote>
<p>The part about <code>core_complex_logic</code> that bugs me most is that I’m making a function public that could be private purely for testing purposes.</p>
</blockquote>
</aside>
<p>I find the private / public visibility distinction overvalued. Testability &gt; almost everything else, in my book. In Elixir we have <code>boundary</code> and with the tools I keep shilling for (especially <code>ast-grep</code>) you can write your own linter and integrate it in into a pre-commit GIT hook, CI/CD and whatever else you like.</p>
<p>Mind you, I still use <code>defp</code> and use it as much as I can get away with but the moment I feel that I have to test my stuff even more granularly, I don’t get a crisis of faith, I just replace the definition with <code>def</code> and sleep very well that night.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="340350" 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/dealing-with-tests-for-projects-that-do-a-lot-of-side-effects/66162/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-340350" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="340350"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>