<?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 Samuel Fabel on Medium]]></title>
        <description><![CDATA[Stories by Samuel Fabel on Medium]]></description>
        <link>https://medium.com/@samuelfabel?source=rss-145df8d7e2bb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*lBs2F8yCpuUfbWn3</url>
            <title>Stories by Samuel Fabel on Medium</title>
            <link>https://medium.com/@samuelfabel?source=rss-145df8d7e2bb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 15:30:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@samuelfabel/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[14 tipos de programador, seus percalços e suas utilidades]]></title>
            <link>https://medium.com/@samuelfabel/14-tipos-de-programador-seus-percal%C3%A7os-e-suas-utilidades-0bc3d2f77a49?source=rss-145df8d7e2bb------2</link>
            <guid isPermaLink="false">https://medium.com/p/0bc3d2f77a49</guid>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[careers]]></category>
            <dc:creator><![CDATA[Samuel Fabel]]></dc:creator>
            <pubDate>Tue, 28 Jul 2026 19:42:58 GMT</pubDate>
            <atom:updated>2026-07-28T19:42:58.042Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eg3GnySEiJtIdMnNquw3zA.png" /></figure><p>Toda empresa de TI já teve a mesma ideia: contratar um time de gente igual. Todo mundo sênior, todo mundo proativo, todo mundo com a mesma régua. Na teoria, funciona. Na prática, dura três meses até alguém perceber que ninguém quer fazer o trabalho chato, ninguém aguenta apagar incêndio às 3 da manhã, e todo mundo quer opinar sobre arquitetura ao mesmo tempo.</p><p>Programador não é peça de reposição: são seres humanos. Cada tipo carrega um jeito diferente de lidar com autonomia, com risco, com regra. Isso tem função dentro do time.</p><p>Aqui não tem programador bom ou ruim. Tem lugar certo e lugar errado. A maioria das empresas não erra na contratação: erra no encaixe.</p><p>São os catorze que eu observei na minha carreira até aqui. Pode ser que tenham mais — mas esses eu já vi de perto o suficiente pra falar deles.</p><p><strong>O vendedor</strong></p><p>Todo mundo já trabalhou com um. Ele engana todo mundo — inclusive quem contratou ele. Em entrevista é brilhante. No código, mais ou menos. Um cadastro de cliente na mão dele vira “plataforma revolucionária de gestão de relacionamento”. A empresa adora ele quando precisa dar um up artificial no projeto e ninguém tem ideia melhor. O problema é que, cedo ou tarde, alguém vai abrir o capô.</p><p><strong>O que faz só o que manda</strong></p><p>Esse não move uma palha se ninguém pedir. E é exatamente por isso que muita empresa gosta dele. Não questiona. Não avisa que vai dar errado. Não tem ideia própria — nem quer ter. Quando o trabalho é só precisar de uma mão a mais, ele é o mais eficiente que existe. O problema aparece quando alguém espera dele algo além da mão.</p><p><strong>O sonhador</strong></p><p>Dá ideia toda hora. Nem sempre cabe no sprint, nem sempre cabe no orçamento, às vezes nem cabe na realidade. Mas é ele quem mantém o roadmap gordo e a empresa pensando em depois de amanhã. Sem ele, o produto para de crescer. Com ele demais, o produto nunca sai do papel.</p><p><strong>O questionador</strong></p><p>Só rende quando compra a ideia. Antes disso, faz pergunta, critica, discute — trava reunião inteira até estar convencido. É chato, mas é ele quem fura buraco que ninguém tinha visto e deixa a ideia mais madura antes de virar código. Todo mundo diz que gosta dele. Na hora H, fica puto porque precisa convencer o cara de novo. Mas se ele compra, ele entrega — e entrega melhor que a maioria.</p><p><strong>O pau pra toda obra</strong></p><p>Abraça tudo que cai na mão dele. Peça qualquer coisa, ele se vira. É útil até demais — e aí mora o risco. Esse tipo não sabe dizer não, veste a camisa até rasgar, e um dia sai. Quando sai, some com a operação inteira, e a empresa fica com fama de ter escravizado o cara. Precisa de alguém filtrando o que chega nele, ou ele não dura.</p><p><strong>O nerd</strong></p><p>Estuda tudo. Acompanha fórum, tira certificação, testa framework que ainda nem lançou versão estável. É quem mantém a empresa não ficar dez anos atrás do mercado. Sozinho, às vezes, prefere a ferramenta nova à solução que resolve.</p><p><strong>O amante</strong></p><p>Se apaixona pelo projeto. Vive o projeto, sonha com o projeto, dá a vida pelo projeto — literalmente, ele não separa vida de trabalho. É bom ter, mas exige cuidado: esse tipo adoece antes de reclamar.</p><p><strong>O by the book</strong></p><p>Só faz do jeito que o manual manda. Chato de trabalhar junto, necessário de ter por perto. É ele quem segura o time na boa prática quando todo mundo já estava disposto a cortar caminho.</p><p><strong>O mal educado</strong></p><p>Encrenqueiro, briga com geral. Ninguém quer ele no time — até precisar que alguém filtre o contato desnecessário e mande recado grosso que ninguém mais tem coragem de mandar.</p><p><strong>O preguiçoso</strong></p><p>Procura sempre o caminho mais curto. Se dá pra automatizar, automatiza. Se dá pra não fazer duas vezes, não faz. Tem fama de vagabundo, mas normalmente é quem escreve o script que economiza três horas de trabalho manual do time inteiro. A diferença entre ele e o resto é que o resto acha bonito trabalhar duro. Ele só quer trabalhar uma vez.</p><p><strong>O bombeiro</strong></p><p>No dia a dia é invisível. Ninguém sabe direito o que ele faz, e ele não faz questão de explicar. Mas quando o sistema cai às 3 da manhã, é o nome dele que aparece no grupo do WhatsApp. Resolve, some de novo, e volta pra invisibilidade até o próximo incêndio.</p><p><strong>O arquiteto de castelo de areia</strong></p><p>Adora desenhar solução. Draw.io lotado, slide bonito, catálogo de padrões — o problema é que na hora de codar, trava. Mas antes de julgar: é ele quem dá visão de conjunto pro time quando ninguém mais enxerga o sistema inteiro, e é ele quem convence board e cliente de que o projeto tem pé e cabeça. Só não pode ser o único no time, ou o pé e a cabeça nunca viram corpo.</p><p><strong>O sobrevivente</strong></p><p>Já passou por três demissões em massa e aprendeu a nunca se destacar demais nem se esconder demais. Não é o melhor do time, não é o pior. Mas é ele quem lembra por que aquela decisão esquisita foi tomada há quatro anos, quem sabe navegar a política interna sem drama, e quem segura a peteca enquanto o resto do time troca. Continuidade tem valor, mesmo quando não tem brilho.</p><p><strong>O invisível</strong></p><p>Entrega quietinho. Não disputa palco em reunião, não briga por crédito, não faz post no LinkedIn contando o que resolveu. Passa tanto tempo sem aparecer que a empresa esquece que ele existe — até ele tirar férias, ou sair. Aí o time descobre, em duas semanas, quanto trabalho estava escondido atrás daquele silêncio todo..</p><h4>O time que funciona</h4><p>Nenhum desses catorze resolve sozinho. O vendedor sem o by the book vira picareta. O by the book sem o sonhador vira empresa que nunca inova. O bombeiro sem o invisível vira empresa correndo atrás do próprio rabo, porque ninguém constrói nada enquanto ele apaga incêndio.</p><p>O erro clássico é contratar achando que um tipo resolve tudo sozinho como se fosse produtos de prateleira. Time cheio de sonhador não entrega. Time cheio de by the book não cresce. Time cheio de amante nem chega a virar time — vira empresa que se orgulha da “paixão” do pessoal até o dia que um deles surta de burnout e quase taca o notebook na cabeça do chefe.</p><p>A régua não devia ser “esse cara é bom programador”. A régua devia ser “esse cara resolve o que esse time precisa agora”. Quando o time muda, a régua muda junto. E é exatamente aí que a maioria trava, porque contratar pelo encaixe dá trabalho. Contratar pelo currículo é mais rápido, e depois se torce pra dar certo.</p><p>Nem sempre dá.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0bc3d2f77a49" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your Microservices Charge an Executive Function Tax]]></title>
            <link>https://medium.com/@samuelfabel/your-microservices-charge-an-executive-function-tax-cbf737b8aede?source=rss-145df8d7e2bb------2</link>
            <guid isPermaLink="false">https://medium.com/p/cbf737b8aede</guid>
            <category><![CDATA[cognitive-load]]></category>
            <category><![CDATA[developer-experience]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Samuel Fabel]]></dc:creator>
            <pubDate>Tue, 07 Jul 2026 16:55:51 GMT</pubDate>
            <atom:updated>2026-07-07T16:58:00.505Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Minimalist vector illustration of a small, dark human silhouette isolated on a dark charcoal background. Above its head, a massive, dense web of thin cyan and teal network lines connects to a chaotic halo of countless floating nodes resembling server icons and dashboards. A few nodes glow amber like unread alerts. The vast negative space around the central figure emphasizes a mood of quiet overload and isolation." src="https://cdn-images-1.medium.com/max/1024/1*sLG0xZdmQ9d7ZlpX4AL1eQ.png" /></figure><p>You open Grafana. Fourteen dashboards. Three queues “nobody remembers who created.” An alert firing in #incidents while someone asks on Slack what the correct deploy path is for billing in staging.</p><p>You’re not debugging. You’re rebuilding a mental map.</p><p>That’s not lack of experience. That’s architecture that externalized complexity into your head.</p><h3>The tax that doesn’t show up on the spreadsheet</h3><p>When we talk microservices, we talk scale, team autonomy, independent deploys. All true.</p><p>What rarely makes it onto the ledger is <strong>mental state</strong>.</p><p>Every new service brings an API contract, a queue, per-environment config, a pipeline, an owner (or no owner), a debug path when things go wrong. It’s not a line on the architecture diagram. It’s a whole package someone has to hold in working memory to operate the system safely.</p><p>Cognitive psychology calls part of this <strong>extraneous load</strong> — effort spent not on the problem itself, but on the bad packaging. Sweller and others have been talking about this for decades in learning contexts. On a distributed platform, the “bad packaging” often has a nice name: <em>best practice</em>.</p><p>Microservices without governance become <strong>cognitive debt</strong>. Compounding. No visible interest until the day nobody knows how checkout talks to inventory without opening six repos and asking on Slack.</p><h3>Context switching isn’t “just distraction”</h3><p>Mark, Gudith, and Klocke measured this in 2008: interruption in digital work increases stress and time to resume the task. Not productivity-coach opinion — data.</p><p>Distributed debugging is serial interruption. You don’t read a stack trace. You hunt trace IDs across services, correlate logs, discover the timeout came from a config that only exists in staging’s values.yaml, ask who touched the queue — and when you get back to the original bug, half the context is gone.</p><p>That’s permanent <strong>dual-tasking</strong>: fix the incident <em>and</em> rebuild the mental model of the system at the same time.</p><p>For people with ADHD or a tighter working memory budget, the cost isn’t linear. The system punishes anyone who already needs more external structure — but it degrades <strong>everyone</strong> trying to keep three flows in their head while the pager goes off.</p><p>Cognitive accessibility isn’t just contrast on the customer-facing site. It’s how many services you force a human to simulate mentally before their coffee gets cold.</p><h3>What I call a complexity budget</h3><p>Teams have a cloud budget. Headcount budget. Sometimes even a “technical debt” line on a slide.</p><p>Almost never a <strong>cognitive complexity budget</strong>.</p><p>Here’s how it works: every architectural decision spends invisible points from the team’s capacity to understand, operate, and evolve the system.</p><p>New service coupled to three more? Points.</p><p>Another way to configure an environment? Points.</p><p>“Easier to ask on Slack”? Points — and high interest, because tribal knowledge doesn’t scale and goes on vacation with the person who had it.</p><p>Feature flags across twelve services with no catalog? Points.</p><p>Generic observability — fifty metrics, zero opinion on what matters? Points.</p><p>Nobody needs to formalize this in Excel on day one. But you need to <strong>stop treating complexity as external to design</strong>. It’s not a side effect. It’s first-class material.</p><h3>What actually helps (without romanticizing the monolith)</h3><p>I’m not selling “go back to the monolith” as a religion. Distributed makes sense at real scale.</p><p>What doesn’t make sense is distributing <strong>without compressing</strong> what humans need to know.</p><p><strong>A service catalog someone actually maintains.</strong> Preferably derived from code where you can — Backstage with a plugin that reads the real repo, not aspirational YAML alone. Clear boundaries: who owns it, what’s in, what’s out, which queue talks to whom.</p><p><strong>Opinionated observability.</strong> Summary dashboard → drill-down. Alerts that point to the runbook in git, not “ask in the channel.” Alert fatigue isn’t just sensory noise — it’s pure cognitive load.</p><p><strong>GitOps or a single source of truth for config.</strong> If staging and prod diverge somewhere nobody documented, you exported complexity to the brain of whoever’s on call.</p><p><strong>Runbooks versioned next to the code.</strong> “Just ask on Slack” is an internal API with infinite SLA and hallucinated documentation.</p><p><strong>RFCs with an explicit question:</strong> how many mental models are we adding? Who pays that bill six months from now?</p><p>That’s not kindness. That’s engineering.</p><h3>Backstage — and the day the catalog lied</h3><p>Worth talking about Backstage, because it’s the most complete example the industry has of “let’s organize this mess.”</p><p>On paper, it solves half this article: system catalog, ownership, dependencies, links to Grafana, the repo, the runbook. One place. Source of truth. The dev stops rebuilding the mental map from scratch every on-call shift.</p><p>It works. When it works.</p><p>The problem is what happens when the catalog becomes a <strong>second source of truth</strong> — hand-typed metadata, a catalog-info.yaml someone forgot to update in the PR, one wrong word in a descriptor, an owner who changed teams but nobody touched the YAML.</p><p>On a normal day, nobody notices. Backstage shows a beautiful page. Confident. Lying.</p><p>On Black Friday — or that Friday 6pm deploy that shouldn’t have shipped but the manager said it was urgent — the mental map everyone trusted blows up. Because the catalog didn’t reflect the system. It reflected what someone <em>thought</em> the system was three sprints ago.</p><p>That’s not a Backstage failure. It’s a model failure: <strong>metadata as truth without enforcement</strong>.</p><p>I’ve done the other thing twice — a Backstage plugin that <strong>didn’t</strong> trust the pretty YAML. It mapped from code. Repo, pipeline, OpenAPI in the repo, whatever was actually there. Raw truth.</p><p>If the code was broken, the mapping broke with it. The catalog went red, or disappeared, or screamed in CI. Ugly. Honest.</p><p>Everyone knew <strong>before</strong> the pager, not after.</p><p>Metadata isn’t useless. Some things code doesn’t carry: business owner, criticality tier, SLA, incident channel link. That needs YAML or some explicit record.</p><p>But everything that <strong>already lives in code</strong> — service name, real dependencies, API contract, deploy target — shouldn’t be re-typed by a tired human on a Friday. Humans forget. Code doesn’t.</p><p>The complexity budget math is simple: a catalog that lies is <strong>cheap</strong> day to day and <strong>expensive</strong> during an incident. A code-derived catalog costs more upfront. It pays dividends later.</p><p>If you have Backstage and still depend on “remember to update catalog-info” — you didn’t buy a catalog. You bought Notion with a Spotify skin.</p><h3>The question missing from the RFC</h3><p>Before approving another service, ask it straight:</p><p><em>How many more bits of context does every dev on the team need to carry to avoid breaking production on a Friday?</em></p><p>If the answer is “oh, they’ll learn” — you don’t have architecture. You have a bet.</p><p>If the answer is “we document it” — show me where. In the repo. Linked from the alert. Versioned.</p><p>If the answer is “just one more small microservice” — count again. Small on the diagram, large in someone’s head.</p><h3>Closing</h3><p>Cloud scaled. Deploy scaled. Slack scaled.</p><p>Developer working memory — didn’t.</p><p>Treating microservices as zero cost to understand is the same category of mistake as treating an inconsistent API as an “implementation detail.” Except the bill shows up as burnout, long incidents, and good people leaving because “nobody here ever knows where anything comes from.”</p><p>A complexity budget doesn’t need to become a corporate framework tomorrow.</p><p>It needs to become an honest question at the next architecture meeting.</p><p>And if someone laughs — ask again. People who laugh usually aren’t on call.</p><h3>References</h3><ul><li>Mark et al. (2008) — The cost of interrupted work</li><li>Sweller — Cognitive Load Theory (overview)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cbf737b8aede" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Not Every Language Survives Vibe Coding]]></title>
            <link>https://medium.com/@samuelfabel/not-every-language-survives-vibe-coding-ccdd1f4527ae?source=rss-145df8d7e2bb------2</link>
            <guid isPermaLink="false">https://medium.com/p/ccdd1f4527ae</guid>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Samuel Fabel]]></dc:creator>
            <pubDate>Thu, 18 Jun 2026 15:43:25 GMT</pubDate>
            <atom:updated>2026-06-18T15:43:25.557Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="A dark cinematic highway at night, shot from low angle behind a speeding car. On the left side of the road: solid concrete guardrails, sharp and structured. On the right side: the road edge drops into an infinite dark void." src="https://cdn-images-1.medium.com/max/1024/1*wiCkTRh8qCXx1vlfFc9kGg.png" /></figure><p>For the first time in the history of programming, there’s a massive number of people building software without knowing how to code.</p><p>That’s not a criticism. It’s a fact — and, for the most part, a positive one. Knowing how to code, having good ideas, the ability to execute, and the money to turn something into reality don’t always come together. AI helps close some of those gaps.</p><p>The problem isn’t AI generating code. The problem is the illusion that, because it can, the technology choice no longer matters.</p><p>In practice, the opposite happened.</p><p>Over the past few months I’ve coded in Rust, Go, Python, Node.js, Java, C#, Terraform, Shell, and PowerShell using AI as support. A pattern showed up early:</p><p>The more freedom a language offers, the faster the code turns into a mess.</p><p>You ask for a feature, then another, then one more — and by the time you notice, there are three different ways to solve the same problem inside the same project. Duplicate dependencies. Massive files. Functions doing things they shouldn’t.</p><p>In some cases, the code doesn’t even run.</p><p>But this problem didn’t start with AI. Long before generative models became mainstream, it was already common to find npm packages with questionable quality — developers using libraries without reviewing the source code, poorly structured implementations being distributed and absorbed into third-party systems without any real quality control. AI accelerated something that already existed. It didn’t invent it.</p><p>Languages like Go, Rust, Java, and C# tend to behave differently in this scenario. Not because AI got smarter, and not because those communities are more mature. But because the language doesn’t let it do just anything.</p><p>The compiler complains. The type system complains. The community conventions complain.</p><p>The language becomes a guardrail.</p><p>And, curiously, guardrails help a lot when the one driving is an AI.</p><p>Python and JavaScript are excellent languages with massive ecosystems, and there’s nothing wrong with choosing them. But they tend to be the default when no stack is defined — and the same flexibility that makes them productive is what makes it easier to generate inconsistent code when there’s no adequate technical oversight.</p><p>The riskiest situation, though, is when that choice isn’t made at all. When you simply let the AI decide the stack. A decision that should weigh business requirements, long-term maintenance, and team context ends up being made based on immediate convenience and the most popular examples from training data.</p><p>If the goal is to validate an MVP, use what you know. Python, Node, whatever. But there’s a third situation that’s becoming more common: the person who doesn’t know any language and is building everything with AI.</p><p>In that case, starting with options that impose more constraints makes more sense. Because they limit the mistakes that will inevitably come up along the way.</p><p>The problem starts when the MVP succeeds.</p><p>That’s when the clients show up. The investors. The expectations. Experienced developers don’t appear overnight — and when the code has been accumulating problems from the start, the first impression for whoever walks in is usually bad. First impressions are rarely easy to fix, including for the developers who are supposed to fix them.</p><p>There’s a saying developers have been repeating for decades: there’s nothing more permanent than a temporary solution.</p><p>All technical debt has interest.</p><p>And the more permissive the language, the easier it is to take on that debt without noticing. It’s almost an inverse relationship: fewer guardrails, faster the interest starts to compound.</p><p>The old question was “which language is most productive for my team?” That made sense. There were developers writing code, reviewing code, debating architecture, making conscious decisions about the project’s trade-offs.</p><p>Today, it’s often a single person talking to an AI and accumulating hundreds of technical decisions without realizing it. The AI makes dozens of them every day — and when it loses context, unless you tell it otherwise, that context is gone forever.</p><p>So a new question emerged: “which language best limits the mistakes AI can make?”</p><p>But maybe it’s not even about the language.</p><p>Maybe the most important question is: who’s going to maintain this code two years from now?</p><p>Speed of construction doesn’t eliminate the need for a foundation. The faster you build up floors, the more the foundation matters. Software works the same way: features ship in hours, the codebase grows faster than understanding of it, and structural problems stay hidden until the business starts to scale.</p><p>A lot of AI-built projects look impressive in the first few weeks. The challenge shows up later — when the software needs to keep evolving. That’s when decisions made quickly, without clarity on the long-term consequences, start collecting their fee.</p><p>The real value isn’t in generating thousands of lines of code. It’s in making good decisions about which lines should exist at all.</p><p>Generating software got cheap.</p><p>Understanding software is still expensive.</p><p>For a long time, the hard part was building.</p><p>Now the hard part is sustaining.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ccdd1f4527ae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[College taught me to code. The industry doesn’t care about its standards.]]></title>
            <link>https://medium.com/@samuelfabel/college-taught-me-to-code-the-industry-doesnt-care-about-its-standards-8e2cb5dbe6a5?source=rss-145df8d7e2bb------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e2cb5dbe6a5</guid>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Samuel Fabel]]></dc:creator>
            <pubDate>Mon, 08 Jun 2026 03:37:58 GMT</pubDate>
            <atom:updated>2026-06-08T03:39:06.740Z</atom:updated>
            <content:encoded><![CDATA[<p><em>On the gap between what universities teach and the patterns that dominate software development today.</em></p><figure><img alt="Split image contrasting two environments. On the left, a university lecture hall with a UML class diagram on the chalkboard, soft academic lighting. On the right, a developer’s workstation at night with dense code on dark-themed monitors. A crumbling stone wall divides both sides, suggesting the gap between what is taught in college and what is actually practiced in the industry." src="https://cdn-images-1.medium.com/max/1024/1*yzxAf5m6aoxFZBZ8303-yw.png" /></figure><h4>The code works. Everything around it is the problem.</h4><p>You leave college knowing how to write code. Class diagrams, sequence diagrams, object-oriented programming, encapsulation. Everything neat, everything working in theory.</p><p>Then you hit the real market and find this:</p><pre>Company oCompany = new Company();<br>oCompany.Server     = &quot;YOUR_SERVER&quot;;<br>oCompany.CompanyDB  = &quot;DATABASE_NAME&quot;;<br>oCompany.UserName   = &quot;manager&quot;;<br>oCompany.Password   = &quot;your_password&quot;;<br><br>int connectResult = oCompany.Connect();<br><br>Documents oPurchaseOrder = (Documents)oCompany<br>    .GetBusinessObject(BoObjectTypes.oPurchaseOrders);<br><br>oPurchaseOrder.CardCode        = &quot;V10000&quot;;<br>oPurchaseOrder.DocDueDate      = DateTime.Today.AddDays(7);<br>oPurchaseOrder.Comments        = &quot;Created via .NET API&quot;;<br>oPurchaseOrder.Lines.ItemCode  = &quot;A00001&quot;;<br>oPurchaseOrder.Lines.Quantity  = 10;<br>oPurchaseOrder.Lines.Price     = 50.00;<br><br>int addResult = oPurchaseOrder.Add();</pre><p>That’s SAP Business One being integrated via DI API with .NET. A purchase order being created, pushed straight to the ERP, running in production at hundreds of companies right now as you read this.</p><p>The code works. It’s the closest thing to what school teaches — but almost every codebase you’ll encounter after this looks nothing like what they taught you.</p><p>Hardcoded credentials in the connection object. Mutable state spread across public properties. Zero separation of responsibility: connection setup, document assembly, and persistence all live in the same block. No interfaces, no abstraction, no real possibility of unit testing.</p><p>Submit this in an academic code review and it’s beautiful. Run it through SonarQube and it fails.</p><p>But if you don’t know how to write it this way, you can’t integrate with SAP.</p><h4><strong>The same order — the way the market expects it</strong></h4><p>Below is the same operation in C# using the patterns that show up in job listings: Controller, Guard, Validator, Mapper, Repository. Each component has one responsibility. None of them knows the others exist beyond what’s strictly necessary.</p><pre>public record CreateOrderRequest(<br>    string SupplierCode,<br>    DateTime DueDate,<br>    string Comments,<br>    List&lt;OrderLineRequest&gt; Lines<br>);<br><br>public record OrderLineRequest(<br>    string ItemCode,<br>    int Quantity,<br>    decimal Price<br>);</pre><pre>[ApiController]<br>[Route(&quot;api/orders&quot;)]<br>public class OrderController(IOrderService _service) : ControllerBase<br>{<br>    [HttpPost]<br>    public async Task&lt;IActionResult&gt; Create([FromBody] CreateOrderRequest request)<br>    {<br>        var id = await _service.CreateAsync(request);<br>        return CreatedAtAction(nameof(Create), new { id }, new { id });<br>    }<br>}</pre><pre>public class OrderGuard(ISupplierRepository _suppliers)<br>{<br>    public async Task ValidateAsync(CreateOrderRequest request)<br>    {<br>        var supplier = await _suppliers.FindByCodeAsync(request.SupplierCode);<br><br>        if (supplier is null)<br>            throw new NotFoundException(<br>                $&quot;Supplier {request.SupplierCode} not found.&quot;);<br>    }<br>}</pre><pre>public class OrderLineValidator<br>{<br>    public void Validate(List&lt;OrderLineRequest&gt; lines)<br>    {<br>        if (lines is null || lines.Count == 0)<br>            throw new ValidationException(<br>                &quot;The order must have at least one line.&quot;);<br><br>        foreach (var line in lines)<br>        {<br>            if (line.Quantity &lt;= 0)<br>                throw new ValidationException(<br>                    $&quot;Invalid quantity for item {line.ItemCode}.&quot;);<br>            if (line.Price &lt; 0)<br>                throw new ValidationException(<br>                    $&quot;Invalid price for item {line.ItemCode}.&quot;);<br>        }<br>    }<br>}</pre><pre>public class OrderService(OrderGuard _guard, OrderLineValidator _validator, IOrderRepository _repository) : IOrderService<br>{<br>    public async Task&lt;int&gt; CreateAsync(CreateOrderRequest request)<br>    {<br>        await _guard.ValidateAsync(request);<br>        _validator.Validate(request.Lines);<br><br>        var order = OrderMapper.ToEntity(request);<br>        return await _repository.SaveAsync(order);<br>    }<br>}</pre><pre>public static class OrderMapper<br>{<br>    public static Order ToEntity(CreateOrderRequest request) =&gt; new()<br>    {<br>        SupplierCode = request.SupplierCode,<br>        DueDate      = request.DueDate,<br>        Comments     = request.Comments,<br>        Lines        = request.Lines.Select(l =&gt; new OrderLine<br>        {<br>            ItemCode = l.ItemCode,<br>            Quantity = l.Quantity,<br>            Price    = l.Price<br>        }).ToList()<br>    };<br>}</pre><pre>public class OrderRepository(AppDbContext _context) : IOrderRepository<br>{<br>    public async Task&lt;int&gt; SaveAsync(Order order)<br>    {<br>        _context.Orders.Add(order);<br>        await _context.SaveChangesAsync();<br>        return order.Id;<br>    }<br>}</pre><blockquote><strong>Guard: </strong>checks whether the supplier exists before any business logic runs. If the supplier doesn’t exist, the request dies here.</blockquote><blockquote><strong>Validator: </strong>filters line by line before persisting. Zero quantity, negative price — all blocked before reaching the database.</blockquote><blockquote><strong>Mapper: </strong>transforms the DTO into an entity. The Repository never receives a CreateOrderRequest — it receives an already-mapped Order.</blockquote><blockquote><strong>Repository: </strong>persists without knowing the Guard exists. Each layer only knows the one directly below it.</blockquote><h4><strong>How to represent this — the class diagram of modern code</strong></h4><p>UML handles structure well. The class diagram below covers the code above. Interfaces, implementations, dependencies — all visible at a glance.</p><figure><img alt="UML class diagram of a purchase order API in C#. OrderController, OrderService, OrderGuard, OrderLineValidator, OrderMapper, and OrderRepository connected by dependency and implementation relationships. OrderService orchestrates all layers." src="https://cdn-images-1.medium.com/max/1024/1*hS-DkXK772BlLidJ_z-QQA.png" /></figure><p>What the class diagram shows clearly: which classes exist, which interfaces they implement, which dependencies each one carries. What it doesn’t show: where each validation happens in the call chain, which layer protects which, what changes shape when crossing a boundary. On top of that, it becomes a massive diagram to describe a simple CRUD operation.</p><h4><strong>A representation universities could actually teach</strong></h4><p>What if we thought of it as a castle? C4 does something similar today, but it’s too descriptive to be intuitive. A representation of concentric layers where each ring has a clear responsibility — and the geometry tells the story without needing text to explain it.</p><figure><img alt="Concentric layer architecture diagram for a purchase order API. OrderController wraps OrderService, which contains an OrderGuard checkpoint and OrderLineValidator. Arrows converge to OrderMapper, then OrderRepository at the core. SupplierRepository shown as an external satellite service." src="https://cdn-images-1.medium.com/max/1024/1*gAYR1YCueIz3nWJhvzHWjQ.png" /></figure><p>What the geometry communicates: the POST enters through the Controller’s gate. The DTO cart transports data across boundaries. The Guard and the Validator are checkpoints inside the Service — each operation passes through different checkpoints before reaching the Repository. The SupplierRepository sits outside the main castle as a satellite, and the dependency line pierces the wall exactly at the Service layer — the Repository never knows it exists.</p><p>That’s all in the geometry. No legend needed for anyone who understands the diagram.</p><h4><strong>What universities teach — and what the market wants</strong></h4><p>A study analyzing 300 real job listings and the curricula of 30 universities found the number that sums it all up: universities allocate 18% of their curriculum to programming languages and 12.8% to databases. In job descriptions, the most required skill is Software Architecture and Design, present in 88.68% of listings. (<a href="https://doi.org/10.1109/TSE.2020.3042">IEEE Transactions on Software Engineering, 2022</a>)</p><p>Universities teach syntax. The market hires people who can architect.</p><p>Systematic reviews published between 1995 and 2018, covering data from 12 countries, point out that university software engineering programs evolved from computer science courses and still maintain a strong focus on theoretical and mathematical foundations — creating a direct mismatch with the skills required in practice.</p><h4><strong>What job listings actually ask for</strong></h4><p>Data from IT Jobs Watch, which tracks contract job postings in the UK, makes this concrete. Microservices appears in 4.27% of all British contract listings — a 35% increase over two years. TDD appears in 2.13% of listings. CQRS, despite smaller absolute numbers, pays a median daily rate of £550 — above most more common patterns.</p><p><strong>Sources: </strong><a href="https://www.itjobswatch.co.uk/contracts/uk/microservices.do">Microservices</a> · <a href="https://www.itjobswatch.co.uk/contracts/uk/tdd.do">TDD</a> · <a href="https://www.itjobswatch.co.uk/contracts/uk/cqrs.do">CQRS</a> — IT Jobs Watch, 2025</p><p>On the other hand, patterns like Rich Domain Model, Anemic Domain Model, and Active Record rarely appear as explicit terms in job listings — not because the market doesn’t use them, but because they’ve become commodity. Developers apply them without naming them. Universities don’t even get to naming them.</p><p>There are languages where the coupling between data and operation is structural — not a choice. In the Stack Overflow Developer Survey 2024, C++ appears in 23% of developers and COBOL in 0.7%. (<a href="https://survey.stackoverflow.co/2024/technology">Source</a>) The rest — JavaScript, Python, Java, C# — operates in ecosystems where Repository Pattern, DDD, and layer separation aren’t architectural options. They’re the expected standard in job listings.</p><p>From the same survey: 66% of developers hold a university degree, but only 49% learned to code in college. Most of what they use at work was learned outside the classroom.</p><p><strong>The gap isn’t in the code. It’s in the context.</strong></p><p>SAP’s DI API was built on a different paradigm. It’s a COM wrapper around a system that has existed since the 1990s. It wasn’t designed to be testable or extensible. It was designed to work — and it does.</p><p>The developer who just graduated sees that code and thinks it’s wrong. The developer who has worked with SAP for five years doesn’t even question it anymore. Both are partially right — and neither was prepared for the conversation they’d need to have.</p><p>Knowing how to write clean code matters. Knowing how to recognize when you’re working within a constraint that isn’t yours to solve also matters. Confusing the two is what makes a junior dev rewrite a SAP integration using repository pattern and dependency injection, spending three weeks on it, only to find out the library wasn’t built for that.</p><p>Academia isn’t wrong to teach good practices. It’s wrong to teach them as if the world were a blank slate.</p><p>It almost never is.</p><h4><strong>References</strong></h4><p>Stack Overflow Developer Survey 2024 — <a href="https://survey.stackoverflow.co/2024/technology">https://survey.stackoverflow.co/2024/technology</a></p><p>IT Jobs Watch — Microservices UK contracts — <a href="https://itjobswatch.co.uk/contracts/uk/microservices.do">https://itjobswatch.co.uk/contracts/uk/microservices.do</a></p><p>IT Jobs Watch — TDD UK contracts — <a href="https://itjobswatch.co.uk/contracts/uk/tdd.do">https://itjobswatch.co.uk/contracts/uk/tdd.do</a></p><p>IT Jobs Watch — CQRS UK contracts — <a href="https://itjobswatch.co.uk/contracts/uk/cqrs.do">https://itjobswatch.co.uk/contracts/uk/cqrs.do</a></p><p>IEEE Transactions on Software Engineering (2022) — Skills gap between academia and industry — <a href="https://doi.org/10.1109/TSE.2020.3042">https://doi.org/10.1109/TSE.2020.3042</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e2cb5dbe6a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When cache hits the budget line — notes from a Rust project at BMS]]></title>
            <link>https://medium.com/@samuelfabel/when-cache-hits-the-budget-line-notes-from-a-rust-project-at-bms-9dbe828e44cc?source=rss-145df8d7e2bb------2</link>
            <guid isPermaLink="false">https://medium.com/p/9dbe828e44cc</guid>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[cache]]></category>
            <category><![CDATA[performance]]></category>
            <dc:creator><![CDATA[Samuel Fabel]]></dc:creator>
            <pubDate>Fri, 08 May 2026 02:29:01 GMT</pubDate>
            <atom:updated>2026-05-08T19:00:56.713Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Co-authors:</strong> João Paulo and Samuel Fabel</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9a99Xo5ifABE5FDUKHcohQ.png" /></figure><h3>1. Opening — the problem wasn’t “hacking something together”, it was surviving the spreadsheet</h3><p>This piece doesn’t start with a buzzword. It starts with a dull truth: <strong>money</strong>.</p><p>At BMS, a set of critical services — especially the <strong>bidder</strong> flow — It was supported by an expensive <strong>AWS stack</strong>: <strong>DynamoDB</strong>, <strong>Amazon DynamoDB Accelerator (DAX)</strong>, and <strong>Redis</strong>. The outcome was predictable for anyone who has watched a cloud bill scale without anesthesia: <strong>high monthly cost</strong>, squeezed budget, and an uncomfortable feeling that <strong>performance and elasticity</strong> had been bought <strong>without a ceiling</strong>.</p><p>We’re not here to demonize DynamoDB or Redis. They’re excellent tools in the right contexts. The point is different: <strong>for our access pattern, volume, and latency expectations</strong>, that combination became <strong>too dangerous a structure</strong> — financially and operationally.</p><p><strong>Engineering translation:</strong> when cache stops being “optimization” and becomes <strong>critical infrastructure</strong>, you pay three times — <strong>cognitive load</strong>, <strong>incident time</strong>, and <strong>the invoice</strong>.</p><h3>2. When João called</h3><p>João called me on a call. You could tell that cost <strong>really bothered him</strong> — not in the tone of coffee-break complaining, but in the tone of <strong>something outside your control</strong> that keeps dripping. I remember a silly detail that matters: he was <strong>standing</strong>. Not TED posture; <strong>physical urgency</strong> meeting <strong>verbal intent</strong>.</p><p>The message was straight: we needed a path to <strong>reduce cost</strong> without <strong>compromising SLA</strong>, and it wouldn’t come from yet another cosmetic query optimization.</p><h3>Where that number came from</h3><p>That kind of line item <strong>had been rising in context at BMS for a while</strong> — it just <strong>wasn’t top priority</strong> back then. What <strong>became critical</strong> was a <strong>new spike</strong> tied to a <strong>new tracker system</strong>: cost <strong>almost doubled</strong>. Suddenly “later” wasn’t an option.</p><p>The company had grown assuming <strong>Aerospike</strong>. Then an <strong>ugly</strong> problem surfaced — <strong>too late in the cycle</strong>: operating Aerospike, in our scenario, was <strong>painful</strong> for <strong>shipping deploys</strong>; we’re talking <strong>days</strong>, not hours. For a company at <strong>startup pace</strong>, when something breaks you need to <strong>turn fast</strong>. Deploy that’s too slow is <strong>risk</strong>, not a detail.</p><p>The <strong>expensive stack</strong> we later ran into — <strong>DynamoDB</strong>, <strong>DAX</strong>, <strong>Redis</strong> — wasn’t born from a calm architecture paper. It came from a <strong>last-minute decision</strong>: company <strong>already running</strong>, needing a <strong>viable substitute</strong> for a hole that opened in the road. Urgency solves short-term problems and <strong>charges interest</strong> in the medium term.</p><h3>How this landed on my plate</h3><p>Even <strong>before</strong> I stepped into <strong>Staff Engineer</strong>, I had already <strong>shown concern</strong> about this direction — I even <strong>exchanged emails</strong> <strong>offering</strong> to <strong>review the process</strong> and help straighten what we could. Shortly after I was <strong>promoted</strong>, and this topic landed on <strong>the list of challenges I’d face as Staff</strong> at BMS. The call with João wasn’t the first signal; it was the moment <strong>priority and urgency</strong> finally aligned.</p><p>A <strong>preliminary POC</strong> already existed — <strong>built by João himself</strong>: an idea of a <strong>gRPC API with Node.js</strong> for cache. He put me on this track <strong>to unload</strong> what, due to <strong>demand overload</strong>, <strong>he couldn’t carry alone</strong>. I got room to think about <strong>what to actually do</strong>, not just the first framework in autocomplete.</p><h3>3. Initial assumptions</h3><p>Before any PDF or other planning artifact for this, there was a set of constraints that looked like a checklist but was a <strong>contract</strong>:</p><figure><img alt="Table with columns Area and Assumption: target NVMe hardware, integration as package plus endpoint, LRU memory split, latency under 5 ms, functional cache API, TTL, multitenancy with product and domain, and data invariant for RAM and disk." src="https://cdn-images-1.medium.com/max/872/1*GLr_cGpSlpz0WWKo4DiL4A.png" /><figcaption><strong>Figure — Initial assumptions (table as image).</strong></figcaption></figure><p>Stated API inspiration: <a href="https://www.npmjs.com/package/node-cache"><strong>node-cache</strong></a> — familiarity beats adoption friction.</p><h3>4. The initial proposal — ambitious out of necessity, dangerous in scope</h3><p>After research and internal conversations, I documented a full <strong>initial proposal</strong> — internally nicknamed <strong>BMS Polar</strong> (yes, I bothered to find a nice name for a system in the middle of chaos): hot/cold, Cap’n Proto in the design, etc.</p><p>The <strong>first brief</strong> already floated <strong>persisting data to disk</strong> when it left RAM; <strong>RocksDB</strong> appeared early as <strong>“might make sense”</strong>, <strong>left to implementers</strong> — a <strong>hint</strong>, not a <strong>locked requirement</strong>. <strong>Rust</strong> and <strong>Cap’n Proto</strong> weren’t <strong>carved in stone</strong> on day one either; they <strong>solidified</strong> when the proposal <strong>grew</strong> and we had to <strong>pick</strong> language, protocol, and wire layout.</p><figure><img alt="Flowchart: business brief (cost, latency under 5 ms, product and domain), cache server with hot RAM LRU/TTL and cold disk KV linked together, consumers as Node APIs and Lambda in VPC; arrows from brief and consumers to the server, edge labeled TCP and framed Cap’n Proto." src="https://cdn-images-1.medium.com/max/691/1*YOL7uIIzGY1QkKpFCPxnYA.png" /><figcaption><strong>Initial proposal — business brief, cache server (hot/cold), and consumers (diagram).</strong></figcaption></figure><p>The pillars were reasonable:</p><ul><li><strong>Rust server</strong> + <strong>Tokio</strong>, <strong>hot LRU with TTL</strong>, <strong>cold</strong> on <strong>sled</strong> (alternative to RocksDB).</li><li><strong>Cap’n Proto contract</strong> as source of truth (cache.capnp), operations aligned with <strong>Redis-like</strong> use where it fits.</li><li><strong>Node client</strong> with API close to <strong>ioredis</strong>, <strong>connection pool</strong>, <strong>keep-alive</strong>, <strong>framing</strong> [4 bytes length][payload].</li><li><strong>Value serialization in Node</strong> with <strong>Avro</strong> as default (avsc), <strong>pluggable serializer</strong> (JSON, MessagePack…) to swap formats without rewriting the client.</li><li><strong>ORM integration / event-driven invalidation</strong> — around clear(product, domain) and the flow the app already had for data changes.</li><li><strong>Heavy observability</strong> — Prometheus-style metrics, <strong>CloudWatch</strong> publishing, dimensions per <strong>product/domain</strong>.</li></ul><p>All of that was <strong>coherent</strong>. It was also <strong>large</strong>. Too large for a situation where <strong>delivery delay</strong> was as dangerous as <strong>technical debt</strong>.</p><h3>5. The counter-proposal — “Done is better than perfect” isn’t a poster</h3><p>João was essential to <strong>stop me from decorating the project until it suffocated</strong>.</p><p>In the first version I already leaned toward <strong>pretty names</strong>, <strong>narrative scope</strong>, <strong>layers that look like slides</strong>: Kubernetes of the soul. He pulled the conversation to a phrase that’s cliché elsewhere and a <strong>cutting tool</strong> at BMS:</p><p><strong>Done is better than perfect.</strong></p><p>Translation without romance:</p><ul><li><strong>Budget</strong> was constrained in a way that <strong>didn’t allow auditorium architecture</strong>.</li><li><strong>Delay</strong> shipping something usable was <strong>organizational risk</strong> — <strong>jobs</strong> included. I’m not putting this here for melodrama; <strong>honest prioritization</strong> includes <strong>legitimate fear of the bill</strong>.</li><li>The counter-proposal wasn’t “drop Rust” or “drop Cap’n Proto”. It was <strong>reduce surface</strong>, <strong>ship first</strong>, <strong>measure always</strong>, <strong>don’t promise heavy ORM integration + full observability + automatic invalidation in the same sprint slice</strong>.</li></ul><p>That turned the project from <strong>cathedral</strong> to <strong>night market that actually opens</strong>.</p><h3>6. Technical decisions — where we bet and why</h3><h3>6.1 Rust in the core</h3><p><strong>Why:</strong> predictable latency, no GC on the server hot path, memory control aligned with the planned LRU.</p><p><strong>Cost:</strong> development time, ecosystem curve — <strong>worth it</strong> because the problem was <strong>structural</strong>, not a misplaced if.</p><h3>6.2 Cap’n Proto + TCP + framing</h3><p><strong>Why:</strong> binary, versionable contract, no HTTP/2 overhead “for free” on intra-VPC RPC.</p><p><strong>Reality check:</strong> Cap’n Proto doesn’t fix <strong>stupid granularity</strong> — if you build a <strong>chatty RPC</strong>, you die by <strong>round-trip</strong>, not by <strong>marshal</strong> cost on the wire.</p><h3>6.3 Hot/cold and LRU</h3><p><strong>Why:</strong> separate <strong>tail latency</strong> (RAM) from <strong>capacity</strong> (disk) without pretending disk is RAM.</p><p><strong>Mental matrix:</strong></p><figure><img alt="Quadrant chart titled Hot vs Cold: axes from low to high capacity and high to low latency; qualitative positions for Hot LRU (ideal hot region) and Cold KV (cold storage region); illustrative positions only." src="https://cdn-images-1.medium.com/max/516/1*2uslDG2KG9qsK4TP74J4mw.png" /><figcaption><strong>Hot vs cold quadrant matrix — Hot LRU and Cold KV positions (illustrative diagram).</strong></figcaption></figure><p><em>(Illustrative diagram — positions are qualitative.)</em></p><h3>6.3.1 Cold on disk — why redb</h3><p>Cold storage wasn’t picked casually: we weighed options in an <strong>internal review</strong> (sled in maintenance mode and unstable on-disk format; mature RocksDB but heavier C++ build; SQLite great for SQL, less natural for raw-byte KV). <strong>redb</strong> fit: <strong>native Rust API</strong>, <strong>stable format</strong>, <strong>ACID transactions</strong>, a fair trade-off between <strong>data safety</strong> and <strong>operational complexity</strong> versus what we had before on cold.</p><h3>6.4 Client as package + endpoint vs mega-lib</h3><p><strong>Why:</strong> standardize consumption as <strong>dependency + endpoint</strong>, not as a <strong>second framework</strong> inside every app.</p><p><strong>Trade-off:</strong> less automatic magic for <strong>faster adoption</strong>.</p><h3>6.5 Avro on paper vs Avro in real life</h3><p>In the initial proposal, Avro was the <strong>default</strong> thinking <strong>compact payload</strong> and binary contract — and <strong>alignment</strong> with patterns the team already used elsewhere.</p><p>In real life, <strong>Avro in Node</strong> pushes work to <strong>heap + GC</strong> (<strong>avsc</strong> is pragmatic, but physics wins). For heavy binary workloads, the symptom can even look like <strong>network</strong> — see section 8.</p><p><strong>Status:</strong> Avro didn’t stay viable as a happy-path <strong>payload</strong> format in Node for the goals we started prioritizing (GC, operations). What <strong>actually stuck</strong> in production was <strong>Protobuf</strong> at the application boundary — .proto contracts, <strong>protobufjs</strong> ecosystem, p tag on values sent to the server — without forcing the team into a <strong>code-generation ritual</strong> in the painful style of other stacks (see <strong>§8.1</strong>).</p><h3>7. Production ghosts — when “timeout” lies</h3><h3>7.1 The Lambda × EC2 case</h3><p>Classic story: <strong>Lambda in the VPC can’t reach a service on EC2 on the expected port</strong>. You review <strong>route tables</strong>, <strong>security groups</strong>, <strong>NACL</strong>, even Python scripts to correlate VPC/subnets.</p><p>Sometimes the packet <strong>never arrives</strong>. Sometimes it arrives <strong>too late</strong>.</p><p>In one episode we documented, the network <strong>looked</strong> guilty — until <strong>tcpdump</strong> and evidence shifted focus. <strong>GC in Node</strong> under load from buffers, conversions, and object churn can produce <strong>pauses</strong> that become <strong>timeouts</strong> on the client. The symptom looks like infrastructure; the cause is the <strong>runtime</strong>.</p><p><strong>Lesson:</strong> serious debugging isn’t linear. It’s <strong>hypothesis → evidence → layer change</strong>.</p><h3>7.2 Lambda vs ECS ↔ EC2 — the gap that still hurts</h3><p>Even with the “right” network, <strong>Lambda didn’t perform in the same ballpark</strong> as <strong>ECS ↔ EC2</strong> for the same usage pattern — in what we observed, roughly <strong>~10×</strong> slower in the compared scenario.</p><p>That’s no surprise if you’ve seen <strong>cold start</strong>, <strong>concurrency</strong>, <strong>ENI</strong>, <strong>conservative timeouts</strong>, and a <strong>badly reused client</strong> (creating a socket per invoke is silent suicide). It means <strong>serverless isn’t plug-and-play</strong> for <strong>persistent TCP</strong> cache without client discipline.</p><h3>8. GC, serialization, and the myth of the “magic format”</h3><p>From internal work on serialization and GC:</p><p>The problem often <strong>isn’t</strong> JSON vs Avro vs Protobuf <strong>on paper</strong>. It’s <strong>how many JS objects</strong> you create per request and <strong>how often</strong> the V8 world has to stop.</p><p>Typical painful flow:</p><pre>Buffer → decode → JS objects → logic → new objects → Buffer</pre><p>While decode becomes an <strong>object tree</strong>, <strong>GC is mandatory</strong>. FlatBuffers and similar help <strong>when you accept a rigid schema</strong> — which doesn’t always fit dynamic domains.</p><p><strong>Line worth the whole article:</strong></p><blockquote><em>The bottleneck stops being the wire protocol and becomes </em><strong><em>allocation in the runtime</em></strong><em>.</em></blockquote><h3>8.1 Protobuf in the payload — the turning point after Avro</h3><p><strong>RPC</strong> with the server stays <strong>Cap’n Proto over TCP</strong> (framing, low overhead in the VPC). What changed was <strong>what goes inside the value</strong>: instead of insisting on <strong>Avro</strong> in Node, we adopted <strong>Protobuf</strong> as the main domain serialization format — <strong>wire format</strong> aligned with the <strong>gRPC/Protobuf</strong> ecosystem the team already treats as <strong>mature reference</strong> (typing, tooling, market habit).</p><p>In practice, .proto files are <strong>versioned in the library</strong> and can be <strong>registered at runtime</strong> when needed — <strong>schema exists and is contract</strong>, but developers <strong>aren’t trapped</strong> in a “generate code or it doesn’t compile” pipeline in the painful style bad Avro experiences impose. The server tags encoding (p for protobuf, j for JSON, etc.) and cold persists it consistently.</p><p><strong>GC doesn’t vanish</strong> just because the wire is binary — but <strong>not every format weighs the same on V8</strong>. <strong>Apache Avro</strong> grew strong in <strong>Java</strong> / big data; in Node the usual path is <strong>avsc</strong>. In practice <strong>decode</strong> tends to build <strong>generic structures</strong> tied to schema/resolver — under load that becomes <strong>mountains of short-lived objects</strong> and GC takes center stage (the symptom even <strong>pretends</strong> to be network). <strong>protobufjs</strong> is a stack <strong>mature and aimed at real JavaScript/Node usage</strong> (patterns with <strong>gRPC</strong>, market habit, tooling). It still <strong>materializes messages</strong> in memory; for us the difference was <strong>predictability</strong> and <strong>less operational friction</strong> than the Avro path we had measured — more <strong>team alignment</strong> than “allocation-free magic”.</p><h3>9. Why Rust showed up on the client too</h3><p>Once <strong>Cap’n Proto</strong> was set for the wire, we still had to answer: <strong>how</strong> would the Node app speak it <strong>maintainably</strong>.</p><p>The first attempt was a <strong>Node-only library</strong> — TypeScript/JavaScript end to end. Obvious on paper; in practice the <strong>Cap’n Proto in JS</strong> ecosystem didn’t give us a <strong>solid</strong> path for the client we needed (RPC, framing, predictable performance) without <strong>constant manual work</strong> or <strong>weak</strong> paths.</p><p>The obvious plan B — <strong>massive code generation</strong> or files where you navigate <strong>numbers and generated structs</strong> until you lose your mind — wasn’t acceptable for a team that needs to <strong>evolve contracts</strong> without fear of opening the diff.</p><p>The way out was <strong>bring Rust to the client side</strong>: instead of a “plain” JS-only library, we ship a <strong>native package</strong> — same npm install, but underneath a compiled <strong>addon</strong> talking to Node via <strong>Node-API</strong>.</p><blockquote><strong><em>Node-API</em></strong><em> (</em><strong><em>N-API</em></strong><em>) is the </em><strong><em>stable</em></strong><em> interface Node.js provides for </em><strong><em>native addons</em></strong><em>: compiled code (C, C++, Rust…) loaded as a </em><em>.node module in </em><em>require(). It exists so addons aren’t tied to V8 internals every release — i.e. the </em><strong><em>official contract</em></strong><em> between the JavaScript runtime and </em><strong><em>native binary</em></strong><em>. In practice, tools like </em><strong><em>napi-rs</em></strong><em> use it to expose Rust to Node with less pain.</em></blockquote><p>So for a while there were <strong>two paths</strong> in parallel: keep a <strong>Cap’n Proto client in TS</strong> (TCP, framing, schema aligned with the server) and compare with the client that <strong>packages Rust</strong> via Node-API. In the internal benchmark: <strong>same server</strong>, same <strong>port</strong>, same <strong>framing</strong>, same <strong>schema</strong> (request_id, etc.) — <strong>connection pool</strong> and read/write <strong>pipeline</strong> where it made sense on both sides.</p><p>On the native client, <strong>request_id</strong> enables <strong>real pipelining</strong>: you <strong>don’t need to block</strong> a worker thread waiting for that RPC’s reply — responses arrive out of order and are <strong>correlated</strong> in the pending map. Together with <strong>round-robin pool</strong>, optional <strong>L1</strong> cache, and revisiting <strong>LRU/moka</strong> on the client, that bundle pulled us out of the “one synchronous call at a time” picture. On the server, Tokio startup uses <strong>available_parallelism</strong>, <strong>worker_threads</strong>, and a higher ceiling for <strong>max_blocking_threads</strong> so disk I/O doesn’t bottleneck — aligned with swapping <strong>LRU</strong> in the core and cold on <strong>redb</strong> (§6.3.1).</p><p>What <strong>still differentiated</strong> the <strong>Cap’n Proto TypeScript client</strong> from the <strong>Rust addon via Node-API</strong> wasn’t “Cap’n Proto is single-thread” as folklore — it was more mundane: <strong>copies</strong> between Buffer and Vec, <strong>spawn_blocking</strong> on the server vs cost of the loop on Node, and the need for real <strong>profiling</strong> (flamegraph) instead of guessing.</p><figure><img alt="Flowchart: Node.js application containing TypeScript Cap’n Proto client and Rust addon via Node-API; both connect to the Rust server with labels TCP framed and native same protocol." src="https://cdn-images-1.medium.com/max/652/1*iEYbwy-aNcFvCqR6DpUgSw.png" /><figcaption><strong>Node.js app with TS Cap’n Proto client and Rust Node-API addon both talking to the Rust server (diagram).</strong></figcaption></figure><h3>10. Data — internal benchmark (BMS Cache × Redis)</h3><p><strong>BMS Cache</strong> latencies are from the <strong>last run before delivery</strong>. <strong>Throughput</strong> in that column <strong>didn’t come from another report</strong>: it was <strong>derived from Mean</strong> using the usual single-thread closed-queue model — <strong>ops/s ≈ 1000 ÷ Mean_ms</strong> for single-key ops (SET, GET, DEL, QUERY); for <strong>MSET/MGET</strong> with a fixed batch of 100 keys, <strong>keys/s ≈ 100 000 ÷ Mean_ms</strong> (Mean = latency of <strong>one</strong> batch call). <strong>Redis</strong> in §10.3 uses the same derivation from <strong>Means</strong> of that earlier measurement (same harness).</p><h3>10.1 Suite configuration</h3><figure><img alt="Benchmark suite parameters: ten thousand iterations, one thousand warmup rounds, value size 256 bytes, batch size 100." src="https://cdn-images-1.medium.com/max/864/1*eV7r0Vx_846ZpgnJVNtZqg.png" /><figcaption><strong>Figure — Suite configuration.</strong></figcaption></figure><h3>10.2 Results — BMS Cache</h3><figure><img alt="BMS Cache benchmark results: operations SET through DEL with columns p50, p95, p99, mean latency in milliseconds, and derived throughput in operations or keys per second." src="https://cdn-images-1.medium.com/max/604/1*Sr-bbHBHYlFi8KHmUigFqA.png" /><figcaption><strong>Figure — BMS Cache results.</strong></figcaption></figure><blockquote>† Derived from Mean per the introductory paragraph of §10.</blockquote><h3>10.3 Results — Redis (earlier measurement)</h3><figure><img alt="Redis benchmark results under the same harness: operations SET through DEL with p50, p95, p99, mean latency, and derived throughput." src="https://cdn-images-1.medium.com/max/604/1*-WZLOsDCAqusjn6kCyhGFg.png" /><figcaption><strong>Figure — Redis results.</strong></figcaption></figure><h3>10.4 Memory observed (process — same suite, earlier measurement)</h3><figure><img alt="Memory usage snapshot for Global Cache and Redis: initial memory, final memory, and delta in megabytes." src="https://cdn-images-1.medium.com/max/684/1*BvXGdYv8fOnRT4rQJPnxlA.png" /><figcaption><strong>Figure — Memory snapshot.</strong></figcaption></figure><h3>10.5 Chart — p50 latency by operation (BMS Cache vs Redis)</h3><p>Values in <strong>ms</strong> — only operations with a <strong>pair in the same harness</strong> (no QUERY: no Redis equivalent measured).</p><figure><img alt="Bar chart comparing p50 latency in milliseconds for BMS Cache and Redis across operations SET, GET hot, GET miss, MSET batch 100, MGET batch 100, and DEL." src="https://cdn-images-1.medium.com/max/920/1*OvsxtC1HyrC54-uG8ZNWig.png" /><figcaption><strong>Figure — p50 latency (ms): BMS Cache vs Redis.</strong></figcaption></figure><h3>10.6 Chart — throughput (ops/s) — single-key ops + DEL</h3><p><em>Batch MSET/MGET are in §10.7 in </em><strong><em>keys/s</em></strong><em>; here only SET/GET/DEL in </em><strong><em>ops/s</em></strong><em> (derived from Mean).</em></p><figure><img alt="Bar chart comparing throughput in operations per second for BMS Cache and Redis for SET, GET hot, GET miss, and DEL." src="https://cdn-images-1.medium.com/max/920/1*OTghXOwWlynwA9xysoPvlQ.png" /><figcaption><strong>Figure — Throughput (ops/s), single-key + DEL: BMS Cache vs Redis.</strong></figcaption></figure><h3>10.7 Chart — batch throughput (100 keys, keys/s)</h3><figure><img alt="Bar chart comparing throughput in keys per second for MSET and MGET with batch size 100, BMS Cache versus Redis." src="https://cdn-images-1.medium.com/max/920/1*tEXemZ2Jo1CORFlhgU09hg.png" /><figcaption><strong>Figure — Throughput (keys/s), MSET and MGET batch=100.</strong></figcaption></figure><h3>10.8 Interpretation</h3><p>These numbers aren’t “win forever”. They’re <strong>evidence in a fixed benchmark scenario</strong> — value size, batch, warmup, machine, versions. Change any of those, the story changes.</p><p>What they <strong>prove</strong> is that we invested in <strong>repeatable measurement</strong> before <strong>LinkedIn discourse</strong>.</p><h3>11. Extra slice — percentiles on the same BMS benchmark</h3><p>Per-operation numbers are in <strong>§10.2</strong>. Here only the chart with <strong>three series</strong> (p50, p95, p99), including <strong>QUERY</strong>.</p><h3>11.1 Chart — p50 / p95 / p99 by operation (BMS Cache)</h3><figure><img alt="Grouped bar chart of BMS Cache only: p50, p95, and p99 latency in milliseconds for each operation including QUERY." src="https://cdn-images-1.medium.com/max/920/1*E7VKtk-o2jhS_7I9BnjsWw.png" /><figcaption><strong>Figure — BMS Cache: p50, p95, and p99 (ms) per operation.</strong></figcaption></figure><p><strong>Note:</strong> scales mix low sub-ms latencies with <strong>batch MSET</strong> in higher ms — for public decks, prefer <strong>two charts</strong> (single-key ops vs batch).</p><h3>12. Honest frontier — what we hardened and what still hurts</h3><p>Some lines from the initial proposal became <strong>closed decisions</strong>; others remain <strong>real pain</strong> in production.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*xy3I4MxwfusExavHer40KA.png" /><figcaption><strong>Figure — Honest frontier table (image).</strong></figcaption></figure><h3>13. Conclusion — done isn’t the end</h3><p>This project exists because <strong>cost</strong> made abstraction impossible. The first proposal was <strong>too good for the time we had</strong>. The counter-proposal saved the essentials: <strong>ship</strong>, <strong>measure</strong>, <strong>decide on data</strong>.</p><p>The figures here are <strong>reference</strong>, not <strong>trophy</strong>. What stays hard is mostly <strong>operational honesty</strong> — <strong>Lambda</strong>, <strong>instance matrix by region</strong>, and everything that doesn’t fit one chart.</p><p>If you read this far, you’ve probably paid a cloud bill that stings too. So close with this:</p><p><strong>Done is better than perfect</strong> — but <strong>done without metrics</strong> is just opinion with CI.</p><p><strong>Next piece (planned):</strong> a <strong>second article</strong> focused on <strong>observability</strong> — how we wired <strong>Prometheus</strong>, <strong>Apdex</strong>, <strong>CloudWatch</strong>, metrics JSON, <strong>replication</strong>, and admin into what runs in production — closing the loop between <strong>benchmark</strong> and <strong>the bill that doesn’t lie</strong>.</p><h3>License of honesty</h3><p>I’m responsible for what I wrote here; I’m <strong>co-responsible</strong> for what we measured wrong or failed to measure. Well-grounded technical critique is welcome — that’s how cache stops being faith.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9dbe828e44cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI Works Great for Neurodivergent Brains. Which Is Why You Should Be Careful.]]></title>
            <link>https://medium.com/@samuelfabel/ai-works-great-for-neurodivergent-brains-which-is-why-you-should-be-careful-fc2d175e6507?source=rss-145df8d7e2bb------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc2d175e6507</guid>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[neuroscience]]></category>
            <dc:creator><![CDATA[Samuel Fabel]]></dc:creator>
            <pubDate>Thu, 30 Apr 2026 20:53:40 GMT</pubDate>
            <atom:updated>2026-04-30T20:53:40.789Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="A person sits at a glowing screen in a dimly lit, chaotic room — sticky notes, stacked papers, multiple open tabs. The screen light is warm and inviting, a chat interface visible. Outside the window, the city is cold, sharp, and overwhelming. The contrast between the comfort inside and the complexity outside is deliberate." src="https://cdn-images-1.medium.com/max/1024/1*nJeXRW-pWquFxLJQ6S1fLQ.png" /></figure><p>It seemed like a simple story. Seemed.</p><p>The logic was obvious: if you already live in chaos, if your brain works differently from the default, and a tool shows up that responds fast, doesn’t judge you, doesn’t get tired, doesn’t lose the thread — why not let it carry the weight?</p><p>It’s a seductive proposition. Dangerously seductive.</p><h4>The Invisible Problem</h4><p>In 2015, researchers interviewed neurodiverse workers in the tech industry. What came up wasn’t surprising to anyone who lives it: difficulty with ambiguity, meetings that drain you, notifications that fragment focus, office politics that feel like a game with no manual.</p><p>People who already pay a cognitive surcharge just to function in a standard environment.</p><p>Now add AI to that equation.</p><p>In 2023, a study tested ChatGPT as a clinical recommendation tool for ADHD — comparing it against established medical guidelines. The result? The model landed in the middle of the ranking. Useful enough to beat randomness. Below the best available standard. With the highest variability of all evaluated sources.</p><p>Read that again: <strong>high variability isn’t personalization. It’s inconsistency.</strong></p><h4>The Physics of Context</h4><p>I’m not saying neurodivergence is vulnerability: I’m saying something more boring and more useful.</p><p>When you already struggle to filter noise, when you already carry accumulated decision fatigue, when processing ambiguity has a high cost — a tool that sounds confident all the time isn’t automatic relief. It’s an amplifier. It amplifies clarity if it’s well-anchored. It amplifies noise if it isn’t.</p><p>And the problem is that it always sounds confident. Even when it’s wrong.</p><h4>Comprehension Debt — But for Your Life</h4><p>There’s a concept called <em>comprehension debt</em>: when code looks healthy on the outside — green tests, clean documentation — but underneath it’s a pile of workarounds nobody mapped. I wrote about that <a href="https://medium.com/p/681f0b2e36d4">here</a>. With neurodivergence and AI, the metaphor is the same — except the system accumulating debt isn’t the repository. It’s you.</p><p>You ask for help prioritizing. The AI responds with a confident, organized list. You don’t question it because questioning is exactly what you don’t have the energy for right now. The list looks right. It might not be.</p><p>You ask it to interpret a social situation that left you confused. The AI interprets it. Fluently. You have no way of knowing what it doesn’t know about your context.</p><h4>The Enthusiasm Is Real. So Is the Risk.</h4><p>Neurodivergent people aren’t on the periphery of the AI revolution. Quite the opposite — they’re overrepresented in tech, and they’re exactly the audience most likely to get excited about tools that promise fluency where it always hurt.</p><p>That’s not weakness. It’s a logical response to real relief.</p><p>But real relief with partial guarantee is exactly the scenario where caution needs to go up, not down. Not out of paternalism. Out of mechanics.</p><p>The clinical study on ADHD showed that ChatGPT beat randomness and fell below the best available standard — with high variability. For someone who already struggles to calibrate what’s reliable, that’s not a technical detail. It’s the central problem.</p><h4>What I Would Do Differently</h4><p><strong>1. Treat “personalization” as a hypothesis, not a fact</strong> When AI says it understands your case, ask: based on what? It doesn’t have your history, your context, your yesterday.</p><p><strong>2. Protect important decisions from fast answers</strong> Response speed isn’t the same as response quality. They frequently move in opposite directions.</p><p><strong>3. Don’t use AI to interpret situations where context matters more than text</strong> Social situations, conflicts, emotionally loaded decisions — the AI will respond fluently. Fluency isn’t comprehension.</p><p><strong>4. Separate short-term relief from long-term accuracy</strong> They’re different things. Frequently opposite things. The relief is real. So is the bill.</p><p><strong>5. Assume the map gets outdated</strong> Models change, your context changes, your needs change. What doesn’t change is the need to verify — not to trust just because it worked before.</p><h4>The Metaphor That Stays</h4><p>AI can be a fast interpreter. But a wrong interpretation in an important decision isn’t an aesthetic cost. It’s a real one.</p><p><strong>The point isn’t “less AI.”</strong></p><p>The point is: for anyone who already pays a surcharge just to function — enthusiasm without discipline becomes risk. And risk, here, isn’t opinion. It’s the gap between high variability and the decision that mattered.</p><h4>References</h4><ol><li>Morris, M. R., Begel, A., &amp; Wiedermann, B. (2015). <em>Understanding the Challenges Faced by Neurodiverse Software Engineering Employees: Towards a More Inclusive and Productive Technical Workforce.</em> ASSETS ’15. <a href="https://doi.org/10.1145/2700648.2809841">https://doi.org/10.1145/2700648.2809841</a></li><li>Ramírez, D. et al. (2023). <em>Could ChatGPT compete with clinical practice guidelines in formulating useful treatment recommendations for attention deficit hyperactivity disorder?</em> Neuroscience Applied. <a href="https://doi.org/10.1016/j.nsa.2023.102850">https://doi.org/10.1016/j.nsa.2023.102850</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc2d175e6507" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTML5 solved accessibility — but users are still struggling]]></title>
            <link>https://medium.com/@samuelfabel/html5-solved-accessibility-but-users-are-still-struggling-4aa8ed8b6fbd?source=rss-145df8d7e2bb------2</link>
            <guid isPermaLink="false">https://medium.com/p/4aa8ed8b6fbd</guid>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Samuel Fabel]]></dc:creator>
            <pubDate>Mon, 20 Apr 2026 01:02:24 GMT</pubDate>
            <atom:updated>2026-04-20T01:02:24.013Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Comparison between a cluttered, high-stimulus user interface that increases cognitive load and a clean, structured interface that supports focus, clarity, and efficient task completion, illustrating the impact of cognitive accessibility in software design." src="https://cdn-images-1.medium.com/max/1024/1*a0YK-hMc_-9A6reFh08pqA.png" /></figure><p>In the previous article, I argued that most accessibility issues on the web are not caused by a lack of technology, but by poor engineering practices. HTML5 already solves a significant portion of physical accessibility problems — yet most systems still fail to use it correctly.</p><p>But there is a deeper layer.</p><p>Even if we fixed 100% of physical accessibility issues today, many users would still struggle to use digital systems efficiently.</p><p>Because accessibility is not only physical.</p><p>It is cognitive.</p><h3>The missing layer: cognitive accessibility</h3><p>Traditional accessibility standards, such as WCAG, focus primarily on physical limitations — vision, hearing, and motor impairments <a href="#1643">[1]</a>. While these are critical, they do not fully address how users process information.</p><p>Cognitive accessibility refers to how systems align with human capabilities such as:</p><ul><li>attention</li><li>memory</li><li>processing speed</li><li>decision-making</li></ul><p>This is particularly relevant for neurodivergent users, including individuals with ADHD and autism, but it also impacts the general population under conditions of stress, fatigue, or multitasking.</p><p>From an engineering perspective, this is not a niche concern. It is a scalability issue of human cognition.</p><h3>Cognitive load as a system constraint</h3><p>In software engineering, we measure latency, throughput, and error rates. However, we rarely measure <strong>cognitive load</strong>, even though it directly affects user performance.</p><p>Cognitive load theory suggests that human working memory is limited, and systems that exceed this capacity lead to degraded performance <a href="#3900">[2]</a>.</p><p>In practical terms, this results in:</p><ul><li>increased task completion time</li><li>higher error rates</li><li>more task abandonment</li></ul><p>These are not UX “nice-to-haves”. They are measurable system inefficiencies.</p><h3>Evidence: digital environments increase cognitive load</h3><p>Empirical studies show that modern digital interfaces frequently introduce unnecessary cognitive burden.</p><p>Research on ADHD and digital interaction indicates that environments with high stimulus density — such as multiple notifications, competing UI elements, and asynchronous interactions — significantly reduce focus and task completion efficiency <a href="#d375">[3]</a>.</p><p>Even for neurotypical users, similar patterns emerge under cognitive stress.</p><p>This means that many systems are not only inaccessible — they are inefficient by design.</p><h3>The modern UI problem: too much, all the time</h3><p>Current interface design trends tend to prioritize engagement over clarity:</p><ul><li>constant notifications</li><li>infinite scrolling</li><li>multiple interaction paths</li><li>dense information layouts</li></ul><p>From a business perspective, these patterns aim to increase interaction. From a cognitive perspective, they fragment attention.</p><p>This creates a paradox: systems optimized for engagement often degrade task performance.</p><h3>The most common cognitive failures in software</h3><p>Just like physical accessibility has recurring issues, cognitive accessibility failures also follow patterns.</p><h4>1. Overloaded interfaces</h4><p>Too many elements competing for attention increase decision fatigue and slow down task execution.</p><h4>2. Lack of prioritization</h4><p>When everything is visually prominent, nothing is. Users must manually decide what matters.</p><h4>3. Interrupt-driven design</h4><p>Frequent notifications and context switches disrupt working memory and reduce task continuity.</p><h4>4. Ambiguous interactions</h4><p>Unclear labels, hidden actions, and inconsistent flows increase cognitive effort and error rates.</p><h4>5. Time pressure</h4><p>Systems that assume immediate responses penalize users who require more processing time.</p><h3>Why this is still ignored</h3><p>Cognitive accessibility is harder to detect than physical accessibility.</p><p>Automated tools can identify missing alt attributes or contrast issues. They cannot easily measure:</p><ul><li>mental effort</li><li>attention fragmentation</li><li>decision complexity</li></ul><p>As a result, cognitive problems are often invisible in standard development workflows.</p><p>Additionally, most teams do not have metrics or tooling to quantify cognitive load, which makes it difficult to prioritize.</p><h3>The cost of ignoring cognition</h3><p>The impact of cognitive overload is not theoretical. It directly affects system performance.</p><p>From a product perspective:</p><ul><li>increased user errors</li><li>longer task completion times</li><li>reduced conversion rates</li><li>higher abandonment</li></ul><p>From an engineering perspective:</p><ul><li>more support tickets</li><li>more retries and failed flows</li><li>lower system efficiency at scale</li></ul><p>These are measurable outcomes, even if the root cause is not explicitly tracked.</p><h3>Toward adaptive systems</h3><p>If cognitive load varies between users, then static interfaces are inherently limited.</p><p>The next step is not just building accessible systems — it is building <strong>adaptive systems</strong>.</p><p>Systems that can:</p><ul><li>reduce stimulus when overload is detected</li><li>adjust interaction complexity</li><li>provide contextual assistance</li><li>allow different pacing models</li></ul><p>This is where software starts to move beyond accessibility and into <strong>human-aware engineering</strong>.</p><h3>What needs to change</h3><p>If we take cognitive accessibility seriously, it must become part of the engineering model.</p><p>This includes:</p><ul><li>treating cognitive load as a measurable constraint</li><li>designing for focus, not just interaction</li><li>reducing unnecessary complexity</li><li>incorporating assistive behavior into the system itself</li></ul><p>This is not about removing features. It is about aligning systems with human capabilities.</p><h3>Conclusion</h3><p>Fixing HTML and following accessibility standards is necessary.</p><p>But it is not sufficient.</p><p>Because even perfectly structured systems can still fail if they overload the user’s ability to process information.</p><p>The next challenge is not just making systems accessible.</p><p>It is making them usable under real cognitive conditions.</p><h3>References (APA)</h3><p>[1] World Wide Web Consortium (W3C). (2018). <em>Web Content Accessibility Guidelines (WCAG) 2.1</em>. <a href="https://www.w3.org/TR/WCAG21/">https://www.w3.org/TR/WCAG21/</a></p><p>[2] Sweller, J. (1988). <em>Cognitive load during problem solving: Effects on learning</em>. Cognitive Science, 12(2), 257–285.</p><p>[3] Barkley, R. A. (2015). <em>Attention-deficit hyperactivity disorder: A handbook for diagnosis and treatment</em>. Guilford Press.</p><p>[4] Interaction Design Foundation. (2020). <em>Cognitive Load Theory in UX Design</em>. <a href="https://www.interaction-design.org/">https://www.interaction-design.org/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4aa8ed8b6fbd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTML5 already solves accessibility — so why is nobody using it properly?]]></title>
            <link>https://medium.com/@samuelfabel/html5-already-solves-accessibility-so-why-is-nobody-using-it-properly-e08bea870b58?source=rss-145df8d7e2bb------2</link>
            <guid isPermaLink="false">https://medium.com/p/e08bea870b58</guid>
            <category><![CDATA[html5]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[accessibility]]></category>
            <dc:creator><![CDATA[Samuel Fabel]]></dc:creator>
            <pubDate>Wed, 15 Apr 2026 14:10:11 GMT</pubDate>
            <atom:updated>2026-04-15T14:10:11.316Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Illustration of a web interface with highlighted HTML5 code, contrasting good and bad accessibility practices, emphasizing semantic structure, correct tag usage, and elements such as buttons, forms, and alt attributes." src="https://cdn-images-1.medium.com/max/1024/1*Jnw5mW4V5akh1NicIq1Qmw.png" /></figure><p>Despite more than two decades of web evolution and the consolidation of standards such as HTML5 and WCAG, digital accessibility still fails at a fundamental level. This is not a subjective perception. Empirical data consistently shows that most web systems remain inaccessible — even when the solutions are already built into the platform itself.</p><p>The annual report from WebAIM, known as the <em>WebAIM Million</em>, analyzed millions of homepages and found that more than <strong>96% contain detectable accessibility issues</strong> <a href="#cc43">[1]</a>. On average, each page has around <strong>50 errors</strong>, most of them related to basic problems such as missing alternative text, poor color contrast, and lack of proper semantic structure <a href="#cc43">[1]</a>.</p><p>The key point here is not the absence of tools or standards. The underlying technology already solves a significant portion of these problems — it is simply not being used correctly.</p><h3>Accessibility is not treated as an engineering concern</h3><p>In many teams, accessibility is still approached as a validation step, often performed late in the development cycle and frequently delegated to automated tools or one-off audits. It is rarely treated as an engineering requirement from the beginning.</p><p>This leads to a predictable pattern: by the time issues are identified, the cost of fixing them is already high, the architecture is already defined, and priorities have shifted to other deliverables. Accessibility ends up competing with functional backlog — and it almost always loses.</p><p>From an engineering perspective, this is equivalent to treating security or performance as a post-production concern. It does not work <a href="#6195">[5]</a>.</p><h3>Empirical evidence: the same mistakes repeated</h3><p>The WebAIM data has remained consistent over the years and reveals a clear pattern of recurring failures <a href="#cc43">[1]</a>. The most common issues include:</p><ul><li><strong>Low color contrast</strong>, affecting readability and visual perception</li><li><strong>Images without </strong><strong>alt attributes</strong>, making them inaccessible to screen readers</li><li><strong>Form inputs without associated labels</strong>, breaking assistive navigation</li><li><strong>Lack of semantic structure</strong>, often replaced by generic elements</li></ul><p>These problems do not require complex solutions. In most cases, they exist because HTML is used incorrectly or incompletely <a href="#da1f">[3]</a>.</p><h3>HTML5 already solves the basics — when used correctly</h3><p>HTML5 introduced a set of semantic and behavioral elements that significantly reduce the need for additional accessibility layers <a href="#da1f">[3]</a>. In practice, however, these features are often ignored or replaced by abstractions that strip away semantic meaning.</p><p>Consider the misuse of interactive elements:</p><pre>&lt;div onclick=&quot;submitForm()&quot;&gt;Submit&lt;/div&gt;</pre><p>This pattern breaks keyboard navigation, does not expose intent, and requires manual behavior implementation. In contrast:</p><pre>&lt;button type=&quot;submit&quot;&gt;Submit&lt;/button&gt;</pre><p>Here, the browser provides built-in support for focus, keyboard interaction, and integration with assistive technologies <a href="#da1f">[3]</a>. The difference is not just syntactic — it is structural.</p><p>The same applies to forms:</p><pre>&lt;input type=&quot;text&quot;&gt;</pre><p>Without semantic context, this input is effectively invisible to screen readers. With explicit association:</p><pre>&lt;label for=&quot;email&quot;&gt;Email&lt;/label&gt;<br>&lt;input id=&quot;email&quot; type=&quot;email&quot;&gt;</pre><p>there is a clear transfer of meaning, improving both accessibility and usability.</p><p>Another common issue is images without descriptions:</p><pre>&lt;img src=&quot;banner.jpg&quot;&gt;</pre><p>Versus:</p><pre>&lt;img src=&quot;banner.jpg&quot; alt=&quot;Summer promotion with 30% discount&quot;&gt;</pre><p>In this case, the alt attribute is not optional — it is a fundamental part of the interface’s communication <a href="#9084">[2]</a>.</p><h3>Semantic structure is not aesthetic — it is infrastructure</h3><p>The introduction of elements such as &lt;header&gt;, &lt;main&gt;, &lt;nav&gt;, &lt;article&gt;, and &lt;footer&gt; was not a cosmetic change. These elements carry structural meaning that is consumed by screen readers, search engines, and assistive navigation systems <a href="#9084">[2]</a><a href="#da1f">[3]</a>.</p><p>A page built entirely with &lt;div&gt; elements loses this layer of information. The impact is not limited to accessibility — it also affects how the interface can be interpreted programmatically.</p><pre>&lt;header&gt;<br>  &lt;nav&gt;...&lt;/nav&gt;<br>&lt;/header&gt;<br><br>&lt;main&gt;<br>  &lt;article&gt;<br>    &lt;h1&gt;Title&lt;/h1&gt;<br>    &lt;p&gt;Content&lt;/p&gt;<br>  &lt;/article&gt;<br>&lt;/main&gt;<br>&lt;footer&gt;<br>  ...<br>&lt;/footer&gt;</pre><p>This structure clearly communicates hierarchy, purpose, and reading flow.</p><h3>Why does this still happen?</h3><p>Even with mature technical support, the low adoption of accessible practices can be explained by structural issues in the development process.</p><p>First, delivery pressure prioritizes speed over structural quality. Second, heavy reliance on frameworks abstracts away the underlying HTML, leading to poor or incorrect semantic decisions. Third, accessibility is rarely included in quality metrics, which reduces its visibility in decision-making processes <a href="#104a">[6]</a>.</p><p>Finally, there is a lack of ownership. When no one is explicitly responsible for a problem, it tends to persist.</p><h3>The real cost: not just technical</h3><p>Ignoring accessibility has direct consequences beyond user experience. There are operational, financial, and legal impacts.</p><p>From a product perspective:</p><ul><li>increased interaction errors</li><li>reduced conversion rates</li><li>higher support dependency</li></ul><p>From a legal standpoint, there are well-documented precedents. One of the most notable cases involves Domino’s Pizza, where the company was sued for failing to provide accessible digital ordering for visually impaired users. The case reached the Supreme Court of the United States, which allowed the lawsuit to proceed, reinforcing the applicability of accessibility regulations to digital platforms <a href="#1370">[7]</a>.</p><p>Another example is the case against Target, which resulted in a multi-million dollar settlement after claims that its website was not usable by visually impaired users <a href="#104a">[6]</a>.</p><p>These cases demonstrate that accessibility is not only a matter of best practice — it is also a matter of compliance.</p><h3>What needs to change</h3><p>If accessibility is treated as an engineering concern, it must be integrated into the development workflow explicitly. This includes validation in code reviews, the use of linting tools, automated testing, and incorporating accessibility criteria into the definition of done.</p><p>This is not about adding complexity to the process — it is about avoiding the creation of known problems.</p><h3>Conclusion</h3><p>The web is not inaccessible because we lack technology.</p><p>It is inaccessible because we ignore what already exists.</p><p>HTML5 already solves a significant portion of the most common accessibility issues — when used correctly. The challenge is not technical. It is a matter of engineering discipline.</p><p>And even if we solved physical accessibility entirely, there would still be a deeper layer related to how different users process information. But that is a discussion for another article.</p><h3>References (APA)</h3><p>[1] WebAIM. (2024). <em>The WebAIM Million: The 2024 report on the accessibility of the top 1,000,000 home pages</em>. <a href="https://webaim.org/projects/million/">https://webaim.org/projects/million/</a></p><p>[2] World Wide Web Consortium (W3C). (2018). <em>Web Content Accessibility Guidelines (WCAG) 2.1</em>. <a href="https://www.w3.org/TR/WCAG21/">https://www.w3.org/TR/WCAG21/</a></p><p>[3] World Wide Web Consortium (W3C). (2014). <em>HTML5: A vocabulary and associated APIs for HTML and XHTML</em>. <a href="https://www.w3.org/TR/html5/">https://www.w3.org/TR/html5/</a></p><p>[4] Google. (2023). <em>Lighthouse accessibility audits</em>. <a href="https://developer.chrome.com/docs/lighthouse/accessibility/">https://developer.chrome.com/docs/lighthouse/accessibility/</a></p><p>[5] Lazar, J., Goldstein, D. F., &amp; Taylor, A. (2015). <em>Ensuring digital accessibility through process and policy</em>. Morgan Kaufmann.</p><p>[6] National Federation of the Blind v. Target Corp. (2006). Settlement agreement.</p><p>[7] Robles v. Domino’s Pizza, LLC. (2019). U.S. Supreme Court decision.</p><p>[8] Deque Systems. (2023). <em>axe DevTools documentation</em>. <a href="https://www.deque.com/axe/">https://www.deque.com/axe/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e08bea870b58" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The GPS That Won’t Stop Recalculating: What I Learned From Trusting AI Too Much in Software…]]></title>
            <link>https://medium.com/@samuelfabel/the-gps-that-wont-stop-recalculating-what-i-learned-from-trusting-ai-too-much-in-software-681f0b2e36d4?source=rss-145df8d7e2bb------2</link>
            <guid isPermaLink="false">https://medium.com/p/681f0b2e36d4</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Samuel Fabel]]></dc:creator>
            <pubDate>Mon, 13 Apr 2026 22:15:05 GMT</pubDate>
            <atom:updated>2026-04-15T14:14:32.575Z</atom:updated>
            <content:encoded><![CDATA[<h3>The GPS That Won’t Stop Recalculating: What I Learned From Trusting AI Too Much in Software Development</h3><figure><img alt="A car driving a complex, glowing orange route through a neon-lit city, bypassing a straight green dotted path." src="https://cdn-images-1.medium.com/max/1024/1*r8uq_fzOncL27Oj0TNi5NQ.png" /><figcaption>A car driving a complex, glowing orange route through a neon-lit city, bypassing a straight green dotted path.</figcaption></figure><p>I started a project that seemed simple. Seemed.</p><p>The stack was familiar, the scope was clear in my head, and I had an AI-powered IDE at my fingertips. The logic was obvious: why spend hours writing detailed specifications, manually breaking down tasks, and reviewing every line of code when I could structure the workflow to leverage what AI does best?</p><p>I structured the workflow to make the most of AI’s strengths: I generated the tickets based on the defined scope, used the specifications as a starting point for implementations, and kept my focus on architectural decisions and integration points. Code review was concentrated on build errors and the most obvious logic problems — which, in theory, is exactly how it should work. And the project grew. Fast, organized, beautiful.</p><p>On the surface, it was flawless. Rich documentation, working Swagger UI, CI/CD pipeline running, unit tests passing. The kind of project you’d demo without hesitation.</p><p>In QA, everything fell apart.</p><h4>The Invisible Problem</h4><p>The pieces I had built across different sessions didn’t fit together. The AI had spent the entire project building workarounds — local solutions designed to work within the context window of each interaction, without needing to hold the entire project in memory.</p><p>The concept I had defined by hand was being silently distorted with each iteration. When I asked it to fix things, the AI didn’t return to my original intent. It rerouted toward the destination it had already committed to, following the logic it had accumulated along the way.</p><p>That’s when the perfect metaphor came to me.</p><p>It’s exactly what happens when you take a detour without updating your GPS. You know you’re going a different way. The GPS does not. At every corner, it tells you to make a U-turn and return to the original route. It isn’t confused — it’s perfectly consistent. It just has a different map than you do.</p><p>The project shipped two weeks late. What should have been an accelerator became a brake.</p><h4>I’m Not Alone</h4><p>I could have spent time blaming myself for trusting too much. But when I started researching the topic, I found something revealing: what happened to me was not the exception.</p><p>In July 2025, the organization METR published a randomized controlled trial — the most rigorous type of research — with 16 experienced developers working on real open-source projects. The result was surprising even to the participants themselves: before starting, developers forecast that AI would reduce task completion time by 24%. After finishing, they still estimated AI had made them 20% faster. In practice, AI actually increased completion time by 19%. <a href="https://arxiv.org/abs/2507.09089">arXiv</a></p><figure><img alt="Comparative graph between predictions and reality regarding the impact of AI on productivity. Four green dots show that experts (Economics and ML) and developers predicted a reduction in time between -20% and -40%. In contrast, a red dot highlights the “Observed Result,” revealing a real increase of +19% in time spent, invalidating the initial efficiency expectations." src="https://cdn-images-1.medium.com/max/985/1*TBZ9NLanpvnIZ5i8ailhBw.png" /></figure><p>Read that again: they thought they were faster. They were slower.</p><p>The study identified a gap between perception and reality of nearly 40 percentage points — from an actual -19% to a perceived +20%. This raises a serious question: subjective productivity assessments in the AI era may be fundamentally unreliable without objective measurements. <a href="https://www.cerbos.dev/blog/productivity-paradox-of-ai-coding-assistants">Cerbos</a></p><p>This phenomenon even has a neuroscientific explanation. Security researcher Marcus Hutchins described it well: LLMs hijack the human brain’s reward system. <a href="https://www.cerbos.dev/blog/productivity-paradox-of-ai-coding-assistants">Cerbos</a> The feeling of progress — watching code appear on screen, tests passing, documentation forming — triggers the same dopamine response as actually moving forward. Even when you’re technically moving backward.</p><h4>The Problem Isn’t the Tool. It’s the Physics of It.</h4><p>I need to be direct about something: the IDE I used is not to blame. No tool is. The problem is structural, and it exists in any AI assistant you use today.</p><p>LLMs are, at their core, probabilistic engines, not architects. They predict the next token based on training data, favoring local coherence over global system integrity. They don’t “know” your entire codebase; they only know the context window you provide. <a href="https://www.baytechconsulting.com/blog/ai-technical-debt-how-vibe-coding-increases-tco-and-how-to-fix-it">Baytech Consulting</a></p><p>This produces predictable structural failures. An AI might generate five different functions for similar tasks because it lacks a unified memory of the project’s utility library. It reinvents the wheel constantly, creating a codebase filled with near-duplicates. <a href="https://www.baytechconsulting.com/blog/ai-technical-debt-how-vibe-coding-increases-tco-and-how-to-fix-it">Baytech Consulting</a></p><p>Market data confirms this trend at scale. GitClear analyzed 211 million changed lines of code between 2020 and 2024, across repositories from Google, Microsoft, and Meta. They found an eightfold increase in the frequency of code blocks with five or more duplicated lines — a prevalence ten times higher than two years prior. And for the first time in the history they analyzed, copy-pasted lines exceeded moved lines. <a href="https://leaddev.com/technical-direction/how-ai-generated-code-accelerates-technical-debt">LeadDev</a></p><figure><img alt="Line graph from 2020 to 2024 showing the “Percentage of Commits Containing a Cloned Code Block”. The index remains stable below 1% until 2022. From 2023 onwards, there is a sharp rise highlighted by a yellow area labeled “AI Influenced”, reaching almost 7% in 2024. The graph indicates a drastic increase in code duplication following the popularization of generative AI tools." src="https://cdn-images-1.medium.com/max/1024/0*jue1e8h1-GOUCTQE.png" /></figure><p>“Moved lines” is the metric that captures refactoring — when a developer takes existing code and reorganizes it to be cleaner and more reusable. That type of change dropped from 25% of all modifications in 2021 to under 10% in 2024. A 60% decline. <a href="https://www.buildmvpfast.com/blog/ai-generated-code-technical-debt-management-2026">BuildMVPFast</a></p><p>In other words: AI writes fast, but doesn’t refactor. It adds on top. And when the context memory is summarized in a new session, it adds on top again — unaware that what’s underneath is already a workaround on top of a workaround.</p><h4>Comprehension Debt: The Liability That Doesn’t Show Up on Your Dashboard</h4><p>There’s a concept that needs to enter the vocabulary of every developer working with AI: <strong>Comprehension Debt</strong>.</p><p>Unlike technical debt, which announces itself through mounting friction — slow builds, tangled dependencies, the creeping dread every time you touch that one module — comprehension debt breeds false confidence. The codebase looks clean. The tests are green. The reckoning arrives quietly, usually at the worst possible moment. <a href="https://addyosmani.com/blog/comprehension-debt/">AddyOsmani.com</a></p><p>AI-generated code is syntactically clean, well-formatted, superficially correct — precisely the signals that historically triggered merge confidence. But surface correctness is not systemic correctness. The codebase looks healthy while comprehension quietly hollows out underneath it. <a href="https://addyosmani.com/blog/comprehension-debt/">AddyOsmani.com</a></p><p>That’s exactly what happened to me. Tests were passing. The documentation was beautiful. Inside, there were layers of workarounds I had no awareness even existed.</p><h4>What the Market Is Saying</h4><p>The 2024 DORA report, with responses from over 39,000 professionals, found an uncomfortable correlation: for every 25% increase in AI adoption, there was a 1.5% drop in delivery speed and a 7.2% drop in system stability. <a href="https://www.infoworld.com/article/4020931/ai-coding-tools-can-slow-down-seasoned-developers-by-19.html">InfoWorld</a></p><p>A Faros AI study analyzing data from over 10,000 developers across 1,255 teams found that teams with high AI adoption interacted with 9% more tasks and 47% more pull requests per day. PR size grew 154%. Then: review time up 91%, bugs up 9%, and organizational DORA metrics remained flat. <a href="https://www.cerbos.dev/blog/productivity-paradox-of-ai-coding-assistants">Cerbos</a></p><p>More PRs, bigger PRs, slower reviews, more bugs, no real throughput improvement.</p><p>Gartner projects that prompt-to-app approaches will increase software defects by 2,500% by 2028. That’s not an empty alarm — it’s the natural consequence of a cycle where code is generated faster than it can be understood.</p><h4>How Models Behave Internally — and Why It Matters</h4><p>To understand what happens in a long project with AI, you need to understand a physical limitation of the models: they don’t have access to your entire project. They have access to what fits in the context window of that session. When that window is summarized to continue in a new conversation, details are lost — not the ones that seem important to the model in that moment, but exactly the ones that were important to you: the architectural decisions made three sessions ago, the reason that abstraction exists, the invariant that must never be violated.</p><p>From there, the model reconstructs with what it has. And what it has is the current state of the code, not the original intent behind it. There’s no malice in this — there’s simply an absence of context. For the model, what’s in the window is reality. What isn’t, doesn’t exist.</p><p>This has a direct consequence: the same structural errors repeat when memory is summarized, unless explicit premises are provided that survive the summary. Corrections made in conversation disappear. Rules written into the context travel with it.</p><h4>What I Learned — and What’s Worth Keeping</h4><p><strong>1. AI doesn’t replace the developer’s mental model</strong></p><p>The invisible work of a good developer isn’t writing code. It’s maintaining a coherent, consistent model of what the system is and what it must never become. That work cannot be delegated.</p><p><strong>2. Weakly typed languages amplify the problem</strong></p><p>Without a compiler enforcing discipline, AI slides toward the path of least resistance at the first opportunity. In strongly typed languages, at least structural deviations produce visible errors. In dynamic languages, they stay hidden — working, but wrong.</p><p><strong>3. Instructions are infrastructure</strong></p><p>The instructions you give to AI work like sidewalks, lane markings, and traffic lights for a self-driving car. Without them, the car gets somewhere. Just not necessarily where you intended.</p><p>Instructions that are too vague give AI the freedom to choose the path. Instructions that are too long cause AI to skip parts to finish sooner. The sweet spot is: precise, non-negotiable constraints about what must be true throughout the system — not rules about how to build.</p><p><strong>4. At the first sign of drift, stop and add premises</strong></p><p>Don’t just fix the immediate error. Add an explicit premise to the context that prevents that class of error from happening again. If you only correct, the next session’s context has been summarized and the error returns. If you add the premise, it travels with the summary.</p><p><strong>5. AI won’t take offense at being corrected — but it will forget</strong></p><p>You can be direct, assertive, even blunt when correcting. The model has no ego. But it does have amnesia. The persistence of learning depends on you turning corrections into written rules, not conversations.</p><h4>The Metaphor That Stayed With Me</h4><p>A self-driving car in a city doesn’t need a driver at every corner. It needs infrastructure: sidewalks that define where it can go, lanes that indicate speed, traffic lights that regulate intersections, signs that anticipate what’s ahead.</p><p>Using AI to develop software is similar. The tool has the engine. It has the sensors. It has reaction speed no human can match. But without an infrastructure of intent — explicit premises, documented invariants, constraints that survive context summarization — it will get somewhere. Just not necessarily where you planned.</p><p>The GPS didn’t fail because it was dumb. It failed because it had an outdated map and no way of knowing it.</p><p>Your job, when working with AI, is to keep the map updated.</p><h4><strong>References</strong></h4><ol><li>METR — <em>Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity</em> (July 2025) — arxiv.org/abs/2507.09089</li><li>Cerbos — <em>The Productivity Paradox of AI Coding Assistants</em> — cerbos.dev/blog</li><li>GitClear — <em>AI Copilot Code Quality 2025</em> — gitclear.com</li><li>LeadDev — <em>How AI generated code accelerates technical debt</em> — leaddev.com</li><li>Addy Osmani — <em>Comprehension Debt: the hidden cost of AI generated code</em> — addyosmani.com/blog</li><li>Baytech Consulting — <em>AI Technical Debt: How Vibe Coding Increases TCO</em> — baytechconsulting.com/blog</li><li>Google DORA Report 2024 — cloud.google.com/devops/dora</li><li>DevOps.com — <em>AI in Software Development: Productivity at the Cost of Code Quality?</em> — devops.com</li><li>InfoWorld — <em>AI coding tools can slow down seasoned developers by 19%</em> — infoworld.com</li><li>Philipp Dubach — <em>93% of developers use AI coding tools. Productivity hasn’t moved.</em> — philippdubach.com</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=681f0b2e36d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Removendo linhas duplicadas no SQL: diferentes abordagens]]></title>
            <link>https://medium.com/@samuelfabel/removendo-linhas-duplicadas-no-sql-diferentes-abordagens-e4aa88f96810?source=rss-145df8d7e2bb------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4aa88f96810</guid>
            <category><![CDATA[sql-server]]></category>
            <dc:creator><![CDATA[Samuel Fabel]]></dc:creator>
            <pubDate>Mon, 18 Aug 2025 14:54:17 GMT</pubDate>
            <atom:updated>2025-08-18T14:54:17.487Z</atom:updated>
            <content:encoded><![CDATA[<p>Quem nunca se deparou com uma tabela cheia de registros duplicados? <br>Isso acontece muito em bases legadas, integrações entre sistemas ou importações feitas sem validação.</p><p>O problema: <strong>como limpar esses duplicados sem perder os dados válidos?</strong><br>Neste artigo vou mostrar diferentes maneiras de resolver isso em SQL — desde as mais modernas até algumas que ainda são úteis em cenários legados.</p><h4>Por que aparecem linhas duplicadas?</h4><p>Algumas causas comuns são:<br>- Ausência de <strong>restrições de unicidade</strong> (PRIMARY KEY ou UNIQUE).<br>- <strong>Importações em massa</strong> de dados sem validação.<br>- <strong>Integrações de sistemas</strong> que acabam inserindo registros repetidos.<br>- Bugs em aplicações que inserem múltiplas vezes o mesmo dado.</p><h4>1. Usando ROW_NUMBER() e CTE (a forma moderna e recomendada)</h4><pre>WITH CTE AS (<br>    SELECT <br>        UsuarioId,<br>        Nome,<br>        Cpf,<br>        ROW_NUMBER() OVER (<br>            PARTITION BY UsuarioId <br>            ORDER BY UsuarioId<br>        ) AS rn<br>    FROM Usuario<br>)<br>DELETE FROM CTE WHERE rn &gt; 1;</pre><p>Vantagens:</p><ul><li>Simples</li><li>Funciona direto na tabela</li><li>Muito mais rápido que soluções manuais</li></ul><h4>2. Usando tabela temporária com IDENTITY</h4><p>Em alguns cenários não é possível apagar diretamente da tabela original.<br> Nesses casos, você pode criar uma cópia auxiliar com uma coluna IDENTITY para identificar duplicados:</p><pre>BEGIN TRAN;<br><br>CREATE TABLE #Usuario_Copia (<br>   Id INT IDENTITY(1,1),<br>   UsuarioId INT,<br>   Nome VARCHAR(15),<br>   Cpf VARCHAR(11)<br>);<br><br>INSERT INTO #Usuario_Copia (UsuarioId, Nome, Cpf)<br>SELECT UsuarioId, Nome, Cpf FROM Usuario;<br><br>DELETE C<br>FROM #Usuario_Copia AS C<br>INNER JOIN (<br>    SELECT ROW_NUMBER() OVER (PARTITION BY UsuarioId ORDER BY Id) AS ordem, *<br>    FROM #Usuario_Copia<br>) AS Q ON C.Id = Q.Id<br>WHERE Q.ordem &gt; 1;<br><br>DELETE FROM Usuario;<br>INSERT INTO Usuario (UsuarioId, Nome, Cpf)<br>SELECT UsuarioId, Nome, Cpf FROM #Usuario_Copia;<br><br>COMMIT TRAN;</pre><p>Essa abordagem é um pouco mais trabalhosa, mas útil em <strong>bancos legados</strong>.</p><h4>3. Usando DISTINCT para recriar a tabela</h4><p>Se a tabela não tem chaves estrangeiras ou dependências fortes, dá para recriar rapidamente só com os registros únicos:</p><pre>SELECT DISTINCT UsuarioId, Nome, Cpf<br>INTO Usuario_SemDuplicados<br>FROM Usuario;</pre><p>Depois é só substituir a tabela original.</p><blockquote>Use com cuidado em produção, pois pode quebrar relações existentes.</blockquote><h4>4. Cursor (quando não há outra opção)</h4><p>O uso de cursor é mais raro hoje em dia, mas ainda pode aparecer em situações bem específicas:</p><pre>DECLARE @UsuarioId INT;<br>DECLARE MEU_CURSOR CURSOR FOR SELECT UsuarioId FROM Usuario;<br><br>OPEN MEU_CURSOR;<br>FETCH NEXT FROM MEU_CURSOR INTO @UsuarioId;<br><br>WHILE @@FETCH_STATUS = 0<br>BEGIN<br>  IF EXISTS (SELECT 1 FROM Usuario WHERE UsuarioId = @UsuarioId)<br>    DELETE TOP(1) FROM Usuario WHERE UsuarioId = @UsuarioId;<br><br>  FETCH NEXT FROM MEU_CURSOR INTO @UsuarioId;<br>END<br><br>CLOSE MEU_CURSOR;<br>DEALLOCATE MEU_CURSOR;</pre><p>É a solução <strong>menos performática</strong> e só deve ser usada em ambientes com muitas restrições.</p><h4>Como evitar duplicados no futuro?</h4><p>O ideal é não precisar corrigir, mas <strong>prevenir</strong>.<br>Algumas práticas importantes:</p><ul><li>Definir <strong>chaves primárias</strong> (PRIMARY KEY) ou <strong>índices únicos</strong> (UNIQUE) nos campos críticos.</li><li>Validar dados na aplicação antes de inserir.</li><li>Tratar duplicados na etapa de integração, antes de salvar no banco.</li></ul><p>Exemplo de constraint para evitar CPFs duplicados:</p><pre>ALTER TABLE Usuario <br>ADD CONSTRAINT UQ_Usuario_Cpf UNIQUE (Cpf);</pre><h4>Conclusão</h4><p>Hoje a forma mais prática de resolver duplicados é com ROW_NUMBER() + CTE.<br> Soluções com tabelas temporárias e cursores ainda têm espaço em cenários legados, mas devem ser vistas como exceção.</p><p>Sempre que possível, adicione <strong>restrições de unicidade</strong> para não ter que lidar novamente com esse problema.</p><p>✍️ Esse artigo foi inspirado em um post antigo meu, escrito em 2015, mas atualizado agora com técnicas modernas e exemplos práticos.</p><p><a href="https://samuelfabel.wordpress.com/2015/05/12/removendo-linhas-duplicadas-no-sql/">https://samuelfabel.wordpress.com/2015/05/12/removendo-linhas-duplicadas-no-sql/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4aa88f96810" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>