<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Binary Dose</title>
    <description>The latest articles on DEV Community by Binary Dose (@binarydose).</description>
    <link>https://dev.to/binarydose</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4204496%2F51ff9ee5-7dac-46e9-95ec-c9eff53d3ed4.png</url>
      <title>DEV Community: Binary Dose</title>
      <link>https://dev.to/binarydose</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/binarydose"/>
    <language>en</language>
    <item>
      <title>The Chomsky Hierarchy: Why Regex Cannot Parse HTML</title>
      <dc:creator>Binary Dose</dc:creator>
      <pubDate>Sat, 24 Oct 2026 17:01:42 +0000</pubDate>
      <link>https://dev.to/binarydose/the-chomsky-hierarchy-why-regex-cannot-parse-html-3802</link>
      <guid>https://dev.to/binarydose/the-chomsky-hierarchy-why-regex-cannot-parse-html-3802</guid>
      <description>&lt;h1&gt;
  
  
  The Chomsky Hierarchy
&lt;/h1&gt;

&lt;p&gt;In 1956, Noam Chomsky classified all formal grammars into a strict 4-level mathematical hierarchy.&lt;/p&gt;

&lt;h2&gt;
  
  
  🏗️ The 4 Tiers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Type 3 (Regular Languages)&lt;/strong&gt;: Recognized by Finite Automata. Zero stack memory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Type 2 (Context-Free Languages)&lt;/strong&gt;: Recognized by Pushdown Automata. Has a single LIFO stack for balanced delimiters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Type 1 (Context-Sensitive Languages)&lt;/strong&gt;: Recognized by Linear Bounded Automata.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Type 0 (Recursively Enumerable)&lt;/strong&gt;: Recognized by Turing Machines with infinite tape.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Explore the full interactive curriculum on &lt;a href="https://binarydose.in/coredose/toc" rel="noopener noreferrer"&gt;Binary Dose&lt;/a&gt;.&lt;/em&gt; &lt;/p&gt;

</description>
      <category>computerscience</category>
      <category>programming</category>
      <category>algorithms</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Why Does TCP Use a Sliding Window? (Flow Control vs BDP)</title>
      <dc:creator>Binary Dose</dc:creator>
      <pubDate>Sat, 24 Oct 2026 13:48:51 +0000</pubDate>
      <link>https://dev.to/binarydose/why-does-tcp-use-a-sliding-window-flow-control-vs-bdp-d25</link>
      <guid>https://dev.to/binarydose/why-does-tcp-use-a-sliding-window-flow-control-vs-bdp-d25</guid>
      <description>&lt;h1&gt;
  
  
  Why Does TCP Use a Sliding Window?
&lt;/h1&gt;

&lt;p&gt;Over high-latency networks, naive Stop-and-Wait throughput collapses because the physical pipe sits empty for most of the Round Trip Time (RTT).&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚡ The Bandwidth-Delay Product (BDP)
&lt;/h2&gt;

&lt;p&gt;$$\text{BDP} = \text{Bandwidth} \times \text{RTT}$$&lt;/p&gt;

&lt;p&gt;On a 10 Gbps transatlantic link with 100ms RTT, BDP = 125 MB! Stop-and-Wait wastes 99.9% of that capacity.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧠 4 Buffer Window Zones
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Zone 1 (ACKed)&lt;/strong&gt;: Safe to discard from RAM.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zone 2 (In-Flight)&lt;/strong&gt;: Emitted, awaiting ACK.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zone 3 (Usable)&lt;/strong&gt;: Permitted to send immediately.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zone 4 (Blocked)&lt;/strong&gt;: Outside advertised window.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Read the full interactive visualizer on &lt;a href="https://binarydose.in/100-days/day-10-tcp-sliding-window" rel="noopener noreferrer"&gt;Binary Dose&lt;/a&gt;.&lt;/em&gt; &lt;/p&gt;

</description>
      <category>networking</category>
      <category>performance</category>
      <category>computerscience</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Announcing the Theory of Computation (TOC) Master Track on Binary Dose</title>
      <dc:creator>Binary Dose</dc:creator>
      <pubDate>Sat, 24 Oct 2026 12:30:32 +0000</pubDate>
      <link>https://dev.to/binarydose/announcing-the-theory-of-computation-toc-master-track-on-binary-dose-54h1</link>
      <guid>https://dev.to/binarydose/announcing-the-theory-of-computation-toc-master-track-on-binary-dose-54h1</guid>
      <description>&lt;h1&gt;
  
  
  🚀 CoreDose Launch: Theory of Computation (TOC) Master Track
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;"Our goal is to provide the absolute best learning experience to our students so they grasp mental models in under 3 seconds."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We are thrilled to announce that the complete &lt;strong&gt;Theory of Computation (TOC)&lt;/strong&gt; master curriculum is now &lt;strong&gt;LIVE and 100% free&lt;/strong&gt; on &lt;a href="https://binarydose.in/coredose/toc" rel="noopener noreferrer"&gt;Binary Dose&lt;/a&gt;!&lt;/p&gt;




&lt;h2&gt;
  
  
  📚 The 10-Module Curriculum Overview
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Phase 1: Finite Automata &amp;amp; Regular Languages
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Module 01&lt;/strong&gt;: Alphabets, Strings, DFA Formalisms, Acceptance Criteria &amp;amp; Combinatorics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Module 02&lt;/strong&gt;: Non-Deterministic Finite Automata (NFA), Epsilon-Closures &amp;amp; DFA Minimization&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Module 03&lt;/strong&gt;: Moore and Mealy Machine Architectures &amp;amp; Bidirectional State Conversions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Module 04&lt;/strong&gt;: Regular Expressions, Algebraic Identities &amp;amp; Arden's Theorem&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Phase 2: Grammars &amp;amp; Pushdown Automata
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Module 05&lt;/strong&gt;: Phrase Structure Grammars, The Chomsky Hierarchy &amp;amp; Type-3 Regular Grammars&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Module 06&lt;/strong&gt;: Pumping Lemma for Regular Languages, Non-Regularity Proofs &amp;amp; Memory Limits&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Module 07&lt;/strong&gt;: Context-Free Grammars, Ambiguity, Parse Trees &amp;amp; Normal Forms (CNF / GNF)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Module 08&lt;/strong&gt;: Pushdown Automata (PDA), Instantaneous Descriptions &amp;amp; DCFL Boundaries&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Phase 3: Computability &amp;amp; Complexity Theory
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Module 09&lt;/strong&gt;: Turing Machine 7-Tuple Model, Infinite Tape Mechanics, Multi-Tape Variants &amp;amp; Church-Turing Thesis&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Module 10&lt;/strong&gt;: The Halting Problem, Undecidability, Rice's Theorem, PCP, and Computational Complexity (Class P vs Class NP)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💡 What Makes Binary Dose Different?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Interactive State Transition Diagrams&lt;/strong&gt;: Trace transitions and trap states in real time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Mathematical Proofs&lt;/strong&gt;: Pumping lemmas and closure property matrices broken down into first principles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero Paywalls&lt;/strong&gt;: Always 100% open-access engineering education.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Explore the complete course right now:&lt;br&gt;
👉 &lt;strong&gt;&lt;a href="https://binarydose.in/coredose/toc" rel="noopener noreferrer"&gt;https://binarydose.in/coredose/toc&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>computerscience</category>
      <category>programming</category>
      <category>algorithms</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Why Do Database Indexes Slow Down INSERTs? (The B+ Tree Page Split Dilemma)</title>
      <dc:creator>Binary Dose</dc:creator>
      <pubDate>Sat, 24 Oct 2026 10:46:36 +0000</pubDate>
      <link>https://dev.to/binarydose/why-do-database-indexes-slow-down-inserts-the-b-tree-page-split-dilemma-31jg</link>
      <guid>https://dev.to/binarydose/why-do-database-indexes-slow-down-inserts-the-b-tree-page-split-dilemma-31jg</guid>
      <description>&lt;p&gt;Every junior engineer learns that adding an index to a database column makes SELECT queries blazing fast—reducing full table scans ((N)$) to logarithmic B+ Tree lookups ((\log N)$).&lt;/p&gt;

&lt;p&gt;So why shouldn't we just index every single column in the table?&lt;/p&gt;

&lt;p&gt;Because on an indexed table, a simple INSERT is never just an append. In high-throughput systems, over-indexing can spike write latency by &lt;strong&gt;300% to 500%&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here is what actually happens inside a database storage engine during an INSERT.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Unindexed Table: The O(1) Sequential Append
&lt;/h2&gt;

&lt;p&gt;When a table has &lt;strong&gt;no secondary indexes&lt;/strong&gt;, inserting a row is straightforward:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The database appends the raw row to the end of the current heap data page.&lt;/li&gt;
&lt;li&gt;This is a fast, sequential write ((1)$ complexity).&lt;/li&gt;
&lt;li&gt;Disk I/O is minimal, and Write-Ahead Log (WAL) records are simple.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Indexed Table: The Write Amplification Problem
&lt;/h2&gt;

&lt;p&gt;When you add indexes (such as B+ Trees on email, created_at, or status), the database must maintain every single index in &lt;strong&gt;strictly sorted order&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Every single INSERT statement now triggers a 2-phase execution:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Heap Storage Write&lt;/strong&gt;: The row is written to raw heap storage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Index Traversal&lt;/strong&gt;: The storage engine traverses the B+ Tree of &lt;strong&gt;every secondary index&lt;/strong&gt; down from the root page to the target leaf page to find the exact insertion slot.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key Shifting&lt;/strong&gt;: Existing keys on that 8KB or 16KB leaf page must be shifted down to insert the new key in sorted order.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  3. The Real Killer: B+ Tree Page Splits
&lt;/h2&gt;

&lt;p&gt;What happens when the target 16KB leaf page is completely full?&lt;/p&gt;

&lt;p&gt;The database cannot simply overwrite adjacent memory. It is forced to trigger an expensive &lt;strong&gt;Page Split&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Allocate New Page&lt;/strong&gt;: The engine allocates a new 16KB disk page.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Migrate Keys&lt;/strong&gt;: Exactly 50% of the keys from the full page are moved to the new page.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Update Parent Pointer&lt;/strong&gt;: A new routing key and pointer are inserted into the parent node.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cascading Splits&lt;/strong&gt;: If the parent node is also full, the split cascades upward toward the root, increasing the height of the tree.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WAL Logging&lt;/strong&gt;: Every modified page generates multiple Write-Ahead Log (WAL) records for durability.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The Result:&lt;/strong&gt; A single INSERT statement turns into multiple random disk I/O operations and write amplification!&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Takeaways for Backend Engineers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Indexes are not free&lt;/strong&gt;: Every index you add speeds up reads at the direct expense of write throughput and storage bloat.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Avoid indexing high-cardinality volatile fields&lt;/strong&gt;: If a column changes constantly and isn't frequently used in WHERE clauses, do not index it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Batch Inserts&lt;/strong&gt;: When loading bulk data, inserting in sorted order of the clustered index drastically reduces page splits.&lt;/li&gt;
&lt;/ul&gt;




&lt;blockquote&gt;
&lt;p&gt;🚀 &lt;strong&gt;Explore the Interactive Visualizer&lt;/strong&gt;:&lt;br&gt;
We built an interactive B+ Tree Page Split simulator and memory rail on Binary Dose to help engineers grasp storage engine internals in under 3 seconds.&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://binarydose.in/100-days/day-02-why-do-database-index-slow-down-inserts" rel="noopener noreferrer"&gt;Read the Full Deep-Dive &amp;amp; Play with the Simulator on Binary Dose&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>database</category>
      <category>sql</category>
      <category>performance</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
