<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Code-Structure on rjrowland</title><link>https://rjrowland.com/tags/code-structure/</link><description>Recent content in Code-Structure on rjrowland</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 21 Jul 2026 09:00:00 -0500</lastBuildDate><atom:link href="https://rjrowland.com/tags/code-structure/index.xml" rel="self" type="application/rss+xml"/><item><title>Push Complexity to the Edges</title><link>https://rjrowland.com/posts/engineering-practices-push-complexity-to-edges/</link><pubDate>Tue, 21 Jul 2026 09:00:00 -0500</pubDate><guid>https://rjrowland.com/posts/engineering-practices-push-complexity-to-edges/</guid><description>&lt;h2 id="push-ifs-up-and-fors-down"&gt;Push ifs up and fors down&lt;/h2&gt;
&lt;p&gt;Alex Kladov named this precisely in &lt;a href="https://matklad.github.io/2023/11/15/push-ifs-up-and-fors-down.html" target="_blank"&gt;&amp;ldquo;Push Ifs Up and Fors Down&amp;rdquo;&lt;/a&gt;: two structural habits most engineers apply by instinct sometimes, without ever generalizing them.&lt;/p&gt;
&lt;p&gt;Push ifs up: conditional logic belongs as high in the call stack as it can go. Instead of a function checking a condition internally and doing nothing when it doesn&amp;rsquo;t apply, let the caller decide whether to call it. The function becomes unconditional, simpler, more composable. Its signature stops lying: it does X, full stop, instead of &amp;ldquo;maybe does X depending on internal state.&amp;rdquo;&lt;/p&gt;</description></item></channel></rss>