<?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 Salman Saeed on Medium]]></title>
        <description><![CDATA[Stories by Salman Saeed on Medium]]></description>
        <link>https://medium.com/@salmansaeed964?source=rss-e5251ad5d8be------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*aI9T1KCvdh22UObT</url>
            <title>Stories by Salman Saeed on Medium</title>
            <link>https://medium.com/@salmansaeed964?source=rss-e5251ad5d8be------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 25 Nov 2026 02:17:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@salmansaeed964/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[After 14 Days With Claude Sonnet 4.6 and Codex 5.3, I removed One?]]></title>
            <link>https://medium.com/@salmansaeed964/after-14-days-with-claude-sonnet-4-6-and-codex-5-3-i-removed-one-869baf3103cb?source=rss-e5251ad5d8be------2</link>
            <guid isPermaLink="false">https://medium.com/p/869baf3103cb</guid>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[sonnet]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[Salman Saeed]]></dc:creator>
            <pubDate>Mon, 02 Mar 2026 07:47:41 GMT</pubDate>
            <atom:updated>2026-03-02T07:47:41.419Z</atom:updated>
            <content:encoded><![CDATA[<p>I didn’t expect to have a strong opinion.</p><p>Two weeks later, I removed one of them from my workflow.</p><p>Here’s what actually happened.</p><h3>The Context (Why This Test Wasn’t a Toy Example)</h3><p>I’m not testing models on todo apps.</p><p>My daily work looks like this:</p><ul><li>New feature development</li><li>Refactoring legacy services written 5+ years ago</li><li>Architecture decisions under real constraints</li><li>Debugging bugs that only happen in production</li><li>Writing and maintaining tests at scale</li></ul><p>For 14 days, I ran <strong>Codex 5.3</strong> and <strong>Claude Sonnet 4.6</strong> in parallel.</p><p>Same prompts.<br>Same codebases.<br>Same criteria.</p><p>I tracked:</p><ul><li>Time to usable output</li><li>Re-prompt frequency</li><li>First-paste success rate</li><li>How often I trusted the result</li></ul><p>No IDE magic. Just API + chat interfaces.</p><h3>Week 1: Codex 5.3 Wins the Sprint</h3><p>Day one? Codex impressed me more.</p><p>It was <strong>fast</strong>.</p><p>Ask it:</p><blockquote><em>“Generate a REST API with authentication scaffolding with test cases .”</em></blockquote><p>Boom. Clean structure. Confident output. No hesitation.</p><p>It felt like pairing with a senior engineer who already knew what I wanted.</p><p>Sonnet 4.6 was slightly slower …. and did something I didn’t love at first:</p><p>It asked a question.</p><blockquote><em>“Are you building this as part of a monolith, or do you plan to extract it into a microservice later?”</em></blockquote><p>I just wanted the code.</p><p>By day three, I realized that question saved me :) from a painful refactor.</p><p>That was the first time i thought.</p><h3>The Turning Point: ~4,000 Lines of Legacy</h3><p>Day five.</p><p>I fed both models a 4,000-line Python service from 2019. Minimal docs. Two abstraction layers. A timezone bug corrupting datetime objects in specific user regions.</p><p>Classic “why does this only break in production?” problem.</p><h3>Codex 5.3’s Response</h3><ul><li>Identified 3 potential causes</li><li>Generated 3 clean patches</li><li>Sounded extremely confident</li></ul><p>Fix #1 → Didn’t work <br>Fix #2 → Introduced a new edge case<br>Fix #3 → Fixed a different bug (real, but not mine)</p><p><strong>It looked right :| .</strong><br>It wasn’t right.</p><h3>Sonnet 4.6’s Response</h3><p>It didn’t start with fixes.</p><p>It asked:</p><ul><li>“Which timezone are affected users in?”</li><li>“Is the database storing UTC or local time?”</li><li>“Where is conversion happening in the pipeline?”</li></ul><p>Then it walked through its reasoning step by step.</p><p>One fix.</p><p>Clear explanation.</p><p>Correct on first try.</p><p>That pattern repeated across every complex debugging session.</p><p>That’s when the gap became obvious.</p><h3>Architecture Conversations: This Wasn’t Even Close</h3><p>When I design systems, I don’t want answers.</p><p>I want friction.</p><p>I want a thinking partner.</p><p>Ask Codex:</p><blockquote><em>“How should I design a notification system?”</em></blockquote><p>You’ll get:</p><ul><li>Event-driven architecture</li><li>Message queues</li><li>Retry logic</li><li>Dead letter queues</li></ul><p>Textbook correct.</p><p>But when I pushed back:</p><blockquote><em>“We’re serverless. Small team. No Kafka experience.”</em></blockquote><p>It mostly rephrased the same answer.</p><p>Sonnet did something different.</p><p>It re-evaluated.</p><p>It asked:</p><ul><li>Team size?</li><li>Deployment cadence?</li><li>Expected scale?</li><li>Operational tolerance?</li></ul><p>Then it proposed:</p><ol><li>Start simple with SQS + Lambda</li><li>Add idempotency guards</li><li>Evolve toward dedicated workers only if volume demands it</li></ol><p>It even warned about premature complexity.</p><p>That’s not code generation.</p><p>That’s engineering judgment.</p><h3>Where Codex 5.3 Is Actually Better</h3><p>Let’s be fair.</p><p>Codex is excellent at:</p><h3>1…. Mechanical Output</h3><ul><li>Generating test suites</li><li>Writing CRUD scaffolding</li><li>Creating typed interfaces</li></ul><p>I generated 47 unit tests in one session.<br>Codex was faster. Output quality was comparable.</p><h3>2…. Staying in Flow</h3><p>If you already know exactly what you want,<br>Sonnet’s clarifying questions can feel like friction.</p><p>Codex just delivers.</p><p>For experienced engineers moving quickly, that matters.</p><h3>The Real Difference: Speed vs Judgment</h3><p>Here’s the uncomfortable truth:</p><p>Codex optimizes for output.</p><p>Sonnet optimizes for correctness under uncertainty.</p><p>If your work is:</p><ul><li>Clearly scoped</li><li>Greenfield</li><li>Spec-driven</li></ul><p>Codex feels great.</p><p>If your work is:</p><ul><li>Ambiguous</li><li>Legacy-heavy</li><li>Architecture-sensitive</li><li>Full of incomplete information</li></ul><p>Sonnet feels safer.</p><p>And in production systems, safety compounds.</p><h3>Thought ?</h3><p>By day ten, I had already stopped routing complex tasks to Codex.</p><p>Not because it’s bad.</p><p>Because for the type of work I actually do — <br>messy systems, scaling decisions, debugging under constraints — <br>Sonnet operates at a different depth.</p><p>The questions that annoyed me early on?</p><p>They’re the feature.</p><p>They’re what a good engineer does:<br>Refuse to optimize the wrong thing.</p><h3>Who Should Use What?</h3><h3>Use Codex 5.3 if:</h3><ul><li>You generate well-defined code from clear specs</li><li>Speed is your bottleneck</li><li>You don’t want pushback</li><li>You’re doing stable greenfield work</li></ul><h3>Use Claude Sonnet 4.6 if:</h3><ul><li>You work in legacy or ambiguous systems</li><li>You want reasoning, not just output</li><li>You’re making architecture decisions</li><li>You’ve been burned by confidently wrong AI before</li></ul><h3>The Unexpected Benefit</h3><p>After two weeks with Sonnet, I noticed:</p><p>I was writing better prompts.</p><p>Because it modeled careful thinking back at me.</p><p>And in 2026, that might be the real edge.</p><p>AI tools are improving every quarter. Maybe Codex 5.4 changes the equation.</p><p>But today?</p><p>For work that matters — not demos, not boilerplate, not tweet-sized projects</p><p>One of these tools behaves like a generator….</p><p>The other behaves like an engineer.</p><p>If you’ve tested both and had a different experience, I genuinely want to hear it …</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=869baf3103cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rails Developers: Stop Hiding Business Logic in Callbacks]]></title>
            <link>https://medium.com/@salmansaeed964/rails-developers-stop-hiding-business-logic-in-callbacks-b9701c19200b?source=rss-e5251ad5d8be------2</link>
            <guid isPermaLink="false">https://medium.com/p/b9701c19200b</guid>
            <category><![CDATA[callback]]></category>
            <category><![CDATA[scalability]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <dc:creator><![CDATA[Salman Saeed]]></dc:creator>
            <pubDate>Mon, 02 Mar 2026 07:15:54 GMT</pubDate>
            <atom:updated>2026-03-02T07:15:54.362Z</atom:updated>
            <content:encoded><![CDATA[<h3>“It works” is not architecture.</h3><p>I’m going to say something that might annoy some Rails developers:</p><p><strong>Most Rails codebases are architectural disasters.</strong></p><p>Not because Rails is bad.<br>Not because developers are incompetent.</p><p>But because Rails makes it very easy to build something that works… and very hard to see when it’s slowly becoming unmaintainable.</p><p>If your app depends on:</p><ul><li>15 model callbacks</li><li>“magic” status transitions</li><li>Side effects buried in after_commit</li><li>Controllers that secretly orchestrate business flows</li></ul><p>You don’t have architecture.</p><p>You have hope-driven development.</p><h3>The Lie We Tell Ourselves</h3><p>“It’s the Rails way.”</p><p>No.</p><p>The Rails way is convention over configuration.<br>Not confusion over execution.</p><p>There is nothing elegant about this:</p><pre>after_create :charge_customer<br>after_update :send_receipt<br>after_commit :notify_admin</pre><p>What actually happens when a record changes?</p><ul><li>Which runs first?</li><li>What fails silently?</li><li>What retries?</li><li>What depends on what?</li></ul><p>If you need to open 4 files to understand one status change — your architecture is broken.</p><h3>Callbacks Are Control Flow, And That’s Dangerous</h3><p>Here’s the uncomfortable truth:</p><p><strong>Callbacks are hidden control flow.</strong></p><p>Hidden control flow is the enemy of scalable systems.</p><p>When a junior developer updates a column and suddenly:</p><ul><li>A payment is captured</li><li>An email is sent</li><li>A webhook fires</li><li>A background job is queued</li></ul><p>That’s not clean design.<br>That’s a trap.</p><p>Callbacks are fine for:</p><ul><li>Cache invalidation</li><li>Small, tightly coupled side effects</li><li>Simple lifecycle concerns</li></ul><p>They are NOT for:</p><ul><li>Business workflows</li><li>Multi-step processes</li><li>Financial operations</li><li>External API coordination</li></ul><h3>Real Systems Demand Explicit Orchestration</h3><p>Once you’ve worked on:</p><ul><li>High-volume SaaS</li><li>Payment integrations</li><li>External APIs</li><li>Background processing</li><li>AI-based automation</li><li>Systems serving hundreds of thousands of users</li></ul><p>You realize something very quickly:</p><blockquote><em>Implicit behavior does not scale.</em></blockquote><p>What scales?</p><p>Explicit services.</p><h3>The Only Pattern That Has Never Betrayed Me</h3><p>Here’s the structure I now refuse to compromise on:</p><h3>Models = State, Not Workflow</h3><p>Models represent persisted data and simple domain constraints.</p><p>If your model is coordinating three systems and five status transitions, you built a god object.</p><p>And god objects eventually punish you.</p><h3>Services = Workflows</h3><p>If something:</p><ul><li>Touches multiple models</li><li>Calls external services</li><li>Has branching logic</li><li>Requires transactions</li><li>Needs observability</li></ul><p>It becomes a service object.</p><p>Example:</p><pre>class ApproveClaim<br>  def call(claim:, approved_by:)<br>    ApplicationRecord.transaction do<br>      claim.approve!<br>      PaymentGateway.capture(claim.payment)<br>      NotificationService.send_approval(claim)<br>    end<br>  end<br>end</pre><p>Now everything is visible.</p><p>No magic.<br>No surprises.<br>No archaeology required.</p><h3>Domain Objects = Business Rules</h3><p>Not everything belongs in ActiveRecord.</p><p>If it doesn’t need persistence, it doesn’t belong in a model.</p><p>Plain Ruby objects:</p><ul><li>Are easier to test</li><li>Are easier to reason about</li><li>Don’t carry database baggage</li><li>Don’t trigger unexpected side effects</li></ul><p>This is how you keep your core logic clean.</p><h3>“But This Is More Code”</h3><p>Yes.</p><p>And that’s the point.</p><p>Clarity &gt; Cleverness<br>Explicitness &gt; Magic<br>Predictability &gt; Convenience</p><p>Rails gives you productivity.</p><p>Architecture gives you longevity.</p><p>Choose both.</p><h3>The Real Cost of Lazy Architecture</h3><p>Here’s what eventually happens in callback-heavy apps:</p><ul><li>A small feature takes 3 days because of fear.</li><li>No one knows what breaks what.</li><li>Refactoring feels dangerous.</li><li>Bugs appear in “unrelated” flows.</li><li>Onboarding new developers becomes painful.</li><li>Senior engineers start saying, “Don’t touch that part.”</li></ul><p>That’s not scaling.<br>That’s accumulating architectural debt.</p><h3>“It Worked Fine Until We Grew”</h3><p>Exactly.</p><p>Early-stage hacks are survivable.</p><p>Scale exposes architectural lies.</p><p>The bigger the system becomes:</p><ul><li>The more integrations it has</li><li>The more money it handles</li><li>The more background jobs it runs</li><li>The more distributed it becomes</li></ul><p>The more you need explicit orchestration.</p><h3>My Rule Now</h3><p>If a workflow is important enough to affect:</p><ul><li>Money</li><li>User trust</li><li>Data integrity</li><li>External systems</li></ul><p>It must be explicit.</p><p>No hidden callbacks.<br>No accidental side effects.<br>No magical status transitions.</p><p>If I can’t trace a business process from controller → service → domain → model in 30 seconds…</p><p>It’s wrong.</p><h3>Rails Is Not the Problem</h3><p>Rails is powerful.</p><p>But power without discipline becomes chaos.</p><p>Senior engineers don’t rely on magic.</p><p>They design control flow intentionally.</p><h3>Final Take</h3><p>If your Rails app is small and experimental, do whatever gets you moving.</p><p>But if you’re building:</p><ul><li>A real SaaS</li><li>A long-term product</li><li>A system that handles payments</li><li>A platform serving thousands of users</li></ul><p>Stop hiding business logic in callbacks.</p><p>Start designing workflows explicitly.</p><p>Future you — and your team — will thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b9701c19200b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Think First, Prompt Later: How Senior Engineers Should Use AI (Not Be Used by It)]]></title>
            <link>https://medium.com/@salmansaeed964/think-first-prompt-later-how-senior-engineers-should-use-ai-not-be-used-by-it-5a3c117c5209?source=rss-e5251ad5d8be------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a3c117c5209</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Salman Saeed]]></dc:creator>
            <pubDate>Wed, 25 Feb 2026 12:05:11 GMT</pubDate>
            <atom:updated>2026-02-25T12:05:11.734Z</atom:updated>
            <content:encoded><![CDATA[<p>We are entering a strange phase in software engineering.</p><p>Junior developers are becoming <strong>faster</strong>.<br>Senior developers are becoming <strong>replaceable</strong>.<br>And everyone is “<strong>productive</strong>.”</p><p>But there’s a dangerous shift happening , the shift from <strong>thinking</strong> to <strong>fetching</strong>.</p><p>AI can generate code.<br>AI can debug.<br>AI can architect.<br>AI can even write this article.</p><p>But here’s the uncomfortable truth:</p><blockquote><em>If you only fetch from AI, you stop building internal depth.</em></blockquote><p>And depth is the only thing that compounds in a software career.</p><h3>The “Fetch vs Think” Problem</h3><p>There are two ways engineers are using AI today:</p><h3>1 ) The Fetch Approach</h3><ul><li>Open ChatGPT</li><li>Paste error</li><li>Copy fix</li><li>Move on</li></ul><p>Result?<br>The bug is gone.<br>But your understanding didn’t grow.</p><h3>2️) The Think-Then-Verify Approach</h3><ul><li>Reproduce the issue</li><li>Form a hypothesis</li><li>Draft a solution</li><li>Then use AI to challenge it</li></ul><p>Result?<br>You build mental models.<br>AI becomes a reviewer, not a crutch.</p><p>The difference compounds over years.</p><h3>AI Is a Multiplier — Not a Brain Replacement</h3><p>AI works like a force multiplier.</p><p>If you have:</p><ul><li>Strong domain knowledge</li><li>Clear architecture principles</li><li>Deep debugging skills</li></ul><p>AI makes you <strong>10x faster</strong>.</p><p>If you lack those?</p><p>AI makes you <strong>10x confident in shallow solutions</strong>.</p><p>And shallow confidence is dangerous in production systems.</p><h3>Real Example: Rails Architecture</h3><p>Let’s take something practical.</p><p>In Rails apps, many engineers:</p><ul><li>Stuff logic in controllers</li><li>Abuse callbacks</li><li>Create “God models”</li><li>Hide orchestration inside ActiveRecord</li></ul><p>It works… until it doesn’t.</p><p>Over time, the system becomes fragile.</p><p>Now imagine this approach instead:</p><ul><li>ActiveRecord models → persisted state only</li><li>POROs → domain rules</li><li>Services → multi-step workflows</li><li>Controllers → HTTP orchestration only</li><li>Minimal callbacks</li></ul><p>This separation forces clarity.</p><p>When AI suggests code, you don’t blindly paste it.<br>You ask:</p><ul><li>Does this violate domain boundaries?</li><li>Is this orchestration leaking into models?</li><li>Is this a side-effect disguised as a callback?</li></ul><p>AI gives code.<br>Architecture gives judgment.</p><h3>Why Senior Engineers Must Protect Their Thinking</h3><p>In the age of AI, your value shifts from:</p><blockquote><em>“Can you write code?”</em></blockquote><p>To:</p><blockquote><em>“Can you think clearly about systems?”</em></blockquote><p>The best engineers in 2026 will not be the fastest typers.<br>They’ll be the best <strong>system designers and constraint navigators</strong>.</p><p>Think about teams shipping at scale:</p><ul><li>Production incidents</li><li>Race conditions</li><li>Background job failures</li><li>Distributed systems inconsistencies</li></ul><p>AI can help debug.<br>But it cannot replace intuition built from:</p><ul><li>Past outages</li><li>Performance bottlenecks</li><li>Scaling failures</li><li>Real customer pain</li></ul><p>That intuition is earned.</p><h3>A Practical Framework for Using AI as an Engineer</h3><p>Here’s the framework I use:</p><h3>Step 1: Think Alone</h3><ul><li>Outline the logic</li><li>Identify constraints</li><li>Predict edge cases</li></ul><h3>Step 2: Implement Draft</h3><ul><li>Write first version without AI</li><li>Even if imperfect</li></ul><h3>Step 3: Stress-Test with AI</h3><p>Ask:</p><ul><li>What edge cases am I missing?</li><li>What are performance risks?</li><li>How would this break under load?</li></ul><h3>Step 4: Refactor with Intent</h3><p>Not because AI suggested it — <br>but because you understand why it’s better.</p><h3>The Career Compounding Effect</h3><p>If you:</p><ul><li>Think first</li><li>Use AI to refine</li><li>Reflect on mistakes</li><li>Build mental models</li></ul><p>You become irreplaceable.</p><p>If you:</p><ul><li>Prompt first</li><li>Copy blindly</li><li>Skip reflection</li></ul><p>You become interchangeable.</p><p>In a world where AI can write code,<br><strong>clarity of thought becomes the real seniority.</strong></p><h3>Final Thought</h3><p>AI is not the threat.</p><p>Shallow thinking is.</p><p>The engineers who win in this era will not fight AI — <br>they will collaborate with it.</p><p>But they will never outsource their judgment.</p><p>If you found this useful, I’d love to hear how you personally balance “thinking vs prompting” in your workflow.</p><p>Because the real question isn’t:</p><blockquote><em>“Can AI write code?”</em></blockquote><p>It’s:</p><blockquote><em>“Can you still think without it?”</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a3c117c5209" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The 5-Minute Rule That Saved My Brain From AI]]></title>
            <link>https://medium.com/@salmansaeed964/the-5-minute-rule-that-saved-my-brain-from-ai-45adf9a7a641?source=rss-e5251ad5d8be------2</link>
            <guid isPermaLink="false">https://medium.com/p/45adf9a7a641</guid>
            <category><![CDATA[addiction]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[thinking]]></category>
            <dc:creator><![CDATA[Salman Saeed]]></dc:creator>
            <pubDate>Wed, 18 Feb 2026 13:03:16 GMT</pubDate>
            <atom:updated>2026-02-18T13:03:16.193Z</atom:updated>
            <content:encoded><![CDATA[<p>I was addicted to the dopamine hit of instant answers.</p><p>Every time I hit a wall , coding bug, blank page, unclear email, my fingers flew to the AI shortcut before my brain even processed the problem. Fast? Yes. But after months of this, I noticed something terrifying: <strong>I was forgetting how to think deeply and consistently.</strong></p><p>Not the big, creative thinking. The small, daily problem-solving that keeps your mind sharp. My brain had become a lazy landlord, outsourcing everything to AI tenants.</p><p>So I made one change.</p><h3>The Rule: Think First, AI Second</h3><p>Now I force a 5-minute pause.</p><p>Before touching AI, I:</p><p><strong>Write down:</strong> my own approach (even if terrible)<br><strong>Attempt:</strong> the solution myself (even if broken)<br><strong>Identify:</strong> exactly where I’m stuck (specificity matters)</p><p>Only then do I open the AI tool.</p><h3>What Changed</h3><p><strong>I started learning again</strong>. When AI explains something now, I actually understand it because I have my own mental model to compare it against.</p><p><strong>I catch AI mistakes.</strong> Weird hallucinations, outdated info, logical gaps , I spot them fast because my brain is already engaged.</p><p><strong>I trust my own judgment.</strong> The more I use it, the less I need the crutch.</p><h4>The Real Test</h4><p>Last week, my internet died during a project. No AI, no search, just me and the feature need to implement. a years ago, I’d have panicked. This time? I solved it. Slowly, messily, but completely.</p><p>My brain still worked.</p><p><strong>The middle path</strong>: You don’t need to quit AI for dayss. Just make it your second opinion, not your first instinct.</p><p>Your future self, the one in a meeting, on a deadline, without signal. will thank you.</p><p>What’s your balance? Drop a comment below.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45adf9a7a641" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The $10.3 Billion Bet: Why AWS Is Going All-In on Saudi Arabia’s Cloud Revolution]]></title>
            <link>https://medium.com/@salmansaeed964/the-10-3-billion-bet-why-aws-is-going-all-in-on-saudi-arabias-cloud-revolution-8fae7df89f6f?source=rss-e5251ad5d8be------2</link>
            <guid isPermaLink="false">https://medium.com/p/8fae7df89f6f</guid>
            <category><![CDATA[saudi-vision-2030]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[saudi-arabia]]></category>
            <dc:creator><![CDATA[Salman Saeed]]></dc:creator>
            <pubDate>Tue, 17 Feb 2026 11:58:55 GMT</pubDate>
            <atom:updated>2026-02-17T11:58:55.914Z</atom:updated>
            <content:encoded><![CDATA[<p>How Amazon Web Services is positioning itself at the center of the Kingdom’s economic transformation — and what it means for the future of cloud computing in the Middle East</p><p>In March 2024, Amazon Web Services made a move that signaled far more than routine business expansion. The cloud giant announced a <strong>$5.3</strong> billion <strong>investment</strong> to establish a full AWS infrastructure region in Saudi Arabia, complete with three Availability Zones and a comprehensive talent development pipeline. Less than a year later, they doubled down with an additional <strong>$5+ billion AI partnership</strong> with HUMAIN, Saudi Arabia’s newly formed AI company.</p><p>This isn’t just another regional data center announcement. It’s a strategic positioning play at the intersection of three powerful forces: <strong>geopolitical economic transformation</strong>, <strong>explosive cloud market growth</strong>, and <strong>the global AI infrastructure race</strong>.</p><p>Let me break down why AWS is betting big — and what it reveals about where cloud computing is heading.</p><h3>The Vision 2030 Opportunity</h3><p>Saudi Arabia’s <strong>Vision 2030</strong> isn’t a marketing slogan — it’s a $3 trillion economic restructuring program designed to wean the Kingdom off oil dependency by 2030. At its core lies digital transformation: smart cities (NEOM), AI-driven government services, fintech innovation, and healthcare modernization.</p><p>For AWS, this represents a <strong>structural demand shift</strong>. When a G20 economy commits to rebuilding itself around digital infrastructure, cloud providers don’t just get customers — they get partners in nation-building.</p><p>The numbers validate the opportunity. Saudi Arabia’s cloud market is valued at <strong>$4.77 billion in 2025</strong> and projected to nearly triple to <strong>$11.47 billion by 2031</strong> . But more importantly, regulatory requirements around <strong>data sovereignty</strong> mean foreign cloud providers can’t just serve Saudi customers from Dubai or Bahrain anymore. Sensitive government, healthcare, and financial data must reside within the Kingdom’s borders.</p><p>AWS’s 2026 launch solves this compliance challenge while positioning them as the infrastructure layer for Saudi Arabia’s economic reinvention.</p><h3>The Competitive Landscape: Why Timing Matters</h3><p>AWS isn’t entering an empty market. <strong>Google Cloud launched its Saudi region in 2023</strong>, and Microsoft has announced plans for its own facilities. But AWS’s approach differs in three critical ways:</p><p><strong>1. Scale and Completeness</strong><br>While competitors launched with limited services, AWS is deploying three Availability Zones from day one — providing the enterprise-grade resilience and low-latency performance that mission-critical workloads demand .</p><p><strong>2. The AI Infrastructure Moat</strong><br>The HUMAIN partnership isn’t just about selling GPU instances. AWS is building a dedicated “<strong>AI Zone”</strong> with specialized infrastructure for training large language models and running generative AI at scale . This positions them to capture the most valuable workloads as Saudi Arabia pursues AI leadership.</p><p><strong>3. Human Capital Investment</strong><br>AWS committed to training <strong>4,000 women </strong>through their “<strong>Saudi Arabia Women’s Skills Initiative</strong>” and establishing two innovation centers . In a market facing severe tech talent shortages, this isn’t corporate social responsibility — it’s competitive moat-building. Local talent creates customer loyalty and reduces AWS’s dependency on expatriate engineers.</p><p>— -</p><h3>What This Means for Cloud Strategy</h3><p>AWS’s Saudi expansion illustrates three trends reshaping global cloud computing:</p><p><strong>Data Sovereignty as Market Access</strong><br>The era of centralized global cloud regions is ending. From EU data localization requirements to Saudi Arabia’s regulatory framework, governments increasingly demand in-country data residency. AWS’s $5.3 billion investment is essentially the <strong>cost of market access </strong>in the new regulatory environment.</p><p><strong>AI Infrastructure as Differentiation</strong><br>The additional $5 billion AI commitment reveals where cloud competition is heading. Compute for traditional workloads is becoming commoditized; <strong>AI training and inference capacity</strong> is becoming the scarce resource that wins enterprise contracts. AWS is essentially pre-building capacity for Saudi Arabia’s national AI ambitions.</p><p><strong>Cloud as Economic Development Tool</strong><br>Notice how AWS frames this not as “we’re selling to Saudi customers” but as “we’re enabling Saudi Arabia’s transformation.” This positioning matters when competing for government and quasi-government contracts. Cloud providers are increasingly <strong>infrastructure partners to states</strong>, not just vendors to companies.</p><p>— -</p><p>### The Risks AWS Is Taking</p><p>No $10+ billion bet is without downside. AWS faces three significant risks:</p><p><strong>Geopolitical Exposure</strong>: Saudi Arabia’s human rights record and regional geopolitical tensions create reputational risk for American tech companies. AWS will need to navigate this carefully.</p><p><strong>Capital Intensity</strong>: Data centers in desert climates require massive cooling infrastructure and energy consumption. The $5.3 billion price tag reflects these physical challenges.</p><p><strong>Customer Concentration</strong>: Much of the initial demand will likely come from government-related entities. Over-dependence on public sector contracts creates revenue volatility.</p><p>— -</p><p>###<strong> The Bottom Line</strong></p><p>AWS’s Saudi Arabia launch represents something larger than a regional expansion. It demonstrates how cloud computing has become central to national economic strategies — and how the hyperscalers are positioning themselves as indispensable infrastructure providers to rising economies.</p><p>For technology professionals and business leaders, this is worth watching closely. The Saudi model — massive state-led digital transformation, data sovereignty requirements, and AI infrastructure partnerships — will likely replicate across Indonesia, Vietnam, Nigeria, and other emerging markets.</p><p>AWS isn’t just building data centers in Saudi Arabia. They’re architecting the template for cloud computing’s next phase: deeply embedded in national economies, compliant with local regulations, and powering the AI ambitions of governments worldwide.</p><p>The $10.3 billion question isn’t whether this bet will pay off for AWS. It’s whether competitors can afford *not* to make similar bets — and what happens to cloud computing’s competitive landscape when they do.</p><p>— -</p><p>What do you think? Is AWS’s Saudi strategy a model for cloud expansion in regulated markets, or an overexposure to geopolitical risk? Share your perspective in the comments.</p><p>#AWS<br>#Cloud Computing #Saudi Arabia #Vision 2030 #Data Sovereignty<br>#AI Infrastructure, #Middle East Tech, #Digital Transformation, #Google Cloud, #Microsoft Azure</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fae7df89f6f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[If you’ve worked with ActiveAdmin in a real production Rails app, you’ve probably seen this:]]></title>
            <link>https://medium.com/@salmansaeed964/if-youve-worked-with-activeadmin-in-a-real-production-rails-app-you-ve-probably-seen-this-8f0fb255688e?source=rss-e5251ad5d8be------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f0fb255688e</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[n-plus-1-queries]]></category>
            <category><![CDATA[active-admin]]></category>
            <dc:creator><![CDATA[Salman Saeed]]></dc:creator>
            <pubDate>Thu, 15 Jan 2026 10:15:53 GMT</pubDate>
            <atom:updated>2026-01-15T10:15:53.693Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>includes vs scoped_collection vs find_collection in Rails ActiveAdmin — What Actually Fixes N+1 Queries?</blockquote><p>If you’ve worked with <strong>ActiveAdmin</strong> in a real production Rails app, you’ve probably seen this:</p><blockquote><em>90+ SQL queries to load 30 records<br>Page loads slow<br>Bullet gem screaming<br>You add </em><em>includes… and suddenly filters break, counts become wrong, or pagination explodes.</em></blockquote><p>This usually happens because developers don’t understand the <strong>three different query layers</strong> ActiveAdmin uses:</p><ul><li>includes</li><li>scoped_collection</li><li>find_collection</li></ul><p>They are <strong>not the same thing</strong> — and using the wrong one can quietly break your entire admin panel.</p><p>Let’s break it down.</p><h3>First: Why ActiveAdmin Is Different from Normal Rails</h3><p>In a normal Rails controller:</p><pre>@claims = Claim.includes(:vehicle, :user)</pre><p>One query. One result set. Done.</p><p>But ActiveAdmin is <strong>not</strong> that simple.</p><p>ActiveAdmin builds <strong>multiple queries</strong> behind the scenes:</p><p>PurposeQueryFilters (Ransack): Claim.all<br>Total count: Claim.count<br>Pagination: Claim.limit(...).offset(...)<br>Rows rendering: Claim.where(...).includes(...)</p><p>So ActiveAdmin needs <strong>two versions</strong> of the dataset:</p><ul><li>A <strong>base scope</strong> (lightweight, no joins)</li><li>A <strong>row scope</strong> (fully eager loaded)</li></ul><p>That’s why just adding .includes everywhere causes problems.</p><h3>1️⃣ includes at the top of ActiveAdmin.register</h3><pre>ActiveAdmin.register Claim do<br>  includes :vehicle, :insurance_account<br>end</pre><p>This looks harmless — but it’s dangerous.</p><p>This runs:</p><pre>Claim.includes(...)</pre><p><strong>everywhere</strong>, including:</p><ul><li>Filters</li><li>Counts</li><li>Ransack searches</li><li>CSV exports</li></ul><p>Result:</p><ul><li>Slower queries</li><li>Wrong counts</li><li>Broken pagination</li><li>Polymorphic crashes (created_by etc)</li></ul><p>⚠️ This should almost never be used for large tables.</p><h3>2️⃣ scoped_collection — the correct place for row optimization</h3><pre>ActiveAdmin.register Claim do<br>  controller do<br>    def scoped_collection<br>      super.includes(<br>        :vehicle,<br>        :insurance_account,<br>        { workshop_branch: :workshop_account }<br>      )<br>    end<br>  end<br>end</pre><p>This is the <strong>correct solution</strong> for N+1 queries.</p><p>Why?</p><p>Because super is the <strong>filtered, paginated base scope</strong> that ActiveAdmin already built.</p><p>So this happens:</p><pre>base = Claim.where(filters...).order(...).page(...)<br>rows = base.includes(...)</pre><p>This means:</p><ul><li>Filters stay fast</li><li>Pagination works</li><li>Count queries stay small</li><li>Only the displayed rows get eager-loaded</li></ul><p>This is how ActiveAdmin was designed to be used.</p><h3>3️⃣ find_collection — even lower level</h3><pre>def find_collection<br>  super.includes(:vehicle)<br>end</pre><p>This runs even later — after pagination.</p><p>It’s useful if:</p><ul><li>You want eager loading <strong>only for the current page</strong></li><li>You don’t want it applied to CSV exports or sidebars</li></ul><p>But 90% of the time, scoped_collection is enough.</p><h3>Why Bullet warns about ActiveAdmin</h3><p>Bullet usually prints:</p><pre>USE eager loading detected<br>Claim =&gt; [:vehicle]<br>Add to your query: .includes(:vehicle)</pre><p>If you follow that advice and add it globally, you will break ActiveAdmin.</p><p>The correct fix is:</p><pre>def scoped_collection<br>  super.includes(:vehicle)<br>end</pre><p>Not:</p><pre>ActiveAdmin.register Claim do<br>  includes :vehicle   # ❌ dangerous<br>end</pre><h3>⚠️ Polymorphic trap</h3><p>If you do this:</p><pre>super.includes(:created_by)</pre><p>And created_by is polymorphic → Rails crashes:</p><pre>ActiveRecord::EagerLoadPolymorphicError</pre><p>So you must <strong>never eager load polymorphic associations</strong>.</p><p>Let Bullet complain — that’s better than breaking the page.</p><h3>Real-world impact (from production)</h3><p>In one Saudi insurance system:</p><p>Metric Before After SQL</p><blockquote>ActiveRecord time 71ms after 5.7ms<br>View rendering 392ms after 179ms</blockquote><p>That is over <strong>80% performance improvement</strong><br>Just by putting .includes in the <strong>right place</strong>.</p><h3>Final advice</h3><p>If you are building <strong>large admin dashboards</strong> (government, insurance, logistics, finance):</p><p>Always fix N+1 queries like this:</p><pre>def scoped_collection<br>  super.includes(...)<br>end</pre><p>Never globally.</p><p>Your performance — and your sanity — will thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f0fb255688e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>