<?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: ahmed hounati</title>
    <description>The latest articles on DEV Community by ahmed hounati (@ahmedhounati).</description>
    <link>https://dev.to/ahmedhounati</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4184612%2F171f7777-63bc-4064-acd0-2cd42ee69532.jpg</url>
      <title>DEV Community: ahmed hounati</title>
      <link>https://dev.to/ahmedhounati</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ahmedhounati"/>
    <language>en</language>
    <item>
      <title>Attention Is a Single-Threaded Runtime</title>
      <dc:creator>ahmed hounati</dc:creator>
      <pubDate>Wed, 14 Oct 2026 14:07:41 +0000</pubDate>
      <link>https://dev.to/ahmedhounati/attention-is-a-single-threaded-runtime-4f23</link>
      <guid>https://dev.to/ahmedhounati/attention-is-a-single-threaded-runtime-4f23</guid>
      <description>&lt;p&gt;There is one mental model that changed more of my daily behavior than every productivity book combined, and it fits in a sentence:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Human attention is a single-threaded runtime with an extremely expensive context switch and no reliable serialization of state.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Everything else follows from that.&lt;/p&gt;

&lt;h2&gt;
  
  
  You are not running tasks in parallel
&lt;/h2&gt;

&lt;p&gt;When you "multitask," nothing runs concurrently. The scheduler is interleaving: it suspends task A, tears down the context, loads task B, and — crucially — much of task A's working state is simply lost rather than saved. It has to be rebuilt from scratch when you return.&lt;/p&gt;

&lt;p&gt;In software we would call this a catastrophically bad implementation. We would rewrite it. You cannot rewrite the runtime, so the only remaining lever is the &lt;em&gt;schedule&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three costs of a switch
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Teardown.&lt;/strong&gt; Whatever you were holding in working memory decays as soon as attention leaves.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reload.&lt;/strong&gt; Getting back to depth on a non-trivial problem takes real minutes, not seconds — and the deeper the problem, the longer the reload.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Residue.&lt;/strong&gt; The previous task keeps consuming capacity in the background. You are not fully on B for some time after you leave A, which is why a two-minute Slack check does not cost two minutes.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Costs one and two are visible. Cost three is the one that quietly determines whether your day produced anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  What follows in practice
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Batch by context, not by priority.&lt;/strong&gt; All code review in one block, all writing in another. Priority ordering across mixed contexts maximizes switches — the single worst thing you can do to this runtime.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Make interruptions synchronous by exception.&lt;/strong&gt; Default everything to async. A notification is a preemptive interrupt with no priority level attached, which means every message is implicitly claiming to be the highest-priority thing in your life. Almost none of them are.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Protect block boundaries more than block length.&lt;/strong&gt; A 90-minute block that gets one interrupt is worth less than a clean 60-minute block. Guard the edges.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stop at a resumable point, never a random one.&lt;/strong&gt; Same principle as leaving a failing test or a half-written function as your bookmark: encode the reload state externally before you let attention leave.&lt;/p&gt;

&lt;h2&gt;
  
  
  The uncomfortable implication
&lt;/h2&gt;

&lt;p&gt;If this model is right, then most of what gets labeled a discipline problem is actually a scheduling problem.&lt;/p&gt;

&lt;p&gt;You are not lazy. You are running a well-designed workload on a schedule that guarantees thrashing, and then blaming the workload.&lt;/p&gt;

&lt;p&gt;Fix the schedule first. Then find out whether you had a discipline problem at all.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://thetimearchitect.blog/blog/attention-is-a-single-threaded-runtime/?utm_source=devto&amp;amp;utm_medium=community&amp;amp;utm_campaign=attention-is-a-single-threaded-runtime" rel="noopener noreferrer"&gt;The Time Architect&lt;/a&gt;. This article was drafted with the help of AI.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>programming</category>
      <category>career</category>
      <category>focus</category>
    </item>
  </channel>
</rss>
