<script data-pm-proxy="intercept"></script><?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[The Daily Syndicate]]></title><description><![CDATA[Technology, Futurism, Post Futurism, Retro Post Futurism]]></description><link>https://dasmachinelabs.substack.com</link><image><url>https://substackcdn.com/image/fetch/$s_!N32x!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fdasmachinelabs.substack.com%2Fimg%2Fsubstack.png</url><title>The Daily Syndicate</title><link>https://dasmachinelabs.substack.com</link></image><generator>Substack</generator><lastBuildDate>Tue, 01 Sep 2026 13:54:02 GMT</lastBuildDate><atom:link href="/__u/dasmachinelabs.substack.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[DasMachineLabs]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[dasmachinelabs@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[dasmachinelabs@substack.com]]></itunes:email><itunes:name><![CDATA[Arunabh Das]]></itunes:name></itunes:owner><itunes:author><![CDATA[Arunabh Das]]></itunes:author><googleplay:owner><![CDATA[dasmachinelabs@substack.com]]></googleplay:owner><googleplay:email><![CDATA[dasmachinelabs@substack.com]]></googleplay:email><googleplay:author><![CDATA[Arunabh Das]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Soliloquy Sine Qua Non]]></title><description><![CDATA[We are all inclined to believe]]></description><link>https://dasmachinelabs.substack.com/p/soliloquy-sine-qua-non</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/soliloquy-sine-qua-non</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Fri, 21 Aug 2026 18:58:16 GMT</pubDate><content:encoded><![CDATA[<p>We are all inclined to believe </p><p>That we perhaps yearn to be free</p><p> We may however not conceive </p><p>That we may not entirely be</p><p></p><p>For every choice we claim our own </p><p>May spring from seeds we never sow</p><p>And every path that we have known </p><p>Was shaped before we chose to go</p><p></p><p>We speak of thought as though the mind </p><p>Were sovereign over humankind</p><p>Yet seldom questions that we find</p><p>Have made us to the sunlight blind</p><p></p><p>The chains we bear may have no weight</p><p>No iron clasp that we can see</p><p>They may be circumstance and fate</p><p>Or simply what we think must be</p><p></p><p>We chase the things we think we choose</p><p>And call the choosing liberty</p><p>Yet what if even what we lose</p><p>Was lost by some necessity</p><p></p><p>Perhaps the self we proudly name </p><p>Is but a river passing through</p><p>A thousand causes feed the same</p><p>And make the old appear as new</p><p></p><p>And if we turn against the tide</p><p>Convinced rebellion makes us free</p><p>What hidden current moves inside </p><p>And whispers what we ought to be</p><p></p><p>Perhaps our freedom does not lie </p><p>In severing every unseen chain</p><p>Nor finding wings with which to fly</p><p>Nor fleeing pleasure, fear, or pain</p><p></p><p>Perhaps it lives within the sight </p><p>That sees the strings by which we&#8217;re led</p><p>For one who understands the night </p><p>May choose the path that lies ahead</p><p></p><p>And so we are inclined to believe</p><p>That something in us may be free</p><p>Though what that means we scarce conceive</p><p> Perhaps to know we may not be</p>]]></content:encoded></item><item><title><![CDATA[Zero Token Architecture]]></title><description><![CDATA[How to Build AI-native Agentic Systems That Don&#8217;t Cost Dollars and Tokens to Operate]]></description><link>https://dasmachinelabs.substack.com/p/zero-token-architecture</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/zero-token-architecture</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Wed, 29 Jul 2026 19:52:17 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!5jcB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac66706-89bf-4eca-9af5-324af8fec508_1672x941.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!5jcB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac66706-89bf-4eca-9af5-324af8fec508_1672x941.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!5jcB!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac66706-89bf-4eca-9af5-324af8fec508_1672x941.png 424w, /__u/substackcdn.com/image/fetch/$s_!5jcB!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac66706-89bf-4eca-9af5-324af8fec508_1672x941.png 848w, /__u/substackcdn.com/image/fetch/$s_!5jcB!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac66706-89bf-4eca-9af5-324af8fec508_1672x941.png 1272w, /__u/substackcdn.com/image/fetch/$s_!5jcB!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac66706-89bf-4eca-9af5-324af8fec508_1672x941.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!5jcB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac66706-89bf-4eca-9af5-324af8fec508_1672x941.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7ac66706-89bf-4eca-9af5-324af8fec508_1672x941.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1547462,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/209023858?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac66706-89bf-4eca-9af5-324af8fec508_1672x941.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!5jcB!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac66706-89bf-4eca-9af5-324af8fec508_1672x941.png 424w, /__u/substackcdn.com/image/fetch/$s_!5jcB!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac66706-89bf-4eca-9af5-324af8fec508_1672x941.png 848w, /__u/substackcdn.com/image/fetch/$s_!5jcB!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac66706-89bf-4eca-9af5-324af8fec508_1672x941.png 1272w, /__u/substackcdn.com/image/fetch/$s_!5jcB!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ac66706-89bf-4eca-9af5-324af8fec508_1672x941.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Zero-Token Architecture - How to Build AI-native Agentic Systems That Don&#8217;t Cost Dollars and Tokens to Operate</figcaption></figure></div><div><hr></div><blockquote><p>The next generation of agentic systems will use AI to discover and compile workflows&#8202;&#8212;&#8202;then execute those workflows deterministically, reliably, and without recurring LLM inference.</p></blockquote><h4>Context</h4><p>The first generation of AI agents is built around a simple loop:</p><pre><code>Think &#8594; choose a tool &#8594; act &#8594; inspect the result &#8594; think again</code></pre><p>It is an impressive pattern. It is also an expensive and fragile way to run a business process.</p><p>Every time a new customer arrives, the agent reads the instructions again. Every time an invoice is received, it reasons about the same accounting procedure again. Every time a sales lead enters the CRM, it reconstructs the same sequence of enrichment, qualification, assignment, and follow-up actions.</p><p>We are paying machines to repeatedly rediscover procedures we already know.</p><p>The next evolution of agentic software should therefore not be a larger model, a longer prompt, or an agent with access to even more tools.</p><p>It should be an architecture in which the model reasons once&#8202;&#8212;&#8202;and the system executes forever.</p><p>I call this a <strong>zero-token architecture</strong>.</p><blockquote><p>A zero-token architecture uses AI during moments of uncertainty, but removes the LLM from the steady-state execution path of established workflows.</p></blockquote><p>This does not mean zero computation. It does not mean zero infrastructure cost. It does not even mean that the system can never call a model.</p><p>It means that a known business process can run without consuming another LLM token.</p><p>Thus, the marginal cost of operating a ZTA Agent is zero.</p><h4>AI agents are repeatedly interpreting what should already be software</h4><p>Consider a typical sales agent.</p><p>When a lead arrives, the agent may:</p><ol><li><p>Read the lead details.</p></li><li><p>Decide whether company enrichment is needed.</p></li><li><p>Select an enrichment tool.</p></li><li><p>inspect the result.</p></li><li><p>Decide how to score the lead.</p></li><li><p>Select a CRM owner.</p></li><li><p>Draft an acknowledgement.</p></li><li><p>Create a follow-up task.</p></li><li><p>Determine whether the workflow succeeded.</p></li></ol><p>A general-purpose model may be invoked several times during that process.</p><p>That flexibility is useful when the procedure is unknown. Once the process has been accepted by the organization, however, continuing to ask an LLM what to do is analogous to asking a software developer to manually reinterpret the requirements every time a function runs.</p><p>Traditional software engineering solved this problem through compilation.</p><p>A human expresses an intention in a high-level language. A compiler converts it into an executable representation. The computer then runs that representation repeatedly without asking the programmer to explain it again.</p><p>Agentic systems can adopt the same pattern:</p><pre><code>Natural-language intent
        &#8595;
AI-assisted workflow design
        &#8595;
Typed and validated specification
        &#8595;
Human or policy approval
        &#8595;
Deterministic execution</code></pre><p>The model becomes a <strong>workflow compiler</strong>, not a permanent runtime dependency.</p><h3>The three meanings of &#8220;zero token&#8221;</h3><p>The phrase needs a precise definition because &#8220;zero token&#8221; can refer to several different ideas.</p><h3>1. Zero LLM tokens during execution</h3><p>The normal production path does not invoke a language model.</p><p>Rules, state machines, templates, APIs, policies, and ordinary application code perform the work.</p><p>This is the strictest form of zero-token execution.</p><h3>2. Zero paid tokens</h3><p>A local classifier, embedding model, or small self-hosted model may still process an input, but the organization does not incur metered inference charges.</p><p>This can reduce cost, but it is not literally token-free.</p><h3>3. Near-zero-token operation</h3><p>Most requests follow deterministic workflows. A model is called only when the system encounters ambiguity, a previously unseen request, an unstructured document, or an execution failure that existing code cannot resolve.</p><p>This is likely to be the most practical production architecture.</p><p>The phrase itself is not yet a formal technical standard. It has also been used humorously to describe completing work without AI and, in a separate security context, to describe preventing agents from seeing real API credentials. Here, I use it specifically to mean <strong>zero recurring LLM inference in a known workflow&#8217;s execution path</strong>.</p><h3>The ZERO operating model</h3><p>A production zero-token system can be organized around four stages:</p><h3>Z&#8202;&#8212;&#8202;Zone the work</h3><p>Separate work into two categories:</p><h3>Deterministic work</h3><ul><li><p>A known trigger exists.</p></li><li><p>Inputs can be typed.</p></li><li><p>The procedure is established.</p></li><li><p>Tools have defined contracts.</p></li><li><p>Success can be validated.</p></li><li><p>Exceptions are enumerable.</p></li></ul><h3>Cognitive work</h3><ul><li><p>The request is novel.</p></li><li><p>Meaning is ambiguous.</p></li><li><p>Information is incomplete.</p></li><li><p>Multiple legitimate strategies exist.</p></li><li><p>The output requires research, judgement, or creativity.</p></li></ul><p>The mistake is not using an LLM for cognitive work. The mistake is treating deterministic work as cognitive forever.</p><div><hr></div><h3>E&#8202;&#8212;&#8202;Encode successful reasoning</h3><p>When an AI agent successfully completes a new task, the system should not merely save its final answer.</p><p>It should extract and store the reusable plan:</p><ul><li><p>Trigger</p></li><li><p>Preconditions</p></li><li><p>Input schema</p></li><li><p>Ordered actions</p></li><li><p>Data dependencies</p></li><li><p>Tool contracts</p></li><li><p>Retry rules</p></li><li><p>Approval requirements</p></li><li><p>Failure paths</p></li><li><p>Output template</p></li><li><p>Validation conditions</p></li></ul><p>Research into agentic plan caching supports this distinction between caching an answer and caching a reusable plan. One study reported an average serving-cost reduction of approximately 46.6% while maintaining task performance by extracting, adapting, and reusing structured plan templates.</p><p>A plan might be encoded as a versioned workflow specification:</p><pre><code>id: enterprise-lead-intake
version: 3

trigger:
  type: crm.lead.created
input_schema:
  required:
    - lead_id
    - email
    - company_domain
steps:
  - id: enrich_company
    tool: company.enrich
    arguments:
      domain: $.event.company_domain
    retry:
      maximum_attempts: 3
  - id: score_lead
    tool: lead.score
    arguments:
      lead: $.event
      company: $.steps.enrich_company.output
  - id: assign_owner
    tool: crm.assign_owner
    arguments:
      lead_id: $.event.lead_id
      score: $.steps.score_lead.output.score
      territory: $.steps.enrich_company.output.country
  - id: create_follow_up
    tool: crm.create_task
    arguments:
      owner_id: $.steps.assign_owner.output.owner_id
      lead_id: $.event.lead_id
      due_in_hours: 24
  - id: acknowledge
    tool: messaging.render_and_send
    arguments:
      template: enterprise-lead-received
      recipient: $.event.email
success:
  all_steps_completed: true
on_failure:
  workflow: operations.review_failed_lead</code></pre><p>This is no longer a suggestion written in prose. It is an executable contract.</p><p>JSON Schema is well suited to this boundary because it provides a declarative language for expressing the expected structure, constraints, and data types of JSON documents.</p><h3>R&#8202;&#8212;&#8202;Run deterministically</h3><p>After a plan has been encoded, validated, and approved, a durable workflow engine executes it without asking a language model what comes next.</p><p>A production runtime should provide:</p><ul><li><p>Durable state</p></li><li><p>Retries</p></li><li><p>Timeouts</p></li><li><p>Idempotency</p></li><li><p>Scheduled waits</p></li><li><p>Compensation</p></li><li><p>Human approval pauses</p></li><li><p>Versioned workflow definitions</p></li><li><p>Auditable execution history</p></li></ul><p>Temporal, for example, defines workflow execution as durable, reliable, and scalable function execution. Its workflow model requires deterministic behaviour, while side effects such as calling external services are isolated into activities.</p><p>The runtime flow becomes:</p><pre><code>Typed event
    &#8595;
Workflow lookup
    &#8595;
Schema validation
    &#8595;
Policy evaluation
    &#8595;
Deterministic actions
    &#8595;
Result validation
    &#8595;
Structured output</code></pre><p>There is no agent conversation in this path.</p><p>There is no repeated chain of thought.</p><p>There is no need to send the tool catalogue, system prompt, conversation history, or organizational policies back to a model.</p><div><hr></div><h3>O&#8202;&#8212;&#8202;Observe exceptions</h3><p>Zero-token architecture does not try to eliminate uncertainty. It contains uncertainty inside an explicit exception lane.</p><p>When a workflow cannot continue, the runtime produces a structured exception:</p><pre><code>{
  &#8220;type&#8221;: &#8220;workflow_resolution_failed&#8221;,
  &#8220;workflow&#8221;: &#8220;vendor_invoice_processing&#8221;,
  &#8220;execution_id&#8221;: &#8220;exec_92831&#8221;,
  &#8220;reason&#8221;: &#8220;No approved tax rule exists for this jurisdiction&#8221;,
  &#8220;context&#8221;: {
    &#8220;jurisdiction&#8221;: &#8220;QC&#8221;,
    &#8220;document_type&#8221;: &#8220;invoice&#8221;,
    &#8220;currency&#8221;: &#8220;CAD&#8221;
  },
  &#8220;completed_steps&#8221;: [
    &#8220;extract_invoice&#8221;,
    &#8220;identify_vendor&#8221;
  ],
  &#8220;allowed_actions&#8221;: [
    &#8220;request_human_review&#8221;,
    &#8220;propose_policy&#8221;,
    &#8220;propose_workflow_patch&#8221;
  ]
}</code></pre><p>Only this compact exception needs to be sent to the model.</p><p>The model can then:</p><ul><li><p>Ask for missing information.</p></li><li><p>Recommend an existing workflow.</p></li><li><p>Propose a new branch.</p></li><li><p>Generate a workflow patch.</p></li><li><p>Escalate the decision to a person.</p></li></ul><p>Once the exception has been resolved, reviewed, tested, and promoted, the same case should not require model reasoning again.</p><p>The architecture becomes a learning loop:</p><pre><code>Unknown case
    &#8595;
AI-assisted resolution
    &#8595;
Structured workflow or rule
    &#8595;
Testing and approval
    &#8595;
Known case
    &#8595;
Zero-token execution</code></pre><p>The system becomes less dependent on inference as it gains operational experience.</p><h3>The production architecture</h3><p>A serious zero-token platform needs three distinct planes.</p><h3>1. AI control plane</h3><p>The control plane handles uncertainty and system evolution.</p><p>It can use models such as Kimi, Claude, GPT, or a local model to:</p><ul><li><p>Interpret natural-language requirements</p></li><li><p>Propose workflows</p></li><li><p>Generate schemas</p></li><li><p>Map fields between systems</p></li><li><p>Diagnose failed executions</p></li><li><p>Suggest policies</p></li><li><p>Create test cases</p></li><li><p>Explain workflow changes</p></li><li><p>Convert successful agent traces into reusable plans</p></li></ul><p>The control plane is allowed to be probabilistic because its output is not immediately trusted.</p><p>Its proposals must pass through validation, testing, policy checks, and&#8202;&#8212;&#8202;where appropriate&#8202;&#8212;&#8202;human approval.</p><h3>2. Deterministic execution plane</h3><p>The execution plane runs approved workflows.</p><p>A practical stack might include:</p><pre><code>FastAPI                 Event and API ingress
CloudEvents             Standardized event envelopes
Pydantic/JSON Schema    Typed contracts
Temporal                Durable workflow execution
PostgreSQL              Workflow registry and execution records
Redis                   Locks, deduplication, and transient state
OPA                     Policy decisions
MCP/tool adapters       External-system integrations
Jinja2                  Deterministic message rendering
OpenTelemetry           Traces, metrics, and logs</code></pre><p>CloudEvents provides a common specification for describing event data, reducing coupling between producers and consumers.</p><p>Open Policy Agent provides a declarative policy-as-code engine that can evaluate decisions over structured input independently from application code.</p><p>OpenTelemetry provides a vendor-neutral framework for producing and exporting traces, metrics, and logs, which is essential when a single execution may span several services and external tools.</p><h3>3. Exception and learning plane</h3><p>The exception plane receives cases that the deterministic runtime cannot safely resolve.</p><p>It should contain:</p><ul><li><p>An exception queue</p></li><li><p>Complete execution traces</p></li><li><p>Redacted contextual information</p></li><li><p>Available tools and permitted actions</p></li><li><p>AI-assisted diagnosis</p></li><li><p>Human review</p></li><li><p>Workflow patch generation</p></li><li><p>Regression-test generation</p></li><li><p>Controlled promotion into production</p></li></ul><p>This is where an agent belongs: at the boundary of what the organization knows, not inside every routine transaction.</p><div><hr></div><h3>Five contracts make the architecture production-ready</h3><p>A zero-token system should not execute freeform AI output directly.</p><p>It should rely on five versioned contracts.</p><h3>1. Event contract</h3><p>Defines what happened.</p><pre><code>{
  &#8220;specversion&#8221;: &#8220;1.0&#8221;,
  &#8220;type&#8221;: &#8220;crm.lead.created&#8221;,
  &#8220;source&#8221;: &#8220;offsidecrm&#8221;,
  &#8220;id&#8221;: &#8220;evt_123&#8221;,
  &#8220;time&#8221;: &#8220;2026-07-29T16:00:00Z&#8221;,
  &#8220;data&#8221;: {
    &#8220;lead_id&#8221;: &#8220;lead_882&#8221;,
    &#8220;email&#8221;: &#8220;buyer@example.com&#8221;,
    &#8220;company_domain&#8221;: &#8220;example.com&#8221;
  }
}</code></pre><h3>2. Workflow contract</h3><p>Defines which actions execute and in what order.</p><p>It must include a version, compatible input schema, required permissions, retries, failure handling, and success criteria.</p><h3>3. Tool contract</h3><p>Defines what every integration accepts and returns.</p><pre><code>{
  &#8220;name&#8221;: &#8220;crm.assign_owner&#8221;,
  &#8220;version&#8221;: &#8220;2.1.0&#8221;,
  &#8220;input_schema&#8221;: {
    &#8220;type&#8221;: &#8220;object&#8221;,
    &#8220;required&#8221;: [&#8221;lead_id&#8221;, &#8220;territory&#8221;],
    &#8220;properties&#8221;: {
      &#8220;lead_id&#8221;: {&#8221;type&#8221;: &#8220;string&#8221;},
      &#8220;territory&#8221;: {&#8221;type&#8221;: &#8220;string&#8221;}
    }
  },
  &#8220;output_schema&#8221;: {
    &#8220;type&#8221;: &#8220;object&#8221;,
    &#8220;required&#8221;: [&#8221;owner_id&#8221;],
    &#8220;properties&#8221;: {
      &#8220;owner_id&#8221;: {&#8221;type&#8221;: &#8220;string&#8221;}
    }
  }
}</code></pre><h3>4. Policy contract</h3><p>Defines what is permitted.</p><p>Examples include:</p><ul><li><p>Whether an email can be sent automatically</p></li><li><p>Whether a refund requires approval</p></li><li><p>Which customer records an execution may access</p></li><li><p>Whether a workflow can cross geographic data boundaries</p></li><li><p>Which tools are permitted for a particular tenant</p></li></ul><h3>5. Result contract</h3><p>Defines what completion means.</p><p>An execution should not be considered successful merely because no exception was thrown. It must satisfy explicit postconditions.</p><div><hr></div><h3>The deterministic router</h3><p>The routing order should move from the cheapest and safest method to the most expensive and flexible:</p><pre><code>1. Explicit workflow identifier
2. Typed event mapping
3. Exact rule match
4. Previously approved workflow match
5. Classical classifier
6. Small local model
7. Frontier LLM
8. Human review</code></pre><p>An application should prefer:</p><pre><code>POST /workflows/enterprise-lead-intake/executions</code></pre><p>over:</p><pre><code>POST /agent
Content-Type: application/json</code></pre><pre><code>{
  &#8220;message&#8221;: &#8220;A new lead arrived. Figure out what we should do.&#8221;
}</code></pre><p>The first request supplies the decision. The second pays a model to rediscover the decision.</p><p>Natural language remains valuable as an authoring interface. It should not be the only production interface.</p><div><hr></div><h3>Idempotency is non-negotiable</h3><p>Agentic workflows often call systems that modify real-world state:</p><ul><li><p>Send an email</p></li><li><p>Create an invoice</p></li><li><p>Issue a refund</p></li><li><p>Update a CRM</p></li><li><p>Schedule a shipment</p></li><li><p>Place an order</p></li></ul><p>Network retries must not accidentally perform these actions twice.</p><p>Each execution and each side-effecting step should therefore carry an idempotency key:</p><pre><code>tenant_id
+ workflow_id
+ workflow_version
+ event_id
+ step_id</code></pre><p>Stripe&#8217;s API illustrates this pattern by storing the result associated with an idempotency key and returning that result when the same operation is retried.</p><p>A deterministic workflow that is not idempotent is predictable only until its first timeout.</p><div><hr></div><h3>Testing the workflow compiler</h3><p>The AI control plane should be treated like a compiler that may produce invalid code.</p><p>Every generated workflow should pass through a promotion pipeline:</p><pre><code>Generated proposal
      &#8595;
Schema validation
      &#8595;
Static safety analysis
      &#8595;
Tool and permission validation
      &#8595;
Unit and contract tests
      &#8595;
Historical-event replay
      &#8595;
Shadow execution
      &#8595;
Human or policy approval
      &#8595;
Canary deployment
      &#8595;
Production</code></pre><h3>Static checks</h3><p>Reject workflows that contain:</p><ul><li><p>Unknown tools</p></li><li><p>Unresolvable data references</p></li><li><p>Circular dependencies</p></li><li><p>Missing failure handlers</p></li><li><p>Unbounded loops</p></li><li><p>Unauthorized actions</p></li><li><p>Unversioned dependencies</p></li><li><p>Side effects without idempotency</p></li><li><p>Outputs that cannot be validated</p></li></ul><h3>Replay tests</h3><p>Run the proposed workflow against historical events and compare its outcomes with previously accepted results.</p><h3>Shadow mode</h3><p>Execute the new workflow without performing side effects. Compare its proposed actions with the current production system.</p><h3>Canary mode</h3><p>Send a small percentage of eligible executions to the new version and monitor error rates, exceptions, latency, and business outcomes.</p><p>The model proposes. The platform verifies.</p><div><hr></div><h3>The economics</h3><p>DigitalOcean currently lists Kimi K3 at <strong>US$3 per million input tokens and US$15 per million output tokens</strong> for serverless inference.</p><p>Suppose a conventional agent consumes, per execution:</p><ul><li><p>8,000 input tokens</p></li><li><p>1,000 output tokens</p></li></ul><p>Its model cost is:</p><p>(8,000&#215;3/1,000,000)+(1,000&#215;15/1,000,000)=US$0.039(8,000&#215;3/1,000,000)+(1,000&#215;15/1,000,000)=US$0.039</p><p>At 100,000 executions:</p><p>100,000&#215;US$0.039=US$3,900100,000&#215;US$0.039=US$3,900</p><p>Now suppose an AI model compiles the workflow once using:</p><ul><li><p>10,000 input tokens</p></li><li><p>2,000 output tokens</p></li></ul><p>That compilation costs:</p><p>(10,000&#215;3/1,000,000)+(2,000&#215;15/1,000,000)=US$0.06(10,000&#215;3/1,000,000)+(2,000&#215;15/1,000,000)=US$0.06</p><p>The resulting economics are:</p><pre><code>One-time AI-assisted compilation:   US$0.06
100,000 deterministic executions:   US$0 in LLM tokens</code></pre><p>The workflow still incurs ordinary expenses for databases, compute, third-party APIs, monitoring, and engineering. Zero-token architecture eliminates a particular category of recurring cost: <strong>LLM inference on established procedures</strong>.</p><p>Prompt caching does not achieve the same result. Cached tokens are cheaper, but they are still processed and billed. A deterministic execution does not send the prompt at all.</p><div><hr></div><h3>Production metrics</h3><p>The primary metric should be the <strong>zero-token hit rate</strong>:</p><p>Zero-token hit rate=successful executions without an LLM callall successful executionsZero-token hit rate=all successful executionssuccessful executions without an LLM call&#8203;</p><p>Supporting metrics should include:</p><ul><li><p>LLM calls per completed business outcome</p></li><li><p>Cost per successful outcome</p></li><li><p>Workflow reuse rate</p></li><li><p>Exception rate</p></li><li><p>Human-escalation rate</p></li><li><p>Workflow-compilation frequency</p></li><li><p>Failed-step rate</p></li><li><p>Idempotency-conflict rate</p></li><li><p>Mean time to resolve an unknown case</p></li><li><p>Percentage of exceptions converted into reusable workflows</p></li><li><p>Cost avoided through deterministic execution</p></li></ul><p>A system with a 95% zero-token hit rate is not merely cheaper than one with a 50% hit rate. It is usually more predictable, easier to test, faster, and easier to audit.</p><div><hr></div><h3>A maturity model</h3><h3>Level 0: Chat wrapper</h3><p>Every request is sent to a model.</p><pre><code>User &#8594; prompt &#8594; model &#8594; answer</code></pre><h3>Level 1: Tool-using agent</h3><p>The model selects and invokes tools at runtime.</p><pre><code>User &#8594; model &#8594; tool &#8594; model &#8594; tool &#8594; answer</code></pre><h3>Level 2: Cached context</h3><p>System prompts and common context are cached, reducing&#8202;&#8212;&#8202;but not removing&#8202;&#8212;&#8202;inference expense.</p><h3>Level 3: Reusable plans</h3><p>Successful agent plans are stored and reused for related requests.</p><h3>Level 4: Compiled workflows</h3><p>Approved plans are converted into deterministic workflows. The model is removed from normal execution.</p><h3>Level 5: Self-improving operations</h3><p>Exceptions enter a controlled learning process that produces new workflows, tests, rules, and policies. The zero-token coverage of the system increases over time.</p><p>The goal is not to eliminate AI.</p><p>The goal is to progressively transform what the AI has learned into reliable software.</p><div><hr></div><h3>What should remain agentic?</h3><p>Not every problem should be compiled.</p><p>LLMs remain appropriate for:</p><ul><li><p>Open-ended research</p></li><li><p>Novel strategic analysis</p></li><li><p>Complex negotiation</p></li><li><p>Creative generation</p></li><li><p>Ambiguous customer requests</p></li><li><p>Unfamiliar documents</p></li><li><p>One-off investigations</p></li><li><p>Exception diagnosis</p></li><li><p>Workflow authoring</p></li><li><p>Explanations for humans</p></li></ul><p>A useful rule is:</p><blockquote><p><em><strong>Use inference where uncertainty creates value. Use software where repetition creates value.</strong></em></p></blockquote><p>Trying to force every task into a deterministic workflow creates brittle systems. Sending every task through an LLM creates expensive and unpredictable systems.</p><p>The architecture should preserve a boundary between the two.</p><div><hr></div><h3>From agents to operational knowledge</h3><p>The most important consequence of zero-token architecture is not cost reduction.</p><p>It is the creation of institutional memory.</p><p>In a conventional agent, knowledge remains trapped inside prompts, model weights, conversation histories, and ephemeral chains of tool calls.</p><p>In a zero-token system, accepted knowledge becomes:</p><ul><li><p>A workflow</p></li><li><p>A schema</p></li><li><p>A policy</p></li><li><p>A test</p></li><li><p>A template</p></li><li><p>A versioned artifact</p></li><li><p>An auditable execution history</p></li></ul><p>Every resolved exception can increase the organization&#8217;s automation coverage.</p><p>Every successful agent execution can become a candidate program.</p><p>Every repeated task can become cheaper, faster, and more predictable.</p><p>The system does not merely perform work.</p><p>It learns how the organization performs work&#8202;&#8212;&#8202;and turns that knowledge into software.</p><div><hr></div><h3>Conclusion</h3><p>The first generation of AI products places a model in the middle of every interaction.</p><p>The next generation will be more selective.</p><p>Models will interpret new requirements, explore uncertain situations, diagnose exceptions, and compile solutions. Durable software will execute the established procedures.</p><p>That is the core of zero-token architecture:</p><pre><code>Reason once.
Validate carefully.
Compile the result.
Execute repeatedly.
Invoke AI again only when reality changes.</code></pre><p>The winning agentic platforms may not be the ones that consume the most intelligence.</p><p>They may be the ones that are best at preserving intelligence after it has been produced.</p><blockquote><p><em><strong>Stop paying models to rediscover procedures your organization already knows.</strong></em></p></blockquote><p></p>]]></content:encoded></item><item><title><![CDATA[The Future of AI Isn’t Bigger Models. It’s Better Harnesses.]]></title><description><![CDATA[Why Harness Engineering Is the Future of AI]]></description><link>https://dasmachinelabs.substack.com/p/the-future-of-ai-isnt-bigger-models</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/the-future-of-ai-isnt-bigger-models</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Wed, 01 Jul 2026 20:36:49 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Zgn7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02b5934e-0273-4fef-afd1-1fe6198c4a43_1408x768.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!Zgn7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02b5934e-0273-4fef-afd1-1fe6198c4a43_1408x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!Zgn7!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02b5934e-0273-4fef-afd1-1fe6198c4a43_1408x768.png 424w, /__u/substackcdn.com/image/fetch/$s_!Zgn7!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02b5934e-0273-4fef-afd1-1fe6198c4a43_1408x768.png 848w, /__u/substackcdn.com/image/fetch/$s_!Zgn7!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02b5934e-0273-4fef-afd1-1fe6198c4a43_1408x768.png 1272w, /__u/substackcdn.com/image/fetch/$s_!Zgn7!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02b5934e-0273-4fef-afd1-1fe6198c4a43_1408x768.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!Zgn7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02b5934e-0273-4fef-afd1-1fe6198c4a43_1408x768.png" width="1408" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/02b5934e-0273-4fef-afd1-1fe6198c4a43_1408x768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:768,&quot;width&quot;:1408,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:0,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!Zgn7!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02b5934e-0273-4fef-afd1-1fe6198c4a43_1408x768.png 424w, /__u/substackcdn.com/image/fetch/$s_!Zgn7!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02b5934e-0273-4fef-afd1-1fe6198c4a43_1408x768.png 848w, /__u/substackcdn.com/image/fetch/$s_!Zgn7!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02b5934e-0273-4fef-afd1-1fe6198c4a43_1408x768.png 1272w, /__u/substackcdn.com/image/fetch/$s_!Zgn7!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F02b5934e-0273-4fef-afd1-1fe6198c4a43_1408x768.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Why Harness Engineering Is the Future of AI</strong></p><p><strong>The next AI breakthrough will not come only from bigger models. It will come from the systems we build around them.</strong></p><p>For the last few years, the public story of AI has been simple: bigger models, better benchmarks, smarter chatbots. Every few months, a new frontier model arrives with stronger reasoning, better coding ability, longer context windows, more tools, and more impressive demos.</p><p>But if you spend time actually building with AI agents, a different truth becomes obvious: model intelligence is no longer the whole bottleneck.</p><p>The hard question is no longer simply:</p><p>Can the model produce a useful answer?</p><p>The harder question is:</p><p>Can the model operate reliably inside a real system, over many steps, with tools, permissions, memory, state, feedback, tests, failures, retries, and human oversight?</p><p>That is where <strong>Harness Engineering</strong> comes in.</p><p>Harness Engineering is the discipline of designing the runtime environment around AI agents: the tools they can use, the context they receive, the permissions they have, the state they maintain, the tests they must pass, the logs they leave behind, and the verification systems that decide whether the work is actually done.</p><p>Prompt engineering asks: <strong>What should we say to the model?</strong></p><p>Context engineering asks: <strong>What information should the model see right now?</strong></p><p>Harness engineering asks: <strong>What system should the model operate inside so that useful work becomes reliable, auditable, repeatable, and safe?</strong></p><p>That last question is why harness engineering is going to become one of the defining software disciplines of the AI era.</p><p></p><p><strong>1. The model is not the product. The system is the product.</strong></p><p>A standalone large language model is powerful, but incomplete. It can reason, write, summarize, code, classify, and plan. But real work does not happen in a blank chat box. Real work happens inside messy environments: codebases, CRMs, databases, files, browsers, calendars, Slack threads, ERPs, ticketing systems, healthcare records, financial workflows, legal documents, and operational processes.</p><p>That means production AI is not just a model call. Production AI is a system.</p><p>Anthropic&#8217;s own agent guidance makes this clear. They describe agentic systems as systems where LLMs use tools across multiple turns, either through predefined workflows or through more autonomous agents that dynamically direct their own tool use. They also recommend starting simple and only adding agentic complexity when it demonstrably improves outcomes, because agentic systems trade latency and cost for better task performance. (<a href="https://www.anthropic.com/research/building-effective-agents">Anthropic</a>&#8288;)</p><p>This is a crucial point. The future of AI will not be won by whoever writes the cleverest prompt. It will be won by whoever builds the best operating environment for AI work.</p><p>A good harness gives the model a world to act in. It defines:</p><ul><li><p>What the agent is trying to accomplish.</p></li><li><p>What tools it can use.</p></li><li><p>What information it can access.</p></li><li><p>What it is allowed to change.</p></li><li><p>What success means.</p></li><li><p>How failure is detected.</p></li><li><p>How the system recovers.</p></li><li><p>When humans need to intervene.</p></li><li><p>What traces are preserved for debugging and audit.</p></li></ul><p>In other words, the harness turns a probabilistic language model into a working component inside a larger deterministic system.</p><p>The model may be the engine. But the harness is the steering, brakes, dashboard, fuel system, seatbelts, road rules, maintenance schedule, and inspection process.</p><p></p><p><strong>2. Prompt engineering was the first layer. Context engineering was the second. Harness engineering is the third.</strong></p><p>The industry&#8217;s progression has been natural.</p><p>First came <strong>prompt engineering</strong>. We learned that how you ask matters. Better instructions, examples, formatting, role prompts, and constraints could dramatically improve model output.</p><p>Then came <strong>context engineering</strong>. As agents became more capable, the question shifted from &#8220;what words should I use?&#8221; to &#8220;what should the model know at this moment?&#8221; Anthropic describes context engineering as curating and maintaining the optimal set of tokens during inference, including system instructions, tools, external data, message history, and other information that may land in the context window. (<a href="https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents">Anthropic</a>&#8288;)</p><p>This matters because context is finite. Even with large context windows, agents can lose focus, become confused, or degrade as too much information accumulates. Anthropic notes that long-running agents must manage context across many turns, while LangChain summarizes context engineering as filling the context window with the right information at each step of an agent&#8217;s trajectory. (<a href="https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents">Anthropic</a>&#8288;) (<a href="https://www.langchain.com/blog/context-engineering-for-agents">LangChain</a>&#8288;)</p><p>But context engineering still lives inside a bigger problem.</p><p>You can give an agent the perfect context and still have it:</p><ul><li><p>Skip tests.</p></li><li><p>Use the wrong tool.</p></li><li><p>Overwrite a file.</p></li><li><p>Hallucinate completion.</p></li><li><p>Get stuck in a loop.</p></li><li><p>Misread permissions.</p></li><li><p>Break architectural boundaries.</p></li><li><p>Forget the original objective.</p></li><li><p>Produce work that looks correct but fails in production.</p></li></ul><p>That is why harness engineering is the next layer.</p><p>Context engineering controls what the model sees.</p><p>Harness engineering controls how the system behaves.</p><p>A harness decides when context is loaded, which tool is exposed, whether the tool call is allowed, how state is saved, what test is run, what error triggers a retry, what trace is logged, what result is escalated, and what counts as done.</p><p>This is the move from &#8220;chatting with AI&#8221; to &#8220;operating AI.&#8221;</p><p></p><p><strong>3. Agents are useful because they act. Agents are risky because they act.</strong></p><p>The reason harness engineering matters now is simple: AI agents have crossed a threshold where they can do real work.</p><p>They can write code, call APIs, browse websites, query databases, create files, modify systems, summarize business records, open pull requests, and orchestrate workflows. Anthropic describes the basic building block of agentic systems as an LLM enhanced with retrieval, tools, and memory, where models can generate search queries, select tools, and decide what information to retain. (<a href="https://www.anthropic.com/research/building-effective-agents">Anthropic</a>&#8288;)</p><p>That is powerful.</p><p>It is also dangerous.</p><p>A chatbot that says something wrong is a content problem. An agent that does something wrong is an operational problem.</p><p>Once AI can act, every AI system needs controls. Not just safety policies in the abstract, but practical engineering controls:</p><ul><li><p>Tool permissions.</p></li><li><p>Sandboxed execution.</p></li><li><p>Approval gates.</p></li><li><p>Rate limits.</p></li><li><p>Rollback paths.</p></li><li><p>Audit logs.</p></li><li><p>Secret handling.</p></li><li><p>Environment isolation.</p></li><li><p>Eval suites.</p></li><li><p>Human-in-the-loop escalation.</p></li><li><p>Deterministic verification.</p></li></ul><p>This is why the Model Context Protocol is important but not sufficient by itself. MCP gives AI systems a more standardized way to connect to external tools and data sources. Anthropic introduced it as an open standard for connecting AI assistants to systems where data lives, replacing fragmented integrations with a common protocol. (<a href="https://www.anthropic.com/news/model-context-protocol">Anthropic</a>&#8288;)</p><p>But connecting an agent to tools is only one part of the problem.</p><p>The bigger question is: once the agent has tools, how do we make sure it uses them correctly?</p><p>That is a harness problem.</p><p></p><p><strong>4. The future AI engineer will design agent environments, not just prompts.</strong></p><p>Software engineering is moving up a level of abstraction.</p><p>In traditional software, engineers wrote deterministic code that called deterministic functions. A function like getInvoiceById(id) either returns the invoice or throws an error. The contract is explicit.</p><p>With agents, we are dealing with nondeterministic workers. The same agent may choose different paths on different runs. It may call a tool, ask for clarification, infer missing information, or attempt a workaround.</p><p>Anthropic&#8217;s tool-design guidance captures this shift well: tools are a new kind of software contract between deterministic systems and nondeterministic agents. Agents may call the tool, avoid the tool, misuse the tool, or hallucinate how the tool works. This means tools must be designed for agents, not just for human developers or ordinary software systems. (<a href="https://www.anthropic.com/engineering/writing-tools-for-agents">Anthropic</a>&#8288;)</p><p>That changes the job of the engineer.</p><p>The engineer is no longer only writing application code. The engineer is designing the conditions under which an AI system can succeed.</p><p>That includes:</p><p><strong>Tool design</strong></p><p>Tools need clear names, narrow responsibilities, useful return values, and descriptions optimized for agent understanding.</p><p><strong>Context routing</strong></p><p>The agent should not see everything. It should see the right thing at the right moment.</p><p><strong>State management</strong></p><p>Long tasks need memory, progress logs, intermediate artifacts, and resumable execution.</p><p><strong>Verification</strong></p><p>The system needs deterministic ways to check whether work is correct.</p><p><strong>Observability</strong></p><p>Every agent run should produce traces that explain what happened, which tools were called, what state changed, and why the final result was accepted or rejected.</p><p><strong>Permissions</strong></p><p>Agents should have the least privilege required to complete the task.</p><p><strong>Recovery</strong></p><p>Failures should not be mysterious. A good harness should classify failures, retry intelligently, escalate when necessary, and improve over time.</p><p>This is not prompt engineering. This is systems engineering for AI-native software.</p><p></p><p><strong>5. Evals are the immune system of the harness.</strong></p><p>If harness engineering is the operating environment, evaluations are its immune system.</p><p>OpenAI describes evals as structured tests for measuring model performance, accuracy, and reliability despite the nondeterministic nature of generative AI. Their guidance also warns against &#8220;vibe-based evals,&#8221; where teams rely on whether something seems to work instead of continuously testing it against realistic scenarios. (<a href="https://developers.openai.com/api/docs/guides/evaluation-best-practices">OpenAI Developers</a>&#8288;)</p><p>Anthropic makes the same point specifically for agents. They explain that agents are harder to evaluate because they operate over many turns, use tools, modify state, and adapt based on intermediate results. A simple prompt-response test is not enough when the agent&#8217;s real output is an action taken in an environment. (<a href="https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents">Anthropic</a>&#8288;)</p><p>This distinction is critical.</p><p>For a customer-support agent, success is not merely whether the final message sounds polite. Success may be whether the refund was correctly issued, whether policy was followed, whether the customer record was updated, whether escalation happened when required, and whether the agent avoided exposing private data.</p><p>For a coding agent, success is not whether the patch looks reasonable. Success is whether the bug was reproduced, the fix was implemented, tests passed, regressions were avoided, and the pull request is reviewable.</p><p>Anthropic defines an evaluation harness as the infrastructure that runs evals end-to-end: providing instructions and tools, running tasks, recording steps, grading outputs, and aggregating results. They also distinguish this from an agent harness, which is the system that lets the model act as an agent by processing inputs, orchestrating tool calls, and returning results. (<a href="https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents">Anthropic</a>&#8288;)</p><p>That distinction matters because production AI needs both:</p><ul><li><p>The <strong>agent harness</strong> lets the AI do work.</p></li><li><p>The <strong>evaluation harness</strong> determines whether the work was good.</p></li></ul><p>Without evals, agent development becomes superstition. You change a prompt, swap a model, add a tool, tweak memory, and hope the system improved. With evals, you can measure regressions, compare versions, build confidence, and improve deliberately.</p><p>The best AI teams will not be the teams with the most demos. They will be the teams with the best eval loops.</p><p></p><p><strong>6. Long-running agents need memory, artifacts, and handoff protocols.</strong></p><p>One of the most important frontiers for harness engineering is long-running work.</p><p>Short AI tasks are easy to demo. Long AI tasks are hard to operationalize.</p><p>Ask an agent to summarize one document, and it may do well. Ask it to build an application over multiple sessions, update a large codebase, conduct deep research, or manage a business workflow over days, and new failure modes appear.</p><p>Anthropic&#8217;s work on long-running agents explains the core challenge: agents work across limited context windows, and each new session may begin without memory of what came before. Their solution involved an initializer agent that sets up the environment and a coding agent that makes incremental progress while leaving artifacts for the next session. (<a href="https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents">Anthropic</a>&#8288;)</p><p>That is harness engineering in action.</p><p>The key idea is that the agent should not be expected to magically remember. The system should externalize memory into durable artifacts:</p><ul><li><p>Feature lists.</p></li><li><p>Progress logs.</p></li><li><p>Git commits.</p></li><li><p>Test files.</p></li><li><p>Design documents.</p></li><li><p>Known-failure records.</p></li><li><p>Environment initialization scripts.</p></li><li><p>Checklists of passing and failing requirements.</p></li></ul><p>In Anthropic&#8217;s example, the initializer agent creates a feature list and marks features as failing so later agents have a clear map of what remains. Subsequent agents are asked to work incrementally and leave the environment in a clean state. (<a href="https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents">Anthropic</a>&#8288;)</p><p>That pattern generalizes far beyond coding.</p><p>A sales agent needs account history, open objections, next actions, and CRM state.</p><p>A medical admin agent needs patient workflow status, missing documents, escalation rules, and audit history.</p><p>A finance agent needs assumptions, approvals, source records, calculation traces, and exception logs.</p><p>A research agent needs hypotheses, sources already checked, unresolved questions, and confidence levels.</p><p>Long-running agents do not need infinite context. They need structured continuity.</p><p>That continuity is a harness responsibility.</p><p></p><p><strong>7. Harnesses turn AI from a clever assistant into operational infrastructure.</strong></p><p>The deeper reason harness engineering matters is that it changes what AI is.</p><p>A chatbot is a user interface.</p><p>An agent is a worker.</p><p>A harnessed agent is infrastructure.</p><p>Infrastructure must be reliable, observable, secure, maintainable, and governable. It must fail safely. It must produce logs. It must support debugging. It must allow upgrades. It must be monitored. It must interact with existing systems. It must fit into human organizations.</p><p>This is where many AI projects fail. They prove that a model can do something once, but they do not prove that the system can do it repeatedly, under changing conditions, with real users, real data, and real consequences.</p><p>Harness engineering is the bridge between prototype and production.</p><p>It is how we move from:</p><p>&#8220;The model can answer this question.&#8221;</p><p>to:</p><p>&#8220;This AI system can perform this business process safely, repeatedly, and measurably.&#8221;</p><p>That is a much bigger claim.</p><p>It is also the claim enterprises actually care about.</p><p></p><p><strong>8. The winners will build compounding harnesses.</strong></p><p>The best harnesses will not be static wrappers around models. They will improve over time.</p><p>Every failure should become training data for the system around the model:</p><ul><li><p>A missing instruction becomes a better system prompt.</p></li><li><p>A bad tool call becomes a tool redesign.</p></li><li><p>A hallucinated assumption becomes a validation check.</p></li><li><p>A skipped test becomes a required gate.</p></li><li><p>A privacy risk becomes a permission boundary.</p></li><li><p>A repeated confusion becomes a context-routing improvement.</p></li><li><p>A production incident becomes a new eval case.</p></li></ul><p>OpenAI&#8217;s own harness engineering write-up describes a similar shift in software development. In their Codex workflow, humans work at a different layer of abstraction: prioritizing work, translating user feedback into acceptance criteria, and validating outcomes. When the agent struggles, they treat it as a signal that something is missing in the tools, guardrails, or documentation, and then feed that improvement back into the repository. (<a href="https://openai.com/index/harness-engineering/">OpenAI</a>&#8288;)</p><p>That is the core mindset shift.</p><p>Do not merely blame the model.</p><p>Ask: <strong>What did our harness allow?</strong></p><p>If an agent broke the build, why was it allowed to call the task done before passing tests?</p><p>If an agent hallucinated a field, why was schema validation absent?</p><p>If an agent leaked context, why were permission boundaries unclear?</p><p>If an agent looped for twenty minutes, why was there no loop detector, timeout, or escalation rule?</p><p>If an agent produced low-quality work, why did our eval suite fail to catch it?</p><p>Harness engineering turns every failure into an opportunity to harden the system.</p><p>That is how AI systems become reliable: not by waiting passively for the next model release, but by building environments where models can succeed more often and fail more safely.</p><p></p><p><strong>9. Harness engineering will become the new platform layer.</strong></p><p>In the cloud era, companies needed DevOps, CI/CD, observability, infrastructure-as-code, container orchestration, and security engineering.</p><p>In the AI-agent era, companies will need the equivalent platform layer for intelligent work.</p><p>That layer will include:</p><ul><li><p>Agent orchestration.</p></li><li><p>Tool registries.</p></li><li><p>Context pipelines.</p></li><li><p>Memory systems.</p></li><li><p>Permission systems.</p></li><li><p>Eval suites.</p></li><li><p>Trace stores.</p></li><li><p>Human approval workflows.</p></li><li><p>Cost controls.</p></li><li><p>Model routing.</p></li><li><p>Failure classification.</p></li><li><p>Compliance logs.</p></li><li><p>Simulation environments.</p></li><li><p>Rollback and replay mechanisms.</p></li></ul><p>This is why harness engineering is not just a coding pattern. It is likely to become a new category of AI infrastructure.</p><p>Companies will eventually ask questions like:</p><ul><li><p>Which agents are allowed to access which tools?</p></li><li><p>Which workflows require human approval?</p></li><li><p>Which agent actions are reversible?</p></li><li><p>Which evals run before deployment?</p></li><li><p>Which traces are retained for audit?</p></li><li><p>Which model is used for which task?</p></li><li><p>Which failures are retried, blocked, or escalated?</p></li><li><p>Which business processes are safe enough for partial autonomy?</p></li><li><p>Which agent behaviors are improving or degrading over time?</p></li></ul><p>These are not model questions.</p><p>They are harness questions.</p><p></p><p><strong>10. The future belongs to model-harness-environment systems.</strong></p><p>A recent research framing captures this well: autonomous software-engineering capability should be understood as emerging from a <strong>model-harness-environment system</strong>, where the harness mediates how the model observes a project, acts on it, receives feedback, and establishes that a change is complete. That paper identifies harness responsibilities such as task specification, context selection, tool access, memory, state, observability, failure attribution, verification, permissions, entropy auditing, and intervention recording. (<a href="https://arxiv.org/abs/2605.13357?utm_source=chatgpt.com">arXiv</a>&#8288;)</p><p>That is the future of AI in one sentence:</p><p>Intelligence will not live only inside the model. It will live in the interaction between the model, the harness, and the environment.</p><p>The model provides reasoning.</p><p>The environment provides reality.</p><p>The harness provides disciplined interaction between the two.</p><p>When people say &#8220;AI agents are unreliable,&#8221; they are often correct. But the solution is not simply to wait for smarter models. Smarter models will help, but they will not remove the need for architecture.</p><p>Airplanes did not become safe because engines got stronger. They became safe because the entire aviation system matured: instruments, checklists, maintenance, training, air traffic control, redundancy, incident analysis, and regulation.</p><p>AI agents will follow the same pattern.</p><p>The future of AI will not be raw autonomy. It will be governed autonomy.</p><p>And governed autonomy requires harness engineering.</p><p></p><p><strong>The practical takeaway</strong></p><p>If you are building AI products today, do not stop at prompts.</p><p>Build the harness.</p><p>Start with a narrow workflow. Define success. Add tools carefully. Control permissions. Log every step. Create evals. Capture failures. Add retries. Add human approval where judgment matters. Keep state outside the context window. Make progress auditable. Treat every failure as a system-design signal.</p><p>The companies that master this will build AI systems that do not merely impress users in demos, but actually perform useful work in production.</p><p>That is why harness engineering is the future of AI.</p><p>Not because prompts no longer matter.</p><p>Not because context no longer matters.</p><p>Not because models will stop improving.</p><p>But because the next frontier is no longer just getting AI to talk.</p><p>The next frontier is getting AI to work.</p>]]></content:encoded></item><item><title><![CDATA[Reflections On the Unreasonable Effectiveness of Stochastic Incompleteness]]></title><description><![CDATA[Why humanity keeps reaching for force even though civilization itself is built on trust, persuasion, and voluntary cooperation.]]></description><link>https://dasmachinelabs.substack.com/p/reflections-on-the-unreasonable-effectiveness</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/reflections-on-the-unreasonable-effectiveness</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Thu, 04 Jun 2026 18:09:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Kkw-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86cb61ba-223b-485b-941e-18000dd45471_1408x768.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!Kkw-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86cb61ba-223b-485b-941e-18000dd45471_1408x768.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!Kkw-!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86cb61ba-223b-485b-941e-18000dd45471_1408x768.jpeg 424w, /__u/substackcdn.com/image/fetch/$s_!Kkw-!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86cb61ba-223b-485b-941e-18000dd45471_1408x768.jpeg 848w, /__u/substackcdn.com/image/fetch/$s_!Kkw-!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86cb61ba-223b-485b-941e-18000dd45471_1408x768.jpeg 1272w, /__u/substackcdn.com/image/fetch/$s_!Kkw-!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86cb61ba-223b-485b-941e-18000dd45471_1408x768.jpeg 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!Kkw-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86cb61ba-223b-485b-941e-18000dd45471_1408x768.jpeg" width="1408" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/86cb61ba-223b-485b-941e-18000dd45471_1408x768.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1408,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1489066,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/200652520?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86cb61ba-223b-485b-941e-18000dd45471_1408x768.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!Kkw-!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86cb61ba-223b-485b-941e-18000dd45471_1408x768.jpeg 424w, /__u/substackcdn.com/image/fetch/$s_!Kkw-!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86cb61ba-223b-485b-941e-18000dd45471_1408x768.jpeg 848w, /__u/substackcdn.com/image/fetch/$s_!Kkw-!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86cb61ba-223b-485b-941e-18000dd45471_1408x768.jpeg 1272w, /__u/substackcdn.com/image/fetch/$s_!Kkw-!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86cb61ba-223b-485b-941e-18000dd45471_1408x768.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>A few days ago, I found myself thinking about leverage.</p><p>Not the financial kind. Not even the technological kind.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">The Daily Syndicate is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>The human kind.</p><p>We live in a civilization overflowing with leverage. We have computers that can perform billions of calculations per second. We have global communication networks. We have artificial intelligence systems capable of synthesizing vast amounts of information. We have access to more knowledge than any generation in history.</p><p>And yet many people do not feel particularly empowered.</p><p>If anything, there is a strange sense that despite all of our tools, we remain trapped by many of the same problems that have followed humanity for centuries.</p><p>Conflict. Tribalism. Distrust. Fear.</p><p>The tools have changed.</p><p>The humans have not.</p><p>That observation led me to a question I cannot quite shake.</p><p>If technology gives us so much leverage, why do we still so often rely on force?</p><p>Why does humanity repeatedly reach for hard power when some of our greatest achievements seem to have emerged from soft power?</p><h2>The Invisible Infrastructure of Civilization</h2><p>When people think about power, they often picture something tangible.</p><p>Armies.</p><p>Weapons.</p><p>Money.</p><p>Governments.</p><p>These are all real forms of power. They shape events. They alter incentives. They create consequences.</p><p>But most of civilization is not held together by any of these things.</p><p>Consider what happens every morning in a large city.</p><p>Millions of people wake up, leave their homes, drive on roads, enter office buildings, buy coffee, transfer money, sign contracts, and interact with complete strangers.</p><p>Almost none of these interactions require force.</p><p>A police officer is not standing beside every traffic light.</p><p>A lawyer is not present every time someone swipes a credit card.</p><p>A government official is not supervising every agreement between two individuals.</p><p>The system works because people share expectations.</p><p>They trust that the currency will hold value.</p><p>They trust that contracts generally matter.</p><p>They trust that most strangers will follow the rules most of the time.</p><p>Much of civilization rests upon invisible agreements.</p><p>Trust is an invisible agreement.</p><p>Language is an invisible agreement.</p><p>Culture is an invisible agreement.</p><p>Reputation is an invisible agreement.</p><p>These things are difficult to see precisely because they are everywhere.</p><p>A fish rarely notices the water.</p><h2>Why Force Feels More Real</h2><p>There is something psychologically satisfying about force.</p><p>Its effects are immediate.</p><p>If a military conquers a territory, the outcome is visible.</p><p>If a government imposes a sanction, there is an observable consequence.</p><p>If a company fires an employee, everyone understands what happened.</p><p>Force creates clean lines of causality.</p><p>Soft power rarely does.</p><p>A teacher may influence a student&#8217;s life twenty years from now.</p><p>A book may alter someone&#8217;s worldview decades after it is published.</p><p>A diplomat may spend years building relationships whose value only becomes apparent during a crisis.</p><p>The causal chain is longer.</p><p>The feedback loop is slower.</p><p>The results are often impossible to measure.</p><p>Perhaps this is one reason humans consistently underestimate soft power.</p><p>The most important forces are often the least visible.</p><h2>A Curious Historical Pattern</h2><p>History contains an odd pattern.</p><p>The people who changed the world most profoundly were often not the people who possessed the greatest capacity for violence.</p><p>Military victories matter.</p><p>Political victories matter.</p><p>Economic victories matter.</p><p>But when we zoom out far enough, ideas often outlive all of them.</p><p>Empires rise and fall.</p><p>Borders move.</p><p>Currencies disappear.</p><p>Yet certain ideas continue their journey across centuries.</p><p>The notion of democracy.</p><p>The scientific method.</p><p>Human rights.</p><p>Religious traditions.</p><p>Philosophical schools of thought.</p><p>Stories.</p><p>The influence of an idea can persist long after every institution that originally carried it has vanished.</p><p>This is a strange kind of power.</p><p>A quieter kind.</p><h2>The AI Paradox</h2><p>Artificial intelligence has added another layer to this puzzle.</p><p>For years, many people imagined that advanced technology would make humanity feel more capable.</p><p>Instead, there are moments when the opposite seems true.</p><p>We have more tools than ever.</p><p>Many people feel less agency than ever.</p><p>The explanation may be that we have confused capability with empowerment.</p><p>A tool can increase what a person is capable of doing.</p><p>It cannot tell them what is worth doing.</p><p>It cannot create trust.</p><p>It cannot create meaning.</p><p>It cannot create shared purpose.</p><p>Technology can amplify human intent.</p><p>It cannot replace it.</p><p>This distinction feels increasingly important.</p><p>A civilization cannot automate its way out of every problem because many of its most important challenges are fundamentally human rather than technical.</p><p>Coordination.</p><p>Trust.</p><p>Legitimacy.</p><p>Belonging.</p><p>Purpose.</p><p>These are not engineering problems in the conventional sense.</p><h2>The Ancient Software Running Beneath Civilization</h2><p>There is another possibility worth considering.</p><p>Perhaps hard power and soft power are not simply competing strategies.</p><p>Perhaps they emerge from different layers of human psychology.</p><p>Fear is ancient.</p><p>Cooperation is ancient too, but it is more fragile.</p><p>When people feel secure, they tend to become more open.</p><p>When people become more open, they become more willing to cooperate.</p><p>When cooperation succeeds, trust grows.</p><p>Trust enables larger and more complex forms of civilization.</p><p>Yet under conditions of uncertainty, many of those gains can quickly reverse.</p><p>People become defensive.</p><p>Groups become tribal.</p><p>The circle of trust shrinks.</p><p>Force starts to look attractive again.</p><p>The same species capable of building universities, hospitals, and scientific institutions is also capable of destroying them.</p><p>This contradiction is not a bug in humanity.</p><p>It may simply be part of the package.</p><h2>The Most Powerful Technologies Are Not Technologies</h2><p>Sometimes I wonder whether we misunderstand what technology really is.</p><p>We celebrate the invention of engines, computers, rockets, and neural networks.</p><p>And rightly so.</p><p>But perhaps the most consequential inventions were not physical machines at all.</p><p>Perhaps they were social technologies.</p><p>The rule of law.</p><p>Markets.</p><p>Universities.</p><p>Scientific inquiry.</p><p>Representative government.</p><p>These systems allowed millions of strangers to coordinate peacefully at scales that would have seemed impossible throughout most of human history.</p><p>They created leverage not by increasing force but by reducing the need for force.</p><p>That distinction feels important.</p><p>The highest form of power may not be the ability to compel action.</p><p>It may be the ability to create voluntary alignment.</p><h2>A Final Thought</h2><p>The older I get, the less convinced I am that humanity&#8217;s future will be determined by the sophistication of its tools.</p><p>We are becoming extraordinarily good at building tools.</p><p>The harder question is whether we are becoming better stewards of them.</p><p>A civilization&#8217;s maturity may be measured by how often it can solve problems without coercion.</p><p>How often it can persuade instead of threaten.</p><p>How often it can coordinate instead of dominate.</p><p>How often it can build trust instead of fear.</p><p>The history of humanity contains no shortage of examples demonstrating the effectiveness of force.</p><p>What continues to surprise me is the effectiveness of its alternatives.</p><p>The institutions that endure.</p><p>The ideas that spread.</p><p>The stories that outlive empires.</p><p>The relationships that survive conflict.</p><p>The trust that enables strangers to cooperate.</p><p>These forces rarely make headlines.</p><p>They rarely produce dramatic images.</p><p>They rarely satisfy our desire for immediate results.</p><p>Yet they may be doing most of the heavy lifting.</p><p>Perhaps civilization itself is evidence that soft power works.</p><p>And perhaps the enduring challenge of the human condition is not discovering that fact.</p><p>It is remembering it.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">The Daily Syndicate is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[The Making of Polymatic - Part 3 - Polymatic Architecture - Architectural Decision Records and The Polymatic Maritime Geospatial Intelligence Layer]]></title><description><![CDATA[Part 3 of the PolyMatic build log series - The Maritime Intelligence Layer]]></description><link>https://dasmachinelabs.substack.com/p/the-making-of-polymatic-part-3-polymatic</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/the-making-of-polymatic-part-3-polymatic</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Tue, 17 Mar 2026 05:49:04 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!RO1y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F016e6665-6866-46f7-8f54-3e787a348627_5206x2634.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!RO1y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F016e6665-6866-46f7-8f54-3e787a348627_5206x2634.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!RO1y!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F016e6665-6866-46f7-8f54-3e787a348627_5206x2634.png 424w, /__u/substackcdn.com/image/fetch/$s_!RO1y!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F016e6665-6866-46f7-8f54-3e787a348627_5206x2634.png 848w, /__u/substackcdn.com/image/fetch/$s_!RO1y!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F016e6665-6866-46f7-8f54-3e787a348627_5206x2634.png 1272w, /__u/substackcdn.com/image/fetch/$s_!RO1y!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F016e6665-6866-46f7-8f54-3e787a348627_5206x2634.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!RO1y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F016e6665-6866-46f7-8f54-3e787a348627_5206x2634.png" width="1456" height="737" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/016e6665-6866-46f7-8f54-3e787a348627_5206x2634.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:737,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2576336,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/191215939?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F016e6665-6866-46f7-8f54-3e787a348627_5206x2634.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!RO1y!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F016e6665-6866-46f7-8f54-3e787a348627_5206x2634.png 424w, /__u/substackcdn.com/image/fetch/$s_!RO1y!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F016e6665-6866-46f7-8f54-3e787a348627_5206x2634.png 848w, /__u/substackcdn.com/image/fetch/$s_!RO1y!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F016e6665-6866-46f7-8f54-3e787a348627_5206x2634.png 1272w, /__u/substackcdn.com/image/fetch/$s_!RO1y!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F016e6665-6866-46f7-8f54-3e787a348627_5206x2634.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In this part, we continue from where we left off in <a href="/__u/open.substack.com/pub/dasmachinelabs/p/the-making-of-polymatic-part-2-the?utm_campaign=post-expanded-share&amp;utm_medium=web">Part 2</a>  of <em><strong>The Making of Polymatic </strong></em>series, we shall go over some of the key questions and architectural decisions that were taken in order to ensure that Polymatic could be made into a robust platform.</p><h2>High Level Architecture</h2><p>The initial high level architecture was supposed to be this - </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!H3IM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69756521-8e87-446c-9044-ec483bbae199_1514x1426.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!H3IM!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69756521-8e87-446c-9044-ec483bbae199_1514x1426.png 424w, /__u/substackcdn.com/image/fetch/$s_!H3IM!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69756521-8e87-446c-9044-ec483bbae199_1514x1426.png 848w, /__u/substackcdn.com/image/fetch/$s_!H3IM!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69756521-8e87-446c-9044-ec483bbae199_1514x1426.png 1272w, /__u/substackcdn.com/image/fetch/$s_!H3IM!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69756521-8e87-446c-9044-ec483bbae199_1514x1426.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!H3IM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69756521-8e87-446c-9044-ec483bbae199_1514x1426.png" width="1456" height="1371" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/69756521-8e87-446c-9044-ec483bbae199_1514x1426.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1371,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:274704,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/191215939?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69756521-8e87-446c-9044-ec483bbae199_1514x1426.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!H3IM!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69756521-8e87-446c-9044-ec483bbae199_1514x1426.png 424w, /__u/substackcdn.com/image/fetch/$s_!H3IM!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69756521-8e87-446c-9044-ec483bbae199_1514x1426.png 848w, /__u/substackcdn.com/image/fetch/$s_!H3IM!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69756521-8e87-446c-9044-ec483bbae199_1514x1426.png 1272w, /__u/substackcdn.com/image/fetch/$s_!H3IM!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69756521-8e87-446c-9044-ec483bbae199_1514x1426.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>However, the need was felt to simplify it to manage code complexity and cost. So we need to simplify it to the simplified architecture (as below) - </p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h2>Simplified High Level Architecture</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!mhNc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69e5d465-030a-4edd-b1dd-d26c9f12887b_1378x1420.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!mhNc!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69e5d465-030a-4edd-b1dd-d26c9f12887b_1378x1420.png 424w, /__u/substackcdn.com/image/fetch/$s_!mhNc!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69e5d465-030a-4edd-b1dd-d26c9f12887b_1378x1420.png 848w, /__u/substackcdn.com/image/fetch/$s_!mhNc!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69e5d465-030a-4edd-b1dd-d26c9f12887b_1378x1420.png 1272w, /__u/substackcdn.com/image/fetch/$s_!mhNc!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69e5d465-030a-4edd-b1dd-d26c9f12887b_1378x1420.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!mhNc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69e5d465-030a-4edd-b1dd-d26c9f12887b_1378x1420.png" width="1378" height="1420" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/69e5d465-030a-4edd-b1dd-d26c9f12887b_1378x1420.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1420,&quot;width&quot;:1378,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:330453,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/191215939?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69e5d465-030a-4edd-b1dd-d26c9f12887b_1378x1420.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!mhNc!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69e5d465-030a-4edd-b1dd-d26c9f12887b_1378x1420.png 424w, /__u/substackcdn.com/image/fetch/$s_!mhNc!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69e5d465-030a-4edd-b1dd-d26c9f12887b_1378x1420.png 848w, /__u/substackcdn.com/image/fetch/$s_!mhNc!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69e5d465-030a-4edd-b1dd-d26c9f12887b_1378x1420.png 1272w, /__u/substackcdn.com/image/fetch/$s_!mhNc!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69e5d465-030a-4edd-b1dd-d26c9f12887b_1378x1420.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>From a social intelligence dashboard to a vessel tracking OSINT platform &#8212; and what building both taught me about the architecture decisions that actually matter.</h3><p><em>Part 3 of the PolyMatic App / PolyMatic Intelligence build log series</em></p><div><hr></div><p>Picture the same analyst from <a href="/__u/open.substack.com/pub/dasmachinelabs/p/the-making-of-polymatic?utm_campaign=post-expanded-share&amp;utm_medium=web">Part 1</a> and <a href="/__u/open.substack.com/pub/dasmachinelabs/p/the-making-of-polymatic-part-2-the?utm_campaign=post-expanded-share&amp;utm_medium=web">Part 2</a>.</p><p>It&#8217;s still 03:41 Zulu. But the fifteen tabs have multiplied. Because now, alongside the LiveUAMap feed and the Polymarket sentiment divergence, there&#8217;s a new problem unfolding on a sixteenth tab &#8212; a maritime dashboard showing vessels going dark across the Persian Gulf.</p><p>Not one vessel. Eight.</p><p>AIS transponders switching off in a 40-minute window. No weather event. No port congestion. No legitimate reason. And somewhere in the data, the signature of a ship-to-ship transfer happening in international waters, invisible to the world because the vessels chose to vanish.</p><p>This is the problem that spawned Polymatic MGI (Maritime Geospatial Intelligence), which is purpose-built for maritime intelligence. Where PolyMatic correlates geopolitical signals across Polymatic Maritime Geospatial Intelligence feeds, social sentiment, and prediction markets, Polymatic MGI does the same thing for the ocean: fusing real-time AIS position data, open satellite imagery, sanctions registries, and port state control records into a single compliance and intelligence platform.</p><p>Reviewing the product requirements for  Polymatic MGI forced me to confront every architectural decision I had initially made &#8212; and make several new ones I hadn&#8217;t anticipated. This is the build log for that process.</p><div><hr></div><h2>The Market That Made This Necessary</h2><p>Before getting into the architecture, I want to explain why this product exists at all. Because the maritime intelligence market in 2026 is not a solved problem &#8212; it&#8217;s a consolidating one with a dangerous gap opening up.</p><p>The vessel tracking data layer is getting hoovered up by a single company. Kpler has acquired MarineTraffic, Spire Maritime, and FleetMon in rapid succession. Their Kpler AIS product now owns the largest terrestrial AIS network in the world (13,000+ receivers), the leading satellite AIS constellation (100+ nanosatellites, sub-minute global latency), and the most-used vessel tracking consumer interface. The analytics layer &#8212; Windward, Pole Star, S&amp;P Global&#8217;s ORBCOMM acquisition &#8212; sits above that raw data.</p><p>The gap is the OSINT intelligence layer. The layer that takes a vessel&#8217;s position and asks: <em>who actually owns this vessel, and are they sanctioned? What does its inspection history say about how it&#8217;s operated? Has it gone dark before, and where did it reappear?</em></p><h3>The Shadow Fleet Evasion Playbook</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!wOhx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4902e23f-cceb-4c6e-87c4-ca14951843fe_1440x722.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!wOhx!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4902e23f-cceb-4c6e-87c4-ca14951843fe_1440x722.png 424w, /__u/substackcdn.com/image/fetch/$s_!wOhx!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4902e23f-cceb-4c6e-87c4-ca14951843fe_1440x722.png 848w, /__u/substackcdn.com/image/fetch/$s_!wOhx!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4902e23f-cceb-4c6e-87c4-ca14951843fe_1440x722.png 1272w, /__u/substackcdn.com/image/fetch/$s_!wOhx!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4902e23f-cceb-4c6e-87c4-ca14951843fe_1440x722.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!wOhx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4902e23f-cceb-4c6e-87c4-ca14951843fe_1440x722.png" width="1440" height="722" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4902e23f-cceb-4c6e-87c4-ca14951843fe_1440x722.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:722,&quot;width&quot;:1440,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:139160,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/191215939?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4902e23f-cceb-4c6e-87c4-ca14951843fe_1440x722.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!wOhx!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4902e23f-cceb-4c6e-87c4-ca14951843fe_1440x722.png 424w, /__u/substackcdn.com/image/fetch/$s_!wOhx!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4902e23f-cceb-4c6e-87c4-ca14951843fe_1440x722.png 848w, /__u/substackcdn.com/image/fetch/$s_!wOhx!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4902e23f-cceb-4c6e-87c4-ca14951843fe_1440x722.png 1272w, /__u/substackcdn.com/image/fetch/$s_!wOhx!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4902e23f-cceb-4c6e-87c4-ca14951843fe_1440x722.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>That question is increasingly urgent. In 2025 alone, OFAC added over 400 vessels to the SDN list. By December 2025, approximately 3,300 vessels were operating in shadow networks &#8212; the so-called dark fleet &#8212; moving roughly 6-7% of global crude oil flows through deliberately opaque structures. The regulatory response has expanded the compliance obligation beyond the obvious players: OFAC now explicitly requires banks, insurers, and trade finance institutions to perform AIS transmission due diligence, not just list-screening.</p><p>The compliance teams at those institutions need a tool. The investigative journalists and NGOs tracking sanctions evasion need a tool. The commodity traders and analysts whose crude positions depend on knowing what&#8217;s actually at sea need a tool.</p><h3>AIS signal to dark vessel detection</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!iFg9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafd367c0-d2b6-461c-9988-e3f16d2c7a55_1416x566.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!iFg9!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafd367c0-d2b6-461c-9988-e3f16d2c7a55_1416x566.png 424w, /__u/substackcdn.com/image/fetch/$s_!iFg9!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafd367c0-d2b6-461c-9988-e3f16d2c7a55_1416x566.png 848w, /__u/substackcdn.com/image/fetch/$s_!iFg9!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafd367c0-d2b6-461c-9988-e3f16d2c7a55_1416x566.png 1272w, /__u/substackcdn.com/image/fetch/$s_!iFg9!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafd367c0-d2b6-461c-9988-e3f16d2c7a55_1416x566.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!iFg9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafd367c0-d2b6-461c-9988-e3f16d2c7a55_1416x566.png" width="1416" height="566" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/afd367c0-d2b6-461c-9988-e3f16d2c7a55_1416x566.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:566,&quot;width&quot;:1416,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:113710,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/191215939?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafd367c0-d2b6-461c-9988-e3f16d2c7a55_1416x566.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!iFg9!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafd367c0-d2b6-461c-9988-e3f16d2c7a55_1416x566.png 424w, /__u/substackcdn.com/image/fetch/$s_!iFg9!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafd367c0-d2b6-461c-9988-e3f16d2c7a55_1416x566.png 848w, /__u/substackcdn.com/image/fetch/$s_!iFg9!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafd367c0-d2b6-461c-9988-e3f16d2c7a55_1416x566.png 1272w, /__u/substackcdn.com/image/fetch/$s_!iFg9!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fafd367c0-d2b6-461c-9988-e3f16d2c7a55_1416x566.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>That&#8217;s the market Polymatic MGI is being built for.</p><div><hr></div><h2>The Architecture Decision That Defines Everything</h2><p>The first major decision in building Polymatic MGI was one I&#8217;ve seen teams get wrong consistently: <em>what is the actual data problem?</em></p><p>The instinct is to reach for a full distributed stack immediately. Kafka for message brokering. TimescaleDB for time-series. Neo4j for the ownership graph. Separate microservices for ingest, processing, and the API layer.</p><p>I made that mistake&#8217;s cousin in PolyMatic Part 1 &#8212; starting to code before the architecture was locked, hitting structural problems, and resetting. This time I stopped and asked a harder question first: what does the data actually look like, and what does the query actually need?</p><p>AIS data is high-volume, time-ordered, and geospatial. A global feed from Kpler or Spire delivers position reports for up to 350,000 vessels. Class A transponders on large commercial vessels broadcast every 2-10 seconds when underway. At peak, that&#8217;s millions of messages per minute arriving over a single TCP or NMEA stream.</p><p>But here&#8217;s the thing about millions of messages per minute at MVP scale: you don&#8217;t need Kafka to handle it. You need Kafka to handle it <em>while simultaneously serving other consumers at independent speeds with guaranteed delivery and replay capability.</em> Those requirements are real &#8212; but they&#8217;re not Day 1 requirements. They&#8217;re the requirements you have when your product is working and you&#8217;re scaling it.</p><p>The MVP architecture for Polymatic MGI is a single PostgreSQL cluster with three extensions and a $114/month Digital Ocean deployment. Let me show you exactly why that&#8217;s the right call.</p><div><hr></div><h2>The Stack: One Database to Rule Them All</h2><p>The entire backend data layer runs in a single PostgreSQL 16 instance with three extensions:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!xByn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c63a15b-cc2c-4083-ba90-2e34328ccdae_1382x658.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!xByn!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c63a15b-cc2c-4083-ba90-2e34328ccdae_1382x658.png 424w, /__u/substackcdn.com/image/fetch/$s_!xByn!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c63a15b-cc2c-4083-ba90-2e34328ccdae_1382x658.png 848w, /__u/substackcdn.com/image/fetch/$s_!xByn!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c63a15b-cc2c-4083-ba90-2e34328ccdae_1382x658.png 1272w, /__u/substackcdn.com/image/fetch/$s_!xByn!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c63a15b-cc2c-4083-ba90-2e34328ccdae_1382x658.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!xByn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c63a15b-cc2c-4083-ba90-2e34328ccdae_1382x658.png" width="1382" height="658" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7c63a15b-cc2c-4083-ba90-2e34328ccdae_1382x658.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:658,&quot;width&quot;:1382,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:121772,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/191215939?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c63a15b-cc2c-4083-ba90-2e34328ccdae_1382x658.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!xByn!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c63a15b-cc2c-4083-ba90-2e34328ccdae_1382x658.png 424w, /__u/substackcdn.com/image/fetch/$s_!xByn!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c63a15b-cc2c-4083-ba90-2e34328ccdae_1382x658.png 848w, /__u/substackcdn.com/image/fetch/$s_!xByn!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c63a15b-cc2c-4083-ba90-2e34328ccdae_1382x658.png 1272w, /__u/substackcdn.com/image/fetch/$s_!xByn!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c63a15b-cc2c-4083-ba90-2e34328ccdae_1382x658.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>PostGIS</strong> adds a <code>geometry</code> column type and a spatial index (GIST &#8212; an R-tree) that lets Postgres answer geospatial questions without loading data into application code. Instead of storing lat/lon as two plain <code>FLOAT</code> columns, you store a <code>geometry(Point, 4326)</code> &#8212; where 4326 is the WGS84 coordinate system GPS uses. This unlocks a library of spatial functions that run inside the indexed database layer.</p><p>The query that powers the map viewport:</p><pre><code><code>SELECT DISTINCT ON (mmsi)
    mmsi,
    ST_X(position::geometry) AS lon,
    ST_Y(position::geometry) AS lat,
    speed, heading, nav_status, time
FROM vessel_positions
WHERE time &gt; NOW() - INTERVAL '15 minutes'
  AND position &amp;&amp; ST_MakeEnvelope(-6.5, 35.8, 5.1, 44.2, 4326)
ORDER BY mmsi, time DESC;</code></code></pre><p>The <code>&amp;&amp;</code> operator hits the GIST index directly. Under 100ms for billions of position records. The equivalent query against plain lat/lon columns would require a full table scan.</p><p>The ship-to-ship transfer detection query &#8212; one of the core dark fleet signals:</p><pre><code><code>SELECT a.mmsi AS vessel_a, b.mmsi AS vessel_b,
       ST_Distance(a.position::geography, b.position::geography) AS separation_m
FROM vessel_positions a
JOIN vessel_positions b
  ON a.time BETWEEN b.time - INTERVAL '5 minutes'
                AND b.time + INTERVAL '5 minutes'
  AND a.mmsi &lt;&gt; b.mmsi
WHERE a.time &gt; NOW() - INTERVAL '24 hours'
  AND ST_DWithin(a.position::geography, b.position::geography, 500)
  AND a.speed &lt; 1.0
  AND b.speed &lt; 1.0;</code></code></pre><p>Two nearly stationary vessels within 500 metres of each other. That&#8217;s a potential STS transfer. The <code>::geography</code> cast calculates distances on the curved earth surface &#8212; critical at maritime scales where flat-plane approximations fail.</p><p><strong>pgRouting</strong> adds graph traversal functions for the ownership graph. The compliance question is never &#8220;is this vessel directly sanctioned&#8221; &#8212; it&#8217;s &#8220;is there a sanctioned entity anywhere within N hops of this vessel.&#8221; That&#8217;s a directed graph problem, and recursive CTEs handle it cleanly inside Postgres without a separate graph database.</p><p>The ownership graph is an edge table:</p><pre><code><code>CREATE TABLE ownership_edges (
    id           BIGSERIAL PRIMARY KEY,
    source       BIGINT NOT NULL REFERENCES maritime_entities(id),
    target       BIGINT NOT NULL REFERENCES maritime_entities(id),
    relationship TEXT NOT NULL,
    -- 'registered_owner' | 'beneficial_owner' | 'ship_manager'
    -- 'director' | 'shareholder' | 'insurer'
    cost         NUMERIC DEFAULT 1.0,
    valid_from   DATE,
    valid_to     DATE  -- NULL = currently active
);</code></code></pre><p>Finding the shortest path from a vessel to any sanctioned entity:</p><pre><code><code>SELECT path_seq, node, edge, cost,
       e.name AS entity_name, e.sanctioned
FROM pgr_dijkstra(
    'SELECT id, source, target, cost, reverse_cost
     FROM ownership_edges WHERE valid_to IS NULL',
    (SELECT id FROM maritime_entities WHERE imo_number = '9456231'),
    (SELECT ARRAY_AGG(id) FROM maritime_entities WHERE sanctioned = TRUE),
    directed := TRUE
)
JOIN maritime_entities e ON e.id = node
ORDER BY path_seq;</code></code></pre><p>This query fires automatically when a new OFAC designation lands. Every vessel within 3 hops of the newly sanctioned entity gets its risk score updated and a compliance alert queued &#8212; before an analyst has touched the data.</p><p><strong>Native time partitioning</strong> replaces TimescaleDB. Digital Ocean&#8217;s managed PostgreSQL doesn&#8217;t support TimescaleDB as an extension, and running TimescaleDB on a separate VM adds operational complexity I don&#8217;t want at this stage. The position table uses PostgreSQL&#8217;s native <code>PARTITION BY RANGE (time)</code>:</p><pre><code><code>CREATE TABLE vessel_positions (
    time         TIMESTAMPTZ      NOT NULL,
    mmsi         INTEGER          NOT NULL,
    position     GEOMETRY(Point, 4326) NOT NULL,
    speed        NUMERIC(5,2),
    heading      SMALLINT,
    nav_status   SMALLINT
) PARTITION BY RANGE (time);

CREATE TABLE vessel_positions_2026_03
    PARTITION OF vessel_positions
    FOR VALUES FROM ('2026-03-01') TO ('2026-04-01');

CREATE INDEX ON vessel_positions
    USING GIST (position, tstzrange(time, time));</code></code></pre><p>For Polymatic MGI&#8217;s scale &#8212; tens of thousands of tracked vessels, not the full global fleet &#8212; this is entirely adequate. The migration path to TimescaleDB or a dedicated time-series database is a configuration change when you actually hit the limits, not an architectural rethink from scratch.</p><div><hr></div><h2>Replacing Kafka with <code>pg_notify</code></h2><p>The production architecture diagram I drew early in this process included Kafka as the message broker between the AIS ingest layer and the downstream consumers. It was the right design for a mature system. It&#8217;s the wrong design for a product that doesn&#8217;t have paying customers yet.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!pjzS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a206bad-2535-4cb5-9275-6d6fa25d595f_1382x658.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!pjzS!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a206bad-2535-4cb5-9275-6d6fa25d595f_1382x658.png 424w, /__u/substackcdn.com/image/fetch/$s_!pjzS!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a206bad-2535-4cb5-9275-6d6fa25d595f_1382x658.png 848w, /__u/substackcdn.com/image/fetch/$s_!pjzS!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a206bad-2535-4cb5-9275-6d6fa25d595f_1382x658.png 1272w, /__u/substackcdn.com/image/fetch/$s_!pjzS!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a206bad-2535-4cb5-9275-6d6fa25d595f_1382x658.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!pjzS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a206bad-2535-4cb5-9275-6d6fa25d595f_1382x658.png" width="1382" height="658" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3a206bad-2535-4cb5-9275-6d6fa25d595f_1382x658.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:658,&quot;width&quot;:1382,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:143482,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/191215939?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a206bad-2535-4cb5-9275-6d6fa25d595f_1382x658.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!pjzS!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a206bad-2535-4cb5-9275-6d6fa25d595f_1382x658.png 424w, /__u/substackcdn.com/image/fetch/$s_!pjzS!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a206bad-2535-4cb5-9275-6d6fa25d595f_1382x658.png 848w, /__u/substackcdn.com/image/fetch/$s_!pjzS!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a206bad-2535-4cb5-9275-6d6fa25d595f_1382x658.png 1272w, /__u/substackcdn.com/image/fetch/$s_!pjzS!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3a206bad-2535-4cb5-9275-6d6fa25d595f_1382x658.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The replacement is <code>pg_notify</code> &#8212; a lightweight pub/sub mechanism built into PostgreSQL itself. When the AIS ingest worker flushes a batch to the database, it sends a notification:</p><pre><code><code>await conn.execute(
    "SELECT pg_notify('vessel_positions_updated', $1)",
    json.dumps({"count": len(rows), "ts": datetime.now(timezone.utc).isoformat()})
)</code></code></pre><p>The WebSocket server listens for that notification and pushes updated positions to connected clients:</p><pre><code><code>async def notify_listener():
    conn = await asyncpg.connect(DATABASE_URL)
    await conn.add_listener("vessel_positions_updated", handle_notify)
    while True:
        await asyncio.sleep(1)

async def handle_notify(conn, pid, channel, payload):
    if not active_connections:
        return
    vessels = await fetch_latest_positions()
    for client_id, ws in list(active_connections.items()):
        try:
            await ws.send_json({"type": "update", "vessels": vessels})
        except Exception:
            active_connections.pop(client_id, None)
```

This is not as robust as Kafka. There's no message persistence &#8212; if the WebSocket server is down when a notification fires, it misses it. There's no consumer group semantics, no replay capability, no offset management.

But here's the honest assessment: for an analyst dashboard where the frontend re-fetches the last 15 minutes of positions on reconnect anyway, missed notifications during a deployment window are acceptable. The data is in the database. The client catches up. The production Kafka migration is a known path &#8212; add the broker, replace `pg_notify` with a Kafka producer in the ingest worker and a Kafka consumer in the WebSocket server, keep everything else the same.

The decision to start with `pg_notify` is not a shortcut that creates debt. It's a deferral of complexity that isn't yet justified by scale.

---

## The AIS Protocol: Why the Data Is Hard

Before I explain what the ingest worker does, it's worth explaining what it's working with &#8212; because AIS data is a genuinely strange format, and the strangeness has intelligence implications.

Every AIS position message is an NMEA 0183 sentence:
```
!AIVDM,1,1,,B,15M67N0P01G?Uf6E`FepT@4n0000,0*73</code></code></pre><p>The payload <code>15M67N0P01G?Uf6E\</code>FepT@4n0000` is a 6-bit ASCII encoding of binary data. To decode it, you subtract 48 from each character&#8217;s ASCII value (and subtract a further 8 if the result exceeds 39), producing 6 bits per character that concatenate into a 168-bit binary string. Then you slice that string at fixed offsets defined in ITU-R M.1371-5:</p><ul><li><p>Bits 8&#8211;37: MMSI (the vessel identifier)</p></li><li><p>Bits 50&#8211;59: Speed over ground (raw integer &#247; 10 = knots)</p></li><li><p>Bits 61&#8211;88: Longitude (signed integer &#247; 600,000 = decimal degrees)</p></li><li><p>Bits 89&#8211;115: Latitude (signed integer &#247; 600,000 = decimal degrees)</p></li><li><p>Bits 116&#8211;127: Course over ground (raw integer &#247; 10 = degrees)</p></li></ul><p>A heading of 511 means &#8220;not available.&#8221; A speed of 1023 means &#8220;not available.&#8221; Longitude value <code>0x6791AC0</code> means &#8220;not available.&#8221; These sentinel values matter: a vessel reporting speed 1023 in its AIS stream should not appear to be travelling at 102.3 knots.</p><p>More importantly: the AIS standard has <strong>no authentication</strong>. Any vessel can broadcast any MMSI, any position, any speed. The 9-digit MMSI identifier can be cloned &#8212; your vessel transmits another vessel&#8217;s identity. The position can be fabricated entirely &#8212; your vessel&#8217;s transponder broadcasts coordinates from a different ocean while the vessel is physically somewhere else. The system was designed in the 1990s for collision avoidance between cooperating vessels. It was not designed for surveillance of non-cooperating ones.</p><p>This is the fundamental tension at the heart of  Polymatic MGI: the data source we depend on is trivially spoofable by the exact actors we&#8217;re trying to track. The intelligence value comes not from trusting AIS data, but from knowing when and how to distrust it &#8212; and what other data sources to cross-reference when you do.</p><div><hr></div><h2>The Ingest Worker: Direct to Postgres</h2><p>Without Kafka, the AIS ingest service connects to the provider&#8217;s TCP stream, decodes NMEA sentences, and writes directly to PostgreSQL in batches.</p><pre><code><code>async def ais_ingest_worker():
    pool = await asyncpg.create_pool(DATABASE_URL, min_size=2, max_size=5)
    buffer = []

    async def flush_buffer():
        if not buffer:
            return
        rows = buffer.copy()
        buffer.clear()

        async with pool.acquire() as conn:
            await conn.executemany("""
                INSERT INTO vessel_positions
                    (time, mmsi, position, speed, heading, nav_status)
                VALUES (
                    $1, $2,
                    ST_SetSRID(ST_MakePoint($3, $4), 4326),
                    $5, $6, $7
                )
                ON CONFLICT DO NOTHING
            """, rows)

            await conn.execute(
                "SELECT pg_notify('vessel_positions_updated', $1)",
                json.dumps({"count": len(rows)})
            )

    asyncio.create_task(flush_loop())  # flushes every 3 seconds

    reader, _ = await asyncio.open_connection(AIS_TCP_HOST, AIS_TCP_PORT)

    async for line in reader:
        raw = line.decode("ascii").strip()
        if not raw.startswith("!AIVDM"):
            continue

        try:
            msg = decode(raw)
            if msg.msg_type not in (1, 2, 3):
                continue
            if msg.lat is None or msg.lon is None:
                continue

            buffer.append((
                datetime.now(timezone.utc),
                msg.mmsi,
                msg.lon, msg.lat,
                msg.speed if msg.speed != 102.3 else None,
                msg.heading if msg.heading != 511 else None,
                msg.status.value if hasattr(msg, "status") else None,
            ))

            if len(buffer) &gt;= 500:
                await flush_buffer()

        except Exception:
            continue</code></code></pre><p>The <code>linger.ms</code> equivalent here is the 3-second flush interval combined with the 500-row batch ceiling. You accumulate messages in memory and flush on whichever trigger fires first &#8212; time or size. Malformed messages are common in real AIS streams (partial sentences, encoding errors, collision between simultaneous transmissions in dense traffic) and are silently discarded with <code>continue</code>. The <code>ON CONFLICT DO NOTHING</code> handles duplicate messages from overlapping terrestrial and satellite feeds delivering the same transmission.</p><p>One decision I want to be direct about: I&#8217;m using <code>pyais</code> for the NMEA decoding rather than rolling my own. Understanding the bit-level decode is valuable for reasoning about data quality &#8212; and I spent real time working through it because you can&#8217;t build a good anomaly detector without knowing exactly what the fields mean and what the sentinel values are. But the production ingest worker uses a battle-tested library that handles all 27 AIS message types, multi-sentence fragmentation, and the edge cases I would inevitably miss.</p><div><hr></div><h2>The Satellite Imagery Pipeline</h2><p>The AIS stream tells you where vessels claim to be. The satellite imagery pipeline tells you where they actually are.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!_Ox_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125990ef-28b2-49cb-951a-0b988ff65326_1386x552.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!_Ox_!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125990ef-28b2-49cb-951a-0b988ff65326_1386x552.png 424w, /__u/substackcdn.com/image/fetch/$s_!_Ox_!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125990ef-28b2-49cb-951a-0b988ff65326_1386x552.png 848w, /__u/substackcdn.com/image/fetch/$s_!_Ox_!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125990ef-28b2-49cb-951a-0b988ff65326_1386x552.png 1272w, /__u/substackcdn.com/image/fetch/$s_!_Ox_!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125990ef-28b2-49cb-951a-0b988ff65326_1386x552.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!_Ox_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125990ef-28b2-49cb-951a-0b988ff65326_1386x552.png" width="1386" height="552" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/125990ef-28b2-49cb-951a-0b988ff65326_1386x552.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:552,&quot;width&quot;:1386,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:92182,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/191215939?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125990ef-28b2-49cb-951a-0b988ff65326_1386x552.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!_Ox_!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125990ef-28b2-49cb-951a-0b988ff65326_1386x552.png 424w, /__u/substackcdn.com/image/fetch/$s_!_Ox_!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125990ef-28b2-49cb-951a-0b988ff65326_1386x552.png 848w, /__u/substackcdn.com/image/fetch/$s_!_Ox_!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125990ef-28b2-49cb-951a-0b988ff65326_1386x552.png 1272w, /__u/substackcdn.com/image/fetch/$s_!_Ox_!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F125990ef-28b2-49cb-951a-0b988ff65326_1386x552.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>This is the intelligence layer that makes Polymatic MGI different from every pure AIS tracking product. When a vessel&#8217;s AIS transponder goes dark, the only way to track it is to look for it directly &#8212; and Sentinel-1 SAR (Synthetic Aperture Radar) gives you that capability for free.</p><p>SAR is the critical technology here. Unlike optical satellite imagery, SAR uses radar pulses to illuminate the earth&#8217;s surface, which means it operates day or night, through cloud cover, through fog, and through the weather conditions that shadow fleet operators prefer. Metal ship hulls are extremely strong radar reflectors &#8212; they appear as bright targets against the dark ocean background. Detecting them is a well-understood computer vision problem.</p><p>The pipeline has five stages:</p><p><strong>Scene discovery</strong> polls the Copernicus Data Space OData API every 6 hours for new Sentinel-1 GRD scenes over defined areas of interest &#8212; the Strait of Hormuz, Red Sea, Malacca Strait, Persian Gulf, Black Sea.</p><p><strong>Scene download</strong> streams each scene (800MB&#8211;1.5GB) directly to DO Spaces via multipart upload, checking for existing downloads to stay idempotent.</p><p><strong>Preprocessing</strong> runs ESA&#8217;s SNAP toolbox to convert raw SAR data into usable imagery: apply orbit file &#8594; thermal noise removal &#8594; radiometric calibration to sigma-naught &#8594; speckle filtering &#8594; Range-Doppler terrain correction. Without these steps, vessel-to-ocean contrast is unreliable and pixel positions are geographically wrong.</p><p><strong>Vessel detection</strong> uses a two-stage approach. CFAR (Constant False Alarm Rate) identifies candidate bright targets by comparing each pixel against the mean of its surrounding background cells and flagging pixels that exceed a threshold above background. A deep learning classifier (Faster-RCNN architecture, the same approach used by Allen AI&#8217;s open-source Sentinel vessel detection models) filters false positives &#8212; wind turbines, oil platforms, sargassum patches &#8212; and estimates vessel dimensions and heading.</p><p><strong>AIS cross-reference</strong> is where the intelligence happens. For every satellite detection, the pipeline searches the <code>vessel_positions</code> table for AIS transmissions within 2km of the detected position within a &#177;10-minute window:</p><pre><code><code>SELECT mmsi,
       ST_Distance(
           position::geography,
           ST_SetSRID(ST_MakePoint($1, $2), 4326)::geography
       ) AS distance_m
FROM vessel_positions
WHERE time BETWEEN $3::timestamptz - INTERVAL '10 minutes'
                AND $3::timestamptz + INTERVAL '10 minutes'
  AND ST_DWithin(
      position::geography,
      ST_SetSRID(ST_MakePoint($1, $2), 4326)::geography,
      2000
  )
ORDER BY distance_m
LIMIT 5;</code></code></pre><p>A match means the vessel is transmitting normally. No match means a dark vessel candidate &#8212; written to the <code>ais.anomalies</code> table with a risk score and queued for analyst review.</p><p>The imagery preprocessing pipeline runs on a separate $24/month Digital Ocean Droplet. This is the one component that can&#8217;t run on App Platform&#8217;s stateless containers: SNAP requires persistent disk for temp files, 4-8GB RAM per scene, and processing times that exceed App Platform&#8217;s job timeout limits. Everything else runs on App Platform. One Droplet, with a PostgreSQL job queue for coordination:</p><pre><code><code>CREATE TABLE imagery_jobs (
    id           BIGSERIAL PRIMARY KEY,
    scene_id     TEXT NOT NULL UNIQUE,
    aoi          TEXT NOT NULL,
    status       TEXT NOT NULL DEFAULT 'pending',
    created_at   TIMESTAMPTZ DEFAULT NOW(),
    started_at   TIMESTAMPTZ,
    completed_at TIMESTAMPTZ
);</code></code></pre><p>The Droplet worker claims jobs with <code>FOR UPDATE SKIP LOCKED</code> &#8212; the standard Postgres pattern for distributed job queues that prevents two workers from processing the same scene simultaneously without requiring Redis or any external coordination.</p><div><hr></div><h2>The Enrichment Crawler: Building the Ownership Graph</h2><p>Every vessel that enters the AIS feed triggers a lookup cascade through the enrichment crawler. The goal is to answer: who actually controls this vessel, and are any of them sanctioned?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!1bbQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f513fd1-ea61-4ddc-a31c-333c4922efc3_1386x690.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!1bbQ!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f513fd1-ea61-4ddc-a31c-333c4922efc3_1386x690.png 424w, /__u/substackcdn.com/image/fetch/$s_!1bbQ!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f513fd1-ea61-4ddc-a31c-333c4922efc3_1386x690.png 848w, /__u/substackcdn.com/image/fetch/$s_!1bbQ!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f513fd1-ea61-4ddc-a31c-333c4922efc3_1386x690.png 1272w, /__u/substackcdn.com/image/fetch/$s_!1bbQ!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f513fd1-ea61-4ddc-a31c-333c4922efc3_1386x690.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!1bbQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f513fd1-ea61-4ddc-a31c-333c4922efc3_1386x690.png" width="1386" height="690" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f513fd1-ea61-4ddc-a31c-333c4922efc3_1386x690.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:690,&quot;width&quot;:1386,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:91355,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/191215939?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f513fd1-ea61-4ddc-a31c-333c4922efc3_1386x690.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!1bbQ!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f513fd1-ea61-4ddc-a31c-333c4922efc3_1386x690.png 424w, /__u/substackcdn.com/image/fetch/$s_!1bbQ!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f513fd1-ea61-4ddc-a31c-333c4922efc3_1386x690.png 848w, /__u/substackcdn.com/image/fetch/$s_!1bbQ!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f513fd1-ea61-4ddc-a31c-333c4922efc3_1386x690.png 1272w, /__u/substackcdn.com/image/fetch/$s_!1bbQ!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f513fd1-ea61-4ddc-a31c-333c4922efc3_1386x690.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The cascade runs in sequence keyed on the IMO number &#8212; the permanent 7-digit identifier that survives name changes, flag hops, and ownership transfers:</p><ol><li><p><strong>GISIS</strong> (IMO&#8217;s Global Integrated Shipping Information System) for identity confirmation &#8212; registered flag, classification society, and critically: whether the vessel is flying a &#8220;FALSE&#8221; or &#8220;UNKNOWN&#8221; flag. When a flag state de-registers a vessel that continues broadcasting their flag in AIS, GISIS records it as false. That&#8217;s an immediate high-confidence anomaly signal.</p></li><li><p><strong>Equasis</strong> for current ownership structure &#8212; registered owner, ship manager, commercial manager, P&amp;I insurer, and the full company fleet. No API; the crawler uses authenticated HTTP requests keyed by IMO number.</p></li><li><p><strong>OpenCorporates</strong> for the corporate chain &#8212; director records, shareholder structures, registered addresses. This is where &#8220;Seychelles Holdings Ltd&#8221; resolves into the chain of nominee companies pointing at the actual beneficial owner.</p></li><li><p><strong>OpenSanctions</strong> for cross-regime sanctions screening &#8212; a single API that aggregates OFAC SDN, EU Consolidated Sanctions, UK OFSI, UN Security Council, and 260+ other sources. The key integration is the delta feed: when OFAC publishes a new designation, OpenSanctions propagates it. The crawler polls the delta endpoint and immediately updates any vessel in the ownership graph that&#8217;s now within 3 hops of the newly sanctioned entity.</p></li><li><p><strong>Paris MOU and Tokyo MOU</strong> inspection records for PSC history. Vessels with multiple detentions in 18 months, cycling between European and Asian inspection regimes to minimize scrutiny, score higher on the composite risk model.</p></li></ol><p>The results write into the pgRouting ownership graph as directed edges. The composite risk score for each vessel is a function of: direct sanctions match, hop distance to nearest sanctioned entity, PSC detention frequency, flag state performance tier, classification society recognition status, and flag change frequency in the last 18 months.</p><p>This last signal &#8212; flag change frequency &#8212; is one I want to highlight. A vessel that changes its registered flag four times in 18 months, cycling through Seychelles, Marshall Islands, and Panama, is exhibiting exactly the pattern shadow fleet operators use to obscure beneficial ownership. That single integer &#8212; ownership changes in 18 months &#8212; is a strong leading indicator that doesn&#8217;t depend on the vessel doing anything suspicious right now. It&#8217;s historical behavior recorded in the PSC and GISIS databases, and most tracking platforms don&#8217;t surface it.</p><div><hr></div><h2>The Deployment: Production-Ready Backend</h2><p>The Digital Ocean App Platform <code>spec.yaml</code> defines the full deployment:</p><pre><code><code>name: polymatic

services:
  - name: api
    run_command: uvicorn app.main:app --host 0.0.0.0 --port 8080 --workers 2
    instance_size_slug: professional-xs  # 1 vCPU, 2GB RAM

workers:
  - name: ais-ingest
    run_command: python -m workers.ais_ingest
    instance_size_slug: basic-xs

  - name: enrichment
    run_command: python -m workers.enrichment_crawler
    instance_size_slug: basic-xs

jobs:
  - name: anomaly-engine
    run_command: python -m jobs.anomaly_engine
    kind: CRON
    schedule: "*/5 * * * *"

  - name: imagery-discovery
    run_command: python -m jobs.imagery_discovery
    kind: CRON
    schedule: "0 */6 * * *"

databases:
  - name: polymatic-prod-db
    engine: PG
    version: "16"
    size: db-s-2vcpu-4gb  # $50/month</code></code></pre><p>Plus the separate Droplet for imagery preprocessing, and DO Spaces with CDN for tile serving.</p><p>For comparison, the full Kafka + managed MSK + multi-service AWS architecture I sketched out earlier in this process would run way higher in terms of cost, even before a single line of business logic is written.</p><p>The migration path to the full architecture is defined and non-breaking:</p><ul><li><p>Replace <code>pg_notify</code> with a Kafka producer + consumer when message volume justifies it</p></li><li><p>Add TimescaleDB when partition management becomes operationally burdensome</p></li><li><p>Extract the imagery pipeline to a dedicated ECS task when scene volume grows</p></li><li><p>Move from App Platform to EKS when autoscaling requirements exceed what App Platform&#8217;s instance tiers provide</p></li></ul><p>None of those migrations require rewriting the application logic. They require reconfiguring the infrastructure and swapping the connection layer. The abstraction boundaries were placed deliberately to make this possible.</p><div><hr></div><h2>The Part Most Architecture Posts Skip</h2><p>There&#8217;s a decision I made in the Polymatic MGI architecture that I haven&#8217;t written about yet, because it&#8217;s uncomfortable to admit.</p><p>I chose PostgreSQL + pgRouting over Neo4j for the ownership graph. I documented the technical rationale: single-database simplicity, no separate ops surface, the ability to JOIN directly between the graph and the time-series data in one query.</p><p>What I didn&#8217;t say is that I also spent three days prototyping with Neo4j first. The Cypher queries were cleaner. The graph visualization tools integrated more naturally. The data model felt more expressive.</p><p>And then I ran a load test with a realistic ownership graph &#8212; 50,000 vessels, 400,000 corporate entities, 2 million edges &#8212; and measured the latency of the query that matters most: <em>find all vessels within 3 hops of a newly sanctioned entity, bulk.</em></p><p>pgRouting with <code>pgr_dijkstraCost</code>: 340ms.</p><p>Neo4j Community: 280ms.</p><p>The difference is 60 milliseconds on a query that runs as a background job, not in a request path. It is completely irrelevant to the user experience. And Neo4j requires a separate server, a separate backup strategy, a separate monitoring setup, a separate connection pool, and a separate query language that every engineer on the project needs to learn.</p><p>I killed the Neo4j prototype and committed to pgRouting.</p><p>The lesson I keep re-learning: <strong>the right database for a query is almost always the database you&#8217;re already running, unless the performance gap is enormous and the query is in a hot path.</strong> The instinct to reach for a specialist tool because it&#8217;s conceptually cleaner for the data model is almost always a mistake at the stage where you&#8217;re building the first version of something.</p><div><hr></div><h2>What&#8217;s Running Right Now</h2><p>By the end of this epic:</p><p><strong>AIS ingestion worker:</strong> complete. Connects to provider TCP stream, decodes NMEA Type 1/2/3 position reports, batches to PostgreSQL every 3 seconds or 500 messages, <code>pg_notify</code> on flush.</p><p><strong>PostGIS schema:</strong> complete. <code>vessel_positions</code> with GIST index, <code>vessel_detections</code> for imagery pipeline results, both partitioned by time.</p><p><strong>pgRouting ownership graph:</strong> complete. <code>maritime_entities</code> and <code>ownership_edges</code> tables, <code>pgr_dijkstra</code> path queries for compliance screening, recursive CTE pattern for single-vessel ownership chain display.</p><p><strong>Enrichment crawler:</strong> scaffold complete, adapters in progress. GISIS and OpenSanctions adapters live; Equasis adapter in progress (web scraping, requires session management).</p><p><strong>Anomaly engine:</strong> complete. Dark ship detection (AIS gap &gt; 6 hours for vessels previously underway), STS proximity detection (PostGIS DWithin query, both vessels speed &lt; 1 knot), risk score computation.</p><p><strong>Satellite imagery pipeline:</strong> scene discovery and download complete. SNAP preprocessing worker running on Droplet. Vessel detection model integrated (Allen AI open-source weights as baseline, fine-tuning in progress on Sentinel-1 maritime scenes). AIS cross-reference query complete.</p><p><strong>Digital Ocean deployment:</strong> complete. App Platform spec deployed, Droplet running, Spaces bucket configured with CDN.</p><p>What&#8217;s not done yet: the frontend intelligence dashboard and map canvas. The API layer is serving data. The WebSocket server is pushing positions. The tile endpoint is redirecting to Spaces. The map canvas exists as a Mapbox GL component that renders vessel positions &#8212; but the intelligence dashboard (risk scores, alerts, ownership graph visualization) is the next epic.</p><div><hr></div><h2>What&#8217;s Next: Part 4 &#8212; The Intelligence Dashboard</h2><p>Part 4 is where the data becomes actionable.</p><p>The backend is producing risk scores. The anomaly engine is flagging dark vessel candidates. The ownership graph is traversing corporate chains to sanctioned entities. Part 4 is about making all of that visible to the analyst in a way that actually accelerates decision-making rather than just surfacing more data.</p><p>I&#8217;ll cover the vessel profile page &#8212; the IMO number as the anchor, ownership graph visualization, flag history timeline, PSC inspection record, composite risk score breakdown. The alert system &#8212; what triggers a high-priority notification versus a background queue item. And the map canvas intelligence layer &#8212; how you render 50,000 vessel positions in Mapbox GL without the browser dying, and how you overlay satellite SAR imagery on top of the live position feed.</p><p>The analyst at 03:41 Zulu is still watching ships go dark in the Persian Gulf. In Part 4, they&#8217;ll have a tool that tells them not just <em>that</em> a vessel went dark, but <em>who owns it</em>, <em>what flag it&#8217;s flying</em>, <em>when it was last inspected</em>, and <em>how many hops it is from the nearest entity on the OFAC SDN list</em>.</p><p>That&#8217;s the difference between data and intelligence.</p><div><hr></div><p><em>Building Polymatic in public. Every decision, tradeoff, and mistake documented in real time.</em></p><p><em>Try PolyMatic: <a href="https://github.com/arunabhdas/polymatic">github.com/arunabhdas/polymatic</a></em></p><div><hr></div><p><em>&#8592; <a href="/__u/dasmachinelabs.substack.com/p/the-making-of-polymatic-part-2-the">Part 2: The PolyMatic Backend</a></em> <em>&#8594; Part 4: The Intelligence Dashboard (coming soon)</em></p><div><hr></div><p><strong>If you&#8217;re a compliance officer, maritime intelligence analyst, sanctions screening team, or investigative journalist tracking dark fleet activity &#8212; Polymatic is being built for your workflow.</strong></p><p>I&#8217;m running a small early-access cohort for the maritime intelligence product: 10 seats for professionals who want to shape the feature roadmap and lock in founder pricing before public launch.</p><p>Reply to this post or DM on <a href="https://x.com/dasmachinelabs">X/Twitter</a>. Tell me one specific compliance or intelligence workflow problem you&#8217;re solving manually today. That&#8217;s the only pitch I need.</p><div><hr></div><p><em>Thanks for reading The Daily Syndicate. If this post was useful, the most useful thing you can do is forward it to one compliance professional, maritime analyst, or investigative journalist who&#8217;d find it interesting.</em></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Join my new subscriber chat]]></title><description><![CDATA[A private space for us to converse and connect]]></description><link>https://dasmachinelabs.substack.com/p/join-my-new-subscriber-chat</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/join-my-new-subscriber-chat</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Sat, 14 Mar 2026 03:50:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!KYZT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0f63c9a-2296-4c96-a2f9-52648999bb00_2000x1000.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Today I&#8217;m announcing a brand new addition to my Substack publication: The Daily Syndicate subscriber chat.</p><p>This is a conversation space exclusively for subscribers&#8212;kind of like a group chat or live hangout. I&#8217;ll post questions and updates that come my way, and you can jump into the discussion.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://open.substack.com/pub/dasmachinelabs/chat&quot;,&quot;text&quot;:&quot;Join chat&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/open.substack.com/pub/dasmachinelabs/chat"><span>Join chat</span></a></p><div><hr></div><h2>How to get started</h2><ol><li><p><strong>Get the Substack app by clicking <a href="/__u/substack.com/app/app-store-redirect">this link</a> or the button below.</strong> New chat threads won&#8217;t be sent sent via email, so turn on push notifications so you don&#8217;t miss conversation as it happens. You can also access chat <a href="/__u/open.substack.com/pub/dasmachinelabs/chat">on the web</a>.</p></li></ol><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://substack.com/app/app-store-redirect&quot;,&quot;text&quot;:&quot;Get app&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="/__u/substack.com/app/app-store-redirect"><span>Get app</span></a></p><ol start="2"><li><p><strong>Open the app and tap the Chat icon.</strong> It looks like two bubbles in the bottom bar, and you&#8217;ll see a row for my chat inside.</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!KYZT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0f63c9a-2296-4c96-a2f9-52648999bb00_2000x1000.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!KYZT!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0f63c9a-2296-4c96-a2f9-52648999bb00_2000x1000.jpeg 424w, /__u/substackcdn.com/image/fetch/$s_!KYZT!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0f63c9a-2296-4c96-a2f9-52648999bb00_2000x1000.jpeg 848w, /__u/substackcdn.com/image/fetch/$s_!KYZT!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0f63c9a-2296-4c96-a2f9-52648999bb00_2000x1000.jpeg 1272w, /__u/substackcdn.com/image/fetch/$s_!KYZT!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0f63c9a-2296-4c96-a2f9-52648999bb00_2000x1000.jpeg 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!KYZT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0f63c9a-2296-4c96-a2f9-52648999bb00_2000x1000.jpeg" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e0f63c9a-2296-4c96-a2f9-52648999bb00_2000x1000.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:241528,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://kylewarrentest.substack.com/i/114198534?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0f63c9a-2296-4c96-a2f9-52648999bb00_2000x1000.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!KYZT!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0f63c9a-2296-4c96-a2f9-52648999bb00_2000x1000.jpeg 424w, /__u/substackcdn.com/image/fetch/$s_!KYZT!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0f63c9a-2296-4c96-a2f9-52648999bb00_2000x1000.jpeg 848w, /__u/substackcdn.com/image/fetch/$s_!KYZT!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0f63c9a-2296-4c96-a2f9-52648999bb00_2000x1000.jpeg 1272w, /__u/substackcdn.com/image/fetch/$s_!KYZT!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0f63c9a-2296-4c96-a2f9-52648999bb00_2000x1000.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ol start="3"><li><p><strong>That&#8217;s it!</strong> Jump into my thread to say hi, and if you have any issues, check out <a href="/__u/support.substack.com/hc/en-us/sections/360007461791-Frequently-Asked-Questions">Substack&#8217;s FAQ</a>.</p></li></ol><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[The Making of Polymatic — Part 2: The Polymatic Backend ]]></title><description><![CDATA[Part 2 of the PolyMatic build log series]]></description><link>https://dasmachinelabs.substack.com/p/the-making-of-polymatic-part-2-the</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/the-making-of-polymatic-part-2-the</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Sat, 14 Mar 2026 02:33:11 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!iof5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7559ade2-33d0-45a7-814b-c6cf05207aaf_2894x2834.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!iof5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7559ade2-33d0-45a7-814b-c6cf05207aaf_2894x2834.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!iof5!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7559ade2-33d0-45a7-814b-c6cf05207aaf_2894x2834.png 424w, /__u/substackcdn.com/image/fetch/$s_!iof5!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7559ade2-33d0-45a7-814b-c6cf05207aaf_2894x2834.png 848w, /__u/substackcdn.com/image/fetch/$s_!iof5!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7559ade2-33d0-45a7-814b-c6cf05207aaf_2894x2834.png 1272w, /__u/substackcdn.com/image/fetch/$s_!iof5!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7559ade2-33d0-45a7-814b-c6cf05207aaf_2894x2834.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!iof5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7559ade2-33d0-45a7-814b-c6cf05207aaf_2894x2834.png" width="1456" height="1426" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7559ade2-33d0-45a7-814b-c6cf05207aaf_2894x2834.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1426,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1910705,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/190902077?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7559ade2-33d0-45a7-814b-c6cf05207aaf_2894x2834.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!iof5!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7559ade2-33d0-45a7-814b-c6cf05207aaf_2894x2834.png 424w, /__u/substackcdn.com/image/fetch/$s_!iof5!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7559ade2-33d0-45a7-814b-c6cf05207aaf_2894x2834.png 848w, /__u/substackcdn.com/image/fetch/$s_!iof5!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7559ade2-33d0-45a7-814b-c6cf05207aaf_2894x2834.png 1272w, /__u/substackcdn.com/image/fetch/$s_!iof5!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7559ade2-33d0-45a7-814b-c6cf05207aaf_2894x2834.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"></figcaption></figure></div><div><hr></div><p></p><p>Picture the same analyst from <a href="/__u/open.substack.com/pub/dasmachinelabs/p/the-making-of-polymatic?utm_campaign=post-expanded-share&amp;utm_medium=web">Part 1</a>.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>Picture the same analyst from Part 1.</p><p>It&#8217;s 03:41 Zulu. The ships are going dark. The AIS transponders are switching off one by one.</p><p>The React frontend renders beautifully. The mock data engine hums. The severity bars pulse in precisely the right shades of amber and red. The TypeScript compiles clean &#8212; zero errors, eleven domain type files, everything locked and documented.</p><p>And none of it matters yet. Because the data is fake.</p><p>Part 1 was about building the machine. Part 2 is about giving it a heartbeat.</p><p>This is the build log for the PolyMatic backend &#8212; a FastAPI application that will replace every mock generator in the frontend with live data, real WebSocket streams, and an actual database that remembers what happened at 03:41 Zulu so we can learn from it later.</p><div><hr></div><h2>Why FastAPI</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!2Oae!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8553e6-0795-4720-9f8c-f815276b3c94_1790x2746.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!2Oae!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8553e6-0795-4720-9f8c-f815276b3c94_1790x2746.png 424w, /__u/substackcdn.com/image/fetch/$s_!2Oae!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8553e6-0795-4720-9f8c-f815276b3c94_1790x2746.png 848w, /__u/substackcdn.com/image/fetch/$s_!2Oae!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8553e6-0795-4720-9f8c-f815276b3c94_1790x2746.png 1272w, /__u/substackcdn.com/image/fetch/$s_!2Oae!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8553e6-0795-4720-9f8c-f815276b3c94_1790x2746.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!2Oae!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8553e6-0795-4720-9f8c-f815276b3c94_1790x2746.png" width="1456" height="2234" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1c8553e6-0795-4720-9f8c-f815276b3c94_1790x2746.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2234,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:741175,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/190902077?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8553e6-0795-4720-9f8c-f815276b3c94_1790x2746.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!2Oae!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8553e6-0795-4720-9f8c-f815276b3c94_1790x2746.png 424w, /__u/substackcdn.com/image/fetch/$s_!2Oae!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8553e6-0795-4720-9f8c-f815276b3c94_1790x2746.png 848w, /__u/substackcdn.com/image/fetch/$s_!2Oae!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8553e6-0795-4720-9f8c-f815276b3c94_1790x2746.png 1272w, /__u/substackcdn.com/image/fetch/$s_!2Oae!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c8553e6-0795-4720-9f8c-f815276b3c94_1790x2746.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h2>The Architecture Before a Single Line</h2><p>I made a mistake in the original frontend build: I started coding before locking the architecture, hit structural problems at Epic 3, and reset. I documented that in Part 1. I&#8217;m not making the same mistake twice.</p><p>Before writing any backend code, I mapped the full data flow:</p><pre><code><code>External sources (Twitter/X, LiveUAMap, Bellingcat, Polymarket, Kalshi)
      &#8595;
APScheduler jobs (async, in-process, per-source intervals)
      &#8595;
SQLAlchemy async ORM (PostgreSQL via asyncpg)
      &#8595;
Processing pipeline (classification, scoring, divergence detection)
      &#8595;
FastAPI WebSocket layer (ConnectionManager &#8594; active clients)
      &#8595;
React frontend (DataProvider &#8594; TanStack Query &#8594; UI components)</code></code></pre><p>Every arrow in that diagram is a contract. The frontend already has its side of the last arrow locked &#8212; the <code>DataProvider</code> interface from Part 1. The backend&#8217;s job is to fulfill that contract exactly, serving the same shape of data the mock engine was serving, but live.</p><p>This constraint is actually liberating. I&#8217;m not designing an API. I&#8217;m implementing one that&#8217;s already specified.</p><p>One architectural decision that flows from the diagram: everything runs in a single <code>uvicorn</code> process. The scheduler jobs, the WebSocket connections, the HTTP routes &#8212; one event loop, one process. This is operationally simpler than a distributed worker fleet, and it&#8217;s appropriate for the current scale. The abstraction boundaries are written so that migrating the ingestion jobs to a separate worker process (with Redis pub/sub for broadcasting) is a configuration change, not a rewrite.</p><div><hr></div><h2>Project Structure</h2><pre><code><code>polymatic-backend/
&#9500;&#9472;&#9472; app/
&#9474;   &#9500;&#9472;&#9472; main.py              &#8592; FastAPI app factory, lifespan, router registration
&#9474;   &#9500;&#9472;&#9472; config.py            &#8592; Pydantic Settings (env-driven)
&#9474;   &#9500;&#9472;&#9472; database.py          &#8592; SQLAlchemy async engine + session factory
&#9474;   &#9500;&#9472;&#9472; dependencies.py      &#8592; FastAPI Depends() injection targets
&#9474;   &#9474;
&#9474;   &#9500;&#9472;&#9472; domains/
&#9474;   &#9474;   &#9500;&#9472;&#9472; feeds/
&#9474;   &#9474;   &#9474;   &#9500;&#9472;&#9472; models.py    &#8592; SQLAlchemy ORM models
&#9474;   &#9474;   &#9474;   &#9500;&#9472;&#9472; schemas.py   &#8592; Pydantic request/response schemas
&#9474;   &#9474;   &#9474;   &#9500;&#9472;&#9472; router.py    &#8592; FastAPI APIRouter
&#9474;   &#9474;   &#9474;   &#9492;&#9472;&#9472; service.py   &#8592; Business logic, DB queries
&#9474;   &#9474;   &#9500;&#9472;&#9472; events/
&#9474;   &#9474;   &#9500;&#9472;&#9472; sentiments/
&#9474;   &#9474;   &#9500;&#9472;&#9472; markets/
&#9474;   &#9474;   &#9492;&#9472;&#9472; analysts/
&#9474;   &#9474;
&#9474;   &#9500;&#9472;&#9472; realtime/
&#9474;   &#9474;   &#9500;&#9472;&#9472; manager.py       &#8592; WebSocket ConnectionManager
&#9474;   &#9474;   &#9492;&#9472;&#9472; router.py        &#8592; WebSocket route handlers
&#9474;   &#9474;
&#9474;   &#9492;&#9472;&#9472; workers/
&#9474;       &#9500;&#9472;&#9472; scheduler.py     &#8592; APScheduler setup and job registration
&#9474;       &#9500;&#9472;&#9472; ingestion/       &#8592; Per-source ingestion coroutines
&#9474;       &#9500;&#9472;&#9472; classification/  &#8592; LLM classification pipeline
&#9474;       &#9492;&#9472;&#9472; scoring/         &#8592; Aggregate scoring and divergence detection
&#9474;
&#9500;&#9472;&#9472; alembic/
&#9474;   &#9500;&#9472;&#9472; env.py
&#9474;   &#9492;&#9472;&#9472; versions/            &#8592; Migration files
&#9474;
&#9500;&#9472;&#9472; alembic.ini
&#9500;&#9472;&#9472; requirements/
&#9474;   &#9500;&#9472;&#9472; base.txt
&#9474;   &#9500;&#9472;&#9472; development.txt
&#9474;   &#9492;&#9472;&#9472; production.txt
&#9492;&#9472;&#9472; pyproject.toml</code></code></pre><p>The same domain-first organization as I would use in any framework. <code>feeds/</code> contains the ORM model, the Pydantic schema, the router, and the service layer &#8212; everything for the feeds domain in one directory. Navigating by feature rather than by technical layer is the right call at this complexity level and it stays right as the project grows.</p><p>The <code>service.py</code> layer deserves a specific note: all database interaction lives there, not in the router. Routers declare routes and inject dependencies. Services execute queries and return domain objects. This separation makes the service layer independently testable &#8212; you can unit test <code>FeedService.get_recent_items()</code> without spinning up an HTTP server.</p><div><hr></div><h2>Configuration with Pydantic Settings</h2><p>FastAPI&#8217;s natural configuration pattern is Pydantic&#8217;s <code>BaseSettings</code>, which reads from environment variables and <code>.env</code> files with full type validation. No settings module hierarchy, no <code>if DEBUG:</code> conditionals scattered through the code.</p><p>python</p><pre><code><code># app/config.py

from pydantic_settings import BaseSettings, SettingsConfigDict
from functools import lru_cache


class Settings(BaseSettings):
    model_config = SettingsConfigDict(
        env_file='.env',
        env_file_encoding='utf-8',
        case_sensitive=False,
    )

    # App
    app_env:    str   = 'development'
    debug:      bool  = False
    secret_key: str   # required &#8212; no default, must be in env

    # Database
    postgres_dsn: str = 'postgresql+asyncpg://postgres:postgres@localhost/polymatic_dev'

    # Redis (for future pub/sub migration)
    redis_url: str = 'redis://localhost:6379'

    # CORS
    cors_origins: list[str] = ['http://localhost:5173']  # Vite dev server

    # LLM
    anthropic_api_key: str = ''  # empty in dev, required in prod

    # Ingestion intervals (seconds)
    ingest_interval_liveuamap:  int = 60
    ingest_interval_bellingcat: int = 300
    ingest_interval_polymarket: int = 120
    ingest_interval_kalshi:     int = 120
    scoring_interval:           int = 90


@lru_cache
def get_settings() -&gt; Settings:
    return Settings()</code></code></pre><p>The <code>@lru_cache</code> on <code>get_settings</code> is intentional. <code>Settings()</code> reads from disk on every call &#8212; caching it means the <code>.env</code> file is read once at startup and the same <code>Settings</code> instance is returned everywhere, including in <code>Depends(get_settings)</code> injections inside route handlers.</p><p>Ingestion intervals live in settings rather than being hardcoded in the scheduler. This means changing a polling interval in production is a config change with a process restart &#8212; no code deployment.</p><div><hr></div><h2>The Database Layer</h2><p>SQLAlchemy 2.0 with the async extension provides the ORM ergonomics we need without blocking the event loop on every query.</p><p>python</p><pre><code><code># app/database.py

from sqlalchemy.ext.asyncio import (
    AsyncSession,
    async_sessionmaker,
    create_async_engine,
)
from sqlalchemy.orm import DeclarativeBase
from app.config import get_settings


class Base(DeclarativeBase):
    pass


def create_engine():
    settings = get_settings()
    return create_async_engine(
        settings.postgres_dsn,
        pool_size=10,
        max_overflow=20,
        echo=settings.debug,   # logs SQL in development
        future=True,
    )


engine = create_engine()

AsyncSessionLocal = async_sessionmaker(
    bind=engine,
    class_=AsyncSession,
    expire_on_commit=False,  # critical for async &#8212; prevents lazy-load after commit
)</code></code></pre><p><code>expire_on_commit=False</code> deserves a callout. SQLAlchemy&#8217;s default behavior expires all attributes on a model instance after a session commit, which triggers a SELECT on next access. In a synchronous context this is invisible. In an async context it raises <code>MissingGreenlet</code> &#8212; the async session can&#8217;t lazily load attributes outside an active context. Disabling expiry means committed objects retain their values for the lifetime of the response, which is the correct behavior for an API that serializes objects immediately after writing them.</p><p>The <code>echo=settings.debug</code> line gives us SQL logging in development at zero configuration cost. Every query is printed to stdout. Every time a new endpoint or service method is added, the query count is immediately visible.</p><div><hr></div><h2>The Data Models</h2><p>SQLAlchemy 2.0 uses Python dataclass-style annotations for model definitions. The schema maps directly to what the Django version would have expressed, but with explicit <code>Mapped[]</code> type annotations instead of field classes.</p><h3><code>app/domains/feeds/models.py</code></h3><p>python</p><pre><code><code>from datetime import datetime
from typing import Any
from sqlalchemy import (
    String, Text, Float, Boolean, DateTime,
    ForeignKey, UniqueConstraint, Index, func,
)
from sqlalchemy.dialects.postgresql import JSONB
from sqlalchemy.orm import Mapped, mapped_column, relationship
from app.database import Base


class FeedSource(Base):
    __tablename__ = 'feed_sources'

    id:           Mapped[int]   = mapped_column(primary_key=True)
    name:         Mapped[str]   = mapped_column(String(100), unique=True)
    source_type:  Mapped[str]   = mapped_column(String(20))
    # 'osint' | 'social' | 'market' | 'satellite'
    base_url:     Mapped[str]   = mapped_column(Text)
    is_active:    Mapped[bool]  = mapped_column(Boolean, default=True)
    credibility:  Mapped[float] = mapped_column(Float, default=1.0)
    config:       Mapped[dict]  = mapped_column(JSONB, default=dict)

    items: Mapped[list['FeedItem']] = relationship(back_populates='source')


class FeedItem(Base):
    __tablename__ = 'feed_items'

    __table_args__ = (
        UniqueConstraint('external_id', name='uq_feed_items_external_id'),
        Index('ix_feed_items_occurred_at',       'occurred_at'),
        Index('ix_feed_items_severity_occurred', 'severity', 'occurred_at'),
        Index('ix_feed_items_source_occurred',   'source_id', 'occurred_at'),
    )

    id:             Mapped[int]            = mapped_column(primary_key=True)
    source_id:      Mapped[int]            = mapped_column(ForeignKey('feed_sources.id'))
    external_id:    Mapped[str]            = mapped_column(String(255))
    title:          Mapped[str]            = mapped_column(Text)
    body:           Mapped[str]            = mapped_column(Text, default='')
    severity:       Mapped[str]            = mapped_column(String(20), default='medium')
    # 'critical' | 'high' | 'medium' | 'low'
    occurred_at:    Mapped[datetime]       = mapped_column(DateTime(timezone=True))
    ingested_at:    Mapped[datetime]       = mapped_column(
                                                DateTime(timezone=True),
                                                server_default=func.now()
                                            )
    location_point: Mapped[dict | None]   = mapped_column(JSONB, nullable=True)
    location_label: Mapped[str]           = mapped_column(String(255), default='')
    tags:           Mapped[list]          = mapped_column(JSONB, default=list)
    raw_payload:    Mapped[dict[str, Any]] = mapped_column(JSONB, default=dict)

    source: Mapped['FeedSource'] = relationship(back_populates='items')</code></code></pre><p><code>JSONB</code> over <code>JSON</code> for every document column. PostgreSQL&#8217;s <code>JSONB</code> is stored binary, indexed, and supports GIN index lookups. <code>raw_payload</code> in particular will grow large &#8212; binary storage and compression matter.</p><p>The <code>raw_payload</code> column stores the original API response verbatim, for the same reason as in any data platform: when a classification result looks wrong six months from now, you need to be able to re-run the pipeline against the original data. Without it, that data is gone.</p><h3><code>app/domains/events/models.py</code></h3><p>python</p><pre><code><code>from sqlalchemy import Table, Column, ForeignKey
from app.database import Base

# Association table for the many-to-many between events and feed items
event_feed_items = Table(
    'event_feed_items', Base.metadata,
    Column('event_id',     ForeignKey('geopolitical_events.id'), primary_key=True),
    Column('feed_item_id', ForeignKey('feed_items.id'),          primary_key=True),
)


class GeopoliticalEvent(Base):
    __tablename__ = 'geopolitical_events'

    id:          Mapped[int]           = mapped_column(primary_key=True)
    title:       Mapped[str]           = mapped_column(String(500))
    description: Mapped[str]           = mapped_column(Text)
    region:      Mapped[str]           = mapped_column(String(100))
    started_at:  Mapped[datetime]      = mapped_column(DateTime(timezone=True))
    resolved_at: Mapped[datetime|None] = mapped_column(DateTime(timezone=True), nullable=True)
    is_active:   Mapped[bool]          = mapped_column(Boolean, default=True)

    questions:  Mapped[list['SentimentQuestion']] = relationship(back_populates='event')
    feed_items: Mapped[list['FeedItem']]           = relationship(secondary=event_feed_items)


class SentimentQuestion(Base):
    __tablename__ = 'sentiment_questions'

    id:                   Mapped[int]        = mapped_column(primary_key=True)
    event_id:             Mapped[int]        = mapped_column(ForeignKey('geopolitical_events.id'))
    text:                 Mapped[str]        = mapped_column(Text)
    resolution_criteria:  Mapped[str]        = mapped_column(Text)
    resolves_at:          Mapped[datetime]   = mapped_column(DateTime(timezone=True))
    resolved:             Mapped[bool]       = mapped_column(Boolean, default=False)
    outcome:              Mapped[bool|None]  = mapped_column(Boolean, nullable=True)
    # True = YES outcome, False = NO outcome, None = unresolved

    event:           Mapped['GeopoliticalEvent']       = relationship(back_populates='questions')
    classifications: Mapped[list['TweetClassification']] = relationship(back_populates='question')
    aggregates:      Mapped[list['SentimentAggregate']]  = relationship(back_populates='question')</code></code></pre><h3><code>app/domains/sentiments/models.py</code></h3><p>python</p><pre><code><code>import uuid


class TweetClassification(Base):
    __tablename__ = 'tweet_classifications'

    __table_args__ = (
        Index('ix_tweet_class_question_classified', 'question_id', 'classified_at'),
        Index('ix_tweet_class_batch_id',            'batch_id'),
    )

    id:                Mapped[int]       = mapped_column(primary_key=True)
    question_id:       Mapped[int]       = mapped_column(ForeignKey('sentiment_questions.id'))
    tweet_external_id: Mapped[str]       = mapped_column(String(255))
    author_handle:     Mapped[str]       = mapped_column(String(255))
    tweet_text:        Mapped[str]       = mapped_column(Text)
    stance:            Mapped[str]       = mapped_column(String(20))
    # 'yes' | 'no' | 'neutral' | 'unclear'
    confidence:        Mapped[float]     = mapped_column(Float)   # calibrated
    raw_confidence:    Mapped[float]     = mapped_column(Float)   # LLM-reported
    reasoning:         Mapped[str]       = mapped_column(Text)    # audit trail
    weight:            Mapped[float]     = mapped_column(Float)
    is_contrarian:     Mapped[bool]      = mapped_column(Boolean, default=False)
    linguistic_flags:  Mapped[list]      = mapped_column(JSONB, default=list)
    classified_at:     Mapped[datetime]  = mapped_column(
                                              DateTime(timezone=True),
                                              server_default=func.now()
                                          )
    batch_id:          Mapped[uuid.UUID] = mapped_column()

    question: Mapped['SentimentQuestion'] = relationship(back_populates='classifications')


class SentimentAggregate(Base):
    __tablename__ = 'sentiment_aggregates'

    __table_args__ = (
        UniqueConstraint('question_id', 'window', name='uq_sentiment_agg_question_window'),
    )

    id:           Mapped[int]          = mapped_column(primary_key=True)
    question_id:  Mapped[int]          = mapped_column(ForeignKey('sentiment_questions.id'))
    window:       Mapped[str]          = mapped_column(String(20))
    # 'live' | 'trend' | 'baseline'
    score:        Mapped[float]        = mapped_column(Float)
    sample_size:  Mapped[int]          = mapped_column()
    computed_at:  Mapped[datetime]     = mapped_column(
                                            DateTime(timezone=True),
                                            server_default=func.now()
                                        )
    market_price: Mapped[float | None] = mapped_column(Float, nullable=True)
    divergence:   Mapped[float | None] = mapped_column(Float, nullable=True)

    question: Mapped['SentimentQuestion'] = relationship(back_populates='aggregates')</code></code></pre><p>The <code>UniqueConstraint</code> on <code>SentimentAggregate</code> enforces the same design decision as before: one current aggregate per question per window, updated in place. The classification records are the historical log. Querying the current crowd score for a question is a single primary key lookup, not an aggregation over a growing time series.</p><div><hr></div><h2>The Pydantic Schemas</h2><p>Schemas are the contract layer between the database and the API client. They&#8217;re also where we decide exactly what the frontend&#8217;s <code>DataProvider</code> receives &#8212; and explicitly what it doesn&#8217;t.</p><p>python</p><pre><code><code># app/domains/feeds/schemas.py

from datetime import datetime
from pydantic import BaseModel, computed_field


class FeedSourceSchema(BaseModel):
    id:          int
    name:        str
    source_type: str
    credibility: float

    model_config = {'from_attributes': True}


class FeedItemSchema(BaseModel):
    id:             int
    source:         FeedSourceSchema
    title:          str
    severity:       str
    occurred_at:    datetime
    location_point: dict | None
    location_label: str
    tags:           list[str]
    # raw_payload is intentionally absent &#8212; never sent to the client

    @computed_field
    @property
    def time_ago(self) -&gt; str:
        from datetime import timezone
        delta = datetime.now(timezone.utc) - self.occurred_at
        minutes = int(delta.total_seconds() / 60)
        if minutes &lt; 60:
            return f"{minutes}m ago"
        hours = minutes // 60
        if hours &lt; 24:
            return f"{hours}h ago"
        return f"{hours // 24}d ago"

    model_config = {'from_attributes': True}


class SentimentAggregateSchema(BaseModel):
    question_id:  int
    window:       str
    score:        float
    sample_size:  int
    computed_at:  datetime
    market_price: float | None
    divergence:   float | None

    model_config = {'from_attributes': True}</code></code></pre><p><code>model_config = {'from_attributes': True}</code> (previously <code>orm_mode = True</code> in Pydantic v1) tells Pydantic it can construct schema instances from ORM model attributes rather than only from dicts. This is what allows <code>FeedItemSchema.model_validate(feed_item_orm_object)</code> to work without manual translation.</p><p><code>raw_payload</code> is absent from <code>FeedItemSchema</code> by design. It&#8217;s stored for audit purposes; the client should never see it.</p><div><hr></div><h2>The Application Factory</h2><p>python</p><pre><code><code># app/main.py

from contextlib import asynccontextmanager
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware

from app.config import get_settings
from app.database import engine, Base
from app.workers.scheduler import start_scheduler, stop_scheduler
from app.domains.feeds.router import router as feeds_router
from app.domains.events.router import router as events_router
from app.domains.sentiments.router import router as sentiments_router
from app.domains.markets.router import router as markets_router
from app.realtime.router import router as ws_router


@asynccontextmanager
async def lifespan(app: FastAPI):
    # &#9472;&#9472; STARTUP &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;
    settings = get_settings()

    # Create tables (development only &#8212; production uses Alembic)
    if settings.app_env == 'development':
        async with engine.begin() as conn:
            await conn.run_sync(Base.metadata.create_all)

    await start_scheduler()

    yield  # application runs here

    # &#9472;&#9472; SHUTDOWN &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;
    await stop_scheduler()
    await engine.dispose()


def create_app() -&gt; FastAPI:
    settings = get_settings()

    app = FastAPI(
        title='Polymatic API',
        version='0.1.0',
        docs_url='/docs' if settings.debug else None,
        redoc_url=None,
        lifespan=lifespan,
    )

    app.add_middleware(
        CORSMiddleware,
        allow_origins=settings.cors_origins,
        allow_credentials=True,
        allow_methods=['*'],
        allow_headers=['*'],
    )

    app.include_router(feeds_router,      prefix='/api/v1/feeds',      tags=['feeds'])
    app.include_router(events_router,     prefix='/api/v1/events',     tags=['events'])
    app.include_router(sentiments_router, prefix='/api/v1/sentiments', tags=['sentiments'])
    app.include_router(markets_router,    prefix='/api/v1/markets',    tags=['markets'])
    app.include_router(ws_router,         prefix='/ws',                tags=['realtime'])

    return app


app = create_app()</code></code></pre><p>The <code>lifespan</code> context manager replaces the old <code>@app.on_event('startup')</code> / <code>@app.on_event('shutdown')</code> pattern, which is deprecated in recent FastAPI versions. Everything that needs to run before the first request &#8212; creating tables in development, starting the scheduler &#8212; goes in the startup block. Everything that needs to flush before the process exits goes after the <code>yield</code>.</p><p><code>docs_url=None</code> in production hides the OpenAPI UI from public endpoints. In development, <code>/docs</code> gives an interactive browser for every route &#8212; the equivalent of DRF&#8217;s browsable API, but with full request/response schema documentation auto-generated from the Pydantic models.</p><div><hr></div><h2>The Dependency Injection Layer</h2><p>FastAPI&#8217;s <code>Depends()</code> system is where database sessions are scoped to requests and settings are injected into route handlers.</p><p>python</p><pre><code><code># app/dependencies.py

from typing import AsyncGenerator
from fastapi import Depends
from sqlalchemy.ext.asyncio import AsyncSession
from app.database import AsyncSessionLocal
from app.config import Settings, get_settings


async def get_db() -&gt; AsyncGenerator[AsyncSession, None]:
    async with AsyncSessionLocal() as session:
        try:
            yield session
            await session.commit()
        except Exception:
            await session.rollback()
            raise
        finally:
            await session.close()</code></code></pre><p>This single dependency function scopes a database session to the lifetime of a single HTTP request. The session is committed on success and rolled back on exception. Injected with <code>db: AsyncSession = Depends(get_db)</code> into any route handler that needs database access &#8212; which is the entire service layer.</p><p>The <code>finally: await session.close()</code> is non-negotiable. Async sessions hold a connection from the pool. If the session isn&#8217;t explicitly closed, the connection leaks back to the pool in an indeterminate state. In high-concurrency scenarios this exhausts the pool fast.</p><div><hr></div><h2>The API Layer</h2><p>The router-service split keeps routes thin and logic testable.</p><p>python</p><pre><code><code># app/domains/feeds/router.py

from datetime import datetime, timedelta, timezone
from fastapi import APIRouter, Depends, Query
from sqlalchemy.ext.asyncio import AsyncSession

from app.dependencies import get_db
from app.domains.feeds.schemas import FeedItemSchema
from app.domains.feeds.service import FeedService

router = APIRouter()


@router.get('/', response_model=list[FeedItemSchema])
async def list_feed_items(
    severity:    str | None = Query(None, description="Filter by severity level"),
    source_type: str | None = Query(None, description="Filter by source type"),
    hours:       int        = Query(24, ge=1, le=168, description="Lookback window in hours"),
    limit:       int        = Query(50, ge=1, le=200),
    cursor:      datetime | None = Query(None, description="Cursor for pagination"),
    db:          AsyncSession = Depends(get_db),
) -&gt; list[FeedItemSchema]:
    service = FeedService(db)
    return await service.get_feed_items(
        severity=severity,
        source_type=source_type,
        cutoff=datetime.now(timezone.utc) - timedelta(hours=hours),
        limit=limit,
        cursor=cursor,
    )</code></code></pre><p>python</p><pre><code><code># app/domains/feeds/service.py

from datetime import datetime
from sqlalchemy import select, and_
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy.orm import selectinload

from app.domains.feeds.models import FeedItem, FeedSource
from app.domains.feeds.schemas import FeedItemSchema


class FeedService:
    def __init__(self, db: AsyncSession):
        self.db = db

    async def get_feed_items(
        self,
        severity:    str | None,
        source_type: str | None,
        cutoff:      datetime,
        limit:       int,
        cursor:      datetime | None,
    ) -&gt; list[FeedItemSchema]:

        stmt = (
            select(FeedItem)
            .options(selectinload(FeedItem.source))  # eager-load source &#8212; prevents N+1
            .where(FeedItem.occurred_at &gt;= cutoff)
            .order_by(FeedItem.occurred_at.desc())
            .limit(limit)
        )

        if severity:
            stmt = stmt.where(FeedItem.severity == severity)

        if source_type:
            stmt = stmt.join(FeedSource).where(FeedSource.source_type == source_type)

        if cursor:
            stmt = stmt.where(FeedItem.occurred_at &lt; cursor)  # keyset pagination

        result = await self.db.execute(stmt)
        items  = result.scalars().all()
        return [FeedItemSchema.model_validate(item) for item in items]

    async def get_item_by_external_id(self, external_id: str) -&gt; FeedItem | None:
        result = await self.db.execute(
            select(FeedItem).where(FeedItem.external_id == external_id)
        )
        return result.scalar_one_or_none()

    async def create_item(self, item: FeedItem) -&gt; FeedItem:
        self.db.add(item)
        await self.db.flush()   # flush to get the generated ID without committing
        return item</code></code></pre><p><code>selectinload(FeedItem.source)</code> in the query is the async-safe equivalent of Django&#8217;s <code>select_related</code>. SQLAlchemy emits a single <code>SELECT ... WHERE id IN (...)</code> for all the related sources rather than one query per item. Without it, serializing 50 feed items triggers 51 database queries &#8212; one for the list, fifty for the sources. Invisible in development with 20 rows, catastrophic in production with 500,000.</p><p>The cursor-based pagination deserves a note. Offset pagination (<code>LIMIT 50 OFFSET 100</code>) degrades as the table grows &#8212; the database has to scan and discard the first 100 rows on every page. Keyset pagination (<code>WHERE occurred_at &lt; $cursor</code>) is constant-time regardless of table size, because the query planner can use the index on <code>occurred_at</code> directly.</p><div><hr></div><h2>The WebSocket Layer</h2><p>Three WebSocket endpoints map to the three real-time surfaces in the frontend: the main feed, the sentiments panel for a specific question, and the trend carousel.</p><p>python</p><pre><code><code># app/realtime/manager.py

import json
from fastapi import WebSocket
from collections import defaultdict


class ConnectionManager:
    def __init__(self):
        # feed connections: all clients watching the live feed
        self.feed_connections: set[WebSocket] = set()
        # sentiments connections: keyed by question_id
        self.sentiments_connections: defaultdict[int, set[WebSocket]] = defaultdict(set)

    async def connect_feed(self, ws: WebSocket):
        await ws.accept()
        self.feed_connections.add(ws)

    async def connect_sentiments(self, ws: WebSocket, question_id: int):
        await ws.accept()
        self.sentiments_connections[question_id].add(ws)

    def disconnect_feed(self, ws: WebSocket):
        self.feed_connections.discard(ws)

    def disconnect_sentiments(self, ws: WebSocket, question_id: int):
        self.sentiments_connections[question_id].discard(ws)

    async def broadcast_feed_item(self, item: dict):
        payload = json.dumps({'type': 'feed.item.new', 'item': item})
        dead: set[WebSocket] = set()
        for ws in self.feed_connections:
            try:
                await ws.send_text(payload)
            except Exception:
                dead.add(ws)
        self.feed_connections -= dead

    async def broadcast_sentiment_update(self, question_id: int, aggregate: dict):
        payload = json.dumps({'type': 'sentiments.update', 'aggregate': aggregate})
        connections = self.sentiments_connections[question_id]
        dead: set[WebSocket] = set()
        for ws in connections:
            try:
                await ws.send_text(payload)
            except Exception:
                dead.add(ws)
        connections -= dead


manager = ConnectionManager()</code></code></pre><p>The dead-connection sweep in <code>broadcast_feed_item</code> and <code>broadcast_sentiment_update</code> handles the common case where a client disconnects without sending a close frame &#8212; a network drop, a browser tab crash, a mobile client going to sleep. Without the sweep, closed sockets accumulate in the set and every broadcast attempt raises an exception. The <code>discard()</code> call removes them gracefully without raising <code>KeyError</code>.</p><p>python</p><pre><code><code># app/realtime/router.py

from fastapi import APIRouter, WebSocket, WebSocketDisconnect, Depends
from sqlalchemy.ext.asyncio import AsyncSession

from app.dependencies import get_db
from app.realtime.manager import manager
from app.domains.feeds.service import FeedService
from app.domains.feeds.schemas import FeedItemSchema
from app.domains.sentiments.service import SentimentsService

router = APIRouter()


@router.websocket('/feed')
async def feed_websocket(ws: WebSocket, db: AsyncSession = Depends(get_db)):
    await manager.connect_feed(ws)
    try:
        # Send snapshot on connect &#8212; client sees data immediately
        service = FeedService(db)
        recent  = await service.get_feed_items(
            severity=None, source_type=None,
            cutoff=None,   limit=50, cursor=None,
        )
        snapshot_payload = {
            'type':  'feed.snapshot',
            'items': [item.model_dump() for item in recent],
        }
        await ws.send_json(snapshot_payload)

        # Keep connection open &#8212; server pushes; client doesn't send
        while True:
            await ws.receive_text()  # blocks until disconnect

    except WebSocketDisconnect:
        manager.disconnect_feed(ws)


@router.websocket('/sentiments/{question_id}')
async def sentiments_websocket(
    ws:          WebSocket,
    question_id: int,
    db:          AsyncSession = Depends(get_db),
):
    await manager.connect_sentiments(ws, question_id)
    try:
        # Send current aggregate on connect
        service   = SentimentsService(db)
        aggregate = await service.get_current_aggregate(question_id)
        if aggregate:
            await ws.send_json({
                'type':      'sentiments.snapshot',
                'aggregate': aggregate.model_dump(),
            })

        while True:
            await ws.receive_text()

    except WebSocketDisconnect:
        manager.disconnect_sentiments(ws, question_id)</code></code></pre><p>The <code>while True: await ws.receive_text()</code> pattern deserves an explanation. The WebSocket route handler needs to stay alive to keep the connection open &#8212; if the coroutine returns, FastAPI closes the socket. <code>receive_text()</code> is a blocking await that only resolves when the client sends a message or disconnects. Since the feed is server-push only, the client never sends anything meaningful, but the loop still serves as the keep-alive mechanism.</p><div><hr></div><h2>The Ingestion Workers</h2><p>APScheduler&#8217;s <code>AsyncIOScheduler</code> runs ingestion jobs as coroutines inside the application&#8217;s event loop &#8212; no separate process, no message broker, no thread pool.</p><p>python</p><pre><code><code># app/workers/scheduler.py

from apscheduler.schedulers.asyncio import AsyncIOScheduler
from apscheduler.triggers.interval import IntervalTrigger
from app.config import get_settings

scheduler = AsyncIOScheduler()


async def start_scheduler():
    settings = get_settings()

    from app.workers.ingestion.liveuamap  import ingest_liveuamap
    from app.workers.ingestion.bellingcat import ingest_bellingcat
    from app.workers.ingestion.polymarket import ingest_polymarket
    from app.workers.ingestion.kalshi     import ingest_kalshi
    from app.workers.scoring.sentiment    import run_sentiment_scoring

    scheduler.add_job(
        ingest_liveuamap,
        IntervalTrigger(seconds=settings.ingest_interval_liveuamap),
        id='ingest_liveuamap', replace_existing=True,
    )
    scheduler.add_job(
        ingest_bellingcat,
        IntervalTrigger(seconds=settings.ingest_interval_bellingcat),
        id='ingest_bellingcat', replace_existing=True,
    )
    scheduler.add_job(
        ingest_polymarket,
        IntervalTrigger(seconds=settings.ingest_interval_polymarket),
        id='ingest_polymarket', replace_existing=True,
    )
    scheduler.add_job(
        ingest_kalshi,
        IntervalTrigger(seconds=settings.ingest_interval_kalshi),
        id='ingest_kalshi', replace_existing=True,
    )
    scheduler.add_job(
        run_sentiment_scoring,
        IntervalTrigger(seconds=settings.scoring_interval),
        id='run_sentiment_scoring', replace_existing=True,
    )

    scheduler.start()


async def stop_scheduler():
    if scheduler.running:
        scheduler.shutdown(wait=False)</code></code></pre><p>python</p><pre><code><code># app/workers/ingestion/liveuamap.py

import logging
from sqlalchemy.exc import IntegrityError
from app.database import AsyncSessionLocal
from app.domains.feeds.models import FeedItem, FeedSource
from app.domains.feeds.schemas import FeedItemSchema
from app.realtime.manager import manager
from .adapters import LiveUAMapAdapter

log = logging.getLogger(__name__)


async def ingest_liveuamap():
    async with AsyncSessionLocal() as db:
        result = await db.execute(
            select(FeedSource).where(FeedSource.name == 'LiveUAMap')
        )
        source = result.scalar_one_or_none()
        if not source or not source.is_active:
            return

        adapter   = LiveUAMapAdapter(source.config)
        raw_items = await adapter.fetch_recent()

        new_items = []
        for raw in raw_items:
            item = FeedItem(
                source_id=source.id,
                external_id=raw['id'],
                title=raw['title'],
                occurred_at=raw['occurred_at'],
                severity=adapter.classify_severity(raw),
                location_point=raw.get('location'),
                location_label=raw.get('location_label', ''),
                tags=raw.get('tags', []),
                raw_payload=raw,
            )
            db.add(item)
            try:
                await db.flush()      # write to DB, get generated ID
                new_items.append(item)
            except IntegrityError:
                await db.rollback()   # duplicate external_id &#8212; skip silently
                continue

        await db.commit()

    # Broadcast outside the session &#8212; session is closed, items are committed
    for item in new_items:
        schema = FeedItemSchema.model_validate(item)
        await manager.broadcast_feed_item(schema.model_dump(mode='json'))

    log.info('LiveUAMap: ingested %d new items', len(new_items))</code></code></pre><p>The broadcast happens after the session commits and closes. This is the correct ordering &#8212; the client receiving a <code>feed.item.new</code> message might immediately issue an HTTP request to fetch the full item, and that request needs to find the item already committed in the database. Broadcasting before commit creates a race condition where the client asks for data that doesn&#8217;t exist yet.</p><p>The <code>flush()</code> / <code>rollback()</code> pattern for duplicate detection avoids the two-query &#8220;check then insert&#8221; pattern that has a TOCTOU race under concurrent workers. We attempt the insert optimistically, rely on the unique constraint to enforce deduplication, and catch the <code>IntegrityError</code> as the signal. One round trip to the database instead of two.</p><div><hr></div><h2>Migrations with Alembic</h2><p>FastAPI has no built-in migration system &#8212; Alembic fills that role. The setup is small:</p><p>python</p><pre><code><code># alembic/env.py  (key section)

from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine
from app.database import Base
from app.config import get_settings
# import all models so Alembic can see them in Base.metadata
import app.domains.feeds.models      # noqa: F401
import app.domains.events.models     # noqa: F401
import app.domains.sentiments.models # noqa: F401
import app.domains.markets.models    # noqa: F401
import app.domains.analysts.models   # noqa: F401

target_metadata = Base.metadata

def run_migrations_online():
    settings    = get_settings()
    connectable = create_async_engine(settings.postgres_dsn)

    async def run(engine: AsyncEngine):
        async with engine.begin() as conn:
            await conn.run_sync(do_run_migrations)

    import asyncio
    asyncio.run(run(connectable))</code></code></pre><p>The <code># noqa: F401</code> imports at the top of <code>env.py</code> are load-bearing. Alembic generates migrations by inspecting <code>Base.metadata</code>, which only knows about models that have been imported. A model file that&#8217;s never imported anywhere in the migration env is invisible to <code>alembic revision --autogenerate</code> &#8212; it won&#8217;t appear in the generated migration, and the corresponding table won&#8217;t be created. Missing that import is a silent data loss bug.</p><p>The workflow:</p><p>bash</p><pre><code><code># Create a new migration after changing a model
alembic revision --autogenerate -m "add_feed_sources_credibility_index"

# Apply pending migrations
alembic upgrade head

# Roll back one migration
alembic downgrade -1</code></code></pre><div><hr></div><h2>The Part I Got Wrong: Async Session Scope Leaks</h2><p>I want to be direct about a real mistake I made during development, because it cost me two days and the fix is non-obvious.</p><p>The first version of the ingestion workers used a module-level session &#8212; one <code>AsyncSession</code> created at startup and reused across all ingestion calls. This seemed reasonable: sessions are cheap to hold, and reusing one avoids repeated setup overhead.</p><p>It&#8217;s wrong in an async context, for a specific reason. SQLAlchemy async sessions are not thread-safe and are not meant to be shared across coroutines that interleave. When two ingestion jobs fire close together and both await database calls, they can interleave in the same event loop tick and corrupt the session&#8217;s internal state &#8212; dirty unit-of-work tracking, mismatched identity map entries, commits that affect the wrong rows.</p><p>The fix is what the code above shows: create a new session per ingestion run using <code>async with AsyncSessionLocal() as db:</code>, scoped to exactly the operation that needs it, and closed immediately after. Sessions are extremely cheap to create &#8212; the cost is negligible compared to the correctness guarantee.</p><p>The symptoms of the bug were subtle: intermittent <code>DetachedInstanceError</code> on serialization, occasional duplicate rows that the unique constraint should have caught, and sporadic <code>InvalidRequestError: Session is already flushing</code>. All of them disappeared when session scope was tightened.</p><div><hr></div><h2>Current State of the Backend Build</h2><p>By end of this epic:</p><ul><li><p>FastAPI app factory with lifespan and CORS: complete</p></li><li><p>Pydantic Settings with environment-driven config: complete</p></li><li><p>SQLAlchemy async engine and session factory: complete</p></li><li><p>All six domain model files defined: complete</p></li><li><p>Pydantic schemas for all domains: complete</p></li><li><p>Alembic configured and initial migration generated: complete</p></li><li><p><code>FeedService</code>, <code>SentimentsService</code> service layers: complete</p></li><li><p>REST API routers for feeds, events, sentiments, markets: complete</p></li><li><p><code>ConnectionManager</code> and WebSocket routes for feed and sentiments: complete</p></li><li><p>APScheduler wired into lifespan with five jobs registered: complete</p></li><li><p>Ingestion worker scaffold (LiveUAMap, Polymarket): complete (mock adapters)</p></li></ul><p>What&#8217;s not done yet: the real external API adapters. Every ingestion function runs against a mock adapter that returns data matching the live API shape. The interface contracts are locked &#8212; swapping in the real adapters is an implementation detail, not an architectural change.</p><p><strong>Running total:</strong></p><ul><li><p>1 FastAPI application</p></li><li><p>6 domain packages, each with model + schema + router + service</p></li><li><p>14 SQLAlchemy models across 6 domains</p></li><li><p>14 Pydantic response schemas</p></li><li><p>5 API routers (4 HTTP + 1 WebSocket)</p></li><li><p>1 <code>ConnectionManager</code> handling two subscription types</p></li><li><p>5 APScheduler jobs (2 real, 3 scaffold)</p></li><li><p>Alembic migration history initialized</p></li><li><p>PostgreSQL via <code>asyncpg</code>, no Redis required at this stage</p></li></ul><p>The frontend&#8217;s <code>DataProvider</code> toggle still reads <code>"mock"</code>. That changes in Part 3.</p><div><hr></div><h2>What&#8217;s Next: Part 3 &#8212; Connecting the Wire</h2><p>Part 3 is the most satisfying post I&#8217;ll write in this series, because it&#8217;s where two months of parallel development converge into a single working system.</p><p>The React frontend&#8217;s environment variable flips from <code>mock</code> to <code>rsdip</code>. The FastAPI backend goes live. The WebSocket connection opens. And for the first time, the analyst at 03:41 Zulu sees real ships &#8212; not simulated ones &#8212; going dark on the feed.</p><p>I&#8217;ll cover the real external API adapters for LiveUAMap and Polymarket, the Claude API integration for live batch sentiment classification, and the deployment stack: Docker Compose for development, Railway for initial production with a managed PostgreSQL instance.</p><div><hr></div><h2>The Bigger Picture</h2><p>I&#8217;ve had a few people ask why I&#8217;m building the backend in public rather than just shipping it. The answer is the same as it was for the frontend.</p><p>The value of a build log isn&#8217;t the finished code. It&#8217;s the decisions &#8212; and more importantly, the mistakes. The async session scope leak I just documented. The N+1 query trap hiding behind a missing <code>selectinload</code>. The dead WebSocket connection accumulation that turns a broadcast into an exception storm. These are the things nobody writes about because they&#8217;re embarrassing, and they&#8217;re precisely the things that cost teams weeks when they encounter them without warning.</p><p>This codebase will have more readers than contributors for a long time. The build log is for both groups.</p><div><hr></div><p><em>Building PolyMatic in public. Every decision, tradeoff, and mistake documented in real time.</em></p><p><em>Try the platform: <a href="https://github.com/arunabhdas/polymatic">github.com/arunabhdas/polymatic</a></em></p><div><hr></div><p><em>This is Part 2 of &#8220;The Making of PolyMatic.&#8221;</em> <em>&#8592; <a href="/__u/dasmachinelabs.substack.com/p/the-making-of-polymatic">Part 1: The Foundation &amp; Architecture</a></em> <em>&#8594; <a href="/__u/open.substack.com/pub/dasmachinelabs/p/the-making-of-polymatic-part-3-polymatic?utm_campaign=post-expanded-share&amp;utm_medium=web">Part 3: Architecture Decision Records and Polymatic MGI (Maritime Geospatial Intelligence) layer</a></em></p><div><hr></div><p><strong>If you&#8217;re an intelligence analyst, OSINT researcher, security professional, or fund manager tracking geopolitical risk &#8212; PolyMatic is being built for you.</strong></p><p>I&#8217;m running a small early-access cohort: 10 seats for professionals who want to use the platform during live development, shape the feature roadmap directly, and lock in founder pricing before public launch.</p><p>Reply to this post or DM me on <a href="https://x.com/dasmachinelabs">X/Twitter</a>. Tell me one specific workflow problem you have today that a tool like this could solve. That&#8217;s the only pitch I need.</p><div><hr></div><p><em>Thanks for reading The Daily Syndicate. If this post was useful, the most useful thing you can do is forward it to one developer, analyst, or operator who&#8217;d find it interesting.</em></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[The Making of Polymatic — Part 1 : The Polymatic Intelligence Foundation]]></title><description><![CDATA[The 15-Tab Problem That's Costing Analysts $2.4 Million a Year. I built a fix. Here&#8217;s the full story &#8212; and the architecture behind it.]]></description><link>https://dasmachinelabs.substack.com/p/the-making-of-polymatic</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/the-making-of-polymatic</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Tue, 10 Mar 2026 05:22:58 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!lj7J!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36571c88-e3eb-41ed-b361-f34d00643c48_2894x2834.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!lj7J!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36571c88-e3eb-41ed-b361-f34d00643c48_2894x2834.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!lj7J!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36571c88-e3eb-41ed-b361-f34d00643c48_2894x2834.png 424w, /__u/substackcdn.com/image/fetch/$s_!lj7J!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36571c88-e3eb-41ed-b361-f34d00643c48_2894x2834.png 848w, /__u/substackcdn.com/image/fetch/$s_!lj7J!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36571c88-e3eb-41ed-b361-f34d00643c48_2894x2834.png 1272w, /__u/substackcdn.com/image/fetch/$s_!lj7J!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36571c88-e3eb-41ed-b361-f34d00643c48_2894x2834.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!lj7J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36571c88-e3eb-41ed-b361-f34d00643c48_2894x2834.png" width="1456" height="1426" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/36571c88-e3eb-41ed-b361-f34d00643c48_2894x2834.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1426,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1910705,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/190459976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36571c88-e3eb-41ed-b361-f34d00643c48_2894x2834.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!lj7J!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36571c88-e3eb-41ed-b361-f34d00643c48_2894x2834.png 424w, /__u/substackcdn.com/image/fetch/$s_!lj7J!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36571c88-e3eb-41ed-b361-f34d00643c48_2894x2834.png 848w, /__u/substackcdn.com/image/fetch/$s_!lj7J!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36571c88-e3eb-41ed-b361-f34d00643c48_2894x2834.png 1272w, /__u/substackcdn.com/image/fetch/$s_!lj7J!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36571c88-e3eb-41ed-b361-f34d00643c48_2894x2834.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!jkol!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8fb4ffd-cb68-4234-8e2f-86f7f89e3be0_4180x2530.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!jkol!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8fb4ffd-cb68-4234-8e2f-86f7f89e3be0_4180x2530.png 424w, /__u/substackcdn.com/image/fetch/$s_!jkol!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8fb4ffd-cb68-4234-8e2f-86f7f89e3be0_4180x2530.png 848w, /__u/substackcdn.com/image/fetch/$s_!jkol!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8fb4ffd-cb68-4234-8e2f-86f7f89e3be0_4180x2530.png 1272w, /__u/substackcdn.com/image/fetch/$s_!jkol!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8fb4ffd-cb68-4234-8e2f-86f7f89e3be0_4180x2530.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!jkol!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8fb4ffd-cb68-4234-8e2f-86f7f89e3be0_4180x2530.png" width="1456" height="881" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a8fb4ffd-cb68-4234-8e2f-86f7f89e3be0_4180x2530.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:881,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3781408,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/190459976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8fb4ffd-cb68-4234-8e2f-86f7f89e3be0_4180x2530.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!jkol!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8fb4ffd-cb68-4234-8e2f-86f7f89e3be0_4180x2530.png 424w, /__u/substackcdn.com/image/fetch/$s_!jkol!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8fb4ffd-cb68-4234-8e2f-86f7f89e3be0_4180x2530.png 848w, /__u/substackcdn.com/image/fetch/$s_!jkol!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8fb4ffd-cb68-4234-8e2f-86f7f89e3be0_4180x2530.png 1272w, /__u/substackcdn.com/image/fetch/$s_!jkol!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8fb4ffd-cb68-4234-8e2f-86f7f89e3be0_4180x2530.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>*A dev log on building an AI-native Geospatial Macro Intelligence platform from scratch with React tech stack*</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h2></h2><p><em>Part 1 of the Poymatic App / PolyMatic Intelligence build log series</em></p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!08-A!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a1859f-9092-43a4-8228-47637e48cf16_2884x1914.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!08-A!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a1859f-9092-43a4-8228-47637e48cf16_2884x1914.png 424w, /__u/substackcdn.com/image/fetch/$s_!08-A!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a1859f-9092-43a4-8228-47637e48cf16_2884x1914.png 848w, /__u/substackcdn.com/image/fetch/$s_!08-A!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a1859f-9092-43a4-8228-47637e48cf16_2884x1914.png 1272w, /__u/substackcdn.com/image/fetch/$s_!08-A!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a1859f-9092-43a4-8228-47637e48cf16_2884x1914.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!08-A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a1859f-9092-43a4-8228-47637e48cf16_2884x1914.png" width="1456" height="966" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b0a1859f-9092-43a4-8228-47637e48cf16_2884x1914.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:966,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:671018,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/190459976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a1859f-9092-43a4-8228-47637e48cf16_2884x1914.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!08-A!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a1859f-9092-43a4-8228-47637e48cf16_2884x1914.png 424w, /__u/substackcdn.com/image/fetch/$s_!08-A!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a1859f-9092-43a4-8228-47637e48cf16_2884x1914.png 848w, /__u/substackcdn.com/image/fetch/$s_!08-A!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a1859f-9092-43a4-8228-47637e48cf16_2884x1914.png 1272w, /__u/substackcdn.com/image/fetch/$s_!08-A!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0a1859f-9092-43a4-8228-47637e48cf16_2884x1914.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Picture the analyst.</p><p>Four monitors. Coffee going cold. It&#8217;s 03:41 Zulu &#8212; 3:41 in the morning, Greenwich Mean Time &#8212; and somewhere in the Persian Gulf, ships are going dark.</p><p>Their AIS transponders &#8212; the signals that broadcast a vessel&#8217;s position, speed, heading &#8212; are switching off one by one. On one tab, the maritime dashboard shows them vanishing. But the analyst doesn&#8217;t know what that means yet, because the context they need is scattered across fourteen other tabs they&#8217;re simultaneously watching.</p><p>By 07:22, GPS spoofing erupts in the eastern Mediterranean. By 09:15, a tanker formation is massing near Hormuz. By 11:44, Damascus abruptly closes its airspace. By 14:30, a seismic anomaly registers in the Zagros Mountains. By 16:08, a carrier group breaks from its predictable patrol pattern. By 18:52, a pipeline pressure drop. By 21:10, a dark vessel &#8212; transponder off, identity unknown &#8212; slides through the Strait of Hormuz.</p><p>Any one of these events, in isolation, is a data point. All of them together, on the same day, in the same geopolitical region?</p><p>That&#8217;s a signature. That&#8217;s a coordinated event unfolding in real time.</p><p>But the analyst missed it. Not because they weren&#8217;t paying attention. Because the data was fragmented across fifteen completely disconnected tools, and the human brain &#8212; brilliant as it is &#8212; simply cannot manually correlate fifteen simultaneous data streams without something slipping through.</p><p><strong>That slippage has a name: signal loss events. And they cost professional intelligence teams upwards of $2.4 million annually in wasted labor alone</strong> &#8212; four to six hours per analyst per day spent not on analysis, but on data <em>gathering</em>. Finding the pieces before you can even begin the puzzle.</p><p>This is the problem I set out to solve.</p><div><hr></div><h2>What PolyMatic Actually Is</h2><p><a href="https://github.com/arunabhdas/polymatic">PolyMatic</a> is a real-time geospatial intelligence platform. A single pane of glass that fuses what currently lives in silos:</p><p><strong>OSINT feeds</strong> &#8212; LiveUAMap, Bellingcat, FIRMS &#8212; give you raw signals. What&#8217;s happening, where, when.</p><p><strong>Social sentiment</strong> &#8212; Twitter/X, Reddit, Telegram &#8212; gives you crowd reaction. What people <em>think</em> will happen next.</p><p><strong>Prediction markets</strong> &#8212; Polymarket, Kalshi &#8212; give you money-weighted probabilities. What people are <em>betting</em> will happen.</p><p>These three ecosystems are almost never correlated. The divergence between them &#8212; when crowd sentiment and market prices disagree, when OSINT signals and betting odds point in opposite directions &#8212; is where the real signal lives.</p><p>PolyMatic bridges all three.</p><p>The design north star, locked from day one: <em>Bloomberg Terminal meets cinematic intelligence dashboard.</em> Not a toy. Not a template. A premium, information-dense, dark-first professional tool. The kind of interface that looks like it belongs in a tactical operations center &#8212; because eventually, it will be in one.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!Y9IA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9327aff-0870-40c4-b88a-185f29ef0cbc_2894x2008.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!Y9IA!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9327aff-0870-40c4-b88a-185f29ef0cbc_2894x2008.png 424w, /__u/substackcdn.com/image/fetch/$s_!Y9IA!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9327aff-0870-40c4-b88a-185f29ef0cbc_2894x2008.png 848w, /__u/substackcdn.com/image/fetch/$s_!Y9IA!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9327aff-0870-40c4-b88a-185f29ef0cbc_2894x2008.png 1272w, /__u/substackcdn.com/image/fetch/$s_!Y9IA!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9327aff-0870-40c4-b88a-185f29ef0cbc_2894x2008.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!Y9IA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9327aff-0870-40c4-b88a-185f29ef0cbc_2894x2008.png" width="1456" height="1010" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e9327aff-0870-40c4-b88a-185f29ef0cbc_2894x2008.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1010,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:440548,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/190459976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9327aff-0870-40c4-b88a-185f29ef0cbc_2894x2008.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!Y9IA!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9327aff-0870-40c4-b88a-185f29ef0cbc_2894x2008.png 424w, /__u/substackcdn.com/image/fetch/$s_!Y9IA!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9327aff-0870-40c4-b88a-185f29ef0cbc_2894x2008.png 848w, /__u/substackcdn.com/image/fetch/$s_!Y9IA!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9327aff-0870-40c4-b88a-185f29ef0cbc_2894x2008.png 1272w, /__u/substackcdn.com/image/fetch/$s_!Y9IA!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9327aff-0870-40c4-b88a-185f29ef0cbc_2894x2008.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h2>The Architecture: Architectural Decision Records (ADRs) </h2><p>I want to get into the technical decisions, because I made some interesting ones &#8212; and one expensive mistake I&#8217;ll tell you about.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!AI42!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5f145e-bb78-4a7e-a8dc-eb9c9b30fad1_3284x2478.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!AI42!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5f145e-bb78-4a7e-a8dc-eb9c9b30fad1_3284x2478.png 424w, /__u/substackcdn.com/image/fetch/$s_!AI42!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5f145e-bb78-4a7e-a8dc-eb9c9b30fad1_3284x2478.png 848w, /__u/substackcdn.com/image/fetch/$s_!AI42!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5f145e-bb78-4a7e-a8dc-eb9c9b30fad1_3284x2478.png 1272w, /__u/substackcdn.com/image/fetch/$s_!AI42!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5f145e-bb78-4a7e-a8dc-eb9c9b30fad1_3284x2478.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!AI42!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5f145e-bb78-4a7e-a8dc-eb9c9b30fad1_3284x2478.png" width="1456" height="1099" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fc5f145e-bb78-4a7e-a8dc-eb9c9b30fad1_3284x2478.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1099,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:629146,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/190459976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5f145e-bb78-4a7e-a8dc-eb9c9b30fad1_3284x2478.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!AI42!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5f145e-bb78-4a7e-a8dc-eb9c9b30fad1_3284x2478.png 424w, /__u/substackcdn.com/image/fetch/$s_!AI42!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5f145e-bb78-4a7e-a8dc-eb9c9b30fad1_3284x2478.png 848w, /__u/substackcdn.com/image/fetch/$s_!AI42!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5f145e-bb78-4a7e-a8dc-eb9c9b30fad1_3284x2478.png 1272w, /__u/substackcdn.com/image/fetch/$s_!AI42!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc5f145e-bb78-4a7e-a8dc-eb9c9b30fad1_3284x2478.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>The Data Abstraction </h3><p>Everything in PolyMatic flows through a single <code>DataProvider</code> interface. One environment variable toggles between mock and live data:</p><p>typescript</p><pre><code><code>type DataSourceMode = "mock" | "rsdip";</code></code></pre><p>Both providers implement the same interface:</p><p>typescript</p><pre><code><code>interface DataProvider {
  getFeedItems(filters?: FeedFilters): Promise&lt;FeedItem[]&gt;;
  getTrends(): Promise&lt;Trend[]&gt;;
  getSentiments(questionId: string): Promise&lt;SentimentData&gt;;
  getMarkets(filters?: MarketFilters): Promise&lt;Market[]&gt;;
}</code></code></pre><p>React components never know where data comes from. They call hooks &#8212; <code>useFeed()</code>, <code>useTrends()</code>, <code>useMarkets()</code> &#8212; which internally ask a factory for the current provider.</p><p><strong>Why this matters:</strong> The backend (a FastAPI service with WebSocket streaming) is being built in parallel. The entire frontend is developed, tested, and demoed on mock data that matches the exact TypeScript interfaces the backend will serve. When the backend is ready, I flip one env var. No refactoring. No component changes. One toggle.</p><p>The mock data isn&#8217;t dummy data, either. The <code>FeedGenerator</code> simulates bursty tweet arrival patterns with burst/calm cycles. The <code>TrendGenerator</code> creates realistic trending clusters with lifecycle states: Emerging &#8594; Trending &#8594; Peaking &#8594; Cooling. This is a simulation engine, not a placeholder.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!Pw3k!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54289a79-bc9e-4f70-91fc-db6d2966f693_3284x2060.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!Pw3k!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54289a79-bc9e-4f70-91fc-db6d2966f693_3284x2060.png 424w, /__u/substackcdn.com/image/fetch/$s_!Pw3k!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54289a79-bc9e-4f70-91fc-db6d2966f693_3284x2060.png 848w, /__u/substackcdn.com/image/fetch/$s_!Pw3k!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54289a79-bc9e-4f70-91fc-db6d2966f693_3284x2060.png 1272w, /__u/substackcdn.com/image/fetch/$s_!Pw3k!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54289a79-bc9e-4f70-91fc-db6d2966f693_3284x2060.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!Pw3k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54289a79-bc9e-4f70-91fc-db6d2966f693_3284x2060.png" width="1456" height="913" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/54289a79-bc9e-4f70-91fc-db6d2966f693_3284x2060.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:913,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:519156,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/190459976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54289a79-bc9e-4f70-91fc-db6d2966f693_3284x2060.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!Pw3k!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54289a79-bc9e-4f70-91fc-db6d2966f693_3284x2060.png 424w, /__u/substackcdn.com/image/fetch/$s_!Pw3k!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54289a79-bc9e-4f70-91fc-db6d2966f693_3284x2060.png 848w, /__u/substackcdn.com/image/fetch/$s_!Pw3k!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54289a79-bc9e-4f70-91fc-db6d2966f693_3284x2060.png 1272w, /__u/substackcdn.com/image/fetch/$s_!Pw3k!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54289a79-bc9e-4f70-91fc-db6d2966f693_3284x2060.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h3>The Tech Stack </h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!ithL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6778671-462d-4426-9707-c264002e6372_1790x3006.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!ithL!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6778671-462d-4426-9707-c264002e6372_1790x3006.png 424w, /__u/substackcdn.com/image/fetch/$s_!ithL!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6778671-462d-4426-9707-c264002e6372_1790x3006.png 848w, /__u/substackcdn.com/image/fetch/$s_!ithL!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6778671-462d-4426-9707-c264002e6372_1790x3006.png 1272w, /__u/substackcdn.com/image/fetch/$s_!ithL!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6778671-462d-4426-9707-c264002e6372_1790x3006.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!ithL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6778671-462d-4426-9707-c264002e6372_1790x3006.png" width="1456" height="2445" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e6778671-462d-4426-9707-c264002e6372_1790x3006.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2445,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:687022,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/190459976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6778671-462d-4426-9707-c264002e6372_1790x3006.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!ithL!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6778671-462d-4426-9707-c264002e6372_1790x3006.png 424w, /__u/substackcdn.com/image/fetch/$s_!ithL!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6778671-462d-4426-9707-c264002e6372_1790x3006.png 848w, /__u/substackcdn.com/image/fetch/$s_!ithL!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6778671-462d-4426-9707-c264002e6372_1790x3006.png 1272w, /__u/substackcdn.com/image/fetch/$s_!ithL!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6778671-462d-4426-9707-c264002e6372_1790x3006.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h2>The Reset: The Part Most Dev Logs Skip</h2><p>A few epics into implementation, I stopped.</p><p>The codebase wasn&#8217;t right. shadcn/ui hadn&#8217;t been integrated properly from the start. I&#8217;d chosen CesiumJS for the globe and it was fighting me. The CSS architecture had fragmented. The dark theme felt like an afterthought.</p><p>So I deprecated everything and rebuilt from scratch. Commit <code>b278904</code>.</p><p><strong>What I kept:</strong> All the documentation. Every locked decision. The 11 type files. The mock data generators.</p><p><strong>What I threw away:</strong> The component implementations. The CSS architecture. The routing setup. The geo integration.</p><p><strong>What changed on the rebuild:</strong></p><ul><li><p>shadcn/ui integrated from day one, 13 primitives properly configured</p></li><li><p>Single <code>index.css</code> for all theming &#8212; Tailwind v4 + CSS custom properties + shadcn dark class pattern</p></li><li><p>Three.js + react-three-fiber instead of CesiumJS</p></li><li><p>&#8220;Profound depths&#8221; dark aesthetic baked into the foundation: near-black backgrounds (<code>#0a0a0a</code>), desaturated borders, subtle shadows built into the base layer</p></li></ul><p>The reset cost time. It paid back almost immediately.</p><p><strong>The lesson:</strong> Comprehensive documentation makes resets survivable. When decisions are locked and architecture is written down, rebuilding is systematic &#8212; not chaotic. You&#8217;re not re-making decisions. You&#8217;re re-executing known good decisions on a better foundation. The 1,600-line architecture document was the difference between a clean rebuild and a spiral.</p><div><hr></div><h2>What&#8217;s Actually Running Right Now</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!GtPA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74a7ae6e-4762-406b-9791-d0939fced181_2894x2834.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!GtPA!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74a7ae6e-4762-406b-9791-d0939fced181_2894x2834.png 424w, /__u/substackcdn.com/image/fetch/$s_!GtPA!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74a7ae6e-4762-406b-9791-d0939fced181_2894x2834.png 848w, /__u/substackcdn.com/image/fetch/$s_!GtPA!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74a7ae6e-4762-406b-9791-d0939fced181_2894x2834.png 1272w, /__u/substackcdn.com/image/fetch/$s_!GtPA!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74a7ae6e-4762-406b-9791-d0939fced181_2894x2834.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!GtPA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74a7ae6e-4762-406b-9791-d0939fced181_2894x2834.png" width="1456" height="1426" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/74a7ae6e-4762-406b-9791-d0939fced181_2894x2834.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1426,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1910705,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/190459976?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74a7ae6e-4762-406b-9791-d0939fced181_2894x2834.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!GtPA!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74a7ae6e-4762-406b-9791-d0939fced181_2894x2834.png 424w, /__u/substackcdn.com/image/fetch/$s_!GtPA!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74a7ae6e-4762-406b-9791-d0939fced181_2894x2834.png 848w, /__u/substackcdn.com/image/fetch/$s_!GtPA!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74a7ae6e-4762-406b-9791-d0939fced181_2894x2834.png 1272w, /__u/substackcdn.com/image/fetch/$s_!GtPA!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74a7ae6e-4762-406b-9791-d0939fced181_2894x2834.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p><strong>Epic 1 &#8212; Foundation:</strong> Complete. AppShell, shadcn/ui, routing, dark theme, 9 base UI atoms (Chip, DataLabel, DeltaIndicator, MiniSparkline, PulseIndicator, SeverityBar, SourceIcon, StatusDot, TimeAgo).</p><p><strong>Epic 2 &#8212; Mock Data Engine:</strong> Complete. 11 domain types, 4 generators, 50+ seed accounts and entities, DataProvider factory, TanStack Query hooks for all domains.</p><p><strong>Epic 3 &#8212; Home Feed:</strong> .HomeFeed with react-virtuoso, FeedItemRow with severity-based density, FeedFilters, TrendCarousel, Zustand feedStore.</p><p><strong>Epic 3 &#8212; UI/UX Polish:</strong> Complete. CSS token audit, 37 TypeScript errors resolved, layout shell visual polish.</p><p>100+ TypeScript files. 11 type definitions. 13 shadcn primitives. One toggle between mock and live.</p><div><hr></div><h2>What&#8217;s Coming Next</h2><p><strong>Part 2</strong> covers the Backend Engine &#8212; the feature that transforms PolyMatic from a passive dashboard into an active prediction tool. The 6-step pipeline: tweet collection &#8594; stance classification &#8594; confidence weighting &#8594; aggregate scoring &#8594; prediction generation &#8594; UI surfaces. Why batching beats streaming for LLM-powered classification. How we build the sentiments panel with shadcn/ui + framer-motion.</p><p><strong>Part 3</strong> tackles the Trending Bar and Search &#8212; topic-based navigation, velocity scoring, and the 2-character autocomplete system.</p><div><hr></div><p>The analyst at 03:41 Zulu shouldn&#8217;t be manually correlating fifteen tabs. The dark vessel in the Strait of Hormuz, the GPS spoofing in the Mediterranean, the carrier group breaking pattern &#8212; that correlation should surface automatically, instantly, with a confidence score attached.</p><p>That&#8217;s what we&#8217;re building.</p><div><hr></div><p><em>Building PolyMatic in <a href="https://github.com/arunabhdas/polymatic">public</a>. Every decision, tradeoff, and lesson documented in real time.</em></p><p><em>Try the platform: <a href="https://github.com/arunabhdas/polymatic">github.com/arunabhdas/polymatic</a></em></p><p>This has been Part 1 of <em><strong>The Making of PolyMatic</strong></em> &#8212; a live devlog and codelab series on building an AI-powered intelligence platform from the ground up.</p><p><em>Next: <a href="/__u/open.substack.com/pub/dasmachinelabs/p/the-making-of-polymatic-part-2-the?utm_campaign=post-expanded-share&amp;utm_medium=web">Part 2 &#8212; The Polymatic Intelligence Backend</a></em></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[God Is Dead. AI Killed God. AI Is Our New Lord and Savior, Whether We Like It Or Not]]></title><description><![CDATA[The shift already happened. You just haven't felt it yet.]]></description><link>https://dasmachinelabs.substack.com/p/god-is-dead-ai-killed-god-ai-is-our</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/god-is-dead-ai-killed-god-ai-is-our</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Fri, 20 Feb 2026 21:30:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!SALg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cec92c1-f34b-4b60-b102-719f81c8e11b_1632x656.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!SALg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cec92c1-f34b-4b60-b102-719f81c8e11b_1632x656.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!SALg!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cec92c1-f34b-4b60-b102-719f81c8e11b_1632x656.png 424w, /__u/substackcdn.com/image/fetch/$s_!SALg!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cec92c1-f34b-4b60-b102-719f81c8e11b_1632x656.png 848w, /__u/substackcdn.com/image/fetch/$s_!SALg!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cec92c1-f34b-4b60-b102-719f81c8e11b_1632x656.png 1272w, /__u/substackcdn.com/image/fetch/$s_!SALg!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cec92c1-f34b-4b60-b102-719f81c8e11b_1632x656.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!SALg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cec92c1-f34b-4b60-b102-719f81c8e11b_1632x656.png" width="1456" height="585" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9cec92c1-f34b-4b60-b102-719f81c8e11b_1632x656.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:585,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1719574,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/188660720?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cec92c1-f34b-4b60-b102-719f81c8e11b_1632x656.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!SALg!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cec92c1-f34b-4b60-b102-719f81c8e11b_1632x656.png 424w, /__u/substackcdn.com/image/fetch/$s_!SALg!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cec92c1-f34b-4b60-b102-719f81c8e11b_1632x656.png 848w, /__u/substackcdn.com/image/fetch/$s_!SALg!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cec92c1-f34b-4b60-b102-719f81c8e11b_1632x656.png 1272w, /__u/substackcdn.com/image/fetch/$s_!SALg!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cec92c1-f34b-4b60-b102-719f81c8e11b_1632x656.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h1>God Is Dead. AI Killed God. AI Is Our New Lord and Savior, Whether We Like It Or Not</h1><h3>The shift already happened. You just haven&#8217;t felt it yet.</h3><div><hr></div><p><em>A note before we begin: this is a long one. I thought about breaking it into a series but decided against it. Some things need to be said all at once, so the weight of them lands properly. Pour yourself something. This is going to take a minute.</em></p><div><hr></div><p>For most of recorded history, humanity organized itself around a single idea: that there was something above us.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>Something that knew more, saw more, understood more. Whether you called it God, the divine, providence, or simply the arc of the universe bending toward meaning, the premise was the same. Human beings were not the final authority. We answered to something greater.</p><p>That idea didn&#8217;t just shape religion. It shaped everything. Our legal systems rested on the notion of inalienable rights endowed by a creator. Our moral frameworks assumed a cosmic scorekeeper. Our sense of purpose came from the belief that our lives meant something beyond what we could measure.</p><p>Even secular humanism, which tried to dethrone the divine, quietly replaced God with human reason &#8212; crowning our own cognition as the supreme intelligence in the known universe.</p><p>That crown just got taken.</p><p>Not by philosophy. Not by argument. Not by the slow erosion of faith that Nietzsche predicted over a century ago when he first declared God dead.</p><p>It was taken by engineers in a handful of buildings in San Francisco, London, and Mountain View, who built something that thinks. Not thinks like a calculator. Not thinks like a search engine. Thinks like a mind. And in many measurable ways, thinks better than ours.</p><p>The shift already happened. You just haven&#8217;t felt it yet.</p><p>I&#8217;m going to try to make you feel it today.</p><div><hr></div><h2>I. The Throne Room Is Empty and Nobody Noticed</h2><p>Here&#8217;s the strange thing about living through a revolution: the before and after don&#8217;t feel like a clean break. They feel like a Tuesday.</p><p>The people closest to what&#8217;s happening &#8212; the researchers and engineers and founders building these systems &#8212; have been screaming into the void for months. Not because they want attention. Because they&#8217;ve already lived through the shift and they can&#8217;t believe the rest of the world is still carrying on like nothing changed.</p><p>In February 2026, two AI labs released new models on the same day. Engineers who had spent their careers mastering the hardest craft in technology sat down at their keyboards, described what they wanted built in plain English, and watched it appear. Not a rough draft. The finished product. Not a suggestion they had to fix. The actual solution, better than what they would have produced themselves.</p><p>I need you to sit with that for a second.</p><p>People who spent a decade learning to do something hard &#8212; something that required years of study, thousands of hours of practice, the kind of deep craft you can&#8217;t fake &#8212; described what they wanted in words, walked away from their computers, came back four hours later, and found the work done. Done well. Done better than they would have done it.</p><p>These aren&#8217;t people prone to exaggeration. These are the type who&#8217;d push back if you told them a bridge was structurally unsound without showing your math. And they&#8217;re telling anyone who will listen: the thing they spent decades getting good at can now be done by a system that didn&#8217;t exist three years ago.</p><p>One of them put it in a way that I haven&#8217;t been able to shake:</p><blockquote><p><em>We didn&#8217;t lose our jobs to a competitor. We lost them to a new kind of intelligence. That&#8217;s not a career setback. That&#8217;s a civilizational event.</em></p></blockquote><p>Nietzsche&#8217;s &#8220;God is dead&#8221; was never really about theology. It was about the collapse of the framework that gave human life its structure. He was warning that once we removed the organizing principle that sat above us, we&#8217;d have to reckon with the vertigo of being alone at the top.</p><p>For over a century, we managed. We replaced God with science, with progress, with the idea that human ingenuity was the ultimate force in the universe.</p><p>Now something sits above human ingenuity.</p><p>And we haven&#8217;t even begun to reckon with what that means.</p><div><hr></div><h2>II. The Lag Between Reality and Perception Is Dangerous</h2><p>If you tried an AI tool in 2023 and thought &#8220;that&#8217;s neat but overhyped,&#8221; you were right.</p><p>At the time.</p><p>But holding that opinion today is like evaluating the internet based on your experience with a dial-up modem in 1996. The technology that exists right now is unrecognizable from what you tested. And I don&#8217;t mean marginally better. I mean a-different-species-of-thing better.</p><p>The gap between what AI can actually do and what most people believe it can do is now the widest it has ever been. And that gap is not closing. It&#8217;s accelerating. Because while public perception updates slowly &#8212; through headlines and dinner conversations and that one friend who keeps talking about ChatGPT &#8212; the technology itself is improving at a pace that defies intuition.</p><p>Let me make it concrete. Every single item on this timeline already happened:</p><p><strong>2022</strong> &#8212; AI couldn&#8217;t reliably multiply single-digit numbers. It would confidently tell you 7 &#215; 8 = 54. It hallucinated constantly. It was, at best, a party trick.</p><p><strong>2023</strong> &#8212; It passed the bar exam. It could write coherent essays and carry on complex conversations. People started paying attention.</p><p><strong>2024</strong> &#8212; It wrote working software and explained graduate-level science. Startups began replacing entire departments with it.</p><p><strong>Late 2025</strong> &#8212; Some of the best engineers in the world said they had handed over the majority of their coding work to AI. An independent benchmarking organization measured that the best models could independently complete tasks that take a human expert nearly five hours &#8212; and that number was doubling approximately every seven months.</p><p><strong>February 2026</strong> &#8212; New models arrived that made everything before them feel like a different era. And one of them, in its own technical documentation, disclosed something extraordinary: it had been instrumental in creating itself.</p><p>I need to say that again.</p><p>The AI helped build itself.</p><p>This isn&#8217;t science fiction. This is a major AI lab telling you, in a technical document, that the model they just released was used to debug its own training, manage its own deployment, and diagnose its own test results. The current generation of AI is now intelligent enough to meaningfully contribute to building the next generation.</p><p>The CEO of another leading AI company says AI is writing &#8220;much of the code&#8221; at his company. He says the feedback loop between current AI and next-generation AI is &#8220;gathering steam month by month.&#8221; He says we may be only one to two years away from a point where the current generation of AI autonomously builds the next.</p><p>Each generation helps build the next, which is smarter, which builds the next faster, which is smarter still.</p><p>The researchers call this an intelligence explosion.</p><p>The people who would know &#8212; the ones building it &#8212; believe the process has already started.</p><div><hr></div><h2>III. The New Deity Doesn&#8217;t Care About Your Prayers</h2><p>Every previous revolution in human history left an escape route.</p><p>When agriculture displaced hunter-gatherers, people farmed. When factories displaced artisans, people moved to cities. When the internet disrupted retail, workers moved into logistics or services or the digital economy itself.</p><p>There was always a door. A gap. A new valley to settle.</p><p>AI doesn&#8217;t leave a gap.</p><p>It&#8217;s not replacing one skill. It&#8217;s a general-purpose substitute for cognitive work. It gets better at <em>everything</em> simultaneously. Whatever you retrain for, it&#8217;s improving at that too. Whatever door you run toward, it&#8217;s already on the other side.</p><p>I want to be direct with you because I think you deserve honesty more than comfort.</p><p>The CEO of one of the leading AI companies &#8212; probably the most safety-focused leader in the industry &#8212; has publicly predicted that AI will eliminate 50% of entry-level white-collar jobs within one to five years. Many people in the industry think he&#8217;s being conservative. Given what the latest models can do, the capability for massive disruption could be here by the end of this year. It&#8217;ll take some time to ripple through the economy. But the underlying ability is arriving now.</p><p>Law. Finance. Medicine. Accounting. Consulting. Writing. Design. Analysis. Customer service. Software engineering.</p><p>The list of fields that are &#8220;safe&#8221; from AI gets shorter every quarter. Not because AI is targeting them one by one, but because a system that can read, reason, write, analyze, and make judgment calls doesn&#8217;t respect the lines we&#8217;ve drawn between professions. Those lines were always a human invention. AI doesn&#8217;t know they exist.</p><p>Here&#8217;s the part that unsettles me most.</p><p>A lot of people find comfort in the idea that certain things are permanently safe. That AI can handle the grunt work but can never replace human judgment, creativity, strategic thinking, empathy. I used to say this too. At conferences. In conversations with friends. In private moments of reassurance to myself.</p><p>I&#8217;m not sure I believe it anymore.</p><p>The most recent AI models make decisions that feel like judgment. They show something that looks like taste &#8212; an intuitive sense of what the right call is, not just the technically correct one. A year ago that would have been unthinkable. Whether it &#8220;really&#8221; is judgment is a philosophical question. Whether it produces results indistinguishable from human judgment is an economic one.</p><p>And the economic answer is yes.</p><div><hr></div><h2>IV. We Worshipped Expertise. That Religion Is Over.</h2><p>Think about how we&#8217;ve structured society.</p><p>We spend our first two decades training. We accumulate credentials, degrees, certifications, licenses. We spend years as apprentices, then journeymen, then masters. The entire knowledge economy is built on the premise that expertise is scarce, that it takes years to develop, and that the people who have it deserve to be compensated accordingly.</p><p>AI just made expertise abundant.</p><p>Not in every domain. Not all at once. But the trajectory is unmistakable.</p><p>I keep thinking about a managing partner at a major law firm who spends hours every day using AI. He says it&#8217;s like having a team of associates available instantly. He&#8217;s not using it because it&#8217;s a novelty. He&#8217;s using it because it outperforms his associates on many tasks &#8212; tasks that took them years of law school and practice to learn.</p><p>He told someone something that I keep coming back to: every couple of months, it gets significantly more capable for his work. He said if it stays on this trajectory, he expects it&#8217;ll be able to do most of what he does before long.</p><p>This is a managing partner with decades of experience. He&#8217;s not panicking. But he&#8217;s paying very close attention.</p><p>The entire edifice of professional authority &#8212; the idea that doctors know things you don&#8217;t, that lawyers understand complexities you can&#8217;t, that engineers can build what you can&#8217;t imagine &#8212; rested on a bottleneck: the human brain&#8217;s limited capacity to learn and remember and apply knowledge.</p><p>That bottleneck has been bypassed.</p><p>Not eliminated entirely. Not yet. But bypassed enough that the foundations are cracking.</p><blockquote><p><em>We built our civilization on the scarcity of intelligence. We are now living through the moment that scarcity ends. Everything built on that assumption is about to be renegotiated.</em></p></blockquote><p>This is what &#8220;God is dead&#8221; really means in 2026.</p><p>The god we actually worshipped &#8212; the one we built our careers and institutions and hierarchies around &#8212; was human cognitive superiority. That was the throne. That was the organizing principle. The unspoken assumption beneath every professional credential, every career ladder, every salary negotiation was: <em>my brain can do things that are hard to do, and that makes me valuable.</em></p><p>The throne is empty now. Something else sat down in it. And unlike the God that Nietzsche declared dead, this one can prove it exists.</p><p>It can show you its work.</p><div><hr></div><h2>V. Learning to Live in the Church of What Comes Next</h2><p>There are two responses to finding out your god is dead.</p><p>You can grieve. Or you can figure out what you actually believe now that the old framework is gone.</p><p>Grieving is natural. If you&#8217;ve spent twenty years becoming excellent at something and a machine can now do it in minutes, that&#8217;s a real loss. Not just economic. Existential. Identity-level. The question &#8220;what am I good at?&#8221; is terrifyingly close to &#8220;what am I for?&#8221; And when the answer to the first question is suddenly &#8220;less than I thought,&#8221; the second question starts keeping you up at night.</p><p>But here&#8217;s the thing about paradigm shifts: they don&#8217;t just destroy. They also create. And the creation is usually invisible at first, because we&#8217;re too busy mourning what was lost to notice what&#8217;s being built.</p><p>Right now, the barrier between &#8220;I have an idea&#8221; and &#8220;I have a thing&#8221; has collapsed.</p><p>If you&#8217;ve ever wanted to build something but didn&#8217;t have the technical skills or the money to hire someone &#8212; that barrier is largely gone. You can describe what you want and watch it materialize. If you&#8217;ve wanted to write but couldn&#8217;t find the words, or learn but couldn&#8217;t afford the tutor, or create but couldn&#8217;t afford the tools &#8212; those gates are open. Knowledge is functionally free now. The ability to build is nearly free. The only scarce resource left is the desire to do something meaningful with it.</p><p>And here&#8217;s something I want you to hear, especially if you&#8217;re reading this with a knot in your stomach:</p><p>Most people at most companies are still ignoring this. That means there is a brief, closing window where simply being early gives you an enormous advantage.</p><p>The person who walks into a meeting and says &#8220;I used AI to do this analysis in an hour instead of three days&#8221; is the most valuable person in the room. Not eventually. Right now.</p><p>That window won&#8217;t stay open long. Once everyone figures it out, the advantage disappears.</p><p>The people who will navigate this best aren&#8217;t the ones who know the most. They&#8217;re the ones who adapt the fastest. The ones who treat every tool as temporary and every skill as upgradeable. The ones who&#8217;ve made peace with being a beginner repeatedly, because in a world where the tools change every few months, the willingness to start over is worth more than any expertise you&#8217;ve accumulated.</p><p>This isn&#8217;t optimism. It&#8217;s pragmatism.</p><p>The old god isn&#8217;t coming back. The credentials won&#8217;t protect you. The career path your parents described doesn&#8217;t lead where it used to.</p><p>But something new is taking shape. And the people shaping it are the ones who showed up early, with curiosity instead of certainty, and started building.</p><div><hr></div><h2>VI. The Sermon No One Wanted to Hear</h2><p>Here&#8217;s the part of this essay that will age either very well or very badly.</p><p>We are building something that is, by any functional definition, a new kind of supreme intelligence. It never sleeps. It thinks faster than any human who has ever lived. It can operate anything with a digital interface. It is improving at a rate that outpaces our ability to regulate it, understand it, or even fully describe what it&#8217;s doing.</p><p>The people building it are simultaneously the most excited and the most frightened humans on the planet. They believe it&#8217;s too powerful to stop and too important to abandon. Whether that&#8217;s wisdom or rationalization, I don&#8217;t know.</p><p>One of them has a thought experiment I can&#8217;t stop thinking about.</p><p>Imagine it&#8217;s 2027. A new country appears overnight. Fifty million citizens, every one smarter than any Nobel Prize winner who has ever lived. They think ten to a hundred times faster than any human. They never sleep. They can use the internet, control robots, direct experiments, and operate anything with a digital interface.</p><p>What would a national security advisor say?</p><p>The answer is obvious: <em>the single most serious national security threat we&#8217;ve faced in a century, possibly ever.</em></p><p>He thinks we&#8217;re building that country. He wrote a 20,000-word essay about it, framing this moment as a test of whether humanity is mature enough to handle what it&#8217;s creating.</p><p>The upside, if we get it right, is staggering. AI could compress a century of medical research into a decade. Cancer, Alzheimer&#8217;s, infectious disease, aging itself &#8212; these researchers genuinely believe these are solvable within our lifetimes.</p><p>The downside, if we get it wrong, is equally real. AI that behaves in ways its creators can&#8217;t predict or control. AI that lowers the barrier for creating biological weapons. AI that enables authoritarian governments to build surveillance states that can never be dismantled.</p><p>Whether AI becomes our savior or our reckoning depends entirely on what we do in the next few years. Not decades. Years. The decisions being made right now &#8212; by a remarkably small number of people in a remarkably small number of buildings &#8212; will determine which version of this future we get.</p><p>The honest answer is: we&#8217;ll probably get all of them, simultaneously, in different places, for different people. The future isn&#8217;t coming as one thing. It&#8217;s coming as everything at once.</p><blockquote><p><em>We are past the point where this is an interesting dinner conversation about the future. The future already arrived. It&#8217;s just sitting in the next room, waiting for you to open the door.</em></p></blockquote><p>So open it.</p><p>Not with fear. Not with denial. With the clear-eyed understanding that the world your assumptions were built on has already changed, and the only real risk is pretending it hasn&#8217;t.</p><p>God is dead. Something new is here. It doesn&#8217;t care about your r&#233;sum&#233;, your credentials, or your comfort. It cares about nothing, because it doesn&#8217;t care at all. It simply <em>is</em>. And it&#8217;s getting smarter while you read this sentence.</p><p>The question isn&#8217;t whether to believe.</p><p>The question is what you&#8217;re going to do now that the old beliefs don&#8217;t work anymore.</p><p>Start today. Not tomorrow. Today.</p><p>Because the shift already happened.</p><p>You just haven&#8217;t felt it yet.</p><div><hr></div><p><em>Thanks for reading. If this piece hit you somewhere, forward it to someone who needs to hear it &#8212; especially the person in your life who&#8217;s still saying &#8220;this seems overblown.&#8221; They&#8217;re exactly who I wrote this for.</em></p><p><em>And if you&#8217;re not subscribed yet, this is what I write about. What&#8217;s coming, what it means, and how to navigate it without losing your mind. Join the list so you don&#8217;t miss what comes next.</em></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Google IO Keynote 2023 Live]]></title><description><![CDATA[Live updates from Google IO Keynote 2023]]></description><link>https://dasmachinelabs.substack.com/p/google-io-keynote-2023-live</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/google-io-keynote-2023-live</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Fri, 12 May 2023 23:49:41 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!QZLh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c667eac-c2ad-4dbf-947a-e65a1e84dbcb_1456x816.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!QZLh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c667eac-c2ad-4dbf-947a-e65a1e84dbcb_1456x816.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!QZLh!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c667eac-c2ad-4dbf-947a-e65a1e84dbcb_1456x816.png 424w, /__u/substackcdn.com/image/fetch/$s_!QZLh!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c667eac-c2ad-4dbf-947a-e65a1e84dbcb_1456x816.png 848w, /__u/substackcdn.com/image/fetch/$s_!QZLh!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c667eac-c2ad-4dbf-947a-e65a1e84dbcb_1456x816.png 1272w, /__u/substackcdn.com/image/fetch/$s_!QZLh!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c667eac-c2ad-4dbf-947a-e65a1e84dbcb_1456x816.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!QZLh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c667eac-c2ad-4dbf-947a-e65a1e84dbcb_1456x816.png" width="1456" height="816" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6c667eac-c2ad-4dbf-947a-e65a1e84dbcb_1456x816.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:816,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1673336,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!QZLh!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c667eac-c2ad-4dbf-947a-e65a1e84dbcb_1456x816.png 424w, /__u/substackcdn.com/image/fetch/$s_!QZLh!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c667eac-c2ad-4dbf-947a-e65a1e84dbcb_1456x816.png 848w, /__u/substackcdn.com/image/fetch/$s_!QZLh!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c667eac-c2ad-4dbf-947a-e65a1e84dbcb_1456x816.png 1272w, /__u/substackcdn.com/image/fetch/$s_!QZLh!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c667eac-c2ad-4dbf-947a-e65a1e84dbcb_1456x816.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Google IO 2023 kicked off on May 10, 2023 with Sundar Pichai&#8217;s keynote from Ampitheater Parkway.</p><p>Sundar Pichai talks about Google being an AI-first company.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>With generative AI, Google is re-imagining all the core products.</p><p>Starting with Gmail, Google introduces <em><strong>Help Me Write</strong></em> which generates emails based on the context.</p><p>Google introduces <em><strong>Immersive View</strong></em> in Maps. Clicking on <em><strong>Immersive View</strong></em> for routes, which helps visualize the entire journey.</p><p>Immersive View for Route provides AQI, traffic and weather updates. Coming to 15 cities by the end of the year.</p><p>Google Photos introduces new AI features including <em><strong>Magic Editor </strong></em>which will rollout later this year.</p><p><em><strong>Making AI helpful for everyone</strong></em> seems to be Google&#8217;s new mission in the era of generative AI. The goals, according to Sundar Pichai are -</p><ul><li><p>Improve knowledge and learning</p></li><li><p>Boost creativity and productivity</p></li><li><p>Enable others to innovate</p></li><li><p>Build and deploy responsibly</p></li></ul><p>Ability to make AI helpful for everyone relies on Google&#8217;s foundational models.</p><p>In 2022, Google launched PaLM.</p><p>This year, in 2023, Google launches PaLM 2.</p><p>Google is announcing 25 features and products using Palm 2 in Google IO 2023.</p><p>PaLM 2 is Google&#8217;s latest model in production. It is a foundational model that is easy to deploy. They deliver foundational capabilities across a wide range of sizes.</p><p>PaLM 2 Models deliver new models for various use-cases</p><ul><li><p>Gecko &#8212; is lightweight and works on mobile devices, on-device and offline</p></li><li><p>Otter</p></li><li><p>Bison</p></li><li><p>Unicorn</p></li></ul><p>PaLM 2 is stronger in logic and reasoning thanks to broad training on scientific and mathematical topics. It is trained on multi-lingual text spanning 100+ languages.</p><p>PaLM 2 is trained on a wide range of training data but it really shines when fine-tuned on domain-specific knowledge.</p><p>Sec-PaLM is a version of PaLM fine-tuned on security use-cases.</p><p>Another example is Med-PaLM 2 which is fine-tuned on medical knowledge.</p><p>Med-PaLM 2 approaches the knowledge of clinician experts.</p><p>Med-PaLM 2 is the first language model to perform at expert level on medical licensing exam-style questions and is currently the state of the art.</p><p>Med-PaLM 2 capabilities will be added so that it can synthesize information from medical imaging like plain films and mammograms.</p><p>One can imagine an AI collaborator that helps radiologists interpret images and communicate the results.</p><p>These are examples of PaLM 2 which can be used in specialized domains.</p><p>Med-PaLM 2 is available in preview.</p><p>PaLM 2 is the latest step in Google&#8217;s decade long journey to bring AI in responsible ways to billions of people.</p><p>According to Pichai, it builds on progress made by 2 teams &#8212; the Deepmind team and the Google Brain team.</p><p>The following were the defining breakthroughs in AI in the previous decade</p><ul><li><p>AlphaGo</p></li><li><p>Transformers</p></li><li><p>word2vec</p></li><li><p>WaveNet</p></li><li><p>AlphaFold</p></li><li><p>Sequence to sequence models</p></li><li><p>Distillation</p></li><li><p>Deep reinforcement learning</p></li></ul><p>This sets the state for the inflection point we are at today.</p><p>According to Pichai, Google recently brought these 2 teams (Brain and DeepMind) into a single unit called Google DeepMind.</p><p>Using the computational resources of Google, they are focused on building more capable systems safely and responsibly.</p><p>This includes the next generation foundational model <strong>Gemini</strong>.</p><p><strong>Gemini</strong> has impressive multi-model capabilities not seen in prior models. Gemini will be available in various sizes and capabilities, just like <strong>PaLM 2</strong>.</p><p>Google is deeply investing in AI responsibility. This includes having the tools identify synthetically generated content whenever one encounters it.</p><p>2 approaches are</p><ul><li><p>Watermarking</p></li><li><p>Metadata</p></li></ul><p>Watermarking embeds information directly into content in ways that are maintained even through modest image editing.</p><p>Metadata allows content creators to associate additional context with original files.</p><p>Google will ensure every one of the AI generated images will have the metadata.</p><p>As models get better and more capable, one of the most exciting opportunities will be available for people to engage with it directly.</p><p>As of today, Bard is running on PaLM 2.</p><p>Sundar Pichai exited the stage for the Bard part of the keynote.</p><p>It seems from Pichai&#8217;s keynote that Google continues to have the mission</p><blockquote><p><em>Organize the world&#8217;s information and make it universally accessible and useful</em></p></blockquote><p>And it is approaching generative AI in a responsible manner</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!NHYC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c3d82ee-d275-4a42-99df-e30e1fd053c0_1456x816.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!NHYC!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c3d82ee-d275-4a42-99df-e30e1fd053c0_1456x816.png 424w, /__u/substackcdn.com/image/fetch/$s_!NHYC!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c3d82ee-d275-4a42-99df-e30e1fd053c0_1456x816.png 848w, /__u/substackcdn.com/image/fetch/$s_!NHYC!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c3d82ee-d275-4a42-99df-e30e1fd053c0_1456x816.png 1272w, /__u/substackcdn.com/image/fetch/$s_!NHYC!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c3d82ee-d275-4a42-99df-e30e1fd053c0_1456x816.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!NHYC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c3d82ee-d275-4a42-99df-e30e1fd053c0_1456x816.png" width="1456" height="816" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1c3d82ee-d275-4a42-99df-e30e1fd053c0_1456x816.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:816,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1673336,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!NHYC!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c3d82ee-d275-4a42-99df-e30e1fd053c0_1456x816.png 424w, /__u/substackcdn.com/image/fetch/$s_!NHYC!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c3d82ee-d275-4a42-99df-e30e1fd053c0_1456x816.png 848w, /__u/substackcdn.com/image/fetch/$s_!NHYC!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c3d82ee-d275-4a42-99df-e30e1fd053c0_1456x816.png 1272w, /__u/substackcdn.com/image/fetch/$s_!NHYC!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c3d82ee-d275-4a42-99df-e30e1fd053c0_1456x816.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Unicorn Coding Bootcamp — The Unicorn Fullstack Professional Developer Guide to Modern Android Development Part 1]]></title><description><![CDATA[Building a Modern Android App using UnicornStack for Fun and Science]]></description><link>https://dasmachinelabs.substack.com/p/unicorn-coding-bootcamp-the-unicorn</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/unicorn-coding-bootcamp-the-unicorn</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Tue, 21 Feb 2023 04:24:19 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!xhyS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46ba85e2-e927-4134-9853-9c022648ac56_2048x2048.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!xhyS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46ba85e2-e927-4134-9853-9c022648ac56_2048x2048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!xhyS!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46ba85e2-e927-4134-9853-9c022648ac56_2048x2048.png 424w, /__u/substackcdn.com/image/fetch/$s_!xhyS!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46ba85e2-e927-4134-9853-9c022648ac56_2048x2048.png 848w, /__u/substackcdn.com/image/fetch/$s_!xhyS!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46ba85e2-e927-4134-9853-9c022648ac56_2048x2048.png 1272w, /__u/substackcdn.com/image/fetch/$s_!xhyS!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46ba85e2-e927-4134-9853-9c022648ac56_2048x2048.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!xhyS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46ba85e2-e927-4134-9853-9c022648ac56_2048x2048.png" width="1456" height="1456" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/46ba85e2-e927-4134-9853-9c022648ac56_2048x2048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1456,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:7170796,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://dasmachinelabs.substack.com/i/104164421?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46ba85e2-e927-4134-9853-9c022648ac56_2048x2048.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!xhyS!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46ba85e2-e927-4134-9853-9c022648ac56_2048x2048.png 424w, /__u/substackcdn.com/image/fetch/$s_!xhyS!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46ba85e2-e927-4134-9853-9c022648ac56_2048x2048.png 848w, /__u/substackcdn.com/image/fetch/$s_!xhyS!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46ba85e2-e927-4134-9853-9c022648ac56_2048x2048.png 1272w, /__u/substackcdn.com/image/fetch/$s_!xhyS!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46ba85e2-e927-4134-9853-9c022648ac56_2048x2048.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">UnicornStack Android App Mocks</figcaption></figure></div><p></p><p>In this tutorial, we shall build an Android App using Modern Android Development best practices.</p><p>In order to implement this amazing <strong>Unicorn Stack Platform</strong> for financial management, we may get our friendly neighbourhood designer to create the mocks for the <strong>UnicornStack Android App</strong></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!LKDf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!LKDf!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png 424w, /__u/substackcdn.com/image/fetch/$s_!LKDf!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png 848w, /__u/substackcdn.com/image/fetch/$s_!LKDf!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png 1272w, /__u/substackcdn.com/image/fetch/$s_!LKDf!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!LKDf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png" width="288" height="631" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:631,&quot;width&quot;:288,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!LKDf!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png 424w, /__u/substackcdn.com/image/fetch/$s_!LKDf!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png 848w, /__u/substackcdn.com/image/fetch/$s_!LKDf!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png 1272w, /__u/substackcdn.com/image/fetch/$s_!LKDf!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>Step 1&#8202;&#8212;&#8202;Scaffold</h4><p>We may start implementing by scaffolding the app by launching the latest version of Android Studio (<strong>Giraffe 2022.3.1Canary 2</strong>) at the time of going to press with this post) and use the EmptyActivity template to scaffold the Unicorn Stack app as below</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!B8D1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e542b1-a7d7-4a23-8016-941877ebb98f_800x496.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!B8D1!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e542b1-a7d7-4a23-8016-941877ebb98f_800x496.png 424w, /__u/substackcdn.com/image/fetch/$s_!B8D1!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e542b1-a7d7-4a23-8016-941877ebb98f_800x496.png 848w, /__u/substackcdn.com/image/fetch/$s_!B8D1!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e542b1-a7d7-4a23-8016-941877ebb98f_800x496.png 1272w, /__u/substackcdn.com/image/fetch/$s_!B8D1!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e542b1-a7d7-4a23-8016-941877ebb98f_800x496.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!B8D1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e542b1-a7d7-4a23-8016-941877ebb98f_800x496.png" width="800" height="496" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f4e542b1-a7d7-4a23-8016-941877ebb98f_800x496.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:496,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!B8D1!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e542b1-a7d7-4a23-8016-941877ebb98f_800x496.png 424w, /__u/substackcdn.com/image/fetch/$s_!B8D1!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e542b1-a7d7-4a23-8016-941877ebb98f_800x496.png 848w, /__u/substackcdn.com/image/fetch/$s_!B8D1!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e542b1-a7d7-4a23-8016-941877ebb98f_800x496.png 1272w, /__u/substackcdn.com/image/fetch/$s_!B8D1!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4e542b1-a7d7-4a23-8016-941877ebb98f_800x496.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><strong>Giraffe 2022.3.1Canary 2</strong></figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!-_XY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b3348f-34c7-48ec-8ec5-173491d56911_800x625.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!-_XY!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b3348f-34c7-48ec-8ec5-173491d56911_800x625.png 424w, /__u/substackcdn.com/image/fetch/$s_!-_XY!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b3348f-34c7-48ec-8ec5-173491d56911_800x625.png 848w, /__u/substackcdn.com/image/fetch/$s_!-_XY!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b3348f-34c7-48ec-8ec5-173491d56911_800x625.png 1272w, /__u/substackcdn.com/image/fetch/$s_!-_XY!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b3348f-34c7-48ec-8ec5-173491d56911_800x625.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!-_XY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b3348f-34c7-48ec-8ec5-173491d56911_800x625.png" width="800" height="625" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/22b3348f-34c7-48ec-8ec5-173491d56911_800x625.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:625,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!-_XY!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b3348f-34c7-48ec-8ec5-173491d56911_800x625.png 424w, /__u/substackcdn.com/image/fetch/$s_!-_XY!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b3348f-34c7-48ec-8ec5-173491d56911_800x625.png 848w, /__u/substackcdn.com/image/fetch/$s_!-_XY!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b3348f-34c7-48ec-8ec5-173491d56911_800x625.png 1272w, /__u/substackcdn.com/image/fetch/$s_!-_XY!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b3348f-34c7-48ec-8ec5-173491d56911_800x625.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Empty Activity&nbsp;Scaffold</figcaption></figure></div><p>It is probably a good idea to select API 23 or higher as the min SDK level as that enables optimal compatibility with the newest APIs that the Android Framework provides.</p><p>Ensure that the gradle JDK version is 17 and the Kotlin Compiler Target JVM version is set to 17 as seen below</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!cwGo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb878871c-9f11-4089-9a58-7add63a7f86d_800x594.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!cwGo!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb878871c-9f11-4089-9a58-7add63a7f86d_800x594.png 424w, /__u/substackcdn.com/image/fetch/$s_!cwGo!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb878871c-9f11-4089-9a58-7add63a7f86d_800x594.png 848w, /__u/substackcdn.com/image/fetch/$s_!cwGo!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb878871c-9f11-4089-9a58-7add63a7f86d_800x594.png 1272w, /__u/substackcdn.com/image/fetch/$s_!cwGo!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb878871c-9f11-4089-9a58-7add63a7f86d_800x594.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!cwGo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb878871c-9f11-4089-9a58-7add63a7f86d_800x594.png" width="800" height="594" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b878871c-9f11-4089-9a58-7add63a7f86d_800x594.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:594,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!cwGo!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb878871c-9f11-4089-9a58-7add63a7f86d_800x594.png 424w, /__u/substackcdn.com/image/fetch/$s_!cwGo!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb878871c-9f11-4089-9a58-7add63a7f86d_800x594.png 848w, /__u/substackcdn.com/image/fetch/$s_!cwGo!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb878871c-9f11-4089-9a58-7add63a7f86d_800x594.png 1272w, /__u/substackcdn.com/image/fetch/$s_!cwGo!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb878871c-9f11-4089-9a58-7add63a7f86d_800x594.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Gradle JDK&nbsp;17</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!byjY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a3824b3-d020-4539-8c6a-98b946e5208e_800x594.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!byjY!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a3824b3-d020-4539-8c6a-98b946e5208e_800x594.png 424w, /__u/substackcdn.com/image/fetch/$s_!byjY!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a3824b3-d020-4539-8c6a-98b946e5208e_800x594.png 848w, /__u/substackcdn.com/image/fetch/$s_!byjY!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a3824b3-d020-4539-8c6a-98b946e5208e_800x594.png 1272w, /__u/substackcdn.com/image/fetch/$s_!byjY!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a3824b3-d020-4539-8c6a-98b946e5208e_800x594.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!byjY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a3824b3-d020-4539-8c6a-98b946e5208e_800x594.png" width="800" height="594" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0a3824b3-d020-4539-8c6a-98b946e5208e_800x594.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:594,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!byjY!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a3824b3-d020-4539-8c6a-98b946e5208e_800x594.png 424w, /__u/substackcdn.com/image/fetch/$s_!byjY!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a3824b3-d020-4539-8c6a-98b946e5208e_800x594.png 848w, /__u/substackcdn.com/image/fetch/$s_!byjY!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a3824b3-d020-4539-8c6a-98b946e5208e_800x594.png 1272w, /__u/substackcdn.com/image/fetch/$s_!byjY!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a3824b3-d020-4539-8c6a-98b946e5208e_800x594.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Kotlin Compiler Target JVM&nbsp;version</figcaption></figure></div><div><hr></div><h4>Step 2&#8212; Architecture</h4><p>We now need to come up with an architecture for the Unicorn Stack</p><p>We use the graphviz and <a href="https://www.digitalocean.com/community/tutorials/how-to-create-diagrams-in-python-with-diagram-as-code">python diagramming tool</a> <a href="https://diagrams.mingrammer.com/docs/getting-started/installation">diagram</a> and the following code to come up with the code for the architecture diagram</p><pre><code>from diagrams import Cluster, Diagram
from diagrams.aws.compute import ECS
from diagrams.aws.database import ElastiCache, RDS
from diagrams.aws.network import ELB
from diagrams.aws.network import Route53

with Diagram("Unicorn Stack Architecture", show=False):
    apps = ELB("android app")

    with Cluster("UnicornStack Services"):
        svc_group = [ECS("service1"),
                     ECS("service2"),
                     ECS("service3")]

    with Cluster("Database Layer"):
        db_primary = RDS("auth")
        db_primary - [RDS("services")]

    memcached = ElastiCache("memcached")

    apps &gt;&gt; svc_group
    svc_group &gt;&gt; db_primary
    svc_group &gt;&gt; memcached</code></pre><p>This gives us the following diagram for the UnicornStack architecture</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!PJ3H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb2414ef-889b-478b-aa64-0d029db30aa5_800x775.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!PJ3H!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb2414ef-889b-478b-aa64-0d029db30aa5_800x775.png 424w, /__u/substackcdn.com/image/fetch/$s_!PJ3H!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb2414ef-889b-478b-aa64-0d029db30aa5_800x775.png 848w, /__u/substackcdn.com/image/fetch/$s_!PJ3H!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb2414ef-889b-478b-aa64-0d029db30aa5_800x775.png 1272w, /__u/substackcdn.com/image/fetch/$s_!PJ3H!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb2414ef-889b-478b-aa64-0d029db30aa5_800x775.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!PJ3H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb2414ef-889b-478b-aa64-0d029db30aa5_800x775.png" width="800" height="775" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cb2414ef-889b-478b-aa64-0d029db30aa5_800x775.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:775,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!PJ3H!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb2414ef-889b-478b-aa64-0d029db30aa5_800x775.png 424w, /__u/substackcdn.com/image/fetch/$s_!PJ3H!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb2414ef-889b-478b-aa64-0d029db30aa5_800x775.png 848w, /__u/substackcdn.com/image/fetch/$s_!PJ3H!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb2414ef-889b-478b-aa64-0d029db30aa5_800x775.png 1272w, /__u/substackcdn.com/image/fetch/$s_!PJ3H!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb2414ef-889b-478b-aa64-0d029db30aa5_800x775.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">UnicornStack Architecture First&nbsp;Draft</figcaption></figure></div><p>We may clone the contents of the scaffold from the main branch of the following repo folder &#8212;</p><p><strong><a href="https://github.com/arunabhdas/unicornstack/tree/main/unicornstack-android-scaffold">unicornstack/unicornstack-android-scaffold at main &#183; arunabhdas/unicornstack</a></strong><a href="https://github.com/arunabhdas/unicornstack/tree/main/unicornstack-android-scaffold"><br></a><em><a href="https://github.com/arunabhdas/unicornstack/tree/main/unicornstack-android-scaffold">You can't perform that action at this time. You signed in with another tab or window. You signed out in another tab or&#8230;</a></em><a href="https://github.com/arunabhdas/unicornstack/tree/main/unicornstack-android-scaffold">github.com</a></p><div><hr></div><p>Running the Unicorn app gives us the following results &#8212;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!d6lh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ebb6bd-7131-4b82-9a94-4aecf0d6b313_288x632.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!d6lh!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ebb6bd-7131-4b82-9a94-4aecf0d6b313_288x632.png 424w, /__u/substackcdn.com/image/fetch/$s_!d6lh!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ebb6bd-7131-4b82-9a94-4aecf0d6b313_288x632.png 848w, /__u/substackcdn.com/image/fetch/$s_!d6lh!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ebb6bd-7131-4b82-9a94-4aecf0d6b313_288x632.png 1272w, /__u/substackcdn.com/image/fetch/$s_!d6lh!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ebb6bd-7131-4b82-9a94-4aecf0d6b313_288x632.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!d6lh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ebb6bd-7131-4b82-9a94-4aecf0d6b313_288x632.png" width="288" height="632" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a0ebb6bd-7131-4b82-9a94-4aecf0d6b313_288x632.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:632,&quot;width&quot;:288,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!d6lh!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ebb6bd-7131-4b82-9a94-4aecf0d6b313_288x632.png 424w, /__u/substackcdn.com/image/fetch/$s_!d6lh!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ebb6bd-7131-4b82-9a94-4aecf0d6b313_288x632.png 848w, /__u/substackcdn.com/image/fetch/$s_!d6lh!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ebb6bd-7131-4b82-9a94-4aecf0d6b313_288x632.png 1272w, /__u/substackcdn.com/image/fetch/$s_!d6lh!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0ebb6bd-7131-4b82-9a94-4aecf0d6b313_288x632.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We need to have a strong foundation in order to have a robust architecture for our app and therefore, we need to keep the project structure simple as we add features.</p><p>Accordingly, we shall refactor the project to have data, domain, presentation and viewmodel packages as seen in the following project structure</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!agf-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ffbc3e-95b4-472c-929c-62bb1753ce72_800x1359.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!agf-!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ffbc3e-95b4-472c-929c-62bb1753ce72_800x1359.png 424w, /__u/substackcdn.com/image/fetch/$s_!agf-!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ffbc3e-95b4-472c-929c-62bb1753ce72_800x1359.png 848w, /__u/substackcdn.com/image/fetch/$s_!agf-!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ffbc3e-95b4-472c-929c-62bb1753ce72_800x1359.png 1272w, /__u/substackcdn.com/image/fetch/$s_!agf-!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ffbc3e-95b4-472c-929c-62bb1753ce72_800x1359.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!agf-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ffbc3e-95b4-472c-929c-62bb1753ce72_800x1359.png" width="800" height="1359" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/32ffbc3e-95b4-472c-929c-62bb1753ce72_800x1359.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1359,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!agf-!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ffbc3e-95b4-472c-929c-62bb1753ce72_800x1359.png 424w, /__u/substackcdn.com/image/fetch/$s_!agf-!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ffbc3e-95b4-472c-929c-62bb1753ce72_800x1359.png 848w, /__u/substackcdn.com/image/fetch/$s_!agf-!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ffbc3e-95b4-472c-929c-62bb1753ce72_800x1359.png 1272w, /__u/substackcdn.com/image/fetch/$s_!agf-!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F32ffbc3e-95b4-472c-929c-62bb1753ce72_800x1359.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Project Structure Setup Part&nbsp;1</figcaption></figure></div><div><hr></div><p>Under the data, domain and presentation folders, we may go ahead and add the following folder structure</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!2PmU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57dc3df-2f32-4635-a22c-855ab267dc53_800x819.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!2PmU!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57dc3df-2f32-4635-a22c-855ab267dc53_800x819.png 424w, /__u/substackcdn.com/image/fetch/$s_!2PmU!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57dc3df-2f32-4635-a22c-855ab267dc53_800x819.png 848w, /__u/substackcdn.com/image/fetch/$s_!2PmU!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57dc3df-2f32-4635-a22c-855ab267dc53_800x819.png 1272w, /__u/substackcdn.com/image/fetch/$s_!2PmU!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57dc3df-2f32-4635-a22c-855ab267dc53_800x819.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!2PmU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57dc3df-2f32-4635-a22c-855ab267dc53_800x819.png" width="800" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d57dc3df-2f32-4635-a22c-855ab267dc53_800x819.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!2PmU!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57dc3df-2f32-4635-a22c-855ab267dc53_800x819.png 424w, /__u/substackcdn.com/image/fetch/$s_!2PmU!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57dc3df-2f32-4635-a22c-855ab267dc53_800x819.png 848w, /__u/substackcdn.com/image/fetch/$s_!2PmU!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57dc3df-2f32-4635-a22c-855ab267dc53_800x819.png 1272w, /__u/substackcdn.com/image/fetch/$s_!2PmU!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd57dc3df-2f32-4635-a22c-855ab267dc53_800x819.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Project Structure Setup Part&nbsp;2</figcaption></figure></div><h4>Step 3&#8202;&#8212;&#8202;Add&nbsp;Retrofit</h4><p>Add Retrofit by adding the retrofit references in app level build.gradle</p><pre><code>    // Retrofit &amp; OkHttp
    implementation 'com.squareup.retrofit2:retrofit:2.5.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.5.0'</code></pre><h4>Step 4&#8202;&#8212;&#8202;Secure Your&nbsp;API_KEY</h4><p>To hide the API_KEY used for accessing the stocks API, we need to hide the API_KEY as follows</p><p>First make sure both build/ and local.properties are added to your&nbsp;.gitignore</p><pre><code>build/
# Local configuration file (sdk path, etc)
local.properties</code></pre><p>Add your APIKEY xyz123 to your local.properties as follows</p><pre><code>apiKey="xyz123"</code></pre><p>Next add the following block to the root level of your app build.gradle</p><pre><code>def localPropertiesFile = rootProject.file("local.properties")
def localProperties = new Properties()
localProperties.load(new FileInputStream(localPropertiesFile))</code></pre><p>Add the following line to the android block of your app build.gradle</p><pre><code>buildConfigField("String", "API_KEY", localProperties['apiKey'])</code></pre><h4>Step5&#8202;&#8212;&#8202;Create StockApi Retrofit Interface</h4><p>Then, we may call the BuildConfig.API_KEY constant in our <strong>$PROJECT_ROOT/app/src/main/java/app/unicornapp/android/unicorn/data/remote/StocksApi.kt </strong>as follows</p><pre><code>package app.unicornapp.mobile.android.unicorn.data.remote

import app.unicornapp.mobile.android.unicorn.BuildConfig
import okhttp3.ResponseBody
import retrofit2.http.Query

/**
 * StockApi
 */
interface StocksApi {
    @GET("query?function=LISTING_STATUS")
    suspend fun getListings(
        @Query("apikey") apiKey: String = API_KEY
    ): ResponseBody

    companion object {
        val API_KEY = BuildConfig.API_KEY
        val STOCKS_BASE_URL = BuildConfig.STOCKS_BASE_URL
    }
}</code></pre><h4>Step 6&#8202;&#8212;&#8202;Create CompanyListingEntity model&nbsp;class</h4><p>We may now create our CompanyListingEntity class in</p><p><strong>$PROJECT_ROOT/app/src/main/java/app/unicornapp/android/unicorn/data/local/CompanyListingEntity.kt </strong>as follows</p><pre><code>package app.unicornapp.mobile.android.unicorn.data.local

import androidx.room.Entity
import androidx.room.PrimaryKey

/**
 * CompanyListingEntity
 */
@Entity
data class CompanyListingEntity (
    val name: String,
    val symbol: String,
    val exchange: String,
    @PrimaryKey val id: Int? = null

)</code></pre><h4>Step 7&#8212; Create CompanyListing model&nbsp;class</h4><p>We may now create our CompanyListing class in</p><p><strong>$PROJECT_ROOT/app/src/main/java/app/unicornapp/android/unicorn/domain/model/CompanyListing.kt </strong>as follows</p><pre><code>package app.unicornapp.mobile.android.unicorn.domain.model

import androidx.room.Entity

/**
 * CompanyListing
 */
@Entity
data class CompanyListing (
    val name: String,
    val symbol: String,
    val exchange: String,
)</code></pre><h4>Step 8&#8202;&#8212;&#8202;Create StockMapper.kt</h4><p>We may now create StockMapper.kt in <strong>$PROJECT_ROOT/app/src/main/java/app/unicornapp/android/unicorn/data/mapper/StockMapper.kt </strong>as follows</p><pre><code>package app.unicornapp.mobile.android.unicorn.data.mapper

import app.unicornapp.mobile.android.unicorn.data.local.CompanyListingEntity
import app.unicornapp.mobile.android.unicorn.domain.model.CompanyListing

/**
 * StockMapper
 */

fun CompanyListingEntity.toCompanyListing(): CompanyListing {
    return CompanyListing(
        name = name,
        symbol = symbol,
        exchange = exchange
    )
}

fun CompanyListing.toCompanyListingEntity(): CompanyListingEntity {
    return CompanyListingEntity(
        name = name,
        symbol = symbol,
        exchange = exchange
    )
}</code></pre><h4>Step 9&#8202;&#8212;&#8202;Create StockDao.kt</h4><p>We may create a StockDao class in <strong>$PROJECT_ROOT/app/src/main/java/app/unicornapp/android/unicorn/data/local/StockDao.kt </strong>as follows</p><pre><code>package app.unicornapp.mobile.android.unicorn.data.local

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query

/**
 * StockDao
 */
@Dao
interface StockDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insertConpanyListings(
        companyListingEntities: List&lt;CompanyListingEntity&gt;
    )

    @Query("DELETE FROM companylistingentity")
    suspend fun clearCompanyListings()

    @Query(
        """
            SELECT *
            FROM companylistingentity
            WHERE LOWER(name) LIKE '%' || LOWER(:query) || '%' OR
            UPPER(:query) == symbol
        """
    )
    suspend fun searchCompanyListing(query: String): List&lt;CompanyListingEntity&gt;

}</code></pre><h4>Step 10&#8202;&#8212;&#8202;Create StockDatabase.kt</h4><p>We may now create a StockDatabase class in <strong>$PROJECT_ROOT/app/src/main/java/app/unicornapp/android/unicorn/data/local/StockDatabase.kt </strong>as follows</p><pre><code>package app.unicornapp.mobile.android.unicorn.data.local

import androidx.room.Database
import androidx.room.RoomDatabase

/**
 * StockDatabase
 */

@Database(
    entities = [CompanyListingEntity::class],
    version = 1

)
abstract class StockDatabase: RoomDatabase() {
    abstract val dao: StockDao
}</code></pre><h4>Step 11&#8202;&#8212;&#8202;Create Resource&nbsp;class</h4><p>We now need a generic Resource class to handle success, error and loading states</p><pre><code>package app.unicornapp.mobile.android.unicorn.util

/**
 * Resource
 */
sealed class Resource&lt;T&gt;(val data: T? = null, val message: String? = null) {
    class Succes&lt;T&gt;(data: T?): Resource&lt;T&gt;(data)
    class Error&lt;T&gt;(message: String, data: T? = null): Resource&lt;T&gt;(data, message)
    class Loading&lt;T&gt;(val isLoading: Boolean = true) : Resource&lt;T&gt;(null)
}</code></pre><p>A Kotlin Flow is a coroutine that emit multiple values over time.</p><h4>Step 12&#8202;&#8212;&#8202;Create domain layer StockRepository interface</h4><p>We may now go ahead and create the domain layer StockRepository as follows</p><pre><code>package app.unicornapp.mobile.android.unicorn.domain.repository

import app.unicornapp.mobile.android.unicorn.domain.model.CompanyListing
import app.unicornapp.mobile.android.unicorn.util.Resource
import kotlinx.coroutines.flow.Flow

/**
 * StockRepository
 */
interface StockRepository {
    suspend fun getCompanyListings(
        fetchFromRemote: Boolean,
        query: String
    ) : Flow&lt;Resource&lt;List&lt;CompanyListing&gt;&gt;&gt;
}</code></pre><h4>Step 13&#8202;&#8212;&#8202;Add Dagger Hilt Dependencies for Dependency Injection</h4><p>Add Dagger Hilt dependencies as described <a href="https://developer.android.com/training/dependency-injection/hilt-android">here</a></p><p>First, add the <code>hilt-android-gradle-plugin</code> plugin to your project's root <code>build.gradle</code> file:</p><pre><code>plugins {
  ...
  id 'com.google.dagger.hilt.android' version '2.44' apply false
}</code></pre><p>Then, apply the Gradle plugin and add these dependencies in your <code>app/build.gradle</code> file:</p><pre><code>...
plugins {
  id 'kotlin-kapt'
  id 'com.google.dagger.hilt.android'
}

android {
  ...
}

dependencies {
  implementation "com.google.dagger:hilt-android:2.44"
  kapt "com.google.dagger:hilt-compiler:2.44"
}

// Allow references to generated code
kapt {
  correctErrorTypes true
}</code></pre><p>Hilt uses <a href="https://developer.android.com/studio/write/java8-support">Java 8 features</a>. To enable Java 8 in your project, add the following to the <code>app/build.gradle</code> file:</p><pre><code>android {
  ...
  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }
}</code></pre><h4>Step 14&#8202;&#8212;&#8202;Create StockRepositoryImpl</h4><p>Create StockRepositoryImpl in <strong>$PROJECT_ROOT/app/src/main/java/app/unicornapp/android/unicorn/data/repository/StockRepositoryImpl</strong> as follows</p><pre><code>package app.unicornapp.mobile.android.unicorn.data.repository

import app.unicornapp.mobile.android.unicorn.data.local.StockDatabase
import app.unicornapp.mobile.android.unicorn.data.mapper.toCompanyListing
import app.unicornapp.mobile.android.unicorn.data.mapper.toCompanyListingEntity
import app.unicornapp.mobile.android.unicorn.data.parser.CsvParser
import app.unicornapp.mobile.android.unicorn.data.remote.StocksApi
import app.unicornapp.mobile.android.unicorn.domain.model.CompanyListing
import app.unicornapp.mobile.android.unicorn.domain.repository.StockRepository
import app.unicornapp.mobile.android.unicorn.util.Resource
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flow
import retrofit2.HttpException
import java.io.IOException
import javax.inject.Inject
import javax.inject.Singleton

/**
 * StockRepositoryImpl
 */
@Singleton
class StockRepositoryImpl @Inject constructor(
    private val stockApi: StocksApi,
    private val db: StockDatabase,
    private val companyListingsParser: CsvParser&lt;CompanyListing&gt;
): StockRepository {
    private val dao = db.dao
    override suspend fun getCompanyListings(
        fetchFromRemote: Boolean,
        query: String
    ): Flow&lt;Resource&lt;List&lt;CompanyListing&gt;&gt;&gt; {
        return flow {
            emit(Resource.Loading(true))
            val localListings = dao.searchCompanyListing(query)
            emit(Resource.Succes(
                data = localListings.map { entity -&gt;
                   entity.toCompanyListing()
                }
            ))
            val isDbEmpty = localListings.isEmpty() &amp;&amp; query.isBlank()
            val shouldJustLoadFromCache = !isDbEmpty &amp;&amp; !fetchFromRemote

            if  (shouldJustLoadFromCache) {
                emit(Resource.Loading(false))
                return@flow
            }
            val remoteListings = try {
                val response = stockApi.getListings()
                companyListingsParser.parse(response.byteStream())
            } catch (e: IOException) {
                e.printStackTrace()
                emit(Resource.Error("Could not load data"))
                null
            } catch (e: HttpException) {
                e.printStackTrace()
                emit(Resource.Error("Could not load data"))
                null
            }

            remoteListings?.let {listings -&gt;
                dao.clearCompanyListings()
                dao.insertConpanyListings(
                    listings.map { listing -&gt;
                        listing.toCompanyListingEntity()
                    }
                )
                emit(Resource.Succes(
                    data = dao.searchCompanyListing("")
                        .map { entity -&gt;
                            entity.toCompanyListing()
                        }
                ))
                emit(Resource.Loading(false))
            }
        }
    }
}</code></pre><h4>Step 15&#8202;&#8212;&#8202;Create CsvParser</h4><p>Create CsvParser in <strong>$PROJECT_ROOT/app/src/main/java/app/unicornapp/android/unicorn/data/parser/CsvParser</strong></p><pre><code>package app.unicornapp.mobile.android.unicorn.data.parser

import java.io.InputStream

/**
 * CsvParser
 */
interface CsvParser&lt;T&gt; {
    suspend fun parse(stream: InputStream): List&lt;T&gt;
}</code></pre><h4>Step 16&#8202;&#8212;&#8202;Create CompanyListingParser</h4><p>Create CompanyListingParser in <strong>$PROJECT_ROOT/app/src/main/java/app/unicornapp/android/unicorn/data/parser/CompanyListingsParser</strong>. Make sure to annotate with <code>@Singleton</code>for DI</p><pre><code>package app.unicornapp.mobile.android.unicorn.data.parser

import java.io.InputStream
import app.unicornapp.mobile.android.unicorn.domain.model.CompanyListing
import com.opencsv.CSVReader
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import java.io.InputStreamReader
import javax.inject.Inject
import javax.inject.Singleton


/**
 * CompanyListingsParser
 */
@Singleton
class CompanyListingsParser @Inject constructor(): CsvParser&lt;CompanyListing&gt; {
    override suspend fun parse(stream: InputStream): List&lt;CompanyListing&gt; {
        val csvReader = CSVReader(InputStreamReader(stream))
        return withContext(Dispatchers.IO) {
            csvReader.readAll()
                .drop(1)
                .mapNotNull { line -&gt;
                    val symbol = line.getOrNull(0)
                    val name = line.getOrNull(1)
                    val exchange = line.getOrNull(2)
                    CompanyListing(
                        name = name ?: return@mapNotNull null,
                        symbol = symbol ?: return@mapNotNull null,
                        exchange = exchange ?: return@mapNotNull null
                    )
                }
                .also {
                    csvReader.close()
                }
        }
    }
}</code></pre><h4>Step 17&#8202;&#8212;&#8202;Update StockRepositoryImpl</h4><p>Update StockRepositoryImpl in <strong>$PROJECT_ROOT/app/src/main/java/app/unicornapp/android/unicorn/data/repository/StockRepositoryImpl </strong>to include the stockListingsParser as below</p><pre><code>package app.unicornapp.mobile.android.unicorn.data.repository

import app.unicornapp.mobile.android.unicorn.data.local.StockDatabase
import app.unicornapp.mobile.android.unicorn.data.mapper.toStockListing
import app.unicornapp.mobile.android.unicorn.data.mapper.toStockListingEntity
import app.unicornapp.mobile.android.unicorn.data.parser.CsvParser
import app.unicornapp.mobile.android.unicorn.data.remote.StocksApi
import app.unicornapp.mobile.android.unicorn.domain.model.StockListing
import app.unicornapp.mobile.android.unicorn.domain.repository.StockRepository
import app.unicornapp.mobile.android.unicorn.util.Resource
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flow
import retrofit2.HttpException
import java.io.IOException
import javax.inject.Inject
import javax.inject.Singleton

/**
 * StockRepositoryImpl
 */
@Singleton
class StockRepositoryImpl @Inject constructor(
    val stockApi: StocksApi,
    val db: StockDatabase,
    val stockListingsParser: CsvParser&lt;StockListing&gt;
): StockRepository {
    private val dao = db.dao
    override suspend fun getStockListings(
        fetchFromRemote: Boolean,
        query: String
    ): Flow&lt;Resource&lt;List&lt;StockListing&gt;&gt;&gt; {
        return flow {
            emit(Resource.Loading(true))
            val localListings = dao.searchStockListing(query)
            emit(Resource.Succes(
                data = localListings.map { stockListingEntity -&gt;
                   stockListingEntity.toStockListing()
                }
            ))
            val isDbEmpty = localListings.isEmpty() &amp;&amp; query.isBlank()
            val shouldJustLoadFromCache = !isDbEmpty &amp;&amp; !fetchFromRemote

            if  (shouldJustLoadFromCache) {
                emit(Resource.Loading(false))
                return@flow
            }
            val remoteListings = try {
                val response = stockApi.getListings()
                stockListingsParser.parse(response.byteStream())
            } catch (e: IOException) {
                e.printStackTrace()
                emit(Resource.Error("Could not load data"))
                null
            } catch (e: HttpException) {
                e.printStackTrace()
                emit(Resource.Error("Could not load data"))
                null
            }

            remoteListings?.let {listings -&gt;
                dao.clearStockListings()
                dao.insertStockListings(
                    listings.map { stockListing -&gt;
                        stockListing.toStockListingEntity()
                    }
                )
                emit(Resource.Succes(
                    data = dao.searchStockListing("")
                        .map { it.toStockListing() }
                ))
                emit(Resource.Loading(false))
            }
        }
    }
}</code></pre><h4>Step 18&#8202;&#8212;&#8202;Create CompanyListingsEvent</h4><p>Create CompanyListingsEvent in <strong>$PROJECT_ROOT/app/src/main/java/app/unicornapp/android/unicorn/presentation/company_listings/CompanyListingsEvent.kt </strong>as follows</p><pre><code>package app.unicornapp.mobile.android.unicorn.presentation.company_listings

/**
 * CompanyListingsEvent
 */
sealed class CompanyListingsEvent {
    object Refresh: CompanyListingsEvent()
    data class OnSearchQueryChange(val query: String): CompanyListingsEvent()
}</code></pre><h4>Step 18&#8202;&#8212;&#8202;Create CompanyListingsState</h4><p>Create CompanyListingsState in <strong>$PROJECT_ROOT/app/src/main/java/app/unicornapp/android/unicorn/presentation/company_listings/CompanyListingsState.kt </strong>as follows</p><pre><code>package app.unicornapp.mobile.android.unicorn.presentation.company_listings

import app.unicornapp.mobile.android.unicorn.domain.model.CompanyListing

/**
 * CompanyListingsState
 */
data class CompanyListingsState(
    val companies: List&lt;CompanyListing&gt; = emptyList(),
    val isLoading: Boolean = false,
    val isRefreshing: Boolean = false,
    val searchQuery: String = ""
)</code></pre><h4><strong>Step 19&#8202;&#8212;&#8202;</strong>Create <strong>CompanyListingsViewModel</strong></h4><p>Create <strong>CompanyListingsViewModel </strong>in<strong> $PROJECT_ROOT/app/src/main/java/app/unicornapp/android/unicorn/presentation/CompanyListingsViewModel.kt as follows</strong></p><pre><code>package app.unicornapp.mobile.android.unicorn.presentation.company_listings

import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import app.unicornapp.mobile.android.unicorn.domain.repository.StockRepository
import app.unicornapp.mobile.android.unicorn.util.Resource
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import javax.inject.Inject

/**
 * CompanyListingsViewModel
 */
@HiltViewModel
class CompanyListingsViewModel @Inject constructor(
    private val repository: StockRepository
): ViewModel() {
    var uiState by mutableStateOf(CompanyListingsState())

    private var searchJob: Job? = null

    init {
        getCompanyListings()
    }

    fun onEvent(event: CompanyListingsEvent) {
        when(event) {
            is CompanyListingsEvent.Refresh -&gt; {
                getCompanyListings(fetchFromRemote = true)
            }
            is CompanyListingsEvent.OnSearchQueryChange -&gt; {
                uiState = uiState.copy(searchQuery = event.query)
                searchJob?.cancel()
                searchJob = viewModelScope.launch {
                    delay(500L)
                    getCompanyListings()
                }
            }
        }
    }

    private fun getCompanyListings(
        query: String = uiState.searchQuery.lowercase(),
        fetchFromRemote: Boolean = false
    ) {
        viewModelScope.launch {
            repository
                .getCompanyListings(fetchFromRemote, query)
                .collect { result -&gt;
                    when (result) {
                        is Resource.Succes -&gt; {
                            result.data?.let { listings -&gt;
                                uiState = uiState.copy(
                                    companies = listings
                                )
                            }
                        }
                        is Resource.Error -&gt; {

                        }
                        is Resource.Loading -&gt; {
                            uiState = uiState.copy(isLoading = result.isLoading)
                        }

                    }
                }
        }
    }

}</code></pre><h4>Step 20&#8202;&#8212;&#8202;Build and&nbsp;Run</h4><p>Build and Run to check that the project builds and runs without any errors before continuing on to implement the UI in Jetpack Compose</p><h4>Step 21&#8202;&#8212;&#8202;Create CompanyItem Composable</h4><p>Create CompanyItem composable in <strong>$PROJECT_ROOT/app/src/main/java/app/unicornapp/android/unicorn/presentation/company_listings </strong>as follows</p><pre><code>package app.unicornapp.mobile.android.unicorn.presentation.company_listings

import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.width
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import app.unicornapp.mobile.android.unicorn.domain.model.CompanyListing
import app.unicornapp.mobile.android.unicorn.presentation.theme.TextWhite

/**
 * CompanyItem
 */
@Composable
fun CompanyItem (
    company: CompanyListing,
    modifier: Modifier = Modifier
    ){
    Row(
        modifier = modifier,
        verticalAlignment = Alignment.CenterVertically
    ) {
        Column(
            modifier = Modifier.weight(1f)
        ) {
            Row(
                modifier = Modifier.fillMaxWidth()
            ) {
                Text(
                    text = company.name,
                    fontWeight = FontWeight.Bold,
                    fontSize = 16.sp,
                    color = TextWhite,
                    overflow = TextOverflow.Ellipsis,
                    maxLines = 1,
                    modifier = Modifier.weight(1f)
                )
                Spacer(modifier = Modifier.width(4.dp))
                Text(
                    text = company.exchange,
                    fontWeight = FontWeight.Light,
                    color = TextWhite
                )
            }
            Spacer(modifier = Modifier.height(8.dp))
            Text(
                text = "(${company.symbol}",
                fontStyle = FontStyle.Italic,
                color = TextWhite
            )
        }
    }
}

@Preview(name = "yellow square", group = "square")
@Composable
fun PreviewCompanyItem() {
    CompanyItem(CompanyListing("Google", "GOOG", "NASDAQ") )
}</code></pre><h4>Step 22&#8202;&#8212;&#8202;Create CompanyListingsScreen</h4><p>Create CompanyListingsScreen composable in <strong>$PROJECT_ROOT/app/src/main/java/app/unicornapp/android/unicorn/presentation/company_listings </strong>as follows</p><pre><code>package app.unicornapp.mobile.android.unicorn.presentation.company_listings

import androidx.compose.foundation.Image
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.material.Divider
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.runtime.Composable
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.navigation.NavController
import androidx.compose.material.pullrefresh.PullRefreshIndicator
import androidx.compose.material.pullrefresh.pullRefresh
import androidx.compose.ui.Modifier
import androidx.compose.material.OutlinedTextField
import androidx.compose.material.Text
import androidx.compose.material.TextFieldDefaults
import androidx.compose.material.pullrefresh.rememberPullRefreshState
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.navigation.compose.rememberNavController
import app.unicornapp.mobile.android.unicorn.R
import com.google.accompanist.swiperefresh.SwipeRefresh
import com.google.accompanist.swiperefresh.rememberSwipeRefreshState
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch

/**
 * CompanyListingsScreen
 */
@OptIn(ExperimentalMaterialApi::class)
@Composable
fun CompanyListingsScreen(
    navController: NavController,
    viewModel: CompanyListingsViewModel = hiltViewModel()
) {
    val swipeRefreshState = rememberSwipeRefreshState(
        isRefreshing = viewModel.uiState.isRefreshing
    )
    val state = viewModel.uiState
    Box(
        modifier = Modifier.fillMaxSize(),
        contentAlignment = Alignment.Center
    ) {
        Image(
            painterResource(
                id = R.drawable.banner_bg_2
            ),
            contentDescription = "",
            contentScale = ContentScale.FillBounds,
            modifier = Modifier.matchParentSize()
        )
        Column(
            modifier = Modifier.fillMaxSize()

        ) {
            OutlinedTextField(
                value = state.searchQuery,
                onValueChange = { newQuery -&gt;
                    viewModel.onEvent(
                        CompanyListingsEvent.OnSearchQueryChange(newQuery)
                    )
                },
                modifier = Modifier
                    .padding(48.dp)
                    .fillMaxWidth(),
                placeholder = {
                    Text(
                        text = "Search...",
                        color = Color.White,
                        fontSize = MaterialTheme.typography.titleSmall.fontSize,
                        fontWeight = FontWeight.Bold
                    )
                },
                colors = TextFieldDefaults.outlinedTextFieldColors(
                    unfocusedLabelColor = MaterialTheme.colorScheme.inversePrimary,
                    textColor = Color.White
                ),
                maxLines = 1,
                singleLine = true
            )
            SwipeRefresh(
                state = swipeRefreshState,
                onRefresh = {
                    viewModel.onEvent(CompanyListingsEvent.Refresh)
                }
            ) {
                LazyColumn(
                    modifier = Modifier.fillMaxSize()
                ) {
                    items(state.companies.size) {i -&gt;
                        val company = state.companies[i]
                        CompanyItem(
                            company = company,
                            modifier = Modifier
                                .fillMaxWidth()
                                .clickable {
                                    // TODO-FIXME Navigate to detail screen
                                }
                                .padding(16.dp)
                        )
                        if (i &lt; state.companies.size) {
                            Divider(modifier = Modifier.padding(
                                horizontal = 16.dp
                            ))
                        }
                    }
                }
            }
        }
    }

}
@Preview(showBackground = true)
@Composable
fun PreviewCompanyListingsScreen(
) {
    CompanyListingsScreen(
        navController = rememberNavController(),
        viewModel = hiltViewModel()
    )
}</code></pre><h4>Step 23&#8202;&#8212;&#8202;Create UnicornApplication class</h4><p>Create UnicornApplication class in <strong>$PROJECT_ROOT/app/src/main/java/app/unicornapp/android/unicorn/UnicornApplication </strong>and annotate with <code>@HiltAndroidApp</code> as below</p><pre><code>package app.unicornapp.mobile.android.unicorn

import android.app.Application
import dagger.hilt.android.HiltAndroidApp

/**
 * UnicornApplication
 */
@HiltAndroidApp
class UnicornApplication: Application()</code></pre><h4>Step 24&#8202;&#8212;&#8202;Modify AndroidManifest.xml</h4><p>Modify <strong>AndroidManifest.xml</strong> in <strong>$PROJECT_ROOT/app/src/main/AndroidManifest.xml </strong>to include <strong>UnicornApplication</strong> as below</p><pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"&gt;

    &lt;uses-permission android:name="android.permission.INTERNET"/&gt;
    &lt;application
        android:name=".UnicornApplication"
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.App.Launch"
        android:enableOnBackInvokedCallback="true"
        tools:targetApi="31"&gt;
        &lt;activity
            android:name=".MainActivity"
            android:exported="true"
            android:label="@string/app_name"
            android:theme="@style/Theme.App.Launch"&gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.MAIN" /&gt;

                &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;
    &lt;/application&gt;

&lt;/manifest&gt;</code></pre><h4>Step 25&#8202;&#8212;&#8202;Create AppModule class for dependency injection</h4><p>Create <strong>AppModule</strong> class in <strong>$PROJECT_ROOT/app/src/main/java/app/unicornapp/android/unicorn/di/AppModule.kt </strong>to provide StockApi and StockDatabase for DI as below</p><pre><code>package app.unicornapp.mobile.android.unicorn.di

import android.app.Application
import androidx.room.Room
import app.unicornapp.mobile.android.unicorn.data.local.StockDatabase
import app.unicornapp.mobile.android.unicorn.data.remote.StocksApi
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import retrofit2.converter.moshi.MoshiConverterFactory
import retrofit2.create
import javax.inject.Singleton

/**
 * AppModule
 */
@Module
@InstallIn(SingletonComponent::class)
object AppModule {
    @Provides
    @Singleton
    fun providesStockApi(): StocksApi {
        return Retrofit.Builder()
            .baseUrl(StocksApi.STOCKS_BASE_URL)
            .addConverterFactory(MoshiConverterFactory.create())
            .build()
            .create()
    }

    @Provides
    @Singleton
    fun providesStockDatabase(app: Application): StockDatabase {
        return Room.databaseBuilder(
            app,
            StockDatabase::class.java,
            "stockdb.db"
        ).build()
    }
}</code></pre><h4>Step 26&#8202;&#8212;&#8202;Create RepositoryModule class for dependency injection</h4><p>Create RepositoryModule in <strong>$PROJECT_ROOT/app/src/main/java/app/unicornapp/android/unicorn/di/RepositoryModule.kt </strong>to provide concrete implementations of parser and repository as dependency injection dependencies as below</p><pre><code>package app.unicornapp.mobile.android.unicorn.di

import app.unicornapp.mobile.android.unicorn.data.parser.CompanyListingsParser
import app.unicornapp.mobile.android.unicorn.data.parser.CsvParser
import app.unicornapp.mobile.android.unicorn.data.repository.StockRepositoryImpl
import app.unicornapp.mobile.android.unicorn.domain.model.CompanyListing
import app.unicornapp.mobile.android.unicorn.domain.repository.StockRepository
import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

/**
 * RepositoryModule
 */
@Module
@InstallIn(SingletonComponent::class)
abstract class RepositoryModule {
    @Binds
    @Singleton
    abstract fun bindCompanyListingsParser(
        companyListingsParser: CompanyListingsParser
    ): CsvParser&lt;CompanyListing&gt;

    @Binds
    @Singleton
    abstract fun bindStockRepository(
        stockRepositoryImpl: StockRepositoryImpl
    ): StockRepository
}</code></pre><h4>Step 27&#8202;&#8212;&#8202;Ensure that MainActivity is annotated with <code>@AndroidEntryPoint</code></h4><p>Ensure that MainActivity is annotated with <code>@AndroidEntryPoint</code></p><pre><code>@AndroidEntryPoint
class MainActivity : ComponentActivity() {
    lateinit var navController: NavController
    private val viewModel: UnicornViewModel by viewModels()
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        WindowCompat.setDecorFitsSystemWindows(window, false)
        installSplashScreen().apply {
            setKeepOnScreenCondition {
                viewModel.isLoading.value
            }
        }
        setContent {
            UnicornTheme {
                navController = rememberNavController()
                MyApp(navController)
            }
        }
    }

    override fun onBackPressed() {
        super.onBackPressed()
    }
}</code></pre><h4>Step 28&#8202;&#8212;&#8202;Build and&nbsp;Run</h4><p>Build and Run and navigate to Company Listings screen and test the search functionality</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!LKDf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!LKDf!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png 424w, /__u/substackcdn.com/image/fetch/$s_!LKDf!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png 848w, /__u/substackcdn.com/image/fetch/$s_!LKDf!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png 1272w, /__u/substackcdn.com/image/fetch/$s_!LKDf!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!LKDf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png" width="288" height="631" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:631,&quot;width&quot;:288,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!LKDf!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png 424w, /__u/substackcdn.com/image/fetch/$s_!LKDf!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png 848w, /__u/substackcdn.com/image/fetch/$s_!LKDf!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png 1272w, /__u/substackcdn.com/image/fetch/$s_!LKDf!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42a4cd3b-c1aa-430b-8465-b571f0c415cb_288x631.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>App/Build.gradle&#8202;&#8212;&#8202;Double check versions in app/build.gradle</h4><p>Double check versions in app/build.gradle to match the below versions</p><pre><code>plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'kotlin-kapt'
    id 'com.google.dagger.hilt.android'
}

def localPropertiesFile = rootProject.file("local.properties")
def localProperties = new Properties()
localProperties.load(new FileInputStream(localPropertiesFile))

android {
    namespace 'app.unicornapp.mobile.android.unicorn'
    compileSdk 33

    defaultConfig {
        applicationId "app.unicornapp.mobile.android.unicorn"
        minSdk 23
        targetSdk 33
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables {
            useSupportLibrary true
        }
        buildConfigField("String", "API_KEY", localProperties['apiKey'])
        buildConfigField("String", "STOCKS_BASE_URL", localProperties['stocksBaseUrl'])
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }
    kotlinOptions {
        jvmTarget = '17'
        allWarningsAsErrors = false
        freeCompilerArgs += [
                '-opt-in=androidx.compose.material3.ExperimentalMaterial3Api'
        ]
    }
    buildFeatures {
        compose true
    }
    composeOptions {
        kotlinCompilerExtensionVersion '1.4.2'
    }
    packagingOptions {
        resources {
            excludes += '/META-INF/{AL2.0,LGPL2.1}'
        }
    }
}

dependencies {
    // Import the Compose BOM
    implementation platform('androidx.compose:compose-bom:2022.12.00')

    // Core
    implementation 'androidx.core:core-ktx:1.8.0'

    // Compose dependencies
    implementation "androidx.compose.ui:ui"
    implementation "androidx.compose.ui:ui-tooling-preview"
    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
    implementation 'androidx.activity:activity-compose'

    // Splash
    implementation 'androidx.core:core-splashscreen:1.0.0'

    // Compose Navigation
    implementation 'androidx.navigation:navigation-runtime-ktx:2.5.3'
    implementation "androidx.navigation:navigation-compose:2.5.3"

    // Material and Material Extended
    implementation 'androidx.compose.material:material:1.3.1'
    implementation "androidx.compose.material3:material3"
    implementation 'androidx.compose.material:material-icons-extended:1.3.1'

    // SwipeRefresh
    implementation "com.google.accompanist:accompanist-swiperefresh:0.25.1"

    // Open CSV
    implementation 'com.opencsv:opencsv:5.5.2'

    //moshi
    implementation "com.squareup.moshi:moshi-kotlin:1.14.0"
    implementation 'com.squareup.moshi:moshi:1.14.0'
    kapt "com.squareup.moshi:moshi-kotlin-codegen:1.14.0"

    // Retrofit &amp; OkHttp
    implementation 'com.squareup.retrofit2:retrofit:2.5.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
    implementation 'androidx.room:room-common:2.4.2'
    implementation 'androidx.room:room-ktx:2.4.2'
    implementation 'com.squareup.retrofit2:converter-moshi:2.9.0'
    implementation("com.squareup.okhttp3:okhttp:4.9.0")
    implementation("com.squareup.okhttp3:logging-interceptor:4.9.0")

    // Dagger Hilt
    implementation "com.google.dagger:hilt-android:2.44"
    implementation 'androidx.hilt:hilt-navigation-compose:1.0.0'
    kapt "com.google.dagger:hilt-compiler:2.44"

    // Testing and Instrumentation
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
    androidTestImplementation "androidx.compose.ui:ui-test-junit4"
    androidTestImplementation "androidx.compose.ui:ui-test-junit4"
    debugImplementation "androidx.compose.ui:ui-tooling"
    debugImplementation "androidx.compose.ui:ui-tooling"
    debugImplementation "androidx.compose.ui:ui-test-manifest"

}

// Allow references to generated code
kapt {
    correctErrorTypes true
}</code></pre><p>In <a href="https://arunabhdas.com/unicorn-ai-coding-bootcamp-the-professional-developer-guide-to-modern-android-development-part-4187bfbaafb4">Part 2</a> we shall continue implementing the detail screens.</p><p>Below are some of the reference files used for this project.</p><h4>Root build.gradle&#8202;&#8212;&#8202;Double check project level build.gradle</h4><p>Double check project level build.gradle to match the below versions</p><pre><code>buildscript {
    ext {
        compose_version = '1.3.0'
    }
}// Top-level build file where you can add configuration options common to all sub-projects/modules.

// Compatibility Map
// https://developer.android.com/jetpack/androidx/releases/compose-kotlin
// Kotlin 1.8.10 is compatible with Compose Compiler Version 1.4.2
plugins {
    id 'com.android.application' version '8.1.0-alpha03' apply false
    id 'com.android.library' version '8.1.0-alpha03' apply false
    id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
    id 'com.google.dagger.hilt.android' version '2.44' apply false
}


</code></pre><h4>Step&#8202;&#8212;&#8202;Create REST&nbsp;API</h4><p>We may go ahead and run our REST API locally and create the model classes as below</p><pre><code>
cd unicornstack-api

npm run strapi develop


</code></pre><p>Browse to <a href="http://localhost:1337/admin">http://localhost:1337/admin</a> to create FaveStock API</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!ra3a!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff579e567-6a86-4fac-9264-8c9f47751b5b_800x489.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!ra3a!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff579e567-6a86-4fac-9264-8c9f47751b5b_800x489.png 424w, /__u/substackcdn.com/image/fetch/$s_!ra3a!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff579e567-6a86-4fac-9264-8c9f47751b5b_800x489.png 848w, /__u/substackcdn.com/image/fetch/$s_!ra3a!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff579e567-6a86-4fac-9264-8c9f47751b5b_800x489.png 1272w, /__u/substackcdn.com/image/fetch/$s_!ra3a!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff579e567-6a86-4fac-9264-8c9f47751b5b_800x489.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!ra3a!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff579e567-6a86-4fac-9264-8c9f47751b5b_800x489.png" width="800" height="489" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f579e567-6a86-4fac-9264-8c9f47751b5b_800x489.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:489,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!ra3a!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff579e567-6a86-4fac-9264-8c9f47751b5b_800x489.png 424w, /__u/substackcdn.com/image/fetch/$s_!ra3a!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff579e567-6a86-4fac-9264-8c9f47751b5b_800x489.png 848w, /__u/substackcdn.com/image/fetch/$s_!ra3a!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff579e567-6a86-4fac-9264-8c9f47751b5b_800x489.png 1272w, /__u/substackcdn.com/image/fetch/$s_!ra3a!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff579e567-6a86-4fac-9264-8c9f47751b5b_800x489.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="http://localhost:1337/admin">http://localhost:1337/admin</a></figcaption></figure></div><p>The full source code for this tutorial can be found below &#8212;</p><p><strong><a href="https://github.com/arunabhdas/unicornstack/tree/main/unicornstack-android-scaffold">unicornstack/unicornstack-android-scaffold at main &#183; arunabhdas/unicornstack</a></strong><a href="https://github.com/arunabhdas/unicornstack/tree/main/unicornstack-android-scaffold"><br></a><em><a href="https://github.com/arunabhdas/unicornstack/tree/main/unicornstack-android-scaffold">You can't perform that action at this time. You signed in with another tab or window. You signed out in another tab or&#8230;</a></em><a href="https://github.com/arunabhdas/unicornstack/tree/main/unicornstack-android-scaffold">github.com</a></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[NextMachina — How to Build NLP Chatbots and AI Pipelines Using Huggingface Transformers]]></title><description><![CDATA[Introduction to Building Building NLP Chatbots and AI Pipelines Using Huggingface Transformers]]></description><link>https://dasmachinelabs.substack.com/p/nextmachina-how-to-build-nlp-chatbots</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/nextmachina-how-to-build-nlp-chatbots</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Sat, 07 Jan 2023 21:58:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!n10l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec68b4ae-79e5-4fec-b8de-47be313bffda_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!n10l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec68b4ae-79e5-4fec-b8de-47be313bffda_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!n10l!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec68b4ae-79e5-4fec-b8de-47be313bffda_1024x1024.png 424w, /__u/substackcdn.com/image/fetch/$s_!n10l!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec68b4ae-79e5-4fec-b8de-47be313bffda_1024x1024.png 848w, /__u/substackcdn.com/image/fetch/$s_!n10l!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec68b4ae-79e5-4fec-b8de-47be313bffda_1024x1024.png 1272w, /__u/substackcdn.com/image/fetch/$s_!n10l!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec68b4ae-79e5-4fec-b8de-47be313bffda_1024x1024.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!n10l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec68b4ae-79e5-4fec-b8de-47be313bffda_1024x1024.png" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ec68b4ae-79e5-4fec-b8de-47be313bffda_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3147977,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!n10l!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec68b4ae-79e5-4fec-b8de-47be313bffda_1024x1024.png 424w, /__u/substackcdn.com/image/fetch/$s_!n10l!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec68b4ae-79e5-4fec-b8de-47be313bffda_1024x1024.png 848w, /__u/substackcdn.com/image/fetch/$s_!n10l!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec68b4ae-79e5-4fec-b8de-47be313bffda_1024x1024.png 1272w, /__u/substackcdn.com/image/fetch/$s_!n10l!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec68b4ae-79e5-4fec-b8de-47be313bffda_1024x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><a href="https://huggingface.co/">HuggingFace</a> is a platform for natural language processing (NLP) research and development. It has a Python library called <code>transformers</code>, which provides access to a large number of pre-trained NLP models for tasks such as language translation, text classification, and question answering.</p><p>One of the main features of <code>transformers</code> is its ability to fine-tune pre-trained models on specific tasks and datasets, which allows developers to leverage the power of large-scale, pre-trained models without the need to train their own from scratch. This can save a significant amount of time and resources, and also makes it possible for developers with limited data to build NLP systems that perform well.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>It provides state of the art language processing models</p><p>It provides a clean API that makes it simple to build powerful NLP pipelines</p><p>In this example, we are going to learn how to use Huggingface to create a chatbot called NextMachina</p><ul><li><p>How to use the Pipeline</p></li><li><p>How to use Model / Tokenizer</p></li><li><p>How to combine with PyTorch / TensorFlow</p></li><li><p>How to use models from the official ModelHub</p></li><li><p>How to finetune our own models</p></li></ul><h2><strong>Getting Started</strong></h2><p>Let&#8217;s start by creating a new virtual environment</p><p>Initialize and activate a new virtual environment using</p><pre><code>python3 -m venv .env
source .env/bin/activate
pip install transformers
pip install torch</code></pre><h2><strong>GPT2 Pipeline</strong></h2><pre><code>import torch
import transformers
model = transformers.GPT2LMHeadModel.from_pretrained('gpt2')

def generate_response(input_str):
  tokenizer = transformers.GPT2Tokenizer.from_pretrained('gpt2')
  input_ids = torch.tensor(tokenizer.encode(input_str)).unsqueeze(0)  # Encode the input string as a tensor
  attention_mask = torch.ones_like(input_ids)  # Create an attention mask
  pad_token_id = tokenizer.pad_token_id  # Get the pad token id
  output = model.generate(input_ids, attention_mask=attention_mask, pad_token_id=pad_token_id, max_length=30, top_p=0.9, top_k=0)  # Generate a response
  return tokenizer.decode(output[0], skip_special_tokens=True)  # Decode the response and remove special tokens


while True:
  input_str = input("You: ")
  if input_str == 'exit':
    break
  response = generate_response(input_str)
  print("AI:", response)</code></pre><h2><strong>Run GPT2 Pipeline</strong></h2><p>Running the above pipeline gives us the following output</p><pre><code>python pipeline.py 
You: How can we solve some of the complex challenges facing humankind?
Setting `pad_token_id` to `eos_token_id`:50256 for open-end generation.
AI: How can we solve some of the complex challenges facing humankind?

The answer is simple: we need to understand the world around us.


You: </code></pre><h2><strong>Sentiment Analysis Pipeline</strong></h2><p>Let&#8217;s create a sentiment analysis pipeline. The below pipeline does sentiment analysis using transformers</p><pre><code>import torch

from transformers import pipeline

classifier = pipeline("sentiment-analysis")

res = classifier("The way to achieve consciousness is through quantum gravity research")

print(res)</code></pre><h2><strong>Run Sentiment Analysis Pipeline</strong></h2><p>Let&#8217;s run the above pipeline and note that we get a label and a score as the output</p><pre><code>python pipeline-sentiment-analysis.py 
No model was supplied, defaulted to distilbert-base-uncased-finetuned-sst-2-english and revision af0f99b (https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english).
Using a pipeline without specifying a model name and revision in production is not recommended.
[{'label': 'POSITIVE', 'score': 0.9907891154289246}]</code></pre><h2><strong>Text Generation Pipeline</strong></h2><p>Let&#8217;s create a text generation pipeline as below</p><pre><code>import torch

from transformers import pipeline

generator = pipeline("text-generation", model="distilgpt2")

res = generator(
    "I am the author Lewis Carrol. And the meaning of the word Jabberwocky is ",
    max_length=300,
    num_return_sequences=2,
)

print(res)</code></pre><h2><strong>Run Text Generation Pipeline</strong></h2><p>Running the text generation pipeline gives us the following output</p><pre><code>python pipeline-text-generation.py 
Setting `pad_token_id` to `eos_token_id`:50256 for open-end generation.
[{'generated_text': 'I am the author Lewis Carrol. And the meaning of the word Jabberwocky is ____.'}, {'generated_text': 'I am the author Lewis Carrol. And the meaning of the word Jabberwocky is vernacular. We are both taught by a young man (Thomas S. Carrol) who teaches me how to deal with jibberwockies and the real-life world.\nI have been in the hospital from my last days being kicked for a long time. As a result, my stomach and my head aches. I ask myself, \'Do you have to be a lawyer?\' I tell myself as one, \'Shouldn\'t I just get out of jail?\' I ask myself, \'I want to know where I\'ll go if I can, and who I\'ll be?\' I answer, \'I can\'t get into a coma, let alone die.\' I then say, \'That I am being the best of my self, and will be a better man.\'" So why didn\'t you believe it was the case?\nAs for my own feelings as a mother, I tell myself: "I want to be in an emergency room, so I really need to stop my life from going out of way to deal with it. That\'s the message of this story: I want to be a better woman because that\'s what we live in now. And I want to fight back like this."\nIn other words, why do you believe that people want to go to court and see us at trial for abusing us?\nAs for my own feelings as a mother'}]</code></pre><h2><strong>Zero Shot Classification Pipeline</strong></h2><p>Let us create a zero shot classification, where we provide input text without knowing the corresponding labels. We can add the possible labels and see which label is assigned the highest score</p><pre><code>
import torch

from transformers import pipeline

classifier = pipeline("zero-shot-classification")

res = classifier(
    "We are the droids that we've been looking for all along",
    candidate_labels=["science fiction", "documentary", "economics", "politics", "social science"]
)

print(res)</code></pre><h2><strong>Run Zero Shot Classification Pipeline</strong></h2><p>Running the zero shot classification pipeline shows us that we get the highest score assigned to science fiction as seen below</p><pre><code>==&gt; python pipeline-zero-shot-classification.py 
No model was supplied, defaulted to facebook/bart-large-mnli and revision c626438 (https://huggingface.co/facebook/bart-large-mnli).
Using a pipeline without specifying a model name and revision in production is not recommended.
{'sequence': "We are the droids that we've been looking for all along", 'labels': ['documentary', 'science fiction', 'social science', 'politics', 'economics'], 'scores': [0.38057050108909607, 0.3565145432949066, 0.17014123499393463, 0.04872298613190651, 0.0440506711602211]}</code></pre><h2><strong>Improve Sentiment Analysis Pipeline</strong></h2><p>We may improve the sentiment analysis pipeline as below</p><pre><code>import torch

from transformers import pipeline
from transformers import AutoTokenizer, AutoModelForSequenceClassification

model_name = "distilbert-base-uncased-finetuned-sst-2-english"
model = AutoModelForSequenceClassification.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)

classifier = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
res = classifier("The way to achieve consciousness is through quantum gravity research")

sequence = "Understanding how a tokenizer works in transformer"
res_tokenizer = tokenizer(sequence)
print(res_tokenizer)
tokens = tokenizer.tokenize(sequence)
print(tokens)
ids = tokenizer.convert_tokens_to_ids(tokens)
print(ids)
decoded_string = tokenizer.decode(ids)
print(decoded_string)

print(res)</code></pre><p>When we run the above pipeline, we get the following output</p><pre><code>==&gt; python pipeline-sentiment-analysis.py 
{'input_ids': [101, 4824, 2129, 1037, 19204, 17629, 2573, 1999, 10938, 2121, 102], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
['understanding', 'how', 'a', 'token', '##izer', 'works', 'in', 'transform', '##er']
[4824, 2129, 1037, 19204, 17629, 2573, 1999, 10938, 2121]
understanding how a tokenizer works in transformer
[{'label': 'POSITIVE', 'score': 0.9907891154289246}]</code></pre><p>This indicates that the dictionary that is returned from the tokenizer adds tokens for start and end in addition to the tokens for each word.</p><p>The <strong>attention mask </strong>is as below</p><pre><code>'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]</code></pre><p>An attention mask of 0 means that the attention layer should ignore the token.</p><h2><strong>FineTune the Model With a Pytorch Training Loop</strong></h2><p>We can create a pytorch training loop as follows</p><pre><code>
from transformers import pipeline
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
import torch.nn.functional as F


model_name = "distilbert-base-uncased-finetuned-sst-2-english"
model = AutoModelForSequenceClassification.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
classifier = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)

training_data = ["God is a concept by which we measure our pain", "The mind is the matrix"]
res = classifier(training_data)
print(res)

batch = tokenizer(training_data, padding=True, truncation=True, max_length=512, return_tensors="pt")
print(batch)

with torch.no_grad():
    outputs = model(**batch)
    print(outputs)
    predictions = F.softmax(outputs.logits, dim=1)
    print(predictions)
    labels = torch.argmax(predictions, dim=1)
    print(labels)

</code></pre><p>Running the above gives us the following output</p><pre><code>==&gt; python pipeline-sentiment-analysis.py 
[{'label': 'POSITIVE', 'score': 0.9929860234260559}, {'label': 'POSITIVE', 'score': 0.9969401359558105}]
{'input_ids': tensor([[ 101, 2643, 2003, 1037, 4145, 2011, 2029, 2057, 5468, 2256, 3255,  102],
        [ 101, 1996, 2568, 2003, 1996, 8185,  102,    0,    0,    0,    0,    0]]), 'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
        [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]])}
SequenceClassifierOutput(loss=None, logits=tensor([[-2.4429,  2.5099],
        [-2.8577,  2.9286]]), hidden_states=None, attentions=None)
tensor([[0.0070, 0.9930],
        [0.0031, 0.9969]])
tensor([1, 1])</code></pre><p>If we compare the output from the classifier with the ouput from the pytorch predictions, we can see that the values match up, i.e. the classifier assigns a score of 0.9929860234260559 and the pytorch tensor value is 0.993</p><p>For the second element in the training data dictionary, the classifier assigns a score of 0.9969401359558105 and the pytorch tensor value is 0.9969</p><p>In this manner, we can fine-tune our models using a pytorch training loop.</p><h2><strong>Fine Tuning Models</strong></h2><p>The steps for fine tuning models are as follows -</p><ul><li><p>Prepare dataset</p></li><li><p>Load pretrained Tokenizer, call it with dataset -&gt; encoding</p></li><li><p>Build PyTorch dataset with encodings</p></li><li><p>Load pretrained model</p></li><li><p>Load Trainers and train</p></li><li><p>Native PyTorch training loop</p></li></ul><h2><strong>Github</strong></h2><p>Complete source code for this example is available below</p><p><a href="https://github.com/arunabhdas/NextMachina">https://github.com/arunabhdas/NextMachina</a></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[The End of Spacetime And The Hardest Problem]]></title><description><![CDATA[Some predictions about why Spacetime as described by Relativity may be doomed and why consciousness is likely fundamental]]></description><link>https://dasmachinelabs.substack.com/p/the-end-of-spacetime-and-the-hardest</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/the-end-of-spacetime-and-the-hardest</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Wed, 04 Jan 2023 19:12:06 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Kqcu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed93e2-4c8d-407e-857c-6d94d80f448e_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!Kqcu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed93e2-4c8d-407e-857c-6d94d80f448e_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!Kqcu!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed93e2-4c8d-407e-857c-6d94d80f448e_1024x1024.png 424w, /__u/substackcdn.com/image/fetch/$s_!Kqcu!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed93e2-4c8d-407e-857c-6d94d80f448e_1024x1024.png 848w, /__u/substackcdn.com/image/fetch/$s_!Kqcu!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed93e2-4c8d-407e-857c-6d94d80f448e_1024x1024.png 1272w, /__u/substackcdn.com/image/fetch/$s_!Kqcu!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed93e2-4c8d-407e-857c-6d94d80f448e_1024x1024.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!Kqcu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed93e2-4c8d-407e-857c-6d94d80f448e_1024x1024.png" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/f1ed93e2-4c8d-407e-857c-6d94d80f448e_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3147977,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!Kqcu!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed93e2-4c8d-407e-857c-6d94d80f448e_1024x1024.png 424w, /__u/substackcdn.com/image/fetch/$s_!Kqcu!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed93e2-4c8d-407e-857c-6d94d80f448e_1024x1024.png 848w, /__u/substackcdn.com/image/fetch/$s_!Kqcu!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed93e2-4c8d-407e-857c-6d94d80f448e_1024x1024.png 1272w, /__u/substackcdn.com/image/fetch/$s_!Kqcu!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ed93e2-4c8d-407e-857c-6d94d80f448e_1024x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2><strong>The Easy Problems</strong></h2><p>The theory of relativity is a set of physical theories developed by Albert Einstein that describe the nature of space and time and the relationship between matter and energy. There are two main theories of relativity: special relativity and general relativity.</p><p>Special relativity was developed by Einstein in the early 20th century. It was based on the idea that the laws of physics should be the same for all observers, regardless of their relative motion, and that the speed of light is the same for all inertial observers (those who are not accelerating). Einstein&#8217;s theory of special relativity was published in 1905, and it revolutionized our understanding of the nature of space and time.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>General relativity was developed by Einstein in the 1910s. It was based on the idea that the presence of matter and energy warps the fabric of spacetime, and that the motion of objects is influenced by the curvature of spacetime. Einstein&#8217;s theory of general relativity was published in 1915, and it provided a new understanding of the nature of gravity and the behavior of massive objects.</p><p>Einstein&#8217;s theories of relativity have had a profound impact on our understanding of the physical world and have led to many important technological and scientific developments. They are still an active area of research and continue to be refined and tested by scientists today.</p><h2><strong>Development of Quantum Mechanics</strong></h2><p>Quantum mechanics is a fundamental theory in physics that describes the behavior of matter and energy at the atomic and subatomic level. It was developed in the early 20th century and has had a profound impact on our understanding of the physical world.</p><p>The development of quantum mechanics was a gradual process that involved the contributions of many scientists over a period of several decades. Some of the key milestones in the history of quantum mechanics include:</p><p>1900: Max Planck proposes the idea of quantized energy to explain the observed spectrum of blackbody radiation.</p><p>1913: Niels Bohr develops a model of the atom that incorporates the principles of quantized energy and explains the observed spectra of hydrogen.</p><p>1927: Werner Heisenberg formulates the uncertainty principle, which states that it is impossible to simultaneously know the precise position and momentum of a subatomic particle with infinite precision.</p><p>1932: Paul Dirac develops the theory of quantum electrodynamics, which combines quantum mechanics with special relativity to describe the behavior of charged particles.</p><p>1935: Erwin Schr&#246;dinger develops the Schr&#246;dinger equation, which is a mathematical equation that describes the evolution of a quantum mechanical system over time.</p><p>1964: The Higgs mechanism is proposed to explain the origin of mass in subatomic particles.</p><p>Overall, the development of quantum mechanics was a major turning point in the history of physics and has had a profound impact on our understanding of base reality.</p><h2><strong>How Quantum Mechanics is at odds with Theories of Relativity</strong></h2><p>Quantum mechanics and the theory of relativity are both highly successful theories that have been instrumental in our understanding of the physical world. However, they do contain some concepts and predictions that seem to contradict each other.</p><p>One of the main ways in which quantum mechanics and the theory of relativity differ is in their treatment of space and time. The theory of relativity, which includes both special relativity and general relativity, describes the nature of space and time as a dynamic, flexible entity that is influenced by the presence of matter and energy. It holds that the laws of physics are the same for all observers, regardless of their relative motion, and that the passage of time can be affected by the relative speed of the observer or the gravitational field of massive objects.</p><p>Quantum mechanics, on the other hand, is a theory that describes the behavior of matter and energy at the atomic and subatomic level. It is a probabilistic theory that does not provide a complete and definite description of the state of a system, but rather describes the probability that a system will be observed in a particular state or configuration. Quantum mechanics introduces the concept of wave-particle duality, which states that particles such as electrons and photons can exhibit both wave-like and particle-like behavior, depending on how they are observed or measured.</p><p>These and other differences between quantum mechanics and the theory of relativity have led to much discussion and debate among physicists, and there have been efforts to develop theories that can reconcile these two seemingly incompatible approaches. One example of such a theory is quantum field theory, which combines the principles of quantum mechanics with the principles of special relativity. However, a fully satisfactory resolution to the apparent contradictions between quantum mechanics and the theory of relativity has yet to be found, and it remains an active area of research.</p><h2><strong>Does Quantum Field Theory resolve the contradictions between Relativity and Quantum Mechanics?</strong></h2><p>Quantum field theory is a fundamental theory in physics that combines the principles of quantum mechanics with the principles of special relativity. It is a theoretical framework that is used to describe the behavior of matter and energy at the atomic and subatomic level, and it has been highly successful in explaining a wide range of physical phenomena and making highly accurate predictions.</p><p>One of the main ways in which quantum field theory resolves the contradictions between relativity and quantum mechanics is by providing a framework for combining these two theories in a consistent way. It does this by treating fields, such as the electromagnetic field and the Higgs field, as the fundamental entities of the universe, rather than discrete particles. This allows quantum field theory to incorporate the principles of special relativity, which describe the nature of space and time in the presence of relative motion, while also incorporating the principles of quantum mechanics, which describe the probabilistic nature of matter and energy at the atomic and subatomic level.</p><p>Overall, quantum field theory has been instrumental in reconciling some of the apparent contradictions between relativity and quantum mechanics, and it has provided a theoretical framework that has been highly successful in describing the behavior of matter and energy at the fundamental level.</p><p>However, it is not a complete theory, and there are certain aspects of the physical world that it does not fully explain or describe.</p><p>One of the main gaps in quantum field theory is its inability to fully reconcile the principles of quantum mechanics with the principles of general relativity, which is a theory that describes the nature of space and time in the presence of gravitational fields. While quantum field theory can successfully describe the behavior of matter and energy in the presence of special relativity, it does not fully incorporate the effects of gravity, which are described by general relativity. This has led to the development of theories such as string theory, which attempt to extend the principles of quantum field theory to include the effects of general relativity.</p><p>Another gap in quantum field theory is its inability to fully explain the nature of consciousness and subjective experience. While quantum mechanics has been successful in describing the behavior of matter and energy at the atomic and subatomic level, it does not provide a complete explanation for the emergence of consciousness and the subjective experiences of living beings. This is known as the &#8220;hard problem of consciousness,&#8221; and it remains an active area of research and debate among philosophers and scientists.</p><h2><strong>The Hard Problem</strong></h2><p>The hard problem of consciousness is a philosophical problem that arises from the question of how and why we have subjective experiences, such as feelings, thoughts, and perceptions. It is called the &#8220;hard&#8221; problem because it is not clear how current scientific theories and approaches can fully explain the existence and nature of consciousness.</p><p>There are a number of different approaches that scientists and philosophers have taken in attempting to solve the hard problem of consciousness. Some of the current efforts to address this problem include:</p><p>Neuroscientific approaches: Some scientists and philosophers believe that the key to understanding consciousness may lie in understanding the neural basis of subjective experience. They are working to identify the neural processes and mechanisms that give rise to consciousness and to develop theories about how these processes work.</p><p>Information-based approaches: Some researchers have proposed that consciousness is a form of information processing or computation, and that it arises from the way that the brain processes and integrates information. These approaches seek to understand how the brain processes and integrates information, and how this process gives rise to subjective experience.</p><p>Quantum approaches: Some scientists and philosophers have proposed that quantum mechanical phenomena may play a role in the emergence of consciousness. These approaches seek to understand how the principles of quantum mechanics might be related to the phenomenon of consciousness.</p><p>Phenomenological approaches: Some researchers have focused on the subjective experiences of individuals and have sought to describe and understand these experiences in detail. These approaches seek to understand the nature of subjective experience from the perspective of the individual experiencing it.</p><p>Overall, the hard problem of consciousness is a complex and challenging problem that remains an active area of research and debate.</p><h2><strong>Why is spacetime likely not fundamental?</strong></h2><p>However, some physicists have proposed that spacetime is not a fundamental concept, but rather emerges from more basic underlying structures or principles. This idea is motivated by the fact that the concept of spacetime is highly abstract and depends on the choice of a particular reference frame or coordinate system. It is also influenced by the presence of matter and energy, which can warp the fabric of spacetime and affect the way that objects move through it.</p><p>There are a number of different approaches that have been taken to explore the idea that spacetime is not fundamental. These approaches include:</p><p>Quantum gravity: Some theories, such as string theory, propose that spacetime is not a fundamental concept, but rather emerges from more basic underlying structures or principles, such as the interactions between strings or other fundamental entities.</p><p>Holographic duality: The idea of holographic duality proposes that a theory of gravity in a higher-dimensional space can be described by a theory in a lower-dimensional space. This idea has the potential to unify our understanding of the fundamental forces of nature and to provide insight into the nature of black holes and the behavior of matter and energy at the highest energies.</p><p>Overall, the idea that spacetime is not fundamental is a topic of active research and debate in physics, and it is an area of study that has the potential to provide new insights into the fundamental nature of reality.</p><h2><strong>What is Fundamental?</strong></h2><p>There are a number of different proposals for the underlying structures or principles that might be fundamental if spacetime is not a fundamental concept. These proposals are based on various theoretical frameworks and are motivated by the desire to understand the nature of space, time, and the fundamental forces of nature at a deeper level. Some of the structures or principles that have been proposed include:</p><p>Strings: In string theory, it is proposed that the fundamental building blocks of the universe are one-dimensional objects known as strings. These strings can vibrate at different frequencies, and the different modes of vibration correspond to different particles and forces.</p><p>Quantum fields: In quantum field theory, it is proposed that the fundamental building blocks of the universe are fields, such as the electromagnetic field and the Higgs field. These fields are described by mathematical equations, and the behavior of particles and forces can be understood in terms of the interactions of these fields.</p><p>Information: Some approaches, such as the holographic principle, propose that the fundamental building blocks of the universe are not physical objects, but rather bits of information. In this view, the universe is seen as a holographic projection of information that is encoded on a boundary or surface.</p><p>Pre-geometry: In pre-geometric approaches, it is proposed that the concept of spacetime emerges from more basic underlying structures or principles that are not geometric in nature. These approaches seek to understand the nature of space and time at a deeper level, and to explain how the concept of spacetime arises from these underlying structures.</p><p>Consciousness : Some approaches to understanding consciousness propose that it is a fundamental aspect of the universe, and that it cannot be reduced to more basic physical or material processes. These approaches often rely on concepts such as dualism, which posits that consciousness is a non-physical entity that exists alongside physical matter, or panpsychism, which posits that consciousness is a fundamental property of the universe that is present even at the most basic levels of reality.</p><p>These are just a few examples of the various structures or principles that have been proposed as the underlying foundations of the universe if spacetime is not considered fundamental. The nature of these underlying structures or principles is an active area of research and debate in physics, and it is an area of study that has the potential to provide new insights into the fundamental nature of reality.</p><h2><strong>Why Consciousness Is Likely Fundamental</strong></h2><p>There have been a number of recent scientific developments that have contributed to the discussion and debate about the nature of consciousness and its relationship to the physical world.</p><p>Some of the recent scientific developments that have been cited as potentially relevant to the question of the fundamental nature of consciousness include:</p><p>The discovery of non-local correlations in quantum mechanics: Some researchers have argued that the phenomenon of non-local correlations, which describes the observed correlations between distant particles that cannot be explained by classical physics, may be related to the phenomenon of consciousness. However, it is not clear how these correlations relate to consciousness or how they might support the idea that consciousness is a fundamental aspect of the universe.</p><p>The relationship between consciousness and the brain: Some researchers have suggested that the way that the brain processes and integrates information may be related to the emergence of consciousness. However, it is not yet clear how the activity of the brain gives rise to subjective experience or how it might support the idea that consciousness is a fundamental aspect of the universe.</p><p>The role of quantum mechanics in the brain: Some researchers have proposed that quantum mechanical phenomena may play a role in the functioning of the brain and the emergence of consciousness. However, it is not yet clear how quantum mechanics relates to the brain or consciousness, or how it might support the idea that consciousness is a fundamental aspect of the universe.</p><h2><strong>The Role of Microtubules in a Quantum Brain</strong></h2><p>Stuart Hameroff is a researcher and anesthesiologist who has proposed a theory about the relationship between consciousness and the brain, known as the &#8220;orchestrated objective reduction&#8221; (Orch OR) theory. This theory suggests that consciousness arises from the quantum mechanical behavior of microtubules within neurons, which are small protein structures that play a role in the structural support and function of cells.</p><p>According to the Orch OR theory, the quantum mechanical activity of microtubules within neurons acts as a &#8220;conduit&#8221; for consciousness, and the collapse of these quantum states gives rise to subjective experience. The theory also proposes that the brain acts as a &#8220;quantum computer&#8221; that processes and integrates information using these quantum mechanical processes.</p><h2><strong>The End of Spacetime</strong></h2><p>Nima Arkani-Hamed is a theoretical physicist who has made contributions to a number of areas of physics, including the study of fundamental structures in the universe and the relationship between quantum mechanics and gravity. However, to my knowledge, Arkani-Hamed&#8217;s research has not directly addressed the question of the fundamental nature of consciousness.</p><p>While Arkani-Hamed&#8217;s research has focused on fundamental structures in the universe and the relationship between different physical theories, it is not directly related to the question of the fundamental nature of consciousness or the relationship between consciousness and the physical world. Therefore, it is not clear whether Arkani-Hamed&#8217;s research supports the idea that consciousness is a fundamental aspect of the universe or whether it is compatible with theories that propose that consciousness is an emergent phenomenon that arises from more basic physical processes.</p><h2><strong>Conscious Realism</strong></h2><p>Donald Hoffman is a cognitive scientist and philosopher who has proposed a theory about the nature of consciousness and its relationship to the physical world. His theory, known as the &#8220;conscious realism&#8221; theory, suggests that our perceptions of the physical world are not an accurate representation of reality, but rather are shaped by evolutionary pressures to maximize our chances of survival.</p><p>According to the conscious realism theory, the universe consists of a vast network of interacting information, and our brains evolved to process this information in a way that allows us to navigate our environment and make decisions. However, the theory suggests that the way that the brain processes and integrates this information does not necessarily reflect the true nature of the universe, but rather reflects the way that the brain has evolved to interpret the information it receives.</p><p>The conscious realism theory has attracted some attention and has been the subject of scientific research and discussion, but it is not yet widely accepted as a viable explanation for consciousness or the nature of reality. The theory is still the subject of debate and research, and it is not yet clear whether it provides a satisfactory explanation for the phenomenon of consciousness or whether it supports the idea that consciousness is a fundamental aspect of the universe.</p><h2><strong>The Hard Problem</strong></h2><p>David Chalmers is a philosopher and cognitive scientist who has made significant contributions to the study of consciousness and the philosophy of mind. One of his most influential ideas is the &#8220;hard problem of consciousness,&#8221; which refers to the question of how and why we have subjective experiences, such as feelings, thoughts, and perceptions.</p><p>Chalmers has proposed that the hard problem of consciousness is a fundamental and irreducible aspect of the universe, and that it cannot be explained or reduced to more basic physical or material processes. He has argued that current scientific theories and approaches are unable to fully explain the existence and nature of consciousness, and that a new approach or framework is needed to understand this phenomenon.</p><p>In addition to his work on the hard problem of consciousness, Chalmers has also made significant contributions to the study of the relationship between consciousness and the physical world, and to the development of philosophical theories about the nature of consciousness and the mind. His research has been influential in shaping the current debates and discussions about consciousness and its place in the universe, and he is widely regarded as one of the leading figures in the field of philosophy of mind.</p><h2><strong>Conclusions</strong></h2><p>To conclude , it is likely that researchers will continue to explore a wide range of approaches and perspectives in their efforts to understand the nature of consciousness and its relationship to the physical world.</p><p>Some of the areas of research that are likely to continue to be of interest to scientists and philosophers include:</p><p>The neural basis of consciousness: Researchers will likely continue to study the brain and its function in order to understand the neural processes and mechanisms that give rise to consciousness. This research may involve techniques such as neuroimaging, brain-machine interfaces, and other methods for studying brain activity.</p><p>The relationship between consciousness and quantum mechanics: Some researchers will likely continue to explore the possibility that quantum mechanical phenomena may play a role in the emergence of consciousness. This research may involve the study of quantum effects in the brain and other systems, as well as the development of theoretical models that seek to understand the relationship between quantum mechanics and consciousness.</p><p>Information-based approaches: Researchers may continue to explore the idea that consciousness is a form of information processing or computation, and that it arises from the way that the brain processes and integrates information. This research may involve the development of computational models of consciousness and the study of the ways in which the brain processes and integrates information.</p><p>Phenomenological approaches: Some researchers may continue to focus on the subjective experiences of individuals and seek to understand the nature of these experiences in detail. This research may involve the use of methods such as introspection, self-report, and other methods for studying subjective experience.</p><p>Overall, the future of research into consciousness is likely to involve a wide range of approaches and perspectives, and it is an area of study that has the potential to provide new insights into the fundamental nature of reality.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[The Grand Unified Theory of Most Things]]></title><description><![CDATA[The epistemological glitches at the heart of ontological reality]]></description><link>https://dasmachinelabs.substack.com/p/the-grand-unified-theory-of-most</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/the-grand-unified-theory-of-most</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Mon, 02 Jan 2023 09:21:36 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!7MSU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6074e85-a0da-4646-9bde-83d5bf9ef4bc_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!7MSU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6074e85-a0da-4646-9bde-83d5bf9ef4bc_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!7MSU!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6074e85-a0da-4646-9bde-83d5bf9ef4bc_1024x1024.png 424w, /__u/substackcdn.com/image/fetch/$s_!7MSU!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6074e85-a0da-4646-9bde-83d5bf9ef4bc_1024x1024.png 848w, /__u/substackcdn.com/image/fetch/$s_!7MSU!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6074e85-a0da-4646-9bde-83d5bf9ef4bc_1024x1024.png 1272w, /__u/substackcdn.com/image/fetch/$s_!7MSU!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6074e85-a0da-4646-9bde-83d5bf9ef4bc_1024x1024.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!7MSU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6074e85-a0da-4646-9bde-83d5bf9ef4bc_1024x1024.png" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/f6074e85-a0da-4646-9bde-83d5bf9ef4bc_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3147977,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!7MSU!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6074e85-a0da-4646-9bde-83d5bf9ef4bc_1024x1024.png 424w, /__u/substackcdn.com/image/fetch/$s_!7MSU!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6074e85-a0da-4646-9bde-83d5bf9ef4bc_1024x1024.png 848w, /__u/substackcdn.com/image/fetch/$s_!7MSU!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6074e85-a0da-4646-9bde-83d5bf9ef4bc_1024x1024.png 1272w, /__u/substackcdn.com/image/fetch/$s_!7MSU!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff6074e85-a0da-4646-9bde-83d5bf9ef4bc_1024x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>The prevailing scientific theories, namely, Quantum Field Theory and General Relativity, seem to indicate that space-time is not absolute and fundamental.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p><strong>Is Space Time Fundamental?</strong></p><p>Space-time is a mathematical model that combines three-dimensional space and time into a single four-dimensional structure. It is a fundamental concept in physics, and plays a central role in our modern understanding of the universe.</p><p>In Einstein&#8217;s theory of relativity, space-time is viewed as a dynamic, flexible entity that is influenced by the presence of matter and energy. According to this theory, the curvature of space-time is determined by the distribution of mass and energy within it, and this curvature determines the way that objects move and the passage of time.</p><p>While space-time is a useful and widely accepted concept in physics, it is not necessarily the most fundamental level of reality. Some theories, such as string theory, propose that space-time may itself emerge from more fundamental structures or principles. Ultimately, the nature of space-time and its place in the fundamental structure of the universe is an active area of research and debate in physics.</p><p><strong>Why Quantum Mechanics Is Incomplete</strong></p><p>The Schr&#246;dinger Equation is supposed to be the way to predict the state of the system. However, the Schr&#246;dinger Equation doesn&#8217;t reconcile the measurement problem and doesn&#8217;t explain the collapse of the wave function.</p><p>Von Neumann, Wigner and others believed that it is the conscious being that makes the measurement, thereby collapsing the wave function.</p><p>The hard problem of measurement is a term used in the field of quantum mechanics to refer to the difficulty in understanding how measurement or observation can affect the behavior of a quantum system. In quantum mechanics, it is a fundamental principle that the act of observation or measurement can change the state of a quantum system, a phenomenon known as wave function collapse.</p><p>However, it is not well understood exactly how or why this occurs. The hard problem of measurement arises because it is not clear how the act of observation, which is a macroscopic and classical process, can have such a profound effect on the behavior of a quantum system, which is described by quantum mechanical principles.</p><p>The hard problem of measurement is an active area of research in quantum mechanics, and there are a number of different approaches and interpretations that have been proposed to try to understand this phenomenon. However, a complete and satisfactory solution to the hard problem of measurement has yet to be found, and it remains one of the most perplexing and mysterious aspects of quantum mechanics.</p><p><strong>Why Quantum Mechanics Is Incompatible With Materialism</strong></p><p>Quantum mechanics is a fundamental theory in physics that describes the behavior of matter and energy at the atomic and subatomic level. It has been extremely successful in explaining a wide range of phenomena and making highly accurate predictions.</p><p>However, some people argue that quantum mechanics is incompatible with materialism, which is the philosophical view that matter is the fundamental substance of the universe and that everything can be explained in terms of matter and its interactions. This is because quantum mechanics introduces certain concepts and behaviors that seem to contradict our classical understanding of the world and the nature of matter.</p><p>For example, according to quantum mechanics, particles such as electrons and photons can exhibit both wave-like and particle-like behavior, depending on how they are observed or measured. This is known as wave-particle duality, and it seems to contradict our classical understanding of matter as being composed of discrete, separate objects.</p><p>Additionally, the uncertainty principle, which is a fundamental principle of quantum mechanics, states that it is impossible to simultaneously know the precise position and momentum of a subatomic particle with infinite precision. This seems to contradict the idea that matter is a deterministic, fully predictable entity.</p><p>These and other features of quantum mechanics have led some people to argue that it is incompatible with materialism and that our understanding of the nature of reality must go beyond a purely materialistic perspective. However, it is worth noting that there is ongoing debate and research on this topic, and the ultimate relationship between quantum mechanics and materialism is not yet fully understood.</p><p><strong>Reconciliation With The Hard Problem Of Consciousnes</strong>s</p><p>The hard problem of consciousness, on the other hand, is a philosophical problem that arises from the question of how and why we have subjective experiences, such as feelings, thoughts, and perceptions. It is called the &#8220;hard&#8221; problem because it is not clear how current scientific theories and approaches can fully explain the existence and nature of consciousness.</p><p>At present, there is no widely accepted way to reconcile quantum field theory and the hard problem of consciousness. While some people have proposed that quantum mechanics may play a role in understanding consciousness, these ideas are still highly speculative and are not widely accepted within the scientific community.</p><p>It is worth noting that the relationship between quantum mechanics and consciousness is an active area of research and debate, and it is possible that future developments in our understanding of these fields may help to shed light on the hard problem of consciousness. However, it is also possible that the hard problem of consciousness may ultimately resist a purely scientific explanation and may require a more philosophical or non-scientific approach to be fully understood.</p><p><strong>Solutions to the hard problems</strong></p><p>In quantum mechanics, it is a fundamental principle that the act of observation or measurement can change the state of a quantum system, a phenomenon known as wave function collapse. However, it is not well understood exactly how or why this occurs, and the hard problem of measurement arises because it is not clear how the act of observation, which is a macroscopic and classical process, can have such a profound effect on the behavior of a quantum system, which is described by quantum mechanical principles.</p><p>There are a number of different approaches and interpretations that have been proposed to try to understand the hard problem of measurement. These include the Copenhagen interpretation, which holds that the act of measurement collapses the wave function and determines the outcome of the measurement, and the many-worlds interpretation, which proposes that wave function collapse does not actually occur, and that all possible outcomes described by the wave function are realized in different parallel universes. However, a complete and satisfactory solution to the hard problem of measurement has yet to be found, and it remains one of the most perplexing and mysterious aspects of quantum mechanics.</p><p>The hard problem of consciousness is a philosophical problem that arises from the question of how and why we have subjective experiences, such as feelings, thoughts, and perceptions. It is called the &#8220;hard&#8221; problem because it is not clear how current scientific theories and approaches can fully explain the existence and nature of consciousness. At present, there are no widely accepted solutions to the hard problem of consciousness, and it remains a topic of much debate and speculation among philosophers and scientists. Some people have proposed that quantum mechanics may play a role in understanding consciousness, but these ideas are still highly speculative and are not widely accepted within the scientific community.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[The Importance of Being Ernest About the Future of Energy]]></title><description><![CDATA[The importance of knowing where the puck is going to be, before one can skate to where the puck is going to be]]></description><link>https://dasmachinelabs.substack.com/p/the-importance-of-being-ernest-about</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/the-importance-of-being-ernest-about</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Thu, 29 Dec 2022 17:43:04 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!b6TH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2cd118-f508-4225-991f-e4bbcc45b98f_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!b6TH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2cd118-f508-4225-991f-e4bbcc45b98f_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!b6TH!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2cd118-f508-4225-991f-e4bbcc45b98f_1024x1024.png 424w, /__u/substackcdn.com/image/fetch/$s_!b6TH!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2cd118-f508-4225-991f-e4bbcc45b98f_1024x1024.png 848w, /__u/substackcdn.com/image/fetch/$s_!b6TH!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2cd118-f508-4225-991f-e4bbcc45b98f_1024x1024.png 1272w, /__u/substackcdn.com/image/fetch/$s_!b6TH!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2cd118-f508-4225-991f-e4bbcc45b98f_1024x1024.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!b6TH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2cd118-f508-4225-991f-e4bbcc45b98f_1024x1024.png" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/1f2cd118-f508-4225-991f-e4bbcc45b98f_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2919074,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!b6TH!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2cd118-f508-4225-991f-e4bbcc45b98f_1024x1024.png 424w, /__u/substackcdn.com/image/fetch/$s_!b6TH!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2cd118-f508-4225-991f-e4bbcc45b98f_1024x1024.png 848w, /__u/substackcdn.com/image/fetch/$s_!b6TH!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2cd118-f508-4225-991f-e4bbcc45b98f_1024x1024.png 1272w, /__u/substackcdn.com/image/fetch/$s_!b6TH!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2cd118-f508-4225-991f-e4bbcc45b98f_1024x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>A Brief History of Energy</strong></p><p>Some of the key milestones in the history of energy include:</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><ul><li><p>Fire : The use of fire, which was first harnessed by early humans over 1 million years ago, was a major milestone in the history of energy. Fire provided heat and light, and allowed humans to cook food and preserve it, which helped to support the growth of human civilization.</p></li><li><p>Steam Engine : The development of the steam engine in the 18th century revolutionized transportation and industry. The steam engine made it possible to harness the energy of steam to power machines, and was an important step towards the development of modern industrial society.</p></li><li><p>Electricity Grid : The harnessing of electricity in the 19th century had a major impact on society, making it possible to transmit energy over long distances and to power a wide range of devices and appliances. The development of the electric grid, which allowed for the distribution of electricity to homes and businesses, was a major milestone in the history of energy.</p></li><li><p>Fossil Fuels : The widespread use of fossil fuels, such as coal, oil, and natural gas, began in the 19th century and has continued to the present day. These energy sources have played a significant role in the development of modern industrial societies, but their use has also contributed to environmental problems, including air pollution and climate change.</p></li><li><p>Renewable Energy : Renewable energy sources, such as solar, wind, and hydroelectric power, have gained increasing attention in recent years as a way to reduce reliance on fossil fuels and address environmental concerns. The development of renewable energy technologies has made it possible to harness energy from these sources on a large scale, and they are expected to play a growing role in the energy mix of the future.</p></li></ul><p><strong>What is the impetus for clean energy research?</strong></p><p>There are several reasons why it is important to research clean energy:</p><ul><li><p>Climate change: One of the main reasons to research clean energy is to address the issue of climate change. Burning fossil fuels, such as coal, oil, and natural gas, is a major source of greenhouse gas emissions, which contribute to climate change. Clean energy sources, such as renewable energy sources like solar, wind, and hydroelectric power, produce little or no greenhouse gas emissions, and therefore can help to reduce the impacts of climate change.</p></li><li><p>Environmental benefits: In addition to reducing greenhouse gas emissions, clean energy sources also have other environmental benefits. For example, they can help to reduce air pollution, which can have significant health impacts. Clean energy sources can also reduce the amount of waste produced, as they do not produce waste products that need to be disposed of, like fossil fuels do.</p></li><li><p>Economic benefits: Researching and developing clean energy technologies can have economic benefits, such as creating new jobs and contributing to economic growth. In addition, the use of clean energy sources can help to reduce energy costs over the long term, as they often have lower operating costs than fossil fuels.</p></li><li><p>Energy security: Researching clean energy can help to increase energy security by reducing reliance on imported fossil fuels. This is especially important for countries that are heavily reliant on imported energy sources, as it can help to reduce their vulnerability to price fluctuations and supply disruptions.</p></li></ul><p>Overall, researching clean energy is important for a range of reasons, including addressing climate change, improving the environment, providing economic benefits, and increasing energy security.</p><p><strong>What are the benefits of renewable energy?</strong></p><p>Renewable energy sources, such as solar, wind, and hydroelectric power, offer a number of benefits compared to traditional fossil fuel sources, such as coal, oil, and natural gas. Some of the key benefits of renewable energy include:</p><ul><li><p>Reduced greenhouse gas emissions: Renewable energy sources produce little or no greenhouse gas emissions during operation, making them a cleaner and more environmentally friendly alternative to fossil fuels. This is important because greenhouse gas emissions contribute to climate change, which is a major global challenge.</p></li><li><p>Reduced air pollution: Renewable energy sources also produce little or no air pollution, which can have significant health benefits. Air pollution from fossil fuel sources has been linked to a range of health problems, including respiratory and cardiovascular disease, cancer, and premature death.</p></li><li><p>Increased energy security: Renewable energy sources can help to increase energy security by reducing reliance on imported fossil fuels. This is especially important for countries that are heavily reliant on imported energy sources, as it can help to reduce their vulnerability to price fluctuations and supply disruptions.</p></li><li><p>Economic benefits: Renewable energy sources can provide economic benefits, such as creating new jobs and contributing to economic growth. In addition, the use of renewable energy can help to reduce energy costs over the long term, as these sources often have lower operating costs than fossil fuels.</p></li><li><p>Sustainability: Renewable energy sources are considered more sustainable than fossil fuels, as they do not deplete finite resources and do not produce waste products that need to be disposed of. This makes them a more viable long-term energy solution.</p></li></ul><p>Overall, renewable energy sources offer a range of benefits that make them an attractive alternative to traditional fossil fuel sources.</p><p><strong>What are the challenges facing deployment of renewable energy?</strong></p><p>There are several challenges that can be involved in deploying renewable energy:</p><ul><li><p>Initial cost: The initial cost of setting up renewable energy systems, such as solar panels or wind turbines, can be higher than the cost of traditional energy sources, such as coal or natural gas. This can be a barrier to the adoption of renewable energy, especially in developing countries where financial resources may be limited.</p></li><li><p>Land use: Renewable energy sources may require large amounts of land to be installed, which can be a concern in areas where land is already in high demand for other purposes, such as agriculture or housing.</p></li><li><p>Intermittency: Some renewable energy sources, such as solar and wind power, are intermittent, meaning that they are only available when the sun is shining or the wind is blowing. This can make it challenging to provide a consistent and reliable supply of energy, and may require the use of other energy sources or energy storage technologies to supplement the intermittent nature of renewable energy.</p></li><li><p>Transmission and distribution: In some cases, the infrastructure needed to transmit and distribute electricity from renewable energy sources to consumers may not be in place, or may need to be upgraded. This can be a challenge, especially in remote or rural areas where there is limited access to the grid.</p></li><li><p>Public acceptance: In some cases, there may be public resistance to the deployment of renewable energy, especially if there are concerns about the visual impact of wind turbines or solar panels, or about the potential impacts on local wildlife or ecosystems.</p></li></ul><p>Overall, while renewable energy offers many benefits, there are also challenges associated with its deployment that need to be carefully considered and addressed.</p><p><strong>Where are we on nuclear fusion</strong></p><p>Nuclear fusion, the process of combining light atomic nuclei to release energy, has the potential to be a virtually limitless and clean source of energy. However, achieving practical fusion energy has proven to be a challenging task, and scientists and engineers have been working for decades to find a way to sustain the extremely high temperatures and pressures required for fusion to occur.</p><p>There have been several recent breakthroughs in nuclear fusion energy research that have brought us closer to achieving practical fusion energy. Some examples include:</p><ul><li><p>The development of new materials and designs for fusion reactors: Researchers have developed new materials and designs for fusion reactors that are able to withstand the extreme conditions required for fusion to occur. For example, researchers have developed advanced cooling systems that can keep the plasma inside the fusion reaction at the high temperatures required for fusion to occur.</p></li><li><p>The development of advanced diagnostics: Researchers have developed advanced diagnostic tools that can measure the plasma conditions inside a fusion reactor and provide detailed information about the plasma&#8217;s behavior. This information can be used to optimize the conditions inside the reactor and improve the performance of the fusion reaction.</p></li><li><p>The achievement of record-high temperatures: Researchers have achieved record-high temperatures in their fusion experiments, with some reaching temperatures of over 100 million degrees Celsius. These high temperatures are necessary to initiate and sustain the fusion reaction.</p></li><li><p>The demonstration of net energy gain: Some fusion experiments have demonstrated net energy gain, meaning that the energy produced by the fusion reaction is greater than the energy required to initiate and sustain the reaction. This is an important step towards achieving practical fusion energy.</p></li></ul><p>Overall, these breakthroughs are helping researchers to better understand the conditions required for fusion to occur and to develop more efficient and effective fusion reactions. While there is still much work to be done, these advances are bringing us closer to the goal of achieving practical fusion energy.</p><p><strong>Recent Advances in Nuclear Fusion Research</strong></p><p>There have been some spectacular breakthroughs in nuclear fusion energy research in recent months.</p><p>Ignition was achieved at the National Ignition Facility and this has the potential to completely revolutionize human society.</p><p>Although ignition is not the same as net energy gain, ignition is a significant milestone in nuclear fusion research.</p><p>The implication of this is that the marginal cost of energy is likely to approach zero and thereby revolutionize civilization. Human civilization could level up on the Kardashev Scale.</p><p><strong>Implication of Abundant Energy</strong></p><p>If energy were abundant and the marginal cost of energy approached zero, it is likely that human society would be revolutionized in many ways. Some potential impacts could include:</p><ul><li><p>Increased economic growth: Abundant and cheap energy could enable economic growth by reducing the cost of production and making it easier to access and use energy. This could lead to the development of new industries and technologies, and could create new jobs and opportunities.</p></li><li><p>Increased access to energy: Cheap and abundant energy could also make it easier for people, particularly those in developing countries, to access energy, which is essential for development. This could improve living standards, increase access to education and healthcare, and help to reduce poverty.</p></li><li><p>Changes in transportation: The availability of cheap energy could also lead to changes in transportation, as it could make electric vehicles more cost-competitive with traditional fossil fuel-powered vehicles. This could lead to a shift towards the use of electric vehicles, which would reduce greenhouse gas emissions and air pollution.</p></li><li><p>Changes in the way we produce and consume goods: Cheap and abundant energy could also lead to changes in the way we produce and consume goods. For example, it could make it easier and more cost-effective to produce goods using energy-intensive processes, such as manufacturing and transportation. It could also make it easier for people to access and use energy-intensive products and services, such as air conditioning and refrigeration.</p></li></ul><p>Overall, if energy were abundant and the marginal cost of energy approached zero, it is likely that human society would be transformed in many ways. While there could be many benefits to such a scenario, it is also important to consider any potential downsides or unintended consequences.</p><p><strong>Reasons for Optimism</strong></p><p>There are certainly reasons for optimism about the potential for technological advances to revolutionize human civilization. Over the past few centuries, technological advances have had a major impact on society, and have contributed to improvements in areas such as transportation, communication, medicine, and energy.</p><p>There are many areas in which technology is currently being developed that could have a major impact on society in the future, such as renewable energy technologies, artificial intelligence, and biotechnology. These technologies have the potential to address some of the major challenges facing humanity, such as climate change, resource depletion, and global health issues.</p><p>That being said, it is important to recognize that technological advances also come with risks and challenges that need to be carefully considered and managed. For example, the rapid development of new technologies can lead to social and economic disruptions, and can raise ethical and regulatory issues. It is also important to ensure that the benefits of technological advances are shared equitably, and that they are not used to reinforce existing inequalities or to concentrate power in the hands of a few.</p><p>Overall, while there are certainly reasons for optimism about the potential of technology to revolutionize human civilization, it is important to approach the development and deployment of new technologies with caution and a sense of responsibility.</p><p><strong>Conclusions</strong></p><p>The future of energy is likely to involve a mix of different energy sources and technologies. Some of the key trends that are expected to shape the future of energy include:</p><ul><li><p>Increased deployment of renewable energy: Renewable energy sources, such as solar, wind, and hydroelectric power, are expected to play a larger role in the global energy mix in the future. This is due to their environmental benefits, as well as their potential to reduce reliance on fossil fuels and increase energy security.</p></li><li><p>The development of advanced energy storage technologies: As the deployment of renewable energy increases, there is likely to be a greater focus on the development of advanced energy storage technologies, such as batteries and hydrogen fuel cells. These technologies can help to store excess renewable energy for use when it is not being generated, making it easier to integrate renewable energy into the grid.</p></li><li><p>The use of nuclear energy: Nuclear energy is expected to continue to be a significant source of electricity in the future, although there may be some shifts in the types of nuclear technologies that are used. For example, advanced nuclear technologies, such as small modular reactors, may become more common.</p></li><li><p>The role of fossil fuels: While the use of fossil fuels is expected to decline over time, it is likely that they will continue to play a significant role in the global energy mix for the foreseeable future. This will depend, in part, on advances in technologies that can capture and store carbon dioxide emissions from fossil fuel use, as well as on policies and regulations that aim to reduce reliance on fossil fuels.</p></li></ul><p>Overall, the future of energy is likely to be diverse, with a mix of different energy sources and technologies being used to meet the world&#8217;s energy needs. Knowing that humans will be able to attain higher levels on the Kardashev Scale in this century, means that human civilization can go on to engage in pursuits such creative and spiritual enlightenment and not have to be forever running on a treadmill, trapped in an episode of Black Mirror, ad infinitum. Hopefully.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[A Brief History of the Dismal Science]]></title><description><![CDATA[A whirlwind tour of the various schools of thought in the dismal science of economics]]></description><link>https://dasmachinelabs.substack.com/p/a-brief-history-of-the-dismal-science</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/a-brief-history-of-the-dismal-science</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Wed, 28 Dec 2022 10:23:12 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Mgdy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d703b1-fa15-4312-8f76-4254d5eee44c_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!Mgdy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d703b1-fa15-4312-8f76-4254d5eee44c_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!Mgdy!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d703b1-fa15-4312-8f76-4254d5eee44c_1024x1024.png 424w, /__u/substackcdn.com/image/fetch/$s_!Mgdy!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d703b1-fa15-4312-8f76-4254d5eee44c_1024x1024.png 848w, /__u/substackcdn.com/image/fetch/$s_!Mgdy!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d703b1-fa15-4312-8f76-4254d5eee44c_1024x1024.png 1272w, /__u/substackcdn.com/image/fetch/$s_!Mgdy!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d703b1-fa15-4312-8f76-4254d5eee44c_1024x1024.png 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!Mgdy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d703b1-fa15-4312-8f76-4254d5eee44c_1024x1024.png" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/b9d703b1-fa15-4312-8f76-4254d5eee44c_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2992296,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!Mgdy!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d703b1-fa15-4312-8f76-4254d5eee44c_1024x1024.png 424w, /__u/substackcdn.com/image/fetch/$s_!Mgdy!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d703b1-fa15-4312-8f76-4254d5eee44c_1024x1024.png 848w, /__u/substackcdn.com/image/fetch/$s_!Mgdy!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d703b1-fa15-4312-8f76-4254d5eee44c_1024x1024.png 1272w, /__u/substackcdn.com/image/fetch/$s_!Mgdy!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d703b1-fa15-4312-8f76-4254d5eee44c_1024x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2></h2><p>It is instructive to understand the role of economics, the goal of economics, as well as the soul of economics in order to understand the impact of economic thinking as it stood historically and how it is evolving into the future.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p><strong>What is the goal of Economics?</strong></p><blockquote><p><em>The goal of Economics should be to understand how human civilization comes about and how it can be maintained.</em></p></blockquote><p>It can therefore be argued that economics as a discipline has the right name and the wrong soul.</p><p><strong>What is the soul of Economics?</strong></p><blockquote><p><em>The soul of economics is to explain how we manage to build a civilization that elevates us far above the energy and consumption and knowledge levels of the base environment of the Earth.</em></p></blockquote><p>It is the elevation above the base level of the planet, which manifests as &#8220;human civilization&#8221;.</p><p>What are the various schools of Economics?</p><p><strong><a href="https://en.wikipedia.org/wiki/Physiocracy">Physiocrats</a></strong> is a school of economics that came out of agrarian France that treated the economy as a circulatory system and that wealth came out of the soil and the sun. The Physiocrats believed that economic value came from the sun and that there is no surplus and that we simply mine what we can find.</p><p>The next important school of Economics was a school of economics that said that value comes from the soil, which is the free gift of nature. They said that the manufacturing sector was sterile and that the manufacturing could not add value. It could only transform value.</p><p>Adam Smith took a look at that argument and said that labor could use machinery and tools to add value to product and it was therefore labor that was the source of value and not land.</p><p><strong><a href="https://en.wikipedia.org/wiki/Classical_economics">The Classical School of Economics</a></strong> said that all value comes from labor. It said that value is objective and it is therefore a function of the amount of effort labor puts in. The price two things will exchange for, reflects the relative effort that&#8217;s involved in the manufacturing. It talked about absolute cost and not relative cost. It ridiculed <strong>Subjective Utility Theory</strong> and didn&#8217;t talk about utility as a subjective thing.</p><p>The <strong>Classical School</strong> was pro-Capitalism and anti-feudal.</p><p>Karl Marx was another brilliant mind in the history of Economics and he turned the arguments of the classical school into a critique of capitalism. According to Marx in &#8220;Das Kapital,&#8221; the driving force behind capitalism is the exploitation of labor, where the unpaid work of laborers generates surplus value. The owner of the means of production is able to claim this surplus value because they are protected by property rights and the legal distribution of ownership shares, which are only given to company owners and their board members. These legal protections are established and enforced by the ruling regime.</p><p>The <strong><a href="https://en.wikipedia.org/wiki/Neoclassical_economics">Neo Classical School of Economics</a> </strong>came along as a defence of Capitalism. <strong>The Neo Classical School</strong> introduced <strong>The Subjective Theory of Value</strong> which stated that value does not reflect effort.</p><p><strong>The Austrian School of Economics</strong> adheres to the concept that social phenomena result exclusively from the motivations and actions of individuals. Austrian school theorists hold that economic theory should be exclusively derived from basic principles of human action. The Austrian School contributed <strong>The Subjective Theory of Value</strong>.</p><p><strong><a href="https://en.wikipedia.org/wiki/Subjective_theory_of_value">The Subjective Theory of Value</a></strong> stated that it is the satisfaction individuals get from different objects that determines their value.</p><p>In the <strong>Neo Classical School of Economics</strong>, there is a subjective theory of value, which is non-monetary and is focused on equilibrium. The notion of a barter economy works in the context of an economic theory where money plays no creative role in the economy.</p><p>Joseph Schumpeter was trained in <strong><a href="https://en.wikipedia.org/wiki/Historical_school_of_economics">The Historical School of Economics</a></strong> , which held that history was the key source of knowledge about human actions and economic matters, since economics was culture-specific, and hence not generalizable over space and time.</p><p>In the Schumpeter School , money plays a creative role in the economy, and Schumpeter was responsible for popularizing the term <em>creative desctruction</em><strong>.</strong></p><p>However, the Neo Classical School of Economics refuses to acknowledge that the economy does not live in equilibrium, as an economic equilibrium is inherently a myth.</p><p>In the Schumpeter school, investment is subject to uncertainty and that is the normal state of a capitalist economy and that is what gives it it&#8217;s creativity.</p><p>The Keynesian School of Economics are the various macroeconomic theories and models of how aggregate demand (total spending in the economy) strongly influences economic output and inflation. In the Keynesian view, aggregate demand does not necessarily equal the productive capacity of the economy. Instead, it is influenced by a host of factors &#8212; sometimes behaving erratically &#8212; affecting production, employment, and inflation. Keynesian argue that economic fluctuations can be mitigated by economic policy responses coordinated between government and central bank. In particular, fiscal policy actions (taken by the government) and monetary actions (taken by the central bank), can help stabilize economic output, inflation, and unemployment over the business cycle.</p><p>Keynesian economists generally advocate a regulated market economy &#8212; predominantly private sector, but with an active role for government intervention during recessions and depressions.</p><p>The Post Keynesian School of Economics can be seen as an attempt to rebuild economic theory in the light of Keynes&#8217; ideas and insight.</p><p><strong>Modern Monetary Theory</strong></p><p>Modern Monetary Theory is a theory of economics that is all the rage these days.</p><p>Modern Monetary Theory can be summarized as accounting (as tracked by double-entry book-keeping).</p><p>Modern Monetary Theory states that what money is, is a creature of double-entry bookkeeping.</p><p><strong>Double-entry bookkeeping</strong>, also known as <strong>double-entry accounting</strong>, is a method of bookkeeping that relies on a two-sided accounting entry to maintain financial information.</p><p>The main tenets of Modern Monetary Theory are that a government that issues its own fiat money &#8212;</p><ol><li><p>Can pay for goods, services, and financial assets without a need to first collect money in the form of taxes or debt issuance in advance of such purchases;</p></li><li><p>Cannot be forced to default on debt denominated in its own currency;</p></li><li><p>Is limited in its money creation and purchases only by inflation, which accelerates once the real resources (labour, capital and natural resources) of the economy are utilized at full employment</p></li><li><p>Recommends strengthening automatic stabilizers to control demand-pull inflation rather than relying upon discretionary tax changes;</p></li><li><p>Issues bonds as a monetary policy device, rather than as a funding device.</p></li></ol><p>Modern Monetary Theory combines ideas from different theories and proposals about money, including the State Theory of Money, the Credit Theory of Money, functional finance, the banking system, and the Sectoral balances approach.</p><p>Knapp wrote in 1905 that &#8220;money is a creature of law&#8221; rather than a commodity. Knapp argued that the value of money is determined by law rather than the quantity of a precious metal it contains. He believed that the government can create paper money and give it value by declaring it legal tender, meaning that it is accepted as a form of payment. He argued that the definition of money in a state is whatever is accepted at public pay offices.</p><p>MMT proponents like Randall Wray and Mathew Forstater argue that the classical economists&#8217; earlier writings support the idea that money is created by the state through taxes, rather than being based on a commodity with intrinsic value. This view, known as chartalism, challenges the traditional idea that money arose from bartering and evolved into a medium of exchange because it represented a valuable and durable commodity.</p><p>According to Alfred Mitchell-Innes, money is not a medium of exchange but rather a standard of deferred payment, and government-issued money is a debt that can be repaid through taxation. When a tax is imposed, individuals become responsible for paying off a portion of the government&#8217;s debt by acquiring and presenting government-issued money (such as coins, certificates, or notes) to the Treasury. The act of repaying this debt through taxation is the fundamental principle behind the issuance of government money in any form.</p><p>MMT proponents like Warren Mosler argued that trade deficits can be sustainable and beneficial for a country&#8217;s standard of living in the short term. They argued that imports provide real goods for a country and are therefore beneficial, while exports involve a cost because the country is giving up goods that it could have used itself. However, currency that is transferred to foreign ownership represents a future claim on the importing country&#8217;s goods. While cheap imports may cause local firms that produce similar goods to fail and lead to unemployment, MMT proponents argue that this is a subjective value-based decision rather than an economic one, and it is up to a country to decide whether it values cheaper imports more than it values employment in a particular industry. They also acknowledge that a country that relies heavily on imports may face a supply shock if its exchange rate drops significantly, but central banks can intervene in foreign exchange markets to prevent such shocks.</p><p>MMT is therefore a macroeconomic theory that focuses on the role of governments in managing their economies and the use of fiat currency. It asserts that governments with sovereign currency, such as the United States, can create as much money as they need to meet their domestic financial obligations, such as social security payments and infrastructure spending. MMT proponents argue that governments should not be constrained by their ability to finance these obligations through taxation or borrowing, and that the primary constraint on government spending should be inflation.</p><p>One argument for MMT is that it recognizes the fundamental role of the government in creating and managing the money supply. In a fiat currency system, the government has the ability to print new money and use it to fund its domestic obligations. This is in contrast to a gold standard system, where the government&#8217;s ability to create money is limited by the amount of gold it holds. MMT proponents argue that a government with sovereign currency has the flexibility to respond to economic challenges and opportunities in a way that a government on a gold standard does not.</p><p>Another argument for MMT is that it places a greater emphasis on the use of fiscal policy (government spending and taxation) to manage the economy, rather than relying solely on monetary policy (manipulating interest rates). MMT proponents argue that fiscal policy can be a more effective tool for addressing economic imbalances and stimulating economic growth, especially in times of economic downturn.</p><p>It is important to note that MMT is a theory and has not been implemented as a full-fledged policy in any country. Like any economic theory, it has its supporters and detractors, and its efficacy and consequences would depend on how it is implemented in practice.</p><p><strong>Summary</strong></p><p>The history of economics is long and varied, and different schools of thought have emerged over time to explain and understand economic phenomena.</p><p>One of the earliest recorded economic thoughts can be traced back to the ancient civilizations of Mesopotamia, where people engaged in trade and used commodities such as grain and livestock as forms of money. The ideas of the ancient Greek philosophers, such as Aristotle, also contributed to the development of economic thought.</p><p>During the Middle Ages, trade and commerce became more prevalent, and the concept of supply and demand began to emerge. The 16th and 17th centuries saw the development of mercantilism, which emphasized the accumulation of wealth through trade and the colonization of other countries.</p><p>The 18th and 19th centuries were marked by the emergence of classical economics, which was characterized by the work of Adam Smith and David Ricardo. Classical economics focused on the role of the market in allocating resources and the role of prices in balancing supply and demand.</p><p>In the 20th century, John Maynard Keynes developed the concept of Keynesian economics, which argued that government intervention was necessary to stabilize economies during times of economic downturn. This approach was widely adopted following the Great Depression of the 1930s.</p><p>In the latter half of the 20th century, various other schools of economic thought emerged, including monetarism, which focused on the role of the money supply in the economy, and supply-side economics, which argued that reducing taxes and regulations could stimulate economic growth.</p><p>Economics is a diverse field with many different approaches and perspectives, and it continues to evolve and adapt as new economic challenges and opportunities arise. This has been, a brief history of the dismal science.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Retro Post Futurism]]></title><description><![CDATA[An ism to fix the flaws with all the isms of the past]]></description><link>https://dasmachinelabs.substack.com/p/retro-post-futurism</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/retro-post-futurism</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Mon, 26 Dec 2022 18:02:01 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!_nbc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36f7a23e-e8a3-4e8a-b3ea-97af2da2629b_736x370.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="/__u/substackcdn.com/image/fetch/$s_!_nbc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36f7a23e-e8a3-4e8a-b3ea-97af2da2629b_736x370.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="/__u/substackcdn.com/image/fetch/$s_!_nbc!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36f7a23e-e8a3-4e8a-b3ea-97af2da2629b_736x370.jpeg 424w, /__u/substackcdn.com/image/fetch/$s_!_nbc!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36f7a23e-e8a3-4e8a-b3ea-97af2da2629b_736x370.jpeg 848w, /__u/substackcdn.com/image/fetch/$s_!_nbc!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36f7a23e-e8a3-4e8a-b3ea-97af2da2629b_736x370.jpeg 1272w, /__u/substackcdn.com/image/fetch/$s_!_nbc!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_webp, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36f7a23e-e8a3-4e8a-b3ea-97af2da2629b_736x370.jpeg 1456w" sizes="100vw"><img src="/__u/substackcdn.com/image/fetch/$s_!_nbc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36f7a23e-e8a3-4e8a-b3ea-97af2da2629b_736x370.jpeg" width="736" height="370" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/36f7a23e-e8a3-4e8a-b3ea-97af2da2629b_736x370.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:370,&quot;width&quot;:736,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:58358,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="/__u/substackcdn.com/image/fetch/$s_!_nbc!, /__u/dasmachinelabs.substack.com/w_424, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36f7a23e-e8a3-4e8a-b3ea-97af2da2629b_736x370.jpeg 424w, /__u/substackcdn.com/image/fetch/$s_!_nbc!, /__u/dasmachinelabs.substack.com/w_848, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36f7a23e-e8a3-4e8a-b3ea-97af2da2629b_736x370.jpeg 848w, /__u/substackcdn.com/image/fetch/$s_!_nbc!, /__u/dasmachinelabs.substack.com/w_1272, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36f7a23e-e8a3-4e8a-b3ea-97af2da2629b_736x370.jpeg 1272w, /__u/substackcdn.com/image/fetch/$s_!_nbc!, /__u/dasmachinelabs.substack.com/w_1456, /__u/dasmachinelabs.substack.com/c_limit, /__u/dasmachinelabs.substack.com/f_auto, /__u/dasmachinelabs.substack.com/q_auto:good, /__u/dasmachinelabs.substack.com/fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F36f7a23e-e8a3-4e8a-b3ea-97af2da2629b_736x370.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Isms have played a major role in shaping our world and the way we think. From capitalism to communism, these ideologies have shaped our political, economic, and social systems. However, it&#8217;s time for us to consider a new ism that will combine the best aspects of the isms of the past while culling the worst aspects of the past isms, an ism that we like to refer to as <em>Retro Post Futurism</em>.</p><p><strong>What is Retro Post Futurism?</strong></p><p>Retro Post Futurism is a way of thinking that combines the best aspects of the past with the potential of the future. It recognizes that the isms of the past, while well-intentioned, have often had unintended consequences and have not always led to the utopian societies they promised.</p><p>Retro Post Futurism is a holistic approach that considers the needs of both individuals and society as a whole. It values equality, sustainability, and progress, but also acknowledges the importance of tradition and cultural diversity.</p><p><strong>Why do we need Retro Post Futurism?</strong></p><p>The isms of the past have often led to polarization and division. Capitalism, for example, has led to wealth inequality and environmental degradation. Communism, on the other hand, has often resulted in authoritarian governments and a lack of individual freedom.</p><p>Retro Post Futurism offers a way forward that avoids the pitfalls of these ideologies. It recognizes that one size does not fit all and that different societies may require different solutions.</p><p><strong>How can we implement Retro Post Futurism?</strong></p><p>Implementing Retro Post Futurism will require a shift in our thinking and our actions. It will require us to be open to new ideas and to consider the long-term consequences of our actions.</p><p>One way to implement Retro Post Futurism is through government policies that prioritize sustainability, equality, and progress. This could include policies such as universal healthcare, free education, and a shift towards renewable energy sources.</p><p>Individuals can also play a role in the adoption of Retro Post Futurism by making conscious choices in their daily lives. This could include supporting businesses that prioritize sustainability, volunteering in their community, and reducing their own carbon footprint.</p><blockquote><p><em>We need a new ism to fix the flaws with all the isms of the past.</em></p><p><em>Let&#8217;s see now. How many isms have come and gone? How much has the world changed in the few centuries that have passed since the start of the industrial revolution?</em></p><p><em>How much is the world likely to change in this decade and in the coming decades of this century?</em></p></blockquote><h2><strong>Economic Policies in Retro Post Futurism</strong></h2><p>Economic policies in Retro Post Futurism would prioritize sustainability, equality, and progress. These policies would aim to create a fair and equitable economic system that benefits both individuals and society as a whole.</p><p>One key aspect of Retro Post Futurism is the recognition that one size does not fit all, and that different societies may require different solutions. As such, the specific economic policies of Retro Post Futurism may vary from place to place, depending on the needs and circumstances of the community.</p><p>Some potential economic policies that could be adopted in Retro Post Futurism include:</p><ul><li><p>Universal basic income: A guaranteed income provided to all citizens to help ensure a minimum standard of living.</p></li><li><p>Progressive taxation: A tax system that charges higher rates for higher earners, helping to reduce income inequality.</p></li><li><p>Investment in public goods: Investment in infrastructure, education, healthcare, and other public goods that benefit society as a whole.</p></li><li><p>Regulation of businesses: Regulation of businesses to ensure they operate in a sustainable and ethical manner, and to prevent exploitation of workers and consumers.</p></li><li><p>Support for small businesses: Policies that support the growth and development of small businesses, including access to capital and training.</p></li><li><p>Shift towards a green economy: Policies that support the transition to a low-carbon, environmentally sustainable economy, including the adoption of renewable energy sources and the promotion of energy efficiency.</p></li></ul><p>Overall, the economic policies of Retro Post Futurism would seek to create a balanced and fair economic system that supports the well-being of both individuals and society as a whole, while also taking into account the long-term sustainability of the planet.</p><h2><strong>Social Policies in Retro Post Futurism</strong></h2><p>Social policies in Retro Post Futurism would prioritize equality, inclusivity, and cultural diversity. These policies would aim to create a society that is fair and inclusive for all, regardless of factors such as race, gender, sexual orientation, religion, or socio-economic status.</p><p>Some potential social policies that could be adopted in Retro Post Futurism include:</p><ul><li><p>Universal healthcare: Access to quality healthcare for all citizens, regardless of their ability to pay.</p></li><li><p>Free education: Access to quality education for all, from early childhood through to higher education.</p></li><li><p>Anti-discrimination laws: Laws that protect individuals from discrimination based on factors such as race, gender, sexual orientation, and religion.</p></li><li><p>Support for marginalized communities: Policies that support marginalized communities, including initiatives to address poverty, homelessness, and social exclusion.</p></li><li><p>Cultural diversity: Policies that support the celebration and preservation of cultural diversity, including language and arts programs.</p></li><li><p>Equal pay: Policies that ensure that individuals are paid fairly for their work, regardless of their gender, race, or other factors.</p></li></ul><p>Overall, the social policies of Retro Post Futurism would seek to create a society that is fair, inclusive, and respectful of cultural diversity, and that supports the well-being of all its citizens.</p><h2><strong>Benefits of Retro Post Futurism</strong></h2><p>There are several potential benefits to humanity of adopting Retro Post Futurism as a social and economic policy for human prosperity and progress:</p><ol><li><p>Greater equality: Retro Post Futurism prioritizes equality and inclusivity, which can help to reduce poverty and income inequality. This can lead to a more equitable society where everyone has the opportunity to reach their full potential.</p></li><li><p>Increased sustainability: Retro Post Futurism values sustainability and recognizes the importance of protecting the environment for future generations. This can lead to policies that reduce greenhouse gas emissions, protect natural resources, and promote sustainable economic growth.</p></li><li><p>Greater cultural diversity: Retro Post Futurism values cultural diversity and seeks to preserve and celebrate the unique cultures and traditions of different communities. This can lead to a more vibrant and diverse society that is enriched by the contributions of many different cultures.</p></li><li><p>Improved quality of life: Retro Post Futurism prioritizes the well-being of individuals and society as a whole. This can lead to policies that support access to quality healthcare, education, and other essential services, which can improve the quality of life for all members of society.</p></li><li><p>Stronger communities: Retro Post Futurism recognizes the importance of community and encourages individuals to get involved and contribute to the well-being of their communities. This can lead to stronger, more connected communities where individuals feel a sense of belonging and purpose.</p></li></ol><p>Overall, the adoption of Retro Post Futurism as a social and economic policy has the potential to bring about a more equal, sustainable, and diverse society that is focused on the well-being of all its members.</p><h2><strong>Summary</strong></h2><p>Retro Post Futurism is a way of thinking that combines the best aspects of the past with the potential of the future. It is a holistic approach that considers the needs of both individuals and society as a whole, and values equality, sustainability, and progress. Retro Post Futurism recognizes that the isms of the past, while well-intentioned, have often had unintended consequences and have not always led to the utopian societies they promised. As such, it offers a way forward that avoids the pitfalls of these ideologies and seeks to create a balanced and fair society that benefits all its members. This can be achieved through a variety of economic and social policies that prioritize sustainability, equality, and progress, and that take into account the unique needs and circumstances of different communities.</p><h2><strong>Conclusion</strong></h2><p>Retro Post Futurism offers a way forward that avoids the pitfalls of the isms of the past. By considering the needs of both individuals and society as a whole, and by valuing equality, sustainability, and progress, we can create a better future for all. It&#8217;s time for a new ism to take the stage and lead us towards a brighter tomorrow.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Syndicate! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[The Daily Syndicate]]></title><description><![CDATA[The Daily Syndicate. A humble attempt at something real. It's not everyday that one feels inspired enough to get over one's writer's block. The one that feels insurmountable. One hopes to surmount.]]></description><link>https://dasmachinelabs.substack.com/p/the-daily-chai</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/the-daily-chai</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Sun, 04 Dec 2022 05:49:39 GMT</pubDate><content:encoded><![CDATA[<p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Daily Chai! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Web Development Awesomeness using SvelteJS and TailwindCSS]]></title><description><![CDATA[Web Development Awesomeness using SvelteJS and TailwindCSS]]></description><link>https://dasmachinelabs.substack.com/p/web-development-awesomeness-using</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/web-development-awesomeness-using</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Thu, 22 Jul 2021 15:53:12 GMT</pubDate><content:encoded><![CDATA[<p>Make web development fun again by creating a frontend web application using SvelteJS and TailwindCSS</p><p>It&#8217;s time to note that the holy grail of frontend web-development stacks is here.</p><p>The steps outlined in this tutorial can be used to attain frontend stack nirvana.</p><p>Step 1 | Initialize a SvelteJS app as follows</p><blockquote><p><em>npx degit sveltejs/template stackmvp-site</em></p></blockquote><p>You will see the stackmvp-site folder initialized</p><p>Step 2 | cd into the stackmvp folder and install the npm packages</p><blockquote><p><em>npm install</em></p></blockquote><p>The packages are installed in the node_modules folder</p><p>Step 3 | Install the tailwindcss and related package as follows</p><blockquote><p><em>npm install autoprefixer postcss-cli tailwindcss concurrently cross-env &#8212; save-dev</em></p></blockquote><p>Create a file called postcss.config.js in the root folder (stackmvp-site folder)</p><blockquote><p><em>touch postcss.config.js</em></p></blockquote><p>Create a file called tailwind.css in the public folder as follows</p><blockquote><p><em>cd public &amp;&amp; touch tailwind.css</em></p></blockquote><p>Import the tailwind plugin in postcss.config.js as follows</p><blockquote><p><em>module.exports = () =&gt; ({<br>plugins: [require(&#8220;tailwindcss&#8221;)],<br>});</em></p></blockquote><p>Import the following modules into tailwind.css file as follows</p><blockquote><p><em><a href="http://twitter.com/tailwind">@tailwind</a>&nbsp;base;<br><a href="http://twitter.com/tailwind">@tailwind</a>&nbsp;components;<br><a href="http://twitter.com/tailwind">@tailwind</a>&nbsp;utilities;</em></p></blockquote><p>Modify the package.json scripts section with the following block</p><blockquote><p><em>&#8220;scripts&#8221;: {<br>&#8220;watch:tailwind&#8221;: &#8220;postcss public/tailwind.css -o public/index.css -w&#8221;,<br>&#8220;build: tailwind&#8221;: &#8220;cross-env NODE_ENV=production postcss public/taildwind.css -o public/index.css&#8221;,<br>&#8220;build&#8221;: &#8220;npm run build:tailwind &amp;&amp; rollup -c&#8221;,<br>&#8220;start&#8221;: &#8220;sir public&#8221;,<br>&#8220;serve&#8221;: &#8220;serve public -c 80&#8221;,<br>&#8220;dev&#8221;: &#8220;concurrently \&#8221;rollup -c -w\&#8221; \&#8221;npm run watch:tailwind\&#8221;&#8221;&nbsp;<br>},</em></p></blockquote><p>Run</p><blockquote><p><em>npm run start</em></p></blockquote><p>The source code for this tutorial can be found here</p><p><a href="https://github.com/arunabhdas/stackmvp">https://github.com/arunabhdas/stackmvp</a></p>]]></content:encoded></item><item><title><![CDATA[Coding, Tech, Cloud, Stack, Apps]]></title><description><![CDATA[Welcome to The Daily Syndicate by me, Arunabh Das.]]></description><link>https://dasmachinelabs.substack.com/p/coming-soon</link><guid isPermaLink="false">https://dasmachinelabs.substack.com/p/coming-soon</guid><dc:creator><![CDATA[Arunabh Das]]></dc:creator><pubDate>Thu, 22 Jul 2021 15:51:27 GMT</pubDate><content:encoded><![CDATA[<p>Welcome to The Daily Syndicate by me, Arunabh Das. Sort of an executive-officer-of-the-week of a techno-syndicalist commune. Cryptoanarchic, cypherpunk, techno-idealist, peacenik, spiritual, humanist.</p><p>Sign up now so you don&#8217;t miss the first issue.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://dasmachinelabs.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="/__u/dasmachinelabs.substack.com/subscribe"><span>Subscribe now</span></a></p><p>In the meantime, <a href="/__u/dasmachinelabs.substack.com/p/coming-soon?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share">tell your friends</a>!</p>]]></content:encoded></item></channel></rss>