<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aransiola Ayodele on Medium]]></title>
        <description><![CDATA[Stories by Aransiola Ayodele on Medium]]></description>
        <link>https://medium.com/@leomofthings?source=rss-b114d38e9f04------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*g7HjOtNlfIf47Cw3P72bvg.jpeg</url>
            <title>Stories by Aransiola Ayodele on Medium</title>
            <link>https://medium.com/@leomofthings?source=rss-b114d38e9f04------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 03:45:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@leomofthings/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[OpenTelemetry is the USB-C of Observability.]]></title>
            <link>https://medium.com/@leomofthings/opentelemetry-is-the-usb-c-of-observability-ea7b7a316846?source=rss-b114d38e9f04------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea7b7a316846</guid>
            <category><![CDATA[metrics]]></category>
            <category><![CDATA[opentelemetry]]></category>
            <category><![CDATA[observability]]></category>
            <dc:creator><![CDATA[Aransiola Ayodele]]></dc:creator>
            <pubDate>Tue, 31 Mar 2026 23:44:17 GMT</pubDate>
            <atom:updated>2026-03-31T23:44:17.417Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DRegMflVgVCH7FWS" /><figcaption>Photo by <a href="https://unsplash.com/@solenfeyissa?utm_source=medium&amp;utm_medium=referral">Solen Feyissa</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>Before USB-C, cables were a mess.</blockquote><p>Every device had its own charger, tied to its manufacturer, incompatible with everything else. You couldn’t borrow a cable without checking compatibility. Some carried power but not data. Others worked for data but not display. Even within the same brand, you’d still run into friction.</p><p><a href="https://www.redhat.com/en/topics/devops/what-is-observability">Observability</a> used to feel the same way.</p><p>Every vendor had its own SDK. If you wanted traces in one system and metrics in another, you had to instrument your application to fit your vendor structure. Switching providers meant rewriting large parts of your codebase. You weren’t just choosing a tool. You were committing to a vendor.</p><p>That’s the problem <a href="https://opentelemetry.io/">OpenTelemetry</a> is solving.</p><h3>The Mess Before OTel</h3><p>If you’ve worked on any reasonably sized system, you’ve seen this firsthand.</p><p>You start with one observability tool. Maybe it’s Datadog. You integrate their SDK across your services. Everything is fine until:</p><ul><li>Pricing becomes a concern</li><li>You need features another vendor does better</li><li>You want to split workloads across multiple tools</li></ul><p>Now you’re stuck.</p><p>Because your instrumentation is locked to that vendor, switching to another vendor becomes expensive technically and sometimes, financially. You’d be rewriting telemetry pipelines instead of shipping product features.</p><p>This is the same ecosystem-divide problem hardware had before standard connectors.</p><h3>Why USB-C Won</h3><p>USB-C didn’t win because it was flashy. It won because it simplified everything.</p><p>I could use one single cable with all my devices (Google Pixel, iPhone, MacBook, Soundcore Headset, Logitech Keyboard, JBL Speaker, etc.) for power, data transfer, or sometimes media output. I stopped thinking about compatibility and started assuming it 😄.</p><p>More importantly, USB-C separated concerns:</p><ul><li>The cable became standard</li><li>The different devices could still compete</li></ul><p>Apple, Dell, and Samsung all build different products, but they plug into the same interface.</p><h3>That’s the key idea.</h3><h3>What OpenTelemetry Actually Is</h3><p>OpenTelemetry is not an observability tool. It’s a standard. It defines how telemetry data is generated, collected, and exported (to any backend).</p><p>Instead of instrumenting your app with vendor-specific libraries, you instrument once using OpenTelemetry.</p><p>A simple example in Node.js looks like this:</p><pre>import { trace, SpanStatusCode } from &quot;@opentelemetry/api&quot;;<br><br>const tracer = trace.getTracer(&quot;payment-service&quot;);<br><br>async function handlePayment() {<br>  return tracer.startActiveSpan(&quot;process-payment&quot;, async (span) =&gt; {<br>    try {<br>      span.setAttribute(&quot;payment.type&quot;, &quot;credit_card&quot;);<br>      await validateUser();<br>      span.setStatus({ code: SpanStatusCode.OK });<br>    } catch (err: any) {<br>      span.recordException(err);<br>      span.setStatus({<br>        code: SpanStatusCode.ERROR,<br>        message: err.message,<br>      });<br>      throw err;<br>    } finally {<br>      span.end();<br>    }<br>  });<br>}</pre><p>The code above describes manual instrumentation using the OpenTelemetry API to track the execution of the `handlePayment` function. It begins by obtaining a <strong>Tracer</strong> instance, which acts as the entry point for creating telemetry. Inside handlePayment, the startActiveSpan method creates a new <strong>span</strong> named &quot;process-payment&quot; and sets it as the &quot;active&quot; context. This means any related operations, like the validateUser() call, will automatically be recorded as child spans of this payment process, forming a hierarchical trace.</p><figure><img alt="Example of hierarchical trace. Image from https://signoz.io/blog/opentelemetry-tracing/" src="https://cdn-images-1.medium.com/max/1024/0*qHpuPhfa5mHuso9A" /><figcaption>Example of hierarchical trace. Image from <a href="https://signoz.io/blog/opentelemetry-tracing/">https://signoz.io/blog/opentelemetry-tracing/</a></figcaption></figure><p>At the end of the span operation, it hands the data off to the OpenTelemetry SDK to be exported to your observability backend. The code doesn’t change. Only the pipeline does.</p><h3>The USB-C Parallel</h3><p>This is where the analogy becomes useful. USB-C gave us a universal interface for hardware. While OpenTelemetry is giving us a universal interface for observability.</p><ul><li>One cable → One instrumentation standard</li><li>Works across devices → Works across vendors</li><li>Reduces cable clutter → Reduces SDK clutter</li><li>Enables interoperability → Enables backend flexibility</li><li>Industry adoption → CNCF-backed ecosystem</li></ul><p>Instead of wiring your system to a single vendor, you plug into a standard layer. <strong><em>That layer is OpenTelemetry</em></strong>.</p><h3>What This Changes in Production</h3><p>This is not just conceptual. It changes how systems are designed.</p><p>First, vendor lock-in is reduced. You can start with one backend and switch later without rewriting your instrumentation. That changes how teams make decisions. You can optimize for current needs without committing long-term. Secondly, multi-backend setups become realistic.</p><p>You might send traces to one platform, metrics to another, and logs to a third platform. All from the same instrumentation layer.</p><p>Your OTel Collector becomes a control point. The OTel<strong> Collector</strong> is a vendor-agnostic interface that sits between your application and your monitoring backend. Instead of your code sending data directly to a specific tool, it sends everything to the Collector, which handles the heavy lifting of receiving, processing, and exporting that data.</p><p>It operates through a multiple-stage pipeline; it “listens” for data coming from your apps in various formats. It cleans or modifies the data, such as removing sensitive PII (like credit card numbers), batching data to save bandwidth, or adding global tags like environment: production. And finally, it sends the finished data to one or multiple destinations simultaneously.</p><h3>The Direction Things Are Moving</h3><p>We are heading toward a period where:</p><ul><li>Instrumentation is standard</li><li>Telemetry is portable</li><li>Vendors compete on insights, not ingestion</li></ul><p>Frameworks are already starting to adopt OpenTelemetry by default. Over time, it becomes unseen infrastructure.</p><p>Just like USB-C, you don’t think about your cable anymore. You assume it works.</p><p>That’s where observability is going, and OpenTelemetry is the layer making that possible.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea7b7a316846" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Anatomy of Cron Jobs]]></title>
            <link>https://medium.com/@leomofthings/the-anatomy-of-cron-jobs-837830f2332b?source=rss-b114d38e9f04------2</link>
            <guid isPermaLink="false">https://medium.com/p/837830f2332b</guid>
            <category><![CDATA[cronjob]]></category>
            <category><![CDATA[unix]]></category>
            <category><![CDATA[computer-process]]></category>
            <category><![CDATA[cron]]></category>
            <dc:creator><![CDATA[Aransiola Ayodele]]></dc:creator>
            <pubDate>Mon, 23 Mar 2026 22:00:44 GMT</pubDate>
            <atom:updated>2026-03-23T22:16:56.090Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zqNP7JueC5rPqYit" /><figcaption>Photo by <a href="https://unsplash.com/@lukash?utm_source=medium&amp;utm_medium=referral">Lukas</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Introduction</h3><p>When you use a Unix system, you rely on processes more than you might realize. Every command you run, every service that starts, and every background task that keeps your system alive exists as a process. If you understand how processes work, you can understand how automation works. And once you understand automation, you can make your system work for you.</p><h3>Processes in Unix</h3><p>You interact with processes every time you use the system. When you run a command in the terminal, the shell creates a new process. That process executes your command, and when it finishes, it exits.</p><p>Each process has a few important properties:</p><ul><li>A <strong>process ID (PID)</strong> that uniquely identifies it</li><li>A <strong>parent process</strong> that created it</li><li>A <strong>state</strong>, such as running or sleeping</li><li>An <strong>execution context</strong>, including environment variables and permissions</li></ul><p>The Unix system manages processes through the kernel. The kernel schedules them, pauses them, resumes them, and terminates them.</p><p>In your terminal, when you run</p><pre>ps aux</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P1TqFjJTTq4tDgCyeSWIKg.png" /><figcaption>The output of running the `ps aux` command in bash</figcaption></figure><p>It will return a snapshot of all active processes. Some are yours. Others belong to the system (root).</p><h3>Foreground and Background Execution</h3><p>By default, when you run a command, it executes in the foreground. Your terminal waits for it to finish.</p><p>You can also run processes in the background. In your terminal, run this command:</p><pre>sleep 60 &amp;</pre><p>In Bash, the command sleep 60 &amp; performs two specific actions:</p><ul><li>sleep 60: Pauses the execution of a process for 60 seconds.</li><li>Runs the preceding command in the background.</li></ul><p>When you run this, the terminal will immediately return to the prompt, allowing you to continue entering other commands while the sleep timer runs quietly in the background. When it’s done, you’ll find the terminal silently output the end of that process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vf5wX12A5F0DMRlGT8S_Yw.png" /><figcaption>The output of the `sleep 60 &amp;` command</figcaption></figure><h3>Daemons: Processes That Never Sleep</h3><p>Some processes run continuously in the background. These are called <strong>daemons</strong>.</p><p>A daemon does not depend on a terminal session. It starts when the system starts and continues running, often waiting for events or conditions.</p><p>Examples include:</p><ul><li>Web servers</li><li>Database servers</li><li>Logging services</li></ul><p>And importantly for this discussion, the cron daemon.</p><h3>Introducing Cron</h3><p>cron is a daemon whose job is simple. It watches the system clock and runs commands when specific time conditions are met.</p><p>You do not interact with cron directly in most cases. Instead, you define instructions in a configuration file. Cron reads those instructions and decides when to launch processes.</p><p>You can think of cron as a scheduler that translates time rules into process execution.</p><h3>How Cron Works Internally</h3><p>The cron daemon wakes up every minute. Each time it wakes up, it performs a check:</p><ol><li>It reads the current system time</li><li>It scans all configured crontab entries</li><li>It compares each entry against the current time</li><li>It launches a process for each matching entry</li></ol><p>When a match occurs, cron forks a new process and executes the specified command using a shell.</p><p>This means every cron job becomes a standard Unix process. It inherits behavior from the system just like any other process.</p><h3>What Is a Cron Job?</h3><p>A cron job is simply an instruction that tells cron:</p><blockquote><em>Run this command when the time matches this pattern.</em></blockquote><p>Each cron job lives inside a <strong>crontab</strong> file.</p><p>A typical entry looks like this:</p><pre>0 2 * * * /usr/bin/backup.sh</pre><p>This line contains two parts:</p><ol><li>A time expression</li><li>A command to execute</li></ol><h3>The Anatomy of a Cron Expression</h3><p>You define the schedule using five fields:</p><pre>* * * * * command</pre><p>Each field represents a unit of time:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3LepaYEcaOLnCeF5crPTrQ.png" /><figcaption>Cron units</figcaption></figure><p>When all fields match the current time, cron runs the command.</p><p>For example: */5 * * * * /script.sh, you tell cron to run the script every five minutes.</p><h3>From Cron to Processes</h3><p>When a cron job triggers, it does not run magically. It follows the same lifecycle as any other process:</p><ol><li>Cron forks a child process</li><li>The child process executes the command</li><li>The command runs in a shell environment</li><li>The process exits when the command completes</li></ol><p>This means you must treat cron jobs like any other process:</p><ul><li>They need correct permissions</li><li>They depend on environment variables</li><li>They can fail silently if misconfigured</li></ul><h3>The Execution Environment</h3><p>Cron does not load your full user environment. This is one of the most common sources of confusion.</p><p>When your cron job runs:</p><ul><li>It uses a minimal set of environment variables</li><li>It may not know your PATH</li><li>It may not have access to aliases or profiles</li></ul><p>So instead of writing:</p><pre>python script.py</pre><p>you should write:</p><pre>/usr/bin/python3 /home/user/script.py</pre><p>You must be explicit.</p><h3>Output and Logging</h3><p>When a cron job produces output, the system handles it differently than an interactive shell.</p><ul><li>Standard output and errors may be emailed to the user</li><li>If mail is not configured, output may be discarded</li></ul><p>You should explicitly log output:</p><pre>*/10 * * * * /script.sh &gt;&gt; /var/log/script.log 2&gt;&amp;1</pre><p>Now you capture both standard output and errors.</p><h3>Why This Matters</h3><p>When you understand cron jobs as processes, you gain control.</p><p>You stop guessing why a job failed. Instead, you ask:</p><ul><li>Did the process start?</li><li>Did it have the right environment?</li><li>Did it have permission to execute?</li></ul><p>This shift turns cron from a fragile tool into a reliable part of your system.</p><h3>While I Close</h3><p>You started with processes, the core unit of execution in Unix. You saw how the system manages them, how daemons operate, and how cron fits into that model. Then you broke down cron jobs into their essential components.</p><p>When you define a cron job, you are not just scheduling a command. You are instructing the system to create and manage a process at a specific time.</p><p>Once you see it that way, cron becomes predictable, debuggable, and powerful.</p><p><em>Originally published at </em><a href="https://www.leomofthings.com/blog/the-anatomy-of-cron-jobs"><em>https://www.leomofthings.com</em></a><em> on March 23, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=837830f2332b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Zero Trust Tunneling for Secure Software Development]]></title>
            <link>https://medium.com/@leomofthings/understanding-zero-trust-tunneling-for-secure-software-development-33cb1cf88eb9?source=rss-b114d38e9f04------2</link>
            <guid isPermaLink="false">https://medium.com/p/33cb1cf88eb9</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Aransiola Ayodele]]></dc:creator>
            <pubDate>Sun, 11 Jan 2026 11:34:33 GMT</pubDate>
            <atom:updated>2026-01-11T11:40:16.748Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uZBoKFwhDYv7n4ew" /><figcaption>Photo by <a href="https://unsplash.com/@zmachacek?utm_source=medium&amp;utm_medium=referral">Zdeněk Macháček</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When you build a web application on your local machine, you often need to show it to someone. On another day, you might need to test a webhook from Stripe, demo a new feature to a client, or test how your app looks on a mobile device.</p><p>Traditionally, developers leverage tunneling tools to bridge the gap between their private localhost and the public internet. But as security threats evolve, simply opening a &quot;hole&quot; in your firewall is no longer enough.</p><p>In this article, you will learn how Zero Trust tunneling works and how it compares to tools like <strong>ngrok</strong> and <strong>Outray</strong>.</p><h3>The “Problem”?</h3><p>Imagine your local computer is a guest staying in a hotel room. You have an <strong>intercom</strong> (your local port, example: 3000). You can call the front desk, but no one from the outside can call your room directly.</p><p>The hotel security (your <strong>Firewall</strong>) prevents anyone from going through the halls to find you. In networking, your computer is behind <strong>NAT</strong> (Network Address Translation). It has a private IP address that the public internet cannot see.</p><p>To let people reach you, you need a way to bypass that security without leaving your door wide open.</p><h3>How Tunneling Tools Works</h3><p>Tools like <a href="https://ngrok.com/">ngrok</a> and <a href="https://outray.dev/">outray</a> solve the initial problem by using a relay system. This system consists of three main parts:</p><ol><li><strong>The Tunnel Client (CLI):</strong> A program running on your machine.</li><li><strong>The Tunnel Server (Relay):</strong> A public server that acts as a middleman between your local machine and the public.</li><li><strong>The Transport Layer (OSI Layer 4):</strong> The mechanism that links your local server to the relay.</li></ol><h3>The Relay Mechanism</h3><p>When you start a tunnel, your local machine initiates an <strong>outbound</strong> call to the Relay Server. You essentially tell the handler, “I am in Room 201. If anyone calls this public number, route the conversation to me.”</p><p>Because <strong>you</strong> started the call, your firewall allows the data to flow back and forth. This is called <strong>Firewall Traversal</strong>.</p><h3>Protocol Support: TCP and UDP</h3><p>Modern tools like <strong>Outray</strong> use different languages for different tasks. Outray uses a Node.js-based CLI for developer experience and a <strong>Golang</strong> relay server for high-performance data handling. Because it operates at <strong>Layer 4</strong> (the Transport Layer) of the Open Systems Interconnection (OSI) model, it can tunnel more than just web traffic. It supports:</p><ul><li><strong>HTTP:</strong> For standard websites.</li><li><strong>TCP:</strong> For databases or SSH.</li><li><strong>UDP:</strong> For game servers or media streaming.</li></ul><h3>What is Zero Trust Tunneling?</h3><p>Most tunnels are often “public by default.” If someone guesses your random ngrok or outray URL, they can access your local development server. <strong>Zero Trust Tunneling</strong> changes the philosophy from “Trust the URL” to “Never Trust, Always Verify.” It adds a security layer between the public request and your tunnel.</p><h3>The Invisible Door</h3><p>In a Zero Trust model (like <strong>Cloudflare Tunnel</strong> or <strong>Zrok</strong>), the relay server does not just pass traffic. It acts as an <strong>Identity-Aware Proxy</strong>.</p><p>Before a request ever reaches your computer, the visitor must prove who they are. The relay checks their identity against a provider like Google, GitHub, or Okta. If they are not authorized, the “door” to your computer remains invisible.</p><h3>Why Use Zero Trust for Development?</h3><p>Using a Zero Trust approach offers several advantages over basic relays:</p><ol><li>You can share a tunnel link with your team and ensure that <em>only</em> people with your company email address can open it. This prevents “leaked” URLs from becoming security vulnerabilities.</li><li>Zero Trust tunnels are <strong>outbound-only</strong>. Your server reaches out to the network, meaning you have zero open ports for hackers to scan.</li><li>Since every user must authenticate, you get a clear trail of who accessed your local environment. You can see exactly which person viewed the demo and at what time.</li></ol><h3>Choosing the Right Tool</h3><p>Each tool has a specific place in a developer’s workflow: you can check which of the tools works best for your current need (ngrok, outray, cloudflare tunnel, zrok, etc.)</p><h3>Conclusion</h3><p>Tunneling is a fundamental skill for developers. Whether you use the ease of <strong>ngrok</strong>, the open-source flexibility of <strong>Outray</strong>, or the high security of <strong>Zero Trust</strong>, understanding the underlying mechanism helps you build more reliably.</p><p>By moving toward Zero Trust, you ensure that your local development environment stays as secure as your production infrastructure.</p><p>If you found this guide helpful, you can connect with me on <a href="https://x.com/leomofthings">X</a>.</p><p><em>Originally published at </em><a href="https://www.leomofthings.com/blog/understanding-zero-trust-tunneling-for-secure-software-development"><em>https://www.leomofthings.com</em></a><em> on January 11, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33cb1cf88eb9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Curiosity: A Curse or a Bliss?]]></title>
            <link>https://medium.com/@leomofthings/curiosity-a-curse-or-a-bliss-64a3d7b97dc5?source=rss-b114d38e9f04------2</link>
            <guid isPermaLink="false">https://medium.com/p/64a3d7b97dc5</guid>
            <category><![CDATA[positive-psychology]]></category>
            <dc:creator><![CDATA[Aransiola Ayodele]]></dc:creator>
            <pubDate>Wed, 31 Dec 2025 19:25:52 GMT</pubDate>
            <atom:updated>2025-12-31T19:25:52.546Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kaAex-lxD5cjiTNE" /><figcaption>Photo by <a href="https://unsplash.com/@serge_k?utm_source=medium&amp;utm_medium=referral">Serge Kutuzov</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The human spirit is undeniably drawn to the unknown, but this drive is often complicated by the restless energy of the anxious mind. Sometimes, while following a designated path, we are asked to be <strong>patient</strong> or to follow a specific lead. Yet, the weight of the unknown can become unbearable.</p><p>In those moments, impatience acts as a catalyst, pushing us to seek answers to questions that were meant for a later time. This intersection is a <strong>“T-junction” of the soul</strong>: a definitive moment where the choice to look ahead out of turn can lead to a door opening to success or, conversely, the beginning of one’s end. This is the dual nature of curiosity—an innate force that can be our greatest bliss or our most haunting curse.</p><h3>The Myth of the Forbidden: Pandora’s Box</h3><p>The most enduring caution against this impatient urge is found in the ancient Greek myth of <strong>Pandora’s Box</strong>. Entrusted with a jar she was forbidden to open, Pandora’s inability to wait, the “bliss” of seeking the unknown, overpowered her.</p><p>Her act, driven by an inquisitive urge she could not suppress, unleashed all the evils and sorrows upon humanity. This narrative paints curiosity as a perilous <strong>curse</strong> that irrevocably shattered an idyllic existence. Yet, even in this catastrophe, a glimmer of bliss remained: at the bottom of the jar sat <strong>Hope</strong>, suggesting that while curiosity can lead to destruction, it also provides the tools to endure the fallout.</p><h3>The Science of the “Curiosity Gap”</h3><p>Modern psychology echoes this “T-junction” in research titled <strong><em>“The Seductive Lure of Curiosity.”</em></strong> Scientists found that people often seek out information even when they know it will cause them distress.</p><ul><li><strong>The Curse:</strong> This manifests as a willingness to risk emotional or physical pain simply to satisfy a “curiosity gap.” It is the anxious mind demanding an answer <em>now</em>, regardless of the cost.</li><li><strong>The Bliss:</strong> Conversely, this same seductive lure is the engine behind all scientific discovery. It is the internal reward system that motivates us to bridge the gap between what we know and what we don’t, leading to the very success and knowledge that defines human progress.</li></ul><h3>The Value of a Tale Worth Telling</h3><p>Perhaps no one encapsulates this duality better than the poet <strong>Alastair Reid</strong> in his piece, <em>“Curiosity.”</em> Challenging the proverb “Curiosity killed the cat,” Reid points out that the true tragedy lies not in the pursuit, but in its absence.</p><p>He suggests that those who live cautiously, avoiding the “curse” of risk and the T-junctions of life, might stay safe, but they never truly live. For Reid, the bliss of curiosity is found in the experience itself:</p><blockquote><strong><em>“Only the curious have, if they live, a tale worth telling at all.”</em></strong></blockquote><p>He argues that even if curiosity leads to a premature end, the journey it inspires is more valuable than a prolonged, unexamined existence.</p><h3>Conclusion: Navigating the T-Junction</h3><p>Ultimately, curiosity is neither solely a curse nor an unmitigated blessing; it is intrinsically both. It is the force that drove Pandora to open a forbidden box, the psychological impulse that makes us seek answers in discomfort, and the spark that compels us to live a life worth recounting.</p><p>The true wisdom lies in recognizing those T-junctions, understanding when curiosity is a door to growth and when it is a trap set by an impatient heart.</p><blockquote><strong><em>Curiosity is the fire of the human spirit. It can light the way to unimaginable success, or it can burn the house down if handled with impatience. May we have the courage to seek the truth, but the wisdom to wait for the lead that ensures our discovery is a blessing, not a burden.</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64a3d7b97dc5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Securing Your Backend: Never Bind Request Data Directly to Database Models]]></title>
            <link>https://medium.com/@leomofthings/securing-your-backend-never-bind-request-data-directly-to-database-models-12f93eada588?source=rss-b114d38e9f04------2</link>
            <guid isPermaLink="false">https://medium.com/p/12f93eada588</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[backend]]></category>
            <dc:creator><![CDATA[Aransiola Ayodele]]></dc:creator>
            <pubDate>Thu, 25 Dec 2025 12:29:29 GMT</pubDate>
            <atom:updated>2025-12-25T12:43:10.872Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5eC5i1IeGzuskx4K" /><figcaption>Photo by <a href="https://unsplash.com/@jakubzerdzicki?utm_source=medium&amp;utm_medium=referral">Jakub Żerdzicki</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Many bugs cause your application to crash or throw different errors, such as 500 or any related ones. You find and could fix them quickly because they break the user experience. But some of the most dangerous bugs are silent. They don’t break your app; they just change how it behaves in ways you didn’t intend without you knowing. all the tests pass, but something is not right.</p><p>One of these silent killers is <strong>over-posting</strong>.</p><p>In this article, you will learn how trusting user input too much can lead to unauthorized data changes. We will also look at how to use Data Transfer Objects (DTOs) and proper architectural mapping to keep your database secure.</p><h3>How Over Posting Works</h3><p>When a user sends a request to your server, like updating their profile, they usually send a JSON object. Many modern Object-Relational Mappers (ORMs) make it easy to save this data. You might be tempted to pass the entire request body directly into your database model to save time.</p><p>This is where the hidden bug lives. Because there is no filter, the ORM accepts every field in the request. If an attacker adds an extra field like &quot;is_admin&quot;: true or &quot;balance&quot;: 9999 to their request, the ORM will blindly bind that data to your database.</p><p>The app doesn’t crash. It simply grants the user admin rights or inflates their credit.</p><h3>How to Use DTOs for Input Filtering</h3><p>Data Transfer Object (DTO) is a simple object that defines exactly what data is allowed to enter your system. Think of DTO as a security guard at the gate of your database, helping to standardize communication, reduce complexity, and control what data is exposed, making them ideal for APIs and microservices. The most effective way to stop this is to stop using req.body or params directly in your database queries. Instead, you should use a <strong>Data Transfer Object (DTO)</strong>.</p><p>When you use a DTO, you create an “allow-list.” Even if a user sends ten extra fields in their request, your DTO will only extract the three fields you actually need.</p><p>Here is an example of a vulnerable update vs. a secure update using a DTO:</p><pre>// The Vulnerable Way<br>// An attacker can send { &quot;name&quot;: &quot;Sam&quot;, &quot;role&quot;: &quot;admin&quot; }<br>app.patch(&quot;/user/profile&quot;, async (req, res) =&gt; {<br>  await User.update(req.body, { where: { id: req.userId } });<br>  res.send(&quot;Profile updated!&quot;);<br>});<br><br>// The Secure Way with a DTO<br>app.patch(&quot;/user/profile&quot;, async (req, res) =&gt; {<br>  // We only pull &quot;name&quot; and &quot;bio&quot;. Everything else is ignored.<br>  const updateData = {<br>    name: req.body.name,<br>    bio: req.body.bio<br>  };<br><br>  await User.update(updateData, { where: { id: req.userId } });<br>  res.send(&quot;Profile updated!&quot;);<br>});</pre><p>By manually mapping the fields, you ensure that sensitive columns like role, price, or balance remain untouched by the user.</p><h3>How to Separate Your Models from Your Logic</h3><p>For larger applications, manual mapping in every route becomes messy. To fix this, you should separate your <strong>Database Models</strong> from your <strong>Application Logic</strong>.</p><p>Your database model should represent the table structure in your database. Your logic layer should handle the “mapping.” This means you take the incoming request data, validate it, and then map it to the model.</p><p>This separation of concerns makes your code easier to test. It also creates a layer where you can perform complex checks. For example, if a user tries to modify the price of an item, your logic layer can catch this and verify if the user is a &quot;Store Manager&quot; or just a &quot;Customer.&quot;</p><h3>How to Verify Roles and State Transitions</h3><p>Filtering data is only half the battle. You also need to check the incoming request against the user’s current state in the database.</p><p>A common mistake is trusting the “role” sent in a request. If a user sends a request to update-role, you must check two things:</p><ol><li>Does the current user have the permission to change roles?</li><li>Is the new role they are requesting valid for their current status?</li></ol><pre>app.post(&quot;/update-role&quot;, async (req, res) =&gt; {<br>  const user = await User.findByPk(req.userId);<br>  const newRole = req.body.role;<br><br>  // Logic check: Check the database, not just the request<br>  if (user.role !== &#39;admin&#39;) {<br>    return res.status(403).send(&quot;Only admins can change roles.&quot;);<br>  }<br><br>  user.role = newRole;<br>  await user.save();<br>});</pre><p>Always treat the incoming request as a “suggestion.” Your backend must be the ultimate source of truth by comparing the incoming request against the existing record in your database.</p><h3>Conclusion</h3><p>“Hidden” bugs like over-posting are dangerous because they don’t cause errors. They simply allow your app to be used in ways you never intended.</p><p>To keep your application secure, remember these three rules:</p><ul><li><strong>Never bind</strong> raw request objects directly to your ORM.</li><li><strong>Use DTOs</strong> to create strict allow-lists for incoming data.</li><li><strong>Verify permissions</strong> by checking the user’s current state in the database before applying changes.</li></ul><p>By following these patterns, you build a “defense in depth” strategy that protects your data from even the most creative attackers.</p><p><em>Originally published at </em><a href="https://www.leomofthings.com/blog/securing-your-backend-never-bind-request-data-directly-to-database-models"><em>https://www.leomofthings.com</em></a><em> on December 25, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12f93eada588" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Do We Stop Now?]]></title>
            <link>https://medium.com/@leomofthings/do-we-stop-now-8e3afc7406dc?source=rss-b114d38e9f04------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e3afc7406dc</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai-ethics]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[human-cognition]]></category>
            <dc:creator><![CDATA[Aransiola Ayodele]]></dc:creator>
            <pubDate>Thu, 30 Oct 2025 08:43:08 GMT</pubDate>
            <atom:updated>2025-10-30T08:43:08.518Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8Ms_GOjOI-X_YICl" /><figcaption>Photo by <a href="https://unsplash.com/@joyflowerphotography?utm_source=medium&amp;utm_medium=referral">Abigail</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Human progress has always been about outsourcing effort. We built tools to lift what we couldn’t, machines to move faster than we could, and now, intelligence that can think in our place.<br>The trajectory has been clear: from doing things <em>ourselves</em> to designing things that <em>do it for us</em>.</p><p>Today, artificial intelligence is no longer a laboratory marvel; it’s woven into the fabric of our lives. It crafts our messages, organizes our calendars, interprets our moods, predicts our choices, and even simulates empathy.<br>We have reached a point where AI isn’t just a tool; it’s a co-thinker, a co-creator, and a co-decider.</p><h3>From Assistance to Autonomy</h3><p>OpenAI released <strong>Atlas, and</strong> the browser itself has become intelligent, not just a window to information but a partner in reasoning.<br>Google’s <strong>AI Mode</strong> now reframes search results into summaries, reflections, and advice.<br>And in <strong>agentic commerce</strong>, AI doesn’t merely recommend what to buy; it acts, negotiates, and transacts on behalf of users.</p><p>The paradigm has shifted. AI no longer waits for our input; it anticipates it.<br>This is not a story of automation; it&#39;s a story of autonomy. Machines are no longer just executing; they’re <em>deciding</em>.</p><h3>The Quiet Surrender of Thinking</h3><p>In chasing efficiency, we may be surrendering something subtle yet profound: the human act of thinking itself. Every auto-generated response, every predictive suggestion, and every AI-drafted idea picks away at the necessity to <em>pause and reason</em>.<br>The friction that once forced us to <strong>reflect</strong>, to <strong>wonder</strong>, to <strong>err, </strong>and to <strong>learn</strong> is fading into the background hum of optimization.</p><p>What happens when thinking becomes optional?<br> Do we still own the decisions we make when a system has already made them probable?</p><h3>The Next Frontier: Intelligence Without Us</h3><p>AI is no longer about replacing tasks; it’s about <em>replicating cognition</em>. We’ve reached the threshold where AI can design, interpret, and reason, and soon, it may question, justify, and philosophize. At this point, I can only smile and giggle at myself on the use of AI (personally and professionally).</p><p>The question, then, is not “What can AI do next?” but “What are we willing to stop doing?”</p><p>If thinking becomes another outsourced process, will we still recognize what it means to <em>know</em> something?</p><h3>Do We Stop Now?</h3><p>Perhaps this is the moment to pause, not to retreat, but to re-evaluate.<br>Do we stop before we lose our intellectual agency? Or do we embrace AI as an extension of human cognition, a chance to think <em>beyond our limits</em> rather than <em>instead of ourselves</em>?</p><p>AI should not be our replacement in thought but our reflection, a mirror that challenges us to be <em>more human</em>, not less. So before we hand over the keys of cognition entirely, we should ask, and keep asking:</p><blockquote><strong><em>Do we stop now?</em></strong></blockquote><p>Not to halt progress, but to preserve meaning.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e3afc7406dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A2A, MCP, and AP2: The Protocol Stack Powering Agentic AI Commerce]]></title>
            <link>https://medium.com/@leomofthings/a2a-mcp-and-ap2-the-protocol-stack-powering-agentic-ai-commerce-ca2eed7ba079?source=rss-b114d38e9f04------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca2eed7ba079</guid>
            <category><![CDATA[a2a-protocol]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[ap2]]></category>
            <dc:creator><![CDATA[Aransiola Ayodele]]></dc:creator>
            <pubDate>Fri, 26 Sep 2025 19:24:07 GMT</pubDate>
            <atom:updated>2025-09-26T19:33:40.341Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qEJ_clCcSMWSzFtp" /><figcaption>Photo by <a href="https://unsplash.com/@shutter_speed_?utm_source=medium&amp;utm_medium=referral">Shutter Speed</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>AI is entering a new era, one where autonomous agents don’t just respond to prompts but can act on behalf of users, collaborate with other agents, and even conduct secure financial transactions. To make this possible, we need more than powerful models. We need protocols that allow agents to interoperate, share context, and transact responsibly.</p><p>That’s where three emerging standards come in:</p><ul><li><strong>A2A (Agent-to-Agent Protocol)</strong>: agents collaborating with each other.</li><li><strong>MCP (Model Context Protocol): </strong>agents accessing tools, APIs, and data.</li><li><strong>AP2 (Agent Payments Protocol):</strong> agents making payments under user-controlled mandates.</li></ul><p>Together, they form the backbone of <strong>agentic commerce</strong>.</p><p>Let’s go a little deeper, explaining each pillar:</p><h3>A2A: Agent-to-Agent Collaboration</h3><p>The <strong>Agent-to-Agent (A2A)</strong> protocol defines how independent AI agents talk to each other.</p><ul><li>Agents can delegate tasks: e.g., a travel-booking agent asks a payment agent to prepare checkout.</li><li>They can negotiate outcomes: e.g., a sourcing agent and supplier agent exchange quotes.</li><li>They remain secure and modular: each agent runs independently, exposing only what’s necessary.</li></ul><blockquote><em>Think of A2A as the “HTTP for agents”: that is, a common protocol that lets them coordinate, regardless of who built them.</em></blockquote><h3>MCP: Model Context Protocol</h3><p>The <strong>Model Context Protocol (MCP)</strong> (pioneered by Anthropic, now supported broadly) ensures agents have structured ways to access context and tools.</p><ul><li>An agent can fetch user files, calendar data, or enterprise APIs.</li><li>It standardizes context exchange so agents don’t need custom integrations for every tool.</li><li>MCP acts like a <strong>universal adapter</strong>, much like USB-C, but for AI agents.</li></ul><blockquote><em>Example: A scheduling agent using MCP could connect to Google Calendar, Outlook, and internal company APIs without hard-coding integrations.</em></blockquote><h3>AP2: Agent Payments Protocol</h3><p>The newest piece is <strong>AP2 (Agent Payments Protocol)</strong>, proposed by Google and partners. Traditionally, payments assume <strong>a human presses “Pay Now.”</strong> But if agents are acting independently, we need a way to:</p><ul><li>Capture the user’s <strong>intent</strong>.</li><li>Authorize the agent to act <strong>within limits</strong>.</li><li>Ensure transactions are <strong>verifiable and auditable</strong>.</li></ul><p>That’s what AP2 introduces, via <strong>Mandates</strong>:</p><ul><li><strong>Intent Mandate</strong>: “Buy me two concert tickets, best available seats, under $300.”</li><li><strong>Cart Mandate</strong>: “This is the specific order your agent prepared. Approve?”</li></ul><p>With these cryptographically signed mandates, an agent can pay securely on your behalf, while merchants and payment providers know the purchase is authorized.</p><h3>How do They Work Together?</h3><p>Let’s walk through an example:</p><ol><li><strong>User instruction</strong>: “Find me the best flight to San Francisco under $800 and book it.”</li><li><strong>A2A in action</strong>: The travel agent talks to an airline agent and a payment agent to coordinate.</li><li><strong>MCP in action</strong>: The agent accesses flight APIs, loyalty points data, and seat maps through MCP.</li><li><strong>AP2 in action</strong>: Once an option is found, the agent generates a Cart Mandate. The user approves it. The payment agent completes the transaction securely.</li></ol><h3>Why This Matters</h3><p>This protocol trio unlocks:</p><ul><li><strong>Interoperability</strong>: Agents from different products or providers can work together.</li><li><strong>Trust &amp; Security</strong>: Mandates ensure payments aren’t rogue.</li><li><strong>Scale</strong>: Businesses and users can safely delegate tasks to AI.</li></ul><h3>Conclusion</h3><p>AI agents are moving beyond experimental projects into real-world solutions.</p><p><em>Originally published at </em><a href="https://www.leomofthings.com/blog/a2a-mcp-and-ap2-the-protocol-stack-powering-agentic-ai-commerce"><em>https://www.leomofthings.com</em></a><em> on September 26, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca2eed7ba079" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Anatomy of Shebang]]></title>
            <link>https://medium.com/@leomofthings/anatomy-of-shebang-c71dbc23e8da?source=rss-b114d38e9f04------2</link>
            <guid isPermaLink="false">https://medium.com/p/c71dbc23e8da</guid>
            <category><![CDATA[shell-script]]></category>
            <category><![CDATA[script]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[shebang]]></category>
            <dc:creator><![CDATA[Aransiola Ayodele]]></dc:creator>
            <pubDate>Thu, 28 Aug 2025 00:33:15 GMT</pubDate>
            <atom:updated>2025-08-28T00:47:28.922Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8-X1qrLaJnDUmITU" /><figcaption>Photo by <a href="https://unsplash.com/@markusspiske?utm_source=medium&amp;utm_medium=referral">Markus Spiske</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When you open a shell script or a Python script, chances are you’ve seen the #! line at the very top. That line is called a <strong>shebang</strong> (or <em>hashbang</em>), and it plays an important role in how scripts are executed on Unix-like systems.</p><p>In this article, I’ll break down what a shebang is, why it matters, and how to write it in a way that keeps your scripts portable and predictable.</p><h3>What Is a Shebang?</h3><p>A <strong>shebang</strong> is simply the two characters #! followed by the <strong>absolute path</strong> of the interpreter that should run a script.</p><p>For example:</p><pre>#!/bin/bash echo &quot;Hello, world!&quot;</pre><ul><li>#! → shebang indicator</li><li>/bin/bash → tells the system to use the <strong>Bash shell</strong> to run this script</li></ul><p>When you run the script directly (./script.sh), the operating system looks at the shebang and invokes the specified interpreter. Without it, the script might run in whichever shell the user&#39;s environment defaults to, which can lead to inconsistent behavior.</p><h3>Common Shebangs</h3><p>Here are a few common examples of Shebangs:</p><pre>-   Bash scripts<br>    <br>    ```bash<br>    #!/bin/bash<br>    ```<br>    <br>-   Portable Bash (through `env`)<br>    <br>    ```bash<br>    #!/usr/bin/env bash<br>    ```<br>    <br>-   POSIX sh (more universal)<br>    <br>    ```bash<br>    #!/bin/sh<br>    ```<br>    <br>-   Python scripts<br>    <br>    ```python<br>    #!/usr/bin/env python3<br>    ```<br>    <br>-   Perl scripts<br>    <br>    ```perl<br>    #!/usr/bin/perl<br>    ```</pre><h3>Why the Path Matters</h3><p>The key detail is that the Shebang line requires the <strong>absolute path</strong> of the interpreter. But here’s the problem: not all systems place interpreters in the same place.</p><ul><li>On most Linux/MacOS distributions, Bash is at /bin/bash.</li><li>On macOS (especially Homebrew installs), Bash may live in /usr/local/bin/bash.</li><li>On some BSD systems, it might be elsewhere.</li></ul><p>If you then hardcode the path incorrectly, your script won’t run.</p><h3>Enter /usr/bin/env: The Portable Solution</h3><p>To solve this, developers often use env, which searches the user&#39;s PATH to find the right interpreter:</p><pre>#!/usr/bin/env bash</pre><p>This tells the system:</p><ol><li>Use the env command.</li><li>Look up bash in the current PATH.</li><li>Run the script with whatever bash it finds.</li></ol><p>This is much more portable and works across different environments. You can also locate your bash path by running whereis bash in your terminal; its output will be the absolute path of your bash.</p><h3>Shebang Best Practices</h3><ol><li>Use /usr/bin/env for portability: This is safer if your script will run across different systems.</li></ol><pre>#!/usr/bin/env bash</pre><p>2. Use fixed paths in controlled environments: If you know the target environment (like an embedded system or a Docker container), a direct path like #!/bin/bash is fine.</p><p>3. For maximum portability, stick to POSIX sh: This is safer if your script will run across different systems.</p><pre>#!/bin/sh</pre><p>4. Always put the shebang on the first line: it only works if it’s the very first thing in the file.</p><h3>Key Takeaway</h3><p>The shebang looks ignorable, but it is powerful; it determines <em>how</em> your script runs. Think of it as the DNA of your script:</p><ul><li>Use #!/bin/bash for predictable local use.</li><li>Use #!/usr/bin/env bash for portable scripts across systems.</li><li>Use #!/bin/sh for maximum compatibility.</li></ul><p>By paying attention to your shebang, you make your scripts easier to share, maintain, and run anywhere.</p><p><em>Originally published at </em><a href="https://www.leomofthings.com/blog/anatomy-of-shebang"><em>https://www.leomofthings.com</em></a><em> on August 28, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c71dbc23e8da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JSX Accessibility]]></title>
            <link>https://medium.com/@leomofthings/jsx-accessibility-4279d24d855a?source=rss-b114d38e9f04------2</link>
            <guid isPermaLink="false">https://medium.com/p/4279d24d855a</guid>
            <category><![CDATA[jsx]]></category>
            <category><![CDATA[a11y]]></category>
            <category><![CDATA[react-jsx]]></category>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Aransiola Ayodele]]></dc:creator>
            <pubDate>Wed, 23 Jul 2025 15:52:51 GMT</pubDate>
            <atom:updated>2025-07-23T16:13:59.533Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3AlBSX1D_HVvC99R" /><figcaption>Photo by <a href="https://unsplash.com/@untodesign_?utm_source=medium&amp;utm_medium=referral">Daniel Ali</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Building React applications with JSX gives us a powerful, declarative way to express user interfaces. But if we stop at “it looks right in the browser,” we exclude users who rely on assistive technologies-and miss out on better SEO and machine‐readable markup. In this article I explained how to write an <strong>accessible JSX</strong>, with practical examples, so that:</p><ul><li><strong>Developers</strong> can ship inclusive UI that meets Web Content Accessibility Guidelines (<a href="https://www.w3.org/WAI/standards-guidelines/wcag/">WCAG</a>) guidelines.</li><li><strong>Crawlers</strong> (search engines, chatbots, indexing tools) can parse your web components reliably and extract content in the right semantic structure.</li></ul><h3>Why Infuse Accessibility into JSX</h3><ol><li>According to the <a href="https://www.un.org/en/observances/day-of-persons-with-disabilities">United Nations</a>’s report, over 1 billion people worldwide have disabilities; many rely on screen readers, keyboard navigation, or simplified layouts.</li><li>Search engines and crawlers including your AI chatbots (ChatGPT, Gemini, etc.), use your markup to understand page structure. Proper tags (&lt;header&gt;, &lt;nav&gt;, headings) and attributes ( alt, aria-label) boost discoverability and rich results.</li><li>Accessible components are usually more semantic, better documented, and easier to test with tools like <a href="https://webdriver.io/docs/accessibility-testing/axe-core/">axe-core</a> or eslint-plugin-jsx-a11y.</li></ol><h3>Principles to Follow to Have an Accessible JSX</h3><p>Follow the <strong>POUR</strong> principles from WCAG:</p><ol><li>Perceivable: Always provide text alternatives ( alt, aria-label) and ensure efficient color contrast (use <a href="https://webaim.org/resources/contrastchecker/">tools</a> to verify 4.5:1 ratio).</li><li>Operable: All interactive elements must be keyboard-focusable (use &lt;button&gt; not &lt;div&gt;) with visible focus indicators.</li><li>Understandable: Use clear labels and consistent component behavior. Also, let your error messages be tied to inputs via aria-describedby.</li><li>Robust: Always use semantic HTML inside your JSX and only fall back to <a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles">ARIA</a> roles when necessary.</li></ol><h3>Practical Examples</h3><h3>1. Semantic Buttons &amp; Links</h3><p><strong>Bad</strong> (non-semantic, not keyboard‐friendly):</p><pre>&lt;div onClick={handleSubmit} role=&quot;button&quot;&gt;<br>  Submit<br>&lt;/div&gt;</pre><p><strong>Good</strong> (semantic):</p><pre>&lt;button onClick={handleSubmit}&gt;<br>  Submit<br>&lt;/button&gt;</pre><blockquote><em>Why?: </em><em>button natively supports keyboard events ( </em><em>Enter/ </em><em>Space) and exposes the right role to screen readers.</em></blockquote><h3>2. Images with Alternatives</h3><p><strong>Bad</strong> (missing alt):</p><pre>&lt;img src=&quot;/logo.png&quot; /&gt;</pre><p><strong>Good</strong> (descriptive alt):</p><pre>&lt;img src=&quot;/logo.png&quot; alt=&quot;GoPaddi travel marketplace logo&quot; /&gt;</pre><blockquote><em>Tip: If the image is purely decorative, use </em><em>alt=&quot;&quot; so screen readers could skip it.</em></blockquote><h3>3. Form Inputs &amp; Labels</h3><p><strong>Bad</strong> (unlinked label):</p><pre>&lt;input id=&quot;email&quot; type=&quot;email&quot; /&gt;<br>&lt;label&gt;Email&lt;/label&gt;</pre><p><strong>Good</strong> (explicit association):</p><pre>&lt;label htmlFor=&quot;email&quot;&gt;Email address&lt;/label&gt;<br>&lt;input id=&quot;email&quot; type=&quot;email&quot; /&gt;</pre><p>Or using a wrapper:</p><pre>&lt;label&gt;<br>  Email address<br>  &lt;input type=&quot;email&quot; name=&quot;email&quot; /&gt;<br>&lt;/label&gt;</pre><blockquote><em>Why?: Explicit labels improve click targets and announce the input purpose.</em></blockquote><h3>4. ARIA for Custom Components</h3><p>When creating a custom dropdown, native select isn&#39;t enough. You need ARIA:</p><pre>function AccessibleDropdown({ options, value, onChange }) {<br>  return (<br>    &lt;div role=&quot;combobox&quot;<br>         aria-haspopup=&quot;listbox&quot;<br>         aria-expanded={Boolean(value)}<br>         aria-controls=&quot;my-listbox&quot;<br>         tabIndex={0}<br>         onKeyDown={handleKey}&gt;<br>      {value || &#39;Select an option&#39;}<br>      &lt;ul role=&quot;listbox&quot; id=&quot;my-listbox&quot;&gt;<br>        {options.map(opt =&gt; (<br>          &lt;li key={opt} role=&quot;option&quot;<br>              aria-selected={opt === value}<br>              onClick={() =&gt; onChange(opt)}<br>          &gt;<br>            {opt}<br>          &lt;/li&gt;<br>        ))}<br>      &lt;/ul&gt;<br>    &lt;/div&gt;<br>  )<br>}</pre><blockquote><em>Note: Ensure </em><em>tabIndex, </em><em>role, </em><em>aria-*, and keyboard handlers align exactly with WAI-ARIA Authoring Practices.</em></blockquote><h3>Keyboard Navigation</h3><p>Always ensure that your tab order is logical (avoid positive tabIndex) and let your focus ring be visible. You can as well customize via CSS if needed:</p><pre>:focus {<br>  outline: 3px solid Highlight;<br>  outline-offset: 2px;<br>}</pre><h3>Color Contrast &amp; Visual Cues</h3><p>Don’t rely solely on color:</p><pre>&lt;button disabled style={{ color: &#39;gray&#39; }}&gt;<br>  Save<br>&lt;/button&gt;</pre><p>Add text or an icon:</p><pre>&lt;button disabled aria-disabled=&quot;true&quot;&gt;<br>  &lt;LockIcon aria-hidden=&quot;true&quot; /&gt; Save<br>&lt;/button&gt;</pre><h3>Testing &amp; Tooling</h3><ul><li>You can add eslint-plugin-jsx-a11y to catch missing alt, aria-*, for inappropriate use of interactive roles.</li><li>You can integrate axe-core for automated audits into your test suites:</li></ul><pre>import { axe, toHaveNoViolations } from &#39;jest-axe&#39;;<br>expect.extend(toHaveNoViolations);<br><br>test(&#39;Homepage is accessible&#39;, async () =&gt; {<br>  const { container } = render(&lt;HomePage /&gt;);<br>  const results = await axe(container);<br>  expect(results).toHaveNoViolations();<br>});</pre><ul><li>Perform manual keyboard navigation and <a href="https://www.nvaccess.org/about-nvda/">VoiceOver/NVDA</a> walkthrough.</li></ul><h3>Helping AI Crawlers</h3><p>Well-structured JSX also aids machine learning agents:</p><ul><li>Headings (h1…h6) reveal document hierarchy.</li><li>Landmarks (header, nav, main) let crawlers segment content.</li><li>Metadata: use meta name=&quot;description&quot; and link rel=&quot;canonical&quot; in your React Helmet or Next.js Head.</li><li>Structured data: <a href="https://json-ld.org/">JSON-LD</a> in script type=&quot;application/ld+json&quot; for rich snippets.</li></ul><p>Example in Next.js:</p><pre>import Head from &#39;next/head&#39;;<br><br>export default function BlogPost({ post }) {<br>  return (<br>    &lt;&gt;<br>      &lt;Head&gt;<br>        &lt;title&gt;{post.title}&lt;/title&gt;<br>        &lt;meta name=&quot;description&quot; content={post.excerpt} /&gt;<br>        &lt;script<br>          type=&quot;application/ld+json&quot;<br>          dangerouslySetInnerHTML={{ __html: JSON.stringify({<br>            &quot;@context&quot;: &quot;https://schema.org&quot;,<br>            &quot;@type&quot;: &quot;BlogPosting&quot;,<br>            &quot;headline&quot;: post.title,<br>            &quot;datePublished&quot;: post.date,<br>            // …more fields<br>          }) }}<br>        /&gt;<br>      &lt;/Head&gt;<br>      &lt;article&gt;<br>        &lt;h1&gt;{post.title}&lt;/h1&gt;<br>        {/* ... */}<br>      &lt;/article&gt;<br>    &lt;/&gt;<br>  );<br>}</pre><h3>Conclusion</h3><p>Accessible JSX is more than compliance; it makes your codebase future-proof, enhances SEO, and makes it easier for everyone to use. Using semantic HTML, best practices for ARIA, and testing, you can make React components that both humans and machine learning agents can interact with.</p><p><em>Originally published at </em><a href="https://www.leomofthings.com/blog/jsx-accessibility"><em>https://www.leomofthings.com</em></a><em> on July 23, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4279d24d855a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[for…of vs. for…in in JavaScript]]></title>
            <link>https://medium.com/@leomofthings/for-of-vs-for-in-in-javascript-2065f62e1e19?source=rss-b114d38e9f04------2</link>
            <guid isPermaLink="false">https://medium.com/p/2065f62e1e19</guid>
            <category><![CDATA[for-in-loop]]></category>
            <category><![CDATA[for-of-loop]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Aransiola Ayodele]]></dc:creator>
            <pubDate>Sun, 13 Jul 2025 16:29:55 GMT</pubDate>
            <atom:updated>2025-07-16T13:56:58.558Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2R7j8hStHehSVRaR" /><figcaption>Photo by <a href="https://unsplash.com/@filisantillan?utm_source=medium&amp;utm_medium=referral">Fili Santillán</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript">Javascript</a> is a very interesting language, but on the other end, it can also give you sleepless nights or headaches when you are confused. In your head, your logic is well written, and it should work perfectly, but the <a href="https://developer.mozilla.org/en-US/docs/Glossary/Engine/JavaScript">JavaScript engine</a> will look at your code and smile 😂😀 (what is this one doing?).</p><p>In JavaScript, for...of and for...in are two loop constructs that <strong>look similar</strong> but behave <strong>very differently</strong>. Many developers, especially beginners, use them interchangeably and end up confused when things don&#39;t work as expected.</p><p>Let’s look at each of these loop constructs individually before putting them against each other.</p><h3>Understanding for...in</h3><p>The for...in loop is used to iterate over all <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Enumerability_and_ownership_of_properties">enumerable</a> properties of an object, including inherited ones.</p><h3>Basic Syntax:</h3><pre>for (const key in object) {<br>  // access object[key]<br>}</pre><h3>Example: Looping through a User Profile</h3><p>You want to display user data on a profile page; you have the userProfile object:</p><pre>const userProfile = {<br>  name: &quot;Zainab&quot;,<br>  age: 30,<br>  country: &quot;Nigeria&quot;<br>};<br><br>for (const key in userProfile) {<br>  console.log(`${key}: ${userProfile[key]}`);<br>}</pre><p><strong>Output:</strong></p><pre>name: Zainab<br>age: 30<br>country: Nigeria</pre><p>What is happening? Let’s go over it together:</p><p>On each iteration, key will hold one of the property names (&quot;name&quot;, then &quot;age&quot;, then &quot;country&quot;). The userProfile[key] will then fetch the value associated with that key. This is a great way to dynamically read and display the contents of any object, especially when you don&#39;t know the property names in advance.</p><h3>Inherited Properties</h3><pre>const base = { country: &quot;Ghana&quot; };<br>const user = Object.create(base);<br>user.name = &quot;John&quot;;<br><br>for (const key in user) {<br>  console.log(key);<br>}</pre><p><strong>Output:</strong></p><pre>name<br>country</pre><p>To understand what’s going on, let’s break down each line.</p><ul><li>An object is defined called base that has one property: country: &quot;Ghana&quot;.</li><li>The next line const user = Object.create(base) is used to create a <strong>new object</strong> named user, but it inherits from base.</li></ul><p>At this point, user itself is empty, but it has access to all properties that exist in the base object through the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Inheritance_and_the_prototype_chain">prototype chain</a>. That is, user looks like this:</p><pre>user = {<br>  __proto__: {<br>    country: &quot;Ghana&quot;<br>  }<br>}</pre><p>The last line user.name = &quot;John&quot;; is then used to add a new property name directly to the user object. So user now has:</p><ul><li>An own property: name</li><li>An inherited property: country (from base)</li></ul><p>The for...in loop now iterates over all enumerable properties of the user object, including those inherited through the prototype chain.</p><p>The for...in loop now iterates over all enumerable properties of the user object, including those inherited through the prototype chain.</p><blockquote><em>If you are hearing about </em><strong><em>Prototype chain</em></strong><em> for the first time, don’t be scared, in JavaScript it is a mechanism that enables objects to inherit properties and methods from other objects.</em></blockquote><p>Here is the catch: if you only want properties directly on the object, use hasOwnProperty.</p><pre>for (const key in user) {<br>  if (user.hasOwnProperty(key)) {<br>    console.log(key);<br>  }<br>}</pre><p><strong>Output:</strong></p><pre>name</pre><p>This loop is will only iterate over the object’s own properties, not the ones it inherits from its prototype. With this explanation, I am sure you are smiling now 🙂 (nodding in agreement). Let’s go over the next one for...of.</p><h3>Understanding for...of</h3><p>The for...of loop is designed for <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols">iterable objects</a>, such as Arrays, Strings, Sets, Maps, and more.</p><h3>Basic Syntax:</h3><pre>for (const value of iterable) {<br>  // use value directly<br>}</pre><h3>Example: Displaying Items in a Cart</h3><pre>const cartItems = [&quot;Laptop&quot;, &quot;Phone&quot;, &quot;Headphones&quot;];<br><br>for (const item of cartItems) {<br>  console.log(`Added to cart: ${item}`);<br>}</pre><p><strong>Output:</strong></p><pre>Added to cart: Laptop<br>Added to cart: Phone<br>Added to cart: Headphones</pre><p>You’re getting the <strong>values</strong> directly without any need to access them through their index.</p><h4>It works on strings too.</h4><pre>for (const char of &quot;Code&quot;) {<br>  console.log(char);<br>}</pre><p><strong>Output:</strong></p><pre>C<br>o<br>d<br>e</pre><p><strong>For…in vs. For…of</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*t-FP-4Kj3Jb6O-z8cPwnbg.png" /><figcaption>a table showing the differences between for…in and for…of</figcaption></figure><h3>What You Should Avoid</h3><ol><li>Don’t use for...in on arrays if you only care about the values or order. It can produce unpredictable results when properties are added to Array.prototype.</li></ol><pre>Array.prototype.extra = &quot;hello&quot;;<br><br>const data = [&quot;a&quot;, &quot;b&quot;];<br>for (const i in data) {<br>  console.log(data[i]);<br>}</pre><p><strong>Output:</strong></p><pre>a<br>b<br>hello</pre><p>2. Don’t use for...of on objects directly, unless you make the object iterable.</p><pre>const obj = { a: 1, b: 2 };<br><br>for (const val of obj) {<br>  //Returns - TypeError: obj is not iterable<br>}</pre><p>To make it work, convert it:</p><pre>for (const [key, value] of Object.entries(obj)) {<br>  console.log(`${key}: ${value}`);<br>}</pre><p><strong>Output:</strong></p><pre>a: 1<br>b:  2</pre><h3>Conclusion</h3><p>When working with <strong>objects</strong>, go with⁣ for...in. When working with <strong>arrays, strings, or anything iterable</strong>, go with for...of. Understanding their difference helps you with the confidence of your program&#39;s predictability.</p><p><em>Originally published at </em><a href="https://www.leomofthings.com/blog/forof-vs-forin-in-javascript"><em>https://www.leomofthings.com</em></a><em> on July 13, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2065f62e1e19" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>