<?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: Sakramen</title>
    <description>The latest articles on DEV Community by Sakramen (@sakramen).</description>
    <link>https://dev.to/sakramen</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%2F4069375%2F90a79e02-e354-493b-8854-c4990e911c07.png</url>
      <title>DEV Community: Sakramen</title>
      <link>https://dev.to/sakramen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sakramen"/>
    <language>en</language>
    <item>
      <title>Feature Matching: From Brute Force to a Robust Pipeline</title>
      <dc:creator>Sakramen</dc:creator>
      <pubDate>Sat, 15 Aug 2026 16:15:08 +0000</pubDate>
      <link>https://dev.to/sakramen/feature-matching-from-brute-force-to-a-robust-pipeline-26l3</link>
      <guid>https://dev.to/sakramen/feature-matching-from-brute-force-to-a-robust-pipeline-26l3</guid>
      <description>&lt;h2&gt;
  
  
  Why Feature Matching Matters
&lt;/h2&gt;

&lt;p&gt;Feature detection finds interesting points in a single image — corners, blobs, distinctive textures. Feature matching is the next step: figuring out which keypoint in image A corresponds to which keypoint in image B, meaning they represent the same physical point in the world. This correspondence is the foundation of image stitching, 3D reconstruction, visual localization, and object recognition.&lt;/p&gt;

&lt;h2&gt;
  
  
  Brute-Force Matching
&lt;/h2&gt;

&lt;p&gt;The simplest strategy compares every descriptor in image A against every descriptor in image B and keeps the closest one. For N features in image A and M in image B, that's N×M distance computations.&lt;/p&gt;

&lt;p&gt;The distance metric depends on the descriptor type:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Float descriptors&lt;/strong&gt; (SIFT, SURF) use &lt;strong&gt;L2 (Euclidean) distance&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Binary descriptors&lt;/strong&gt; (ORB, BRIEF, BRISK) use &lt;strong&gt;Hamming distance&lt;/strong&gt; — the number of bits that differ — computed efficiently with bitwise XOR plus a popcount.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The cost adds up fast. With 5,000 features per image and 128-dimensional SIFT descriptors, brute-force matching means 25 million 128-dimensional distance computations. That's fine for small images but becomes a bottleneck at scale.&lt;/p&gt;

&lt;h2&gt;
  
  
  FLANN: Approximate Nearest Neighbors
&lt;/h2&gt;

&lt;p&gt;FLANN (Fast Library for Approximate Nearest Neighbors) builds an index — typically a randomized k-d tree or a hierarchical k-means tree — over the descriptors of one image. Instead of scanning every descriptor for every query, each lookup only examines a small subset of likely candidates.&lt;/p&gt;

&lt;p&gt;This trades exactness for speed: FLANN is typically 10–100x faster than brute-force, but it can occasionally miss the true nearest neighbor since it's approximate. For most vision tasks that tradeoff is worth it — a slightly imperfect match rarely matters once you filter matches downstream anyway. OpenCV picks an appropriate FLANN algorithm automatically based on descriptor type.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lowe's Ratio Test
&lt;/h2&gt;

&lt;p&gt;Not every feature in image A has a genuine match in image B. Parts of the scene may be occluded, backgrounds may only appear in one image, or two unrelated features may look coincidentally similar. Raw nearest-neighbor matching doesn't know the difference — it always returns something.&lt;/p&gt;

&lt;p&gt;The ratio test, from David Lowe, filters these out. For each feature in image A, find its two nearest neighbors in image B, then compute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;distance(best match) / distance(second-best match) &amp;lt; threshold
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep the match only if this ratio is below the threshold — commonly &lt;strong&gt;0.75&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The logic: if a feature has one clearly closest neighbor and everything else is far away, that match is trustworthy. If the best and second-best candidates are nearly tied, the descriptor is ambiguous and the match shouldn't be trusted, regardless of which one scored slightly better.&lt;/p&gt;

&lt;p&gt;In practice this eliminates 70–90% of false matches while keeping most true ones. It should be considered a mandatory step in any matching pipeline, not an optional refinement.&lt;/p&gt;

&lt;h2&gt;
  
  
  RANSAC for Outlier Rejection
&lt;/h2&gt;

&lt;p&gt;Even after the ratio test, some bad matches slip through. RANSAC (Random Sample Consensus) is a robust estimation technique built to handle exactly this: separating inliers (correct matches) from outliers when a meaningful fraction of your data is wrong.&lt;/p&gt;

&lt;p&gt;The algorithm:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Sample&lt;/strong&gt; — randomly pick the minimum number of matches needed to estimate the geometric model (4 points for a homography, 5 for a fundamental matrix).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Estimate&lt;/strong&gt; — compute the model from that sample.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Score&lt;/strong&gt; — count how many of the remaining matches agree with the model within some distance threshold (inliers).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Repeat&lt;/strong&gt; — run many iterations, keep the model with the most inliers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Refine&lt;/strong&gt; — re-estimate the final model using all inliers from the winning iteration.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;RANSAC is surprisingly tolerant of bad data — it can recover the correct model even when 50% or more of the matches are wrong. The number of iterations required depends on the inlier ratio and desired confidence. As a concrete example: with a 50% inlier ratio and 4-point samples, about 72 iterations get you to 99% confidence of having sampled at least one all-inlier set.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Full Pipeline
&lt;/h2&gt;

&lt;p&gt;Putting it together, a robust matching pipeline looks like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Detect features and compute descriptors in both images.&lt;/li&gt;
&lt;li&gt;Match descriptors with brute-force or FLANN.&lt;/li&gt;
&lt;li&gt;Filter with Lowe's ratio test (threshold ~0.75).&lt;/li&gt;
&lt;li&gt;Estimate a geometric model with RANSAC to reject remaining outliers.&lt;/li&gt;
&lt;li&gt;Refine the model using all surviving inliers.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This five-step sequence is the standard backbone behind virtually every classical feature-based vision task — stitching panoramas, aligning point clouds, localizing a camera against a map. Skipping any single stage — matching without the ratio test, or accepting matches without RANSAC — tends to produce systems that work on easy images and fall apart on real-world ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn More
&lt;/h2&gt;

&lt;p&gt;This post covers the core ideas from the full lesson on Feature Matching, part of the Feature Detection &amp;amp; Description chapter in NeutralBlock's Computer Vision track. The full lesson, like everything on NeutralBlock, is free: &lt;a href="https://neutralblock.com/learn/computer-vision/cv-chapter-2/feature-matching" rel="noopener noreferrer"&gt;https://neutralblock.com/learn/computer-vision/cv-chapter-2/feature-matching&lt;/a&gt;&lt;/p&gt;

</description>
      <category>computervision</category>
      <category>machinelearning</category>
      <category>opencv</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How Buffer Overflows Actually Hijack Program Execution</title>
      <dc:creator>Sakramen</dc:creator>
      <pubDate>Fri, 14 Aug 2026 16:43:02 +0000</pubDate>
      <link>https://dev.to/sakramen/how-buffer-overflows-actually-hijack-program-execution-29op</link>
      <guid>https://dev.to/sakramen/how-buffer-overflows-actually-hijack-program-execution-29op</guid>
      <description>&lt;h2&gt;
  
  
  Why the Stack Matters
&lt;/h2&gt;

&lt;p&gt;When a program runs, its memory splits into regions: the text segment (executable code), the data segment (globals/statics), the heap (grows upward, dynamically allocated), and the stack (grows downward, holds function call frames).&lt;/p&gt;

&lt;p&gt;Every function call pushes a new stack frame containing local variables, the saved base pointer (EBP/RBP), and the return address — the address execution jumps back to once the function finishes. That return address is the target of a classic buffer overflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Vulnerable Pattern
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;vulnerable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
    &lt;span class="n"&gt;strcpy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;strcpy&lt;/code&gt; copies &lt;code&gt;input&lt;/code&gt; into &lt;code&gt;buffer&lt;/code&gt; with no length check. If &lt;code&gt;input&lt;/code&gt; is longer than 64 bytes, the extra bytes spill past the buffer into whatever sits next on the stack — which, sequentially, is the saved base pointer and then the return address. Write enough carefully chosen bytes and you're no longer overflowing a buffer, you're rewriting where the CPU jumps when the function returns.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the Exploit Actually Works
&lt;/h2&gt;

&lt;p&gt;A stack-based overflow exploit generally follows five steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Identify the vulnerability&lt;/strong&gt; — find a function that copies user input into a fixed-size buffer without bounds checking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Determine the offset&lt;/strong&gt; — figure out exactly how many bytes are needed before you start overwriting the return address. Tools like Metasploit's &lt;code&gt;pattern_create&lt;/code&gt; and &lt;code&gt;pattern_offset&lt;/code&gt; generate unique byte patterns so you can pinpoint this precisely instead of guessing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Control the return address&lt;/strong&gt; — overwrite it with a pointer to memory you control.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Insert shellcode&lt;/strong&gt; — place executable machine code in the buffer itself, so there's something worth jumping to.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use a NOP sled&lt;/strong&gt; — prepend the shellcode with a run of no-operation instructions. This widens the target area so minor address miscalculations still land inside the sled and slide into the shellcode.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Defenses That Exist Now
&lt;/h2&gt;

&lt;p&gt;Modern systems don't leave this wide open. Several protections stack on top of each other:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Protection&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;th&gt;How it gets bypassed&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Stack canaries&lt;/td&gt;
&lt;td&gt;Random value placed before the return address, checked before the function returns&lt;/td&gt;
&lt;td&gt;Information leaks that reveal the canary value&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ASLR&lt;/td&gt;
&lt;td&gt;Randomizes memory layout on each run&lt;/td&gt;
&lt;td&gt;Brute force, info leaks, or return-oriented programming&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DEP/NX&lt;/td&gt;
&lt;td&gt;Marks stack memory non-executable&lt;/td&gt;
&lt;td&gt;Return-oriented programming (ROP) chains&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PIE&lt;/td&gt;
&lt;td&gt;Randomizes the executable's base address&lt;/td&gt;
&lt;td&gt;Info leaks combined with ROP&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Notice the pattern: almost every defense is eventually worked around with either an information leak or ROP — chaining together small existing code fragments already marked executable, instead of injecting new shellcode. Defense in depth here means each protection raises the cost of an exploit, not that any single one is unbeatable alone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Heap Overflows Are a Different Beast
&lt;/h2&gt;

&lt;p&gt;Stack overflows go after the return address. Heap overflows instead corrupt the metadata that &lt;code&gt;malloc&lt;/code&gt; and &lt;code&gt;free&lt;/code&gt; use internally to track allocated chunks. Corrupting that bookkeeping data can hand an attacker an arbitrary write primitive — the ability to write attacker-chosen values to attacker-chosen addresses. It's more complex to pull off than a stack overflow, but it can sidestep protections that are specific to the stack.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fixing It at the Source
&lt;/h2&gt;

&lt;p&gt;All of this traces back to one root cause: functions that copy data without checking length. The fix starts in the code, not in the mitigations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Replace &lt;code&gt;strcpy&lt;/code&gt; with &lt;code&gt;strncpy&lt;/code&gt; or &lt;code&gt;strlcpy&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Replace &lt;code&gt;sprintf&lt;/code&gt; with &lt;code&gt;snprintf&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Replace &lt;code&gt;gets&lt;/code&gt; with &lt;code&gt;fgets&lt;/code&gt; (never use &lt;code&gt;gets&lt;/code&gt;, full stop)&lt;/li&gt;
&lt;li&gt;Where you can, use a memory-safe language like Rust, Go, or Java instead of C/C++&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And turn on the compiler-level protections wherever the code does stay in C/C++:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nt"&gt;-fstack-protector-all&lt;/span&gt;
&lt;span class="nt"&gt;-D_FORTIFY_SOURCE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;2
&lt;span class="nt"&gt;-pie&lt;/span&gt;
&lt;span class="nt"&gt;-z&lt;/span&gt; relro &lt;span class="nt"&gt;-z&lt;/span&gt; now
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;None of these make unsafe code safe on their own — they raise the bar for exploitation while the real fix is bounds-checked input handling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Go Deeper
&lt;/h2&gt;

&lt;p&gt;This covers the mechanics of memory layout, exploitation steps, and mitigations. The full lesson is free: &lt;a href="https://neutralblock.com/learn/ethical-hacking/hack-chapter-4/buffer-overflows" rel="noopener noreferrer"&gt;Buffer Overflows&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>security</category>
      <category>c</category>
      <category>hacking</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>AI Governance 101: What ML Practitioners Actually Need to Know</title>
      <dc:creator>Sakramen</dc:creator>
      <pubDate>Thu, 13 Aug 2026 16:48:08 +0000</pubDate>
      <link>https://dev.to/sakramen/ai-governance-101-what-ml-practitioners-actually-need-to-know-39b5</link>
      <guid>https://dev.to/sakramen/ai-governance-101-what-ml-practitioners-actually-need-to-know-39b5</guid>
      <description>&lt;p&gt;AI regulation isn't abstract policy anymore. If you're building systems that touch hiring, credit, healthcare, or law enforcement, there are now legal requirements attached to your model's behavior — and the penalties are real. Here's what actually matters for practitioners, without the fluff.&lt;/p&gt;

&lt;h2&gt;
  
  
  The EU AI Act: risk tiers, not blanket rules
&lt;/h2&gt;

&lt;p&gt;Adopted in 2024, the EU AI Act is the first comprehensive AI law, and it works by classifying systems into four risk tiers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unacceptable risk&lt;/strong&gt; — banned outright. Government social scoring, real-time biometric ID in public spaces (with narrow exceptions), manipulative AI targeting vulnerable people.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High risk&lt;/strong&gt; — hiring, credit scoring, healthcare diagnostics, law enforcement, critical infrastructure, education. These require a conformity assessment, a documented risk management system, data governance controls, transparency, human oversight, and accuracy/robustness testing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Limited risk&lt;/strong&gt; — chatbots, emotion recognition, deepfake generators. The obligation here is simpler: tell users they're interacting with AI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Minimal risk&lt;/strong&gt; — spam filters, game AI, most recommendation systems. No specific legal requirements, though voluntary codes are encouraged.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The part that should get your attention: non-compliance for high-risk systems can cost up to €35 million or 7% of global annual turnover, whichever is higher. That's not a slap on the wrist — it's a board-level risk.&lt;/p&gt;

&lt;p&gt;High-risk systems also need ongoing post-market monitoring and registration in an EU database, not just a one-time sign-off before launch.&lt;/p&gt;

&lt;h2&gt;
  
  
  NIST AI RMF: voluntary, but increasingly load-bearing
&lt;/h2&gt;

&lt;p&gt;The US hasn't passed anything like the AI Act. Instead, NIST published the AI Risk Management Framework (AI RMF) — voluntary, not law, but referenced in federal procurement and rapidly becoming the de facto standard for US organizations doing this work seriously.&lt;/p&gt;

&lt;p&gt;It has four core functions, and they map cleanly onto the ML lifecycle:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Govern&lt;/strong&gt; — set policies, define who owns AI risk, build accountability structures before you build anything else.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Map&lt;/strong&gt; — understand context: intended use, stakeholders, likely harms, deployment environment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Measure&lt;/strong&gt; — test for bias, evaluate robustness, check performance across subpopulations, using both quantitative and qualitative methods.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manage&lt;/strong&gt; — prioritize the risks you found, implement mitigations, monitor in production, keep an incident response plan ready.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you're not sure where to start with governance internally, this four-function structure is a reasonable skeleton even outside the US.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sector rules stack on top of horizontal law
&lt;/h2&gt;

&lt;p&gt;Horizontal AI legislation isn't the whole picture. Specific sectors have their own layered requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Healthcare&lt;/strong&gt;: the FDA regulates AI/ML-based Software as a Medical Device, and has proposed rules for continuously-learning models that keep adapting post-deployment — these need a predetermined change control plan, not a one-time approval.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Finance&lt;/strong&gt;: the Federal Reserve and OCC require explainability for AI-driven credit decisions under the Equal Credit Opportunity Act. The SEC has proposed rules targeting AI-driven investment advisors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Employment&lt;/strong&gt;: NYC's Local Law 144 requires bias audits for automated employment decision tools, with results published publicly — not just kept in an internal report.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Autonomous vehicles&lt;/strong&gt;: NHTSA requires manufacturers to report crashes involving automated driving systems.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your model touches any of these domains, the horizontal AI law is the floor, not the ceiling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Corporate frameworks fill the gaps
&lt;/h2&gt;

&lt;p&gt;Google, Microsoft, and IBM all publish their own responsible AI frameworks. They're voluntary, but they matter in practice — they shape hiring expectations, client requirements, and often preview where regulation is headed. IBM's approach is notable structurally: it runs a centralized AI ethics board with actual authority to halt projects that don't meet its standards, which is a governance pattern worth borrowing even at smaller scale.&lt;/p&gt;

&lt;h2&gt;
  
  
  Different regions, different philosophies
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;EU&lt;/strong&gt;: prescriptive, risk-based, legally binding.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;US&lt;/strong&gt;: sector-specific, voluntary-framework-heavy, optimized for innovation speed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;China&lt;/strong&gt;: comprehensive rules specifically targeting algorithmic recommendation, deepfakes, and generative AI, with content moderation and transparency requirements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UK&lt;/strong&gt;: pro-innovation, delegates oversight to existing sector regulators rather than creating a new AI-specific body.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Canada&lt;/strong&gt;: AIDA creates requirements for high-impact systems and a dedicated AI and Data Commissioner role.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you ship globally, you're effectively subject to the strictest applicable regime for each market you touch.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this means for your actual pipeline
&lt;/h2&gt;

&lt;p&gt;Compliance isn't a document you write after the model ships. In practice it means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Documenting training data, architecture decisions, and evaluation results as you go&lt;/li&gt;
&lt;li&gt;Building monitoring that catches performance degradation and bias drift in production, not just accuracy drops&lt;/li&gt;
&lt;li&gt;Defining accountability explicitly — who is responsible when the model causes harm&lt;/li&gt;
&lt;li&gt;Having an incident response procedure ready before you need it&lt;/li&gt;
&lt;li&gt;Keeping audit trails a regulator (or auditor) could actually review&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Treating this as an afterthought is the expensive path. Embedding it into the ML lifecycle from day one is cheaper and, frankly, just better engineering practice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Further reading
&lt;/h2&gt;

&lt;p&gt;This is a condensed version of a full lesson on AI governance and regulation, part of the Ethics &amp;amp; Responsible AI chapter in NeutralBlock's ML Fundamentals track. The full lesson is free: &lt;a href="https://neutralblock.com/learn/ml-fundamentals/ml-chapter-9/ai-governance-regulation" rel="noopener noreferrer"&gt;https://neutralblock.com/learn/ml-fundamentals/ml-chapter-9/ai-governance-regulation&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>compliance</category>
      <category>ethics</category>
    </item>
    <item>
      <title>Meeting Latency Budgets in Real-Time Vision Systems</title>
      <dc:creator>Sakramen</dc:creator>
      <pubDate>Tue, 11 Aug 2026 16:50:50 +0000</pubDate>
      <link>https://dev.to/sakramen/meeting-latency-budgets-in-real-time-vision-systems-4o2</link>
      <guid>https://dev.to/sakramen/meeting-latency-budgets-in-real-time-vision-systems-4o2</guid>
      <description>&lt;p&gt;Autonomous vehicles need to process frames in 50-100ms to react to obstacles. Augmented reality needs 16ms frame times to hit 60fps without feeling laggy. Industrial inspection has to keep pace with a moving line. These are hard latency budgets, and hitting them consistently takes engineering across the whole pipeline, not just a fast model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Latency Is Not Just Inference Time
&lt;/h2&gt;

&lt;p&gt;End-to-end latency in a vision system breaks down into several stages, each with its own typical range and its own optimization lever:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stage&lt;/th&gt;
&lt;th&gt;Typical Latency&lt;/th&gt;
&lt;th&gt;Optimization Lever&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Image capture&lt;/td&gt;
&lt;td&gt;1-33ms (depends on fps)&lt;/td&gt;
&lt;td&gt;Camera selection, exposure settings&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data transfer&lt;/td&gt;
&lt;td&gt;1-10ms&lt;/td&gt;
&lt;td&gt;DMA, zero-copy buffers, GPU-direct capture&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Preprocessing&lt;/td&gt;
&lt;td&gt;2-10ms&lt;/td&gt;
&lt;td&gt;GPU-accelerated resize, on-device normalization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model inference&lt;/td&gt;
&lt;td&gt;5-100ms&lt;/td&gt;
&lt;td&gt;Model optimization, quantization, hardware selection&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Post-processing&lt;/td&gt;
&lt;td&gt;1-10ms&lt;/td&gt;
&lt;td&gt;NMS optimization, result filtering&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Action/response&lt;/td&gt;
&lt;td&gt;1-5ms&lt;/td&gt;
&lt;td&gt;Direct hardware control, efficient IPC&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A team that spends all its optimization budget on the model while capture and transfer stay untouched is optimizing the wrong variable. A holistic view of the pipeline is what actually gets you under budget.&lt;/p&gt;

&lt;h2&gt;
  
  
  Batching: Throughput vs Latency
&lt;/h2&gt;

&lt;p&gt;GPUs are massively parallel and sit underutilized when fed one image at a time. Batching fixes utilization but costs latency, so the strategy matters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Static batching&lt;/strong&gt;: wait to collect a fixed number of requests before running inference. Simple, but adds wait time equal to however long it takes to fill the batch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic batching&lt;/strong&gt;: process whatever requests arrived within a short time window (e.g., 5ms). This is what Triton Inference Server and TorchServe support natively, and it balances throughput against latency better than static batching.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Micro-batching&lt;/strong&gt;: for streaming video from multiple cameras, batch frames across streams rather than across time from a single stream.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The right batch size is a function of your latency budget. If you have 100ms to work with and inference takes 30ms per image, a batch of 2-3 might be the sweet spot — bigger batches raise throughput but blow past the target.&lt;/p&gt;

&lt;h2&gt;
  
  
  Asynchronous Pipelines
&lt;/h2&gt;

&lt;p&gt;Running every stage sequentially means your total latency is the sum of every stage's latency. Decoupling the stages so they run concurrently on different hardware changes that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Conceptual async pipeline
&lt;/span&gt;&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;running&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
 &lt;span class="c1"&gt;# These run concurrently on different hardware
&lt;/span&gt; &lt;span class="n"&gt;future_frame&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;camera&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;capture_async&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="c1"&gt;# Camera sensor
&lt;/span&gt; &lt;span class="n"&gt;future_preprocess&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;preprocess_async&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# CPU
&lt;/span&gt; &lt;span class="n"&gt;future_inference&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;infer_async&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;batch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# GPU
&lt;/span&gt; &lt;span class="n"&gt;future_postprocess&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;postprocess&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# CPU
&lt;/span&gt;
 &lt;span class="c1"&gt;# Pipeline: while GPU processes frame N,
&lt;/span&gt; &lt;span class="c1"&gt;# CPU preprocesses frame N+1,
&lt;/span&gt; &lt;span class="c1"&gt;# and camera captures frame N+2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this pipeline parallelism, no piece of hardware sits idle waiting on another. The camera captures frame N+2 while the CPU preprocesses N+1 and the GPU infers on N. Throughput ends up bound by the slowest stage in the pipeline, not the sum of all of them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Streaming Video Has Its Own Rules
&lt;/h2&gt;

&lt;p&gt;Continuous streams introduce failure modes that don't show up when you're just benchmarking single images:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frame skipping&lt;/strong&gt;: if inference takes longer than the frame interval, don't let a queue build up. Drop stale frames and process the most recent one instead of working through a growing backlog.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Temporal redundancy exploitation&lt;/strong&gt;: run full inference on keyframes and cheaper updates on the frames in between. If the scene hasn't changed much, reuse the previous result instead of recomputing from scratch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Region-of-interest processing&lt;/strong&gt;: run a lightweight detector across the full frame first, then reserve the expensive model for the regions that actually matter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-resolution strategies&lt;/strong&gt;: detect at low resolution, then crop and process only the interesting regions at full resolution.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Hardware Options for Edge Deployment
&lt;/h2&gt;

&lt;p&gt;The right hardware depends on your power, cost, and flexibility constraints:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;NVIDIA Jetson (Orin, Xavier)&lt;/strong&gt;: 10-275 TOPS, the standard for edge AI in robotics and autonomous vehicles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Coral (Edge TPU)&lt;/strong&gt;: 4 TOPS for TFLite models at 2W, well suited to always-on vision devices.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intel Movidius (VPU)&lt;/strong&gt;: neural compute sticks common in smart cameras and drones.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Apple Neural Engine&lt;/strong&gt;: 15.8 TOPS on M1, up to 38 TOPS on M3 Max, accessed through CoreML.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom ASICs&lt;/strong&gt;: maximum efficiency for a fixed model architecture, at the cost of zero flexibility if requirements change.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Benchmarking Pitfalls
&lt;/h2&gt;

&lt;p&gt;Always profile on the actual target hardware, not a dev workstation. Three things reliably distort results:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Cold start overhead&lt;/strong&gt;: the first inference is slower because of memory allocation and kernel compilation. Warm up the model before you start timing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory contention&lt;/strong&gt;: other processes competing for GPU or CPU memory can introduce latency spikes that don't show up in isolated tests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Thermal throttling&lt;/strong&gt;: embedded devices can show degraded performance after several minutes of sustained load, so short benchmarks can be misleadingly optimistic.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;Meeting a real-time latency budget is a systems problem, not a model problem. The camera, the transfer path, the batching strategy, the pipeline concurrency, and the hardware all contribute, and any one of them can become the bottleneck if ignored.&lt;/p&gt;

&lt;p&gt;This is a condensed version of the full lesson, which goes into more depth on each of these topics: &lt;a href="https://neutralblock.com/learn/computer-vision/cv-chapter-9/real-time-vision-systems" rel="noopener noreferrer"&gt;Real-Time Vision Systems&lt;/a&gt;, free on NeutralBlock.&lt;/p&gt;

</description>
      <category>computervision</category>
      <category>machinelearning</category>
      <category>edgecomputing</category>
      <category>performance</category>
    </item>
    <item>
      <title>How Two-Stage Object Detectors Went From 47 Seconds to Real-Time-Adjacent</title>
      <dc:creator>Sakramen</dc:creator>
      <pubDate>Mon, 10 Aug 2026 16:45:06 +0000</pubDate>
      <link>https://dev.to/sakramen/how-two-stage-object-detectors-went-from-47-seconds-to-real-time-adjacent-4m2</link>
      <guid>https://dev.to/sakramen/how-two-stage-object-detectors-went-from-47-seconds-to-real-time-adjacent-4m2</guid>
      <description>&lt;p&gt;Object detection has two broad architectural families: one-stage detectors that predict boxes and classes directly in a single pass, and two-stage detectors that first propose candidate regions, then classify and refine them. Two-stage detectors were the dominant approach from 2014 to 2017 and are still the most accurate choice on many benchmarks when latency isn't the constraint.&lt;/p&gt;

&lt;p&gt;The interesting part isn't just that two-stage detectors work — it's how each generation solved a specific, identifiable bottleneck in the previous one. Here's the sequence.&lt;/p&gt;

&lt;h2&gt;
  
  
  R-CNN (2014): Prove CNN Features Work
&lt;/h2&gt;

&lt;p&gt;R-CNN (Girshick et al.) was the first detector to apply deep learning effectively to the detection problem. Its pipeline had three independent stages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Selective Search&lt;/strong&gt; — a traditional segmentation-based algorithm generates ~2,000 region proposals per image.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CNN feature extraction&lt;/strong&gt; — each proposal is resized to 227x227 and run through AlexNet to get a feature vector.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Classification&lt;/strong&gt; — an SVM is trained per class on those features, plus a separate bounding box regressor to tighten the boxes.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This improved detection accuracy by 30% over prior hand-crafted-feature methods (like HOG) on PASCAL VOC, which was a genuinely big deal — it proved CNN features generalize to detection, not just classification.&lt;/p&gt;

&lt;p&gt;The cost: running the CNN forward pass 2,000 times per image, once per proposal. That's about 47 seconds per image. Fine for a paper, useless for a product.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fast R-CNN (2015): Stop Recomputing Features
&lt;/h2&gt;

&lt;p&gt;The fix here is almost obvious in retrospect: don't run the CNN once per proposal. Run it once on the whole image, and extract each proposal's features from the resulting shared feature map.&lt;/p&gt;

&lt;p&gt;The mechanism that makes this possible is &lt;strong&gt;RoI Pooling&lt;/strong&gt;. Since proposals come in arbitrary sizes but downstream fully-connected layers need a fixed-size input, RoI Pooling divides each proposal's region of the feature map into a fixed grid — say 7x7 — and max-pools within each cell. Regardless of how big or small the original proposal was, you get a fixed-length vector out.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;feature_map -&amp;gt; RoI Pooling(proposal_region, output_size=7x7) -&amp;gt; fixed_vector -&amp;gt; FC layers -&amp;gt; class + box offsets
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This single change made Fast R-CNN 213x faster than R-CNN at test time, and it could be trained end-to-end instead of as three disconnected stages. But Selective Search — a non-learned, CPU-bound algorithm — was still sitting in the pipeline, costing about 2 seconds per image and capping how fast the whole system could go.&lt;/p&gt;

&lt;h2&gt;
  
  
  Faster R-CNN (2015): Replace the Last Non-Learned Component
&lt;/h2&gt;

&lt;p&gt;Faster R-CNN's contribution is the &lt;strong&gt;Region Proposal Network (RPN)&lt;/strong&gt;: a small neural network that shares the backbone's feature map and generates proposals directly, replacing Selective Search entirely.&lt;/p&gt;

&lt;p&gt;The RPN works like this: a 3x3 convolution slides over the feature map, feeding two parallel 1x1 convolutions — one producing objectness scores (2k values), one producing box offsets (4k values). At each spatial location, it evaluates k anchor boxes of different scales and aspect ratios (typically k=9: three scales x three ratios), predicting whether each anchor contains an object and how to adjust its coordinates.&lt;/p&gt;

&lt;p&gt;Training uses a multi-task loss:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;L = L_cls(objectness) + lambda * L_reg(box_offsets)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Anchors are labeled positive if they have IoU &amp;gt; 0.7 with any ground truth box, and negative if IoU &amp;lt; 0.3 with all ground truth boxes. This threshold strategy yields hundreds of high-quality proposals in a single forward pass, no external algorithm required.&lt;/p&gt;

&lt;p&gt;The result: a single, fully end-to-end trainable network running at roughly 5 FPS. Not real-time, but orders of magnitude faster than R-CNN's 47 seconds per image, while matching state-of-the-art accuracy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where This Goes Next
&lt;/h2&gt;

&lt;p&gt;The two-stage idea didn't stop at Faster R-CNN. Cascade R-CNN extends the pattern to three sequential stages, each trained with a progressively stricter IoU threshold, so detections get refined more precisely at each step.&lt;/p&gt;

&lt;p&gt;The underlying tradeoff hasn't changed: two-stage detectors spend more compute deciding where to look before classifying, which costs speed but tends to pay off in accuracy. For applications where real-time inference isn't required and precision matters — medical imaging, satellite imagery, quality inspection — this family of architectures is still a reasonable default.&lt;/p&gt;

&lt;h2&gt;
  
  
  Further Reading
&lt;/h2&gt;

&lt;p&gt;This is a condensed version of the full lesson, which goes into more detail on anchor design and the RPN training procedure: &lt;a href="https://neutralblock.com/learn/computer-vision/cv-chapter-4/two-stage-detectors" rel="noopener noreferrer"&gt;Two-Stage Detectors&lt;/a&gt;, free on NeutralBlock.&lt;/p&gt;

</description>
      <category>computervision</category>
      <category>machinelearning</category>
      <category>deeplearning</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Nodes and Networks: How Blockchains Actually Stay Decentralized</title>
      <dc:creator>Sakramen</dc:creator>
      <pubDate>Mon, 10 Aug 2026 06:25:43 +0000</pubDate>
      <link>https://dev.to/sakramen/nodes-and-networks-how-blockchains-actually-stay-decentralized-47l6</link>
      <guid>https://dev.to/sakramen/nodes-and-networks-how-blockchains-actually-stay-decentralized-47l6</guid>
      <description>&lt;p&gt;When someone says "Bitcoin has over 15,000 nodes worldwide," they mean 15,000+ independent computers are each running Bitcoin software and each maintaining their own full copy of the blockchain. No server owns the truth. Every node checks it for itself.&lt;/p&gt;

&lt;p&gt;That single fact — every node independently verifies every transaction and block against protocol rules — is the reason blockchains don't need a central authority. If one node tries to cheat, the rest simply ignore it. There's no admin account to compromise because there's no admin.&lt;/p&gt;

&lt;h2&gt;
  
  
  Not All Nodes Do the Same Job
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Full Node
&lt;/h3&gt;

&lt;p&gt;Downloads and stores the entire blockchain, every block since genesis, and independently validates everything against consensus rules.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Highest security&lt;/li&gt;
&lt;li&gt;~500 GB for Bitcoin&lt;/li&gt;
&lt;li&gt;~1 TB for Ethereum&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the backbone of network security. A full node doesn't trust anyone's summary of the chain; it recomputes validity itself.&lt;/p&gt;

&lt;h3&gt;
  
  
  Light Node (SPV)
&lt;/h3&gt;

&lt;p&gt;Stores only block headers, not full transaction data. Uses Merkle proofs and relies on full nodes to verify transactions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Low storage, ~50 MB&lt;/li&gt;
&lt;li&gt;Trusts full nodes for verification&lt;/li&gt;
&lt;li&gt;What most mobile wallets run&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Mining/Validator Node
&lt;/h3&gt;

&lt;p&gt;A full node that also participates in block creation. Miners (Proof of Work) solve computational puzzles; validators (Proof of Stake) stake cryptocurrency as collateral. Both earn rewards for securing the network.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creates new blocks&lt;/li&gt;
&lt;li&gt;Earns rewards&lt;/li&gt;
&lt;li&gt;Requires specialized hardware (PoW) or capital at stake (PoS)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Archive Node
&lt;/h3&gt;

&lt;p&gt;Everything a full node stores, plus historical state at every block height.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Complete history&lt;/li&gt;
&lt;li&gt;~15+ TB for Ethereum&lt;/li&gt;
&lt;li&gt;Used by explorers, analytics platforms, and enterprise tooling&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Peer-to-Peer Instead of Client-Server
&lt;/h2&gt;

&lt;p&gt;A traditional web service is client-server: your browser requests data from a company's servers. If those servers go down, the service is unavailable. That's a single point of failure by design.&lt;/p&gt;

&lt;p&gt;Blockchain networks use peer-to-peer (P2P) architecture instead. Every participant is simultaneously a client and a server. Nodes connect directly to each other, typically maintaining 8-20 peer connections, and information spreads through the network like gossip: each node tells its peers, who tell their peers, until everyone has it.&lt;/p&gt;

&lt;h2&gt;
  
  
  How a Transaction Actually Propagates
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;You submit a transaction from your wallet. It goes to whichever node your wallet is connected to.&lt;/li&gt;
&lt;li&gt;That node validates it: correct format, valid signature, sufficient balance. Invalid transactions get rejected right there.&lt;/li&gt;
&lt;li&gt;If valid, the node broadcasts it to its 8-20 connected peers.&lt;/li&gt;
&lt;li&gt;Each peer independently validates and rebroadcasts to its own peers. The transaction spreads exponentially.&lt;/li&gt;
&lt;li&gt;Within seconds, the transaction has reached nodes worldwide and is sitting in mempools, waiting to be included in a block.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;No central router coordinates this. It's just repeated local validation and rebroadcast, scaled across thousands of independent machines.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Architecture Is Hard to Kill
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Geographic distribution&lt;/strong&gt;: nodes run on every continent, so a regional outage or disaster can't take the network down.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No single point of failure&lt;/strong&gt;: even if 90% of nodes went offline, the remaining 10% could keep the network operating.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Censorship resistance&lt;/strong&gt;: no central authority can block a transaction. If one node refuses to process it, thousands of others will.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-healing&lt;/strong&gt;: nodes that go offline can rejoin later and automatically sync the blocks they missed from peers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What It Takes to Run One Yourself
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Requirement&lt;/th&gt;
&lt;th&gt;Bitcoin Full Node&lt;/th&gt;
&lt;th&gt;Ethereum Full Node&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Storage&lt;/td&gt;
&lt;td&gt;500+ GB SSD&lt;/td&gt;
&lt;td&gt;1+ TB NVMe SSD&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RAM&lt;/td&gt;
&lt;td&gt;2+ GB&lt;/td&gt;
&lt;td&gt;16+ GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Internet&lt;/td&gt;
&lt;td&gt;Unmetered, 50+ Mbps&lt;/td&gt;
&lt;td&gt;Unmetered, 100+ Mbps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Initial Sync Time&lt;/td&gt;
&lt;td&gt;1-7 days&lt;/td&gt;
&lt;td&gt;2-14 days&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Running your own full node gets you a few concrete things: your transactions aren't routed through someone else's infrastructure, you're verifying against your own copy of the rules instead of trusting a third party's node, and you're adding to the pool of validators that makes the network harder to disrupt.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;The short version: nodes are computers running blockchain software, each holding a copy of the ledger. Full nodes validate everything independently; light nodes lean on full nodes for verification through Merkle proofs. There's no central server, connections are peer-to-peer, and data spreads by gossip. That combination is what makes these networks resilient and hard to censor.&lt;/p&gt;

&lt;p&gt;Full lesson, free: &lt;a href="https://neutralblock.com/learn/fundamentals/blockchain-fundamentals/nodes-and-networks" rel="noopener noreferrer"&gt;https://neutralblock.com/learn/fundamentals/blockchain-fundamentals/nodes-and-networks&lt;/a&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>networking</category>
      <category>web3</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Purple Teaming: Closing the Loop Between Attack and Detection</title>
      <dc:creator>Sakramen</dc:creator>
      <pubDate>Sun, 09 Aug 2026 16:25:35 +0000</pubDate>
      <link>https://dev.to/sakramen/purple-teaming-closing-the-loop-between-attack-and-detection-1207</link>
      <guid>https://dev.to/sakramen/purple-teaming-closing-the-loop-between-attack-and-detection-1207</guid>
      <description>&lt;h2&gt;
  
  
  The Problem With Traditional Red Team Reports
&lt;/h2&gt;

&lt;p&gt;A standard red team engagement works like this: the offensive team operates covertly, tries to achieve objectives without being caught, and delivers a report at the end summarizing what worked. The blue team reads it, maybe weeks or months later, and has to reverse-engineer exactly which detection failed and why.&lt;/p&gt;

&lt;p&gt;Meanwhile blue teams often write detection rules in isolation, without ever confirming those rules actually fire against a real execution of the technique they're meant to catch. Two teams, two blind spots, no feedback loop.&lt;/p&gt;

&lt;p&gt;Purple teaming is the fix: red and blue work together, in real time, so that every attack execution is immediately paired with a detection check.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Concrete Example: DCSync
&lt;/h2&gt;

&lt;p&gt;Say the red team executes a DCSync attack against Active Directory, which abuses domain replication to pull password hashes.&lt;/p&gt;

&lt;p&gt;In a traditional engagement, the report just says "DCSync was successful." In a purple team exercise, the blue team is watching the SIEM, EDR, and domain controller logs while the attack runs. If nothing alerts, both teams stop and figure out why immediately. Two common causes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The SIEM has no rule for &lt;code&gt;DsGetNCChanges&lt;/code&gt; replication requests originating from a non-domain-controller host.&lt;/li&gt;
&lt;li&gt;The relevant Windows event (Event ID 4662) isn't even being collected.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The blue team writes and deploys the detection rule on the spot. The red team re-executes the exact same attack to confirm the new rule fires with an alert an analyst could actually act on. That's the whole point: verified, not assumed.&lt;/p&gt;

&lt;h2&gt;
  
  
  MITRE ATT&amp;amp;CK as the Shared Language
&lt;/h2&gt;

&lt;p&gt;Purple teaming needs a common vocabulary so both teams are testing and measuring the same thing. MITRE ATT&amp;amp;CK provides that: a catalog of adversary techniques organized under tactical objectives like initial access, execution, persistence, privilege escalation, defense evasion, credential access, discovery, lateral movement, collection, exfiltration, and command and control.&lt;/p&gt;

&lt;p&gt;Teams use ATT&amp;amp;CK to pick which techniques to test in a given session, track what's covered across the matrix over time, and prioritize based on techniques known to be used by threat actors relevant to their industry.&lt;/p&gt;

&lt;h2&gt;
  
  
  Exercise Structure
&lt;/h2&gt;

&lt;p&gt;A purple team exercise generally follows six steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Scope and prioritize&lt;/strong&gt; — pick ATT&amp;amp;CK techniques based on threat intel for your industry. You can't test everything in one sitting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Baseline detection&lt;/strong&gt; — document what rules, log sources, and response procedures already exist for each chosen technique, before anything is executed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Execute and observe&lt;/strong&gt; — red runs each technique while blue watches every detection layer: SIEM, EDR, NDR, firewall logs. Both sides document what happened.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analyze gaps&lt;/strong&gt; — for each technique, determine if it was detected, at which layer, how long it took, and whether the alert gave an analyst enough context to investigate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remediate and retest&lt;/strong&gt; — build or tune detections for the gaps found, then re-run the attack to confirm the fix works with acceptable fidelity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Document and track&lt;/strong&gt; — log everything in an ATT&amp;amp;CK coverage heatmap. This becomes an ongoing detection maturity scorecard.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Atomic Red Team
&lt;/h2&gt;

&lt;p&gt;Atomic Red Team is an open-source library of small, focused test scripts, each mapped to a specific ATT&amp;amp;CK technique. An "atomic test" does one thing: dump LSASS memory, create a scheduled task for persistence, run DNS tunneling, and so on.&lt;/p&gt;

&lt;p&gt;They're designed to be safe to run in production with proper authorization, which makes them the practical building blocks of a purple team exercise. Instead of designing a custom attack script for every technique, teams pull an atomic test off the shelf and work through the ATT&amp;amp;CK matrix systematically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Metrics That Matter
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Target&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Detection Coverage&lt;/td&gt;
&lt;td&gt;% of tested ATT&amp;amp;CK techniques with working detections&lt;/td&gt;
&lt;td&gt;Increase each quarter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mean Time to Detect&lt;/td&gt;
&lt;td&gt;Average time from attack execution to alert generation&lt;/td&gt;
&lt;td&gt;Under 5 minutes for priority techniques&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Alert Fidelity&lt;/td&gt;
&lt;td&gt;True positive vs. false positive ratio per rule&lt;/td&gt;
&lt;td&gt;Above 80% true positive rate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Response Completeness&lt;/td&gt;
&lt;td&gt;Whether runbooks cover all investigation/containment steps&lt;/td&gt;
&lt;td&gt;Full coverage for top 50 techniques&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These give you something a narrative pentest report doesn't: a trackable scorecard of detection maturity over time, not just a snapshot of what one red team happened to bypass on one particular day.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why It's Worth Adopting
&lt;/h2&gt;

&lt;p&gt;Purple teaming turns security testing from a periodic, adversarial exercise into an ongoing, collaborative one. Instead of finding out three months later that a technique slipped through, you find out immediately, fix it immediately, and verify the fix immediately.&lt;/p&gt;

&lt;p&gt;The full lesson, with the complete exercise framework and metrics breakdown, is free here: &lt;a href="https://neutralblock.com/learn/network-security/net-chapter-9/purple-teaming" rel="noopener noreferrer"&gt;Purple Teaming&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>networking</category>
      <category>tutorial</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
