<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>emre şahin's digital garden 🍃 - best practices</title>
    <link>https://emresahin.net/tags/best-practices/</link>
    <description>Posts in the best practices tag</description>
    <language>en</language>
    <managingEditor>contact@emresahin.net (Emre Şahin)</managingEditor>
    <lastBuildDate>Tue, 15 Sep 2026 19:46:32 +0000</lastBuildDate>
    <atom:link href="https://emresahin.net/tags/best-practices/rss.xml" rel="self" type="application/rss+xml"/>
    <item>
      <title>Unit tests vs Integration Tests in Rust</title>
      <published>2022-06-11T05:55:58+00:00</published>
      <updated>2022-06-11T05:55:58+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Sat, 11 Jun 2022 05:55:58 +0000</pubDate>
      <link>https://emresahin.net/Unit-tests-vs-Integration-Tests-in-Rust/</link>
      <guid isPermaLink="true">https://emresahin.net/Unit-tests-vs-Integration-Tests-in-Rust/</guid>
      <description>One thing I’ve noticed since I started working with Rust is that Test-Driven Development (TDD) has become much more feasible. As a developer who is “absentminded by default,” I highly value tests. However, if the feedback cycle is slow, it becomes prohibitively expensive to test everything. This ...</description>
      <category>Rust</category>
      <category>Testing</category>
      <category>development</category>
      <category>unit tests</category>
      <category>integration tests</category>
      <category>Rust</category>
      <category>CI/CD</category>
      <category>TDD</category>
      <category>best practices</category>
      <content:encoded><![CDATA[<p>One thing I’ve noticed since I started working with Rust is that <em>Test-Driven Development</em> (TDD) has become much more feasible. As a developer who is “absentminded by default,” I highly value tests. However, if the feedback cycle is slow, it becomes prohibitively expensive to test everything. This is likely why unit tests are often favored over integration tests: they are more precise, faster to execute, and make rapid round-trip testing more achievable.</p>
<p>Another point is that Rust, being a statically typed language, requires far fewer unit tests than dynamic languages. Traditionally, unit tests are used to validate “input consumption” (ensuring input is processed correctly) and “well-formed output” (verifying that the output meets requirements under specific conditions). In Rust, many of these input-output concerns are resolved at compile time through the use of expressive types like structs and enums.</p>
<p>For these reasons, I find myself more inclined toward integration tests that reflect real-world requirements, rather than focusing solely on unit tests in artificial settings.</p>]]></content:encoded>
    </item>
    <item>
      <title>Shell (Bash and Zsh) Notes</title>
      <published>2013-08-16T21:00:00+00:00</published>
      <updated>2013-08-16T21:00:00+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Fri, 16 Aug 2013 21:00:00 +0000</pubDate>
      <link>https://emresahin.net/shell-notes/</link>
      <guid isPermaLink="true">https://emresahin.net/shell-notes/</guid>
      <description>Don’t use ~ in scripts; use $HOME I have used ~ several times in scripts, but it may not always expand as expected depending on the environment. Use $HOME to refer to the home directory; it is much more reliable and always works.</description>
      <category>Scripting</category>
      <category>CLI</category>
      <category>shell</category>
      <category>bash</category>
      <category>zsh</category>
      <category>scripting</category>
      <category>best practices</category>
      <category>til</category>
      <content:encoded><![CDATA[<h1 id="dont-use--in-scripts-use-home">Don’t use <code>~</code> in scripts; use <code>$HOME</code></h1>
<p>I have used <code>~</code> several times in scripts, but it may not always expand as expected depending on the environment. Use <code>$HOME</code> to refer to the home directory; it is much more reliable and always works.</p>]]></content:encoded>
    </item>
  </channel>
</rss>
