Painel de Notícias

Tecnologia

7045 posts · 26 feeds · tópicos e interesse por Jev

Filtros
dev.to

The Pressure Points of Software Architecture

Software architecture rarely breaks where we expect it to. A system can have clean code, elegant abstractions, carefully designed APIs, automated tests, and a beautiful deployment pipeline. It can pass every review and still develop strange behavior when the number of users increases, when a database becomes larger, when a service starts receiving unexpected traffic, or when several parts of the system begin depending on one another. This is because software architecture is not simply about where code lives. It is about where pressure accumulates. Every software system has pressure points. Some are obvious. A database receiving thousands of queries per second is an obvious pressure point. A server with limited memory is another. A heavily used API endpoint can become a bottleneck. But some pressure points are quieter. A configuration file that slowly becomes responsible for half the application's behavior. A service that everyone depends on. A database table that becomes the source of truth for too many unrelated features. A queue that seems harmless until a small delay creates a long backlog. A shared utility that starts collecting unrelated responsibilities. These are architectural pressure points. They are places where the system carries more responsibility, traffic, dependency, complexity, or uncertainty than the surrounding architecture. And understanding them can change the way we design software. Imagine a bridge. The bridge is not simply a collection of steel beams. The interesting question is how the weight moves through those beams. Some structures carry more load than others. Some joints experience more stress. Some points become critical because many forces converge there. Software behaves similarly. A system might look like this: Users | v API | v Application | +------> Database | +------> Cache | +------> Queue | +------> External Services At first glance, everything looks balanced. But the real architecture might be closer to this: +------ Cache | Use

Dev
Interesse
dev.to

Your integration's real bugs are in the events you can't trigger

Every integration I have written against a third-party API has the same shape. Those branches are exactly the ones a provider sandbox cannot help me exercise. completed before I finished handling pending. And a classic mock server does not help either: it answers one request at a time with no memory, so it cannot represent "this payment already succeeded, now it is disputed". So I wrote a small tool that treats an integration as what it actually is: a state machine. You describe a scenario in YAML. A session remembers where a client is in the flow, keyed by whatever identifies it in your API - a body field, a header, a query or a path parameter. The same endpoint then answers according to the current state: GET /v1/orders/ord_42/payment -> processing (a few seconds pass, a webhook fires) GET /v1/orders/ord_42/payment -> succeeded (later, another webhook fires) GET /v1/orders/ord_42/payment -> chargeback Entering a state can schedule webhooks: delayed, HMAC-signed in the Stripe format, with retries, a delivery journal and replay. That is the part I care about most, because the webhook path is where my code has the most untested branches. Does the handler reject a forged signature? Does it answer 2xx so the sender stops retrying? Does the same event delivered twice settle once? Two flags make it usable in CI. --time-scale compresses "30 days later" into seconds, so a full lifecycle runs in a test. --seed makes the template functions (ids, timestamps) reproducible, so snapshot assertions are stable. It does not record or proxy real traffic, and it has no GUI. If you need those, WireMock and Mockoon are the right tools. This one is aimed narrowly at deterministic, versionable simulation of event-driven APIs. And there is one honest limitation worth stating up front: a twin is only as accurate as the scenario you write. If the YAML mismodels the real response, the twin will happily repeat your mistake. The workflow that works for me is to confirm the response shape once

Dev
Interesse
dev.to

The Complete Guide to SVG Icon Optimization for Web Performance

SVG icons have become a cornerstone of modern web design, offering scalability, crisp rendering on any device, and easy customization. But as with any web asset, poorly optimized SVGs can bloat your pages and negatively impact web performance. Whether you’re building a design system or just want sharper, faster-loading icons, mastering SVG optimization is a must. Let’s dive into practical strategies and tools to ensure your SVG icons are as efficient as they are beautiful. SVG (Scalable Vector Graphics) icons are vectors, meaning they can scale to any size without losing quality—a major advantage over raster formats like PNG. However, SVGs are still code, and unoptimized SVG files can contain redundant elements, unnecessary metadata, and verbose paths that slow down rendering and inflate file sizes. Optimizing SVG icons delivers several benefits: Reduced file sizes: Smaller icons mean faster downloads and snappier page loads. Improved rendering speed: Clean SVG code ensures the browser can parse and paint icons efficiently. Pixel-perfect visuals: Optimization often removes rendering quirks and ensures icons look crisp everywhere. Maintainability: Clean markup is easier to read, update, and style with CSS or JavaScript. Let’s break down how to achieve optimal SVG icon performance, from export to deployment. Design your icons on a grid (e.g., 24x24, 32x32 px) and align shapes to whole pixels. Fractional coordinates can lead to blurry or misaligned rendering, especially on low-DPI screens. Favor simple paths and basic shapes ( , , ) where possible. Avoid excessive anchor points, which add complexity and file size. SVG supports a range of effects (blurs, shadows, gradients), but these can balloon file size and hurt performance. Use them sparingly in icons, or flatten them where possible before export. When exporting from design tools (Figma, Illustrator, Sketch): Set canvas/artboard to the icon’s intended size. Use “SVG Tiny 1.1” or “SVG 1.1” export settings for best co

Dev
Interesse
dev.to

Best LLM Gateways in 2026: A Production-Ready Comparison

TL;DR An LLM gateway is production-ready when it adds negligible latency under load, fails over across providers without application code, enforces budgets per team, governs MCP tool calls, and deploys where compliance requires. Bifrost adds 11 microseconds of overhead per request at 5,000 requests per second with a 100% success rate, and enforces budgets at the customer, team, virtual key, and provider-config levels. LiteLLM Proxy covers 100+ LLMs in Python, but production deployments run PostgreSQL and Redis alongside it, and SSO, audit logs, and Prometheus metrics require an enterprise license. Kong AI Gateway adds AI plugins to Kong Gateway; its AI MCP Proxy plugin needs Kong Gateway 3.12 and an AI Gateway Enterprise license. Cloudflare AI Gateway and AWS Bedrock are managed services, so neither runs inside your own network or spans every cloud from one control plane. An LLM gateway is the layer between applications and model providers that authenticates, routes, governs, and logs every model call through one API. Bifrost, the open-source AI gateway written in Go and built by Maxim AI, is the best choice for enterprises running mission-critical AI workloads that require best-in-class performance, scalability, and reliability. This guide compares the five LLM gateways most often shortlisted for production in 2026 (Bifrost, LiteLLM, Kong AI Gateway, Cloudflare AI Gateway, and AWS Bedrock) on gateway overhead, failover, governance depth, MCP support, deployment model, and compliance. Every competitor capability below was checked against that vendor's own documentation, and anything a vendor does not publish is marked "Not published." An LLM gateway is a control layer that sits between AI applications and model providers, exposing one API while handling authentication, routing, failover, spend limits, and logging for every request. Applications call the gateway instead of each provider SDK, so changing a model or adding a provider becomes configuration rather than a

IADev
Interesse
dev.to

What I cut from my MVP to ship it in weeks, not months

The first version of my last MVP had a feature list that would have taken months. I shipped something in a few weeks instead, mostly by deleting things I was sure we needed. Here is what went, and what I regretted. I had planned an admin panel, team invites and three permission levels. The first users were a handful of people I knew by name. I gave them logins by hand and kept a spreadsheet of who could see what. Nobody noticed. Every setting I had sketched was really me avoiding a decision. I picked sensible defaults and hardcoded them. When two people asked for the same change, that became the first real setting. I didn't wire up a checkout. The first people who wanted to pay got an invoice by email. It felt a bit embarrassing, but it told me who was serious faster than a pricing page would have. Email and in-app notifications were on the list. I sent updates myself, by hand, for the first few weeks. That also meant I was talking to every user, which turned out to be the most useful part. The one workflow people came for, done properly. Error logging. A way for users to tell me something was broken. Backups. I didn't want to cut anything that would lose someone's data or leave me blind when it broke. Basic analytics. I skipped it to save a day, and then spent weeks guessing which screens people actually used. I'd add it from day one next time, even something rough. Search too, a little. I thought nobody would have enough data to need it. A couple of heavy users did within the first month. If I could do it by hand for the first group of users, it stayed out of the code. If skipping it could lose data or hide errors, it stayed in. What did you cut from your first version that you later wished you'd kept?

Geral
Interesse
dev.to

Como funciona a memória de um agente de IA (e o que acontece quando ela esquece do jeito errado)

Um modelo de linguagem não lembra de nada. Cada chamada recebe um prompt, gera uma resposta e pronto, esqueceu. Quando um agente "lembra" que o projeto usa pytest, quem lembrou foi um sistema fora do modelo, que guardou isso em algum lugar e recolocou no prompt na hora certa. Esse sistema é a memória do agente. Nesse post eu explico como ela funciona, mostro quatro políticas de memória que implementei e conto o que aconteceu quando coloquei as quatro pra acompanhar o mesmo projeto simulado por meses. O jeito mais simples seria mandar o histórico todo em toda chamada. Funciona por um tempo. O problema é que o histórico só cresce: uma hora não cabe mais, e bem antes disso o consumo de tokens corresponde a informações que podem não agregar em nada no verdadeiro intuito do prompt. E tem um problema pior: o histórico mistura informação velha e nova sem dizer qual vale. Se o serviço mudou de região na semana 4, as mensagens das semanas 1 a 3 continuam lá, falando a região antiga, o que afeta diretamente a qualidade das respostas. Por isso memória de agente quase sempre é escrita seletiva e busca seletiva: guarda fora do prompt e traz de volta só o que importa para a pergunta da vez. mensagem do usuário │ ▼ [ESCRITA] vale guardar? em que formato? com que metadados? │ ▼ [ARMAZENAMENTO] texto + embedding + metadados (fonte, data, confiança, uso) │ ▼ pergunta nova ──► [BUSCA] o que é relevante? quanto cabe? │ ▼ prompt = instruções + memórias recuperadas + pergunta │ ▼ LLM em paralelo: [ESQUECIMENTO] substituir, rebaixar ou arquivar o que ficou velho Toda política de memória é basicamente um conjunto de decisões nessas quatro etapas. É possível ter duas memórias com o mesmo banco e o mesmo modelo se comportando de jeitos totalmente diferentes, só porque decidem diferente o que escrever e o que esquecer. A busca quase sempre é semântica. Cada texto vira um embedding, um vetor de números (aqui, 1024 números gerados pelo bge-m3) que representam o significado do texto. Textos pare

IADev
Interesse
dev.to

Quebec's QST does not compound: the tax rule most checkout code gets wrong

Quebec's QST does not compound: the tax rule most checkout code gets wrong Most checkout tax code applies rates one after another, each on the running total. That model is wrong in Quebec, and the error is silent: every order comes out a little too high, the customer pays it, and nobody notices until reconciliation. Quebec charges 5% GST, same as the rest of Canada, plus 9.975% QST. The rule that breaks naive code: QST is calculated on the selling price before GST, not on the GST-inclusive amount. The two taxes add, they do not compound. gst = price * 0.05 qst = (price + gst) * 0.09975 # wrong base, looks reasonable total = price + gst + qst On a $100 sale this gives $115.47. The correct total is $114.98. A $100 sale in Quebec: GST: 5% of $100 = $5.00 QST: 9.975% of $100 = $9.975, rounds to $9.98 Total: $100 + $5.00 + $9.98 = $114.98 The compounding version charges 9.975% on $105 instead of $100. That is $0.49 of phantom tax on a $100 sale, about half a percent of revenue. On $1M of Quebec sales, that is $4,987.50 collected from customers that was never owed, sitting in your remittance where Revenu Quebec's numbers will never match yours. In most of Canada the naive model happens to work. Ontario is a flat 13% HST, Alberta is just the 5% GST, and BC is 5% GST plus 7% PST where both apply to the same base, so adding the rates gives the right answer there too. Quebec is the one province where the second tax's base explicitly excludes the first tax. If your tax engine models "apply each rate to the running total", Quebec is the province that breaks it. The correct model is per-component bases: each tax component carries its own rate and its own base. In Quebec, the QST base is the pre-GST selling price. Get the model right and every province falls out of the same code path. curl "https://prsorfaeexugwkvjuwzw.supabase.co/functions/v1/canadian-api/calculate-tax?province=QC&amount=100&description=general%20merchandise" \ -H "TRUENORTH_API_KEY: your_key_here" TrueNorth API

Dev
Interesse
dev.to

💀 I Hunted Down the Silent Killers in ATLOCK v5 (And Why Your Python App is Probably Failing in Silence) 🔥

💀 I Hunted Down the Silent Killers in ATLOCK v5 (And Why Your Python App is Probably Failing in Silence) 🔥 "The devil isn't in the missing comma. The devil is in the background thread that silently fails to lock the vault when Windows goes to sleep." We are at 984 downloads across all Akhouri Systems products. Just 16 more until we hit the 1,000 milestone. ATLOCK v5 is 100% built, battle-tested, and ready to ship. But before we drop the hammer and release it to the wild, I need to talk about the monsters I had to slay in the codebase. This isn’t a post about "I fixed a missing comma" or "I updated a dependency." This is a deep dive into the architecture-shattering, silent-failure bugs that keep security developers awake at night. If you build security tools in Python, you need to read this. The Nightmare: Background workers (Vault health checks, Defender status updates, Watchdog scans) were directly calling self.after(0, lambda: ...) to update the UI. The Reality: Tkinter is not thread-safe. Calling it from a worker thread doesn't always crash immediately. Sometimes, it just silently deadlocks, corrupts the event loop, or vanishes without a trace in the logs. The Fix: I completely ripped out direct UI calls from workers. I built a custom, thread-safe event pump using queue.SimpleQueue (atl_ui_post / atl_ui_pump_start). only drop payload functions into the queue. The main Tkinter thread polls this queue and executes the updates safely. Workers never touch the UI. Period. The Nightmare: When a user locks their Windows PC (Win + L), ATLOCK is supposed to instantly lock the Vault and wipe the clipboard. But what if the main UI thread is busy rendering, blocked by an AV scanner, or frozen? The lock command gets queued... and your secrets stay exposed in RAM. The Reality: Relying solely on the main thread for security-critical state changes is a single point of failure. The Fix: A 3-second fail-safe timer mechanism. forces the vault lock and nukes the clipboard anyway.

Dev
Interesse
dev.to

pqc-bench Part 2: Where the X25519MLKEM768 overhead actually matters

Part 1 ran a fresh-handshake load test on a Graviton3 and measured what the ML-KEM half of X25519MLKEM768 adds to TLS 1.3 handshake latency. The headline was that hybrid PQ costs about an order of magnitude more at p95 under a stream of brand-new connections. That's a correct number for a benchmark almost nobody runs in production. Real HTTPS traffic doesn't handshake once per request. Browsers pool connections. Load balancers hold them open. TLS session tickets let returning clients skip the key exchange entirely. So the question Part 1 left open is: once we measure in a shape that looks like production, what does the PQ cost actually become? Same infra, two toggles. Server (terraform/target/user-data-fast.sh.tftpl): ssl_session_cache shared:SSL:10m; ssl_session_timeout 1h; ssl_session_tickets on; Client (Gatling): http.baseUrl(target) .shareConnections() // ← the key change .disableCaching() ... With shareConnections(), each virtual user does N requests over one TLS session instead of opening a new connection per request. That's how production clients behave. Everything else is identical to Phase 1: c7g.large Graviton3 target running nginx-pq against the same c7g.large loadgen, OpenSSL 3.5, TLS 1.3, hybrid X25519MLKEM768 KEM, ML-DSA-65 server cert for PQ-capable clients and an ECDSA P-256 cert for BoringSSL-based ones. Full Phase 2 code is on GitHub. Two scenarios on top of that. Four arms: classical-fresh, classical-resumed, pq-fresh, pq-resumed. 300 user-connections per second, 10 requests per user, 5-minute measurement, 3 trials per arm, 12 trials total. The p95 for each arm, averaged across trials: arm p95 (ms) classical-fresh 4 classical-resumed 1 pq-fresh 5 pq-resumed 1 Fresh PQ adds 1 ms at p95. That's smaller than Part 1's number, mostly because Phase 2 uses hybrid session-cache-enabled nginx-pq with a lighter config path for the sub-ms responses. The relative cost (+25% vs classical fresh) is still real. Resumed PQ adds nothing. The resumed numbers for cl

SegurançaInfraDev
Interesse
dev.to

Running a Multi-Repo Product with Parallel AI Agents (Claude Code)

How I set up one workspace where a single Claude Code session hands work to one agent per repository, keeps them out of each other's code, and runs several tasks at the same time without them stepping on each other. The setup: 7 independent git repos (API backend, customer dashboard, admin portal, marketing site, iOS SDK, Android SDK, an internal Python tool) sitting side by side in one folder. The workspace root is its own small git repo holding only the shared pieces: a root CLAUDE.md (map of all repos + shared rules), a contracts/ folder (the only place cross-repo changes are agreed), .claude/agents/ (one agent per repo + a read-only test auditor), .claude/hooks/ (guards that enforce the rules), and a clone-all.sh script. Each product repo sits next to it as a normal clone, ignored by the workspace repo. one main session started at the workspace root. It plans, starts one agent copy per task per repo (each in its own git worktree), and collects the results. Don't use submodules. Keep each product repo as a normal clone, and make the root a tiny repo that tracks only workspace files. Use an allowlist .gitignore (ignore everything, then un-ignore only the workspace files) so a product repo can never be committed by accident. Add a clone-all.sh so a new machine or teammate gets the same layout with one command. Keep each one under 300 lines: purpose, stack, key folders, entry points, run/test/build commands, conventions. Generate it by having an agent read package.json, build files and existing docs, then check the commands against the real scripts. End each with a pointer to the shared root rules instead of copying them. Claude Code loads CLAUDE.md files from parent folders, so root rules apply inside every repo. One line per repo: name, stack, role.- How the repos connect (who calls which API, which auth).- The core rule: route work to the matching agent; cross-repo changes go through /contracts.- A git workflow (branch from develop, never skip hooks, one PR per r

IADev
Interesse
dev.to

What 125B parameters at 100 tok/s on one GPU costs to reproduce

Building AI that practitioners can actually run The pipeline of open-source work this month points to a single theme: practitioners are less interested in abstract capability claims than in systems they can reproduce, govern, and maintain. The Strata project shows Qwen 3.8 Flash Next (125B) running at roughly 100 tokens per second on an RTX 4090 consumer card, which matters because it collapses the assumption that large-model inference requires cloud-scale budgets; what people rarely account for is the reproducibility burden — cooling, power stability, quantization choices, and memory fragmentation on a single GPU — all of which can erase that headline number in real-world deployments. The same practitioner mindset appears in the Show HN: AI search for every photo and frame of video on macOS release, which targets an often-ignored problem: search quality degrades sharply when the corpus spans both still images and temporal video frames rather than uniform text, and building that locally introduces indexing overhead that cloud vendors quietly absorb. A video on scaling intent, quality, and artistry with AI illustrates a tension that analytics practitioners feel acutely: as generative systems scale, the marginal improvement in output fidelity often hides a rising dependency on prompt architecture and post-processing. People have noticed that what looks like quality at first pass frequently requires significant manual curation; the community has also noticed that "artistry" in this context is not decorative but structural — it reflects how carefully one has defined evaluation criteria before generation. For practitioners on constrained budgets, the practical takeaway is that scaling intent without scaling documentation produces brittle pipelines, not better results. The hidden operational cost is often in evaluation infrastructure: without explicit criteria, practitioners spend more time correcting outputs than they saved through automation, which undermines the econom

IAInfraDev
Interesse
dev.to

Which check in your pipeline has never fired?

I went through every automated check in my publishing pipeline this week and sorted them by how many times each had ever caught something. Four of them had never caught anything. My first reaction was that this was good news. A check that never fires is a check whose class of problem you have stopped having, which is what you want. I held that opinion for about an hour. Then I found a bug that had been live for twenty-four days and is still live a month later, sitting in front of all four of those checks, and realised that two of them had never fired for a completely different reason: they could not. Not "had no occasion to." Could not. The thing they were meant to catch was not visible from the data they were looking at, and no amount of occasion would have changed that. The specific case, briefly, because the shape matters more than the details. All six of my checks took a file and examined it. The bug was that two of my posts existed twice on the platform under different URLs. That is not a property of any file. You can hand a per-file checker every file I own, run it forever, and it will never see a duplicate, because the duplicate lives in a relationship between my repo and a remote system that no single file knows about. What unsettles me is that I could not tell the two groups apart by reading them. Both categories look identical in the code and identical in the logs. Both are a function that runs, examines something, and returns no findings. "Quiet because the problem is gone" and "quiet because I am blind to the problem" produce byte-identical output, and I had been reading that output as reassurance for weeks. I have been trying to find a reliable way to distinguish them and I do not have one. A few things I have tried, none of which fully work: Feed each check an input that should fail it. This catches the crudest version, where a check is misconfigured or its regex never matches. It caught one of my four. It does not catch the structural case, because to

Dev
Interesse
dev.to

Your 7B Model Doesn't Need an H100: A Practical GPU Sizing Guide for LLM Inference

Your 7B Model Doesn't Need an H100: A Practical GPU Sizing Guide for LLM Inference Researched October 2026. Sizing rules from public docs and community practice, not my own benchmarks. The most expensive mistake in LLM inference isn't picking the wrong cloud — it's renting too much GPU. I keep seeing people spin up H100s to serve 7B chatbots. Here's a practical guide to right-sizing your GPU. Weights in FP16 take roughly 2 bytes per parameter: Model size FP16 weights Minimum sensible GPU 7–8B ~14–16 GB RTX 4090 / L4 (24 GB) 13B ~26 GB A100 40GB 34B ~68 GB 2× A100 40GB or 1× H100 80GB 70B ~140 GB 2× A100/H100 80GB Then add ~20–30% headroom for KV cache (grows with context length and batch size). Long-context workloads can double your memory needs — that's the part most guides skip. FP8 / AWQ / GPTQ roughly halve the memory requirement: A 70B model in FP8 (~70 GB) can fit on a single H100 80GB A 13B AWQ model runs comfortably on a 24 GB card If your accuracy budget allows it, quantization is the single biggest cost lever you have — bigger than switching cloud providers. Chatbot (low concurrency): you need enough VRAM, that's it. A 4090 serving a 7B model at 60+ tok/s is overkill for 5 concurrent users — but cheap overkill. Batch/API workloads: memory bandwidth is king. This is where A100/H100 earn their premium. Don't pay for bandwidth you won't use. What's the largest model you'll serve in the next 6 months? FP16 or can you quantize? Max context length × max batch size → KV cache estimate Latency SLA? (real-time chat vs. background jobs) Spot-tolerant? (see my previous post on spot pricing) Combining sizing with cloud prices (researched Oct 2026): a 7B model on a Vast.ai spot 4090 (~$0.35/hr) vs. an H100 on-demand (~$2.50+/hr) is a 7x cost difference for a workload that might not even notice. I'm building a free tool that asks about your use case and ranks GPU options: https://qisuanai.com/advisor What are you serving, and on what? Curious where these rules break dow

IA
Interesse
dev.to

Searching Arabic text in JavaScript: why "احمد" doesn't find "أحمد" (and how to fix it)

A user types «احمد» (Ahmad) into your search box and gets nothing, even though the page says «أحمد». Or they search for «مدرسه» (school) and the text has «مدرسة». Or they search «محمد» and the text is vowelled, «مُحَمَّد», or stretched with tatweel, «مـحـمـد». To the user it's the same word every time. JavaScript's string matching doesn't treat these spellings as equivalent. This post covers four traps when searching Arabic text in JavaScript, then builds a search-normalization function, a function that finds match positions so you can highlight them, and finally when you should not normalize. Disclosure: I work on an open-source Arabic text library that has normalization functions; I mention it briefly at the end. Everything before that is plain JavaScript, no libraries. 'محمد أحمد'.includes('احمد'); // false 'مُحَمَّد'.includes('محمد'); // false 'مـحـمـد'.includes('محمد'); // false includes, indexOf and regular expressions do exact matching, with no Arabic-specific normalization. «أ» (alef with hamza, U+0623) is not «ا» (bare alef, U+0627); the vowel marks (harakat) are separate characters between the letters, and so is the tatweel «ـ» (U+0640). People also spell hamza forms, teh marbuta «ة» and alef maksura «ى» inconsistently, so literal search fails a lot. const a = 'أحمد'; const b = 'ا\u0654حمد'; // alef + separate hamza above (U+0654) a === b; // false a === b.normalize('NFC'); // true «أ» can arrive as one code point, or as two: a bare alef followed by a combining hamza. They render the same, but they don't compare equal. This shows up in text copied from some programs and in file names from some systems; normalize('NFC') unifies these canonically equivalent forms. There's a second case NFC doesn't cover. Text copied from some PDFs arrives in Arabic "presentation forms": dedicated code points for certain letter shapes and ligatures. const fromPdf = '\uFEE3\uFEA4\uFEE4\uFEAA'; // «محمد» in presentation forms fromPdf === 'محمد'; // false fromPdf.normalize('NFC'

Dev
Interesse
dev.to

Real‑Time Deepfake Detection for the 2026 Election

Detecting 2026 Election Deepfakes in Real Time – A Practical Guide for Journalists, Campaign Staff, and Citizens Introduction Deepfake videos of politicians are no longer a novelty; they are a battlefield weapon that can flip voter sentiment in minutes. Since January 2026, Google Trends shows a 312 % surge in U.S. searches for “deepfake elections” and a 274 % rise across the EU. If you’re responsible for protecting the integrity of the 2026 campaign, you need a fast, low‑cost detection workflow you can deploy today. In this article you’ll learn: How the latest generative models work (GAN vs. diffusion) Which visual and audio cues betray a fake in seconds A step‑by‑step tutorial for building a Telegram/Discord bot that flags suspicious videos as they appear All examples are ready‑to‑run on a single RTX 4090 or a modest cloud VM. Question Answer What’s the practical difference between GAN‑based and diffusion‑based deepfakes? GANs generate frames in a single forward pass – they’re fast but often produce “temporal flicker.” Diffusion models (e.g., Stable Diffusion Video) denoise over many steps, yielding smoother motion and up to 8K resolution, but require more compute time. Can I trust platform watermarks (TikTok, YouTube) as proof of authenticity? No. Watermarks can be stripped or forged. Rely on independent pixel‑level and biometric analysis instead. Is scraping public video URLs legal? Generally yes for research or journalism under “fair use” / “public interest,” but you must honor each platform’s TOS and comply with GDPR/CCPA when storing personal data. Massive reach – Pew Research estimates 2.1 billion political video impressions during the 2026 midterms. One viral deepfake can rack up 10–15 million engagements in under an hour. Low‑cost creation – Open‑source models like Stable Diffusion Video (Mar 2025) run on a single RTX 4090, putting high‑quality synthesis in anyone’s hands. Regulatory pressure – The EU’s Digital Services Act amendment (effective July 2026) f

IADev
Interesse
dev.to

Four ways to sandbox a coding agent on a Mac, and where each one leaks

Disclosure up front: I build Kyvenza, a paid VM manager for Apple Silicon, and it comes up near the end. Most of this post applies to any VM tool, and one section is about where mine is the wrong choice. Coding agents with shell access are useful for exactly the reason they are risky: they run commands as you. The permission prompts get tiresome, everyone eventually switches them off, and from then on the only thing between a confidently wrong command and your SSH keys is the quality of the model's day. So the real question is not "how do I make the agent careful". It is "what can this process reach if it is not". Here are the four places I have seen people put an agent on a Mac, and what each one still lets through. This is the default, and it is no isolation at all. The agent inherits your Keychain access, ~/.ssh, browser profiles, cloud CLI credentials, and every file you can read. A single prompt injection in a README the agent fetches has the reach you have. Nothing leaks here because nothing is held back. A standard second account is a real improvement. macOS home folders are not readable by other standard users, and the agent's Keychain is its own. For accidents, this works. What survives: Anything listening on localhost. A dev server or database bound to 127.0.0.1 is reachable by every user on the machine. If your real work has a local database with real data, the second user can open a socket to it. World-readable locations, such as /Users/Shared and anything under /tmp you forgot about. Admin rights. The moment the agent is allowed sudo, which many setups grant to avoid more prompts, the separation is a suggestion. It is the same kernel and the same operating system. It protects you from the agent's mistakes more than from its compromise. On a Mac, containers are not native. Docker Desktop and similar tools run a Linux virtual machine and start your containers inside it, sharing that VM's kernel. For headless Linux tooling this is excellent: fast to create

SegurançaInfraDevIA
Interesse
dev.to

Claude Haiku 5.5 Pricing: The 100K-Token Rule for Agents

Claude Haiku 5.5 costs $0.10 per million input tokens up to 100K tokens of prompt, and $0.50 per million above it, a fivefold cliff that decides your agent bill. Anthropic released the model on 7 October 2026 on its own platform, AWS, Google Cloud and Microsoft Azure the same day. Output is $0.50 per million tokens at or below the threshold and $2.50 above it. The context window is 1M tokens with up to 128K tokens of output. Short answer: for high-volume agent loops, Haiku 5.5 is the cheapest Anthropic model ever listed, and a loop that keeps every prompt under 100K tokens runs about $1,050 per million calls at 8,000 input tokens and 500 output tokens each. Add prompt caching and that falls to roughly $520. The risk is the 100K line. One careless context-stuffing change moves a call from the cheap tier to the expensive one. Here is the price sheet, the worked budget and the rules that keep you below the line. The numbers below come from Anthropic's pricing page as reported by VentureBeat and MarkTechPost on launch day. Anthropic describes Haiku 5.5 as its "best lightweight model yet" and says it beats Haiku 4.5 in coding, computer use and knowledge work. It also says the model is on average 75% cheaper than Haiku 4.5. VentureBeat frames the headline as a 90% API price cut against Haiku 4.5's $1.00 input and $5.00 output, which is what you get when you compare the lower tier alone. Item Prompt up to 100K tokens Prompt above 100K tokens | Input, per million tokens | $0.10 | $0.50 | | Output, per million tokens | $0.50 | $2.50 | | Cache read, per million tokens | $0.01 | not listed in my sources | | Cache write (5 minute), per million tokens | $0.125 | not listed in my sources | Read the two columns as a step function, not a slope. A 99,000-token prompt with a 1,000-token answer costs $0.0104. A 101,000-token prompt with the same answer costs $0.053, which is 5.1 times more for 2% more input. That calculation assumes the higher rate applies to the whole request, which

IA
Interesse
dev.to

Poucos alertas, um trace, zero impacto

Uma semana depois do incidente de 8h40, os alertas novos começaram a tocar, sempre por volta das 21:30. O pool de conexões do banco subiu noite após noite: 90%, 89%, 94,8%. Na terceira noite, 36 conexões recusadas. Era a mesma falha daquele incidente, em formação. Só que desta vez sabíamos três noites antes. O diagnóstico não veio de uma ferramenta cara. Veio de duas coisas simples: um alerta de conexões que tocou antes do impacto; um trace, na janela do alerta, que ligou um job noturno de um serviço à saturação do banco de outro. O job fazia uma consulta por ponto de medição. A leitura no banco chegava a 12 vezes o normal, com a escrita parada. Era o padrão N+1, conhecido de qualquer livro. Do primeiro erro ao diagnóstico, levou menos de um dia útil. O impacto em cliente foi zero. No mesmo dia, corrigi dois alertas que davam falso positivo. Menos ruído é o que faz o time acreditar no próximo alerta. A lição para quem gere risco: detectar cedo é barato. Poucos alertas certos e uma forma de ligar a causa ao sintoma valem mais que cem painéis. Spoiler: a correção do job ainda não saiu. Detectar não é corrigir, e isso é assunto de outro post. No seu time, o último incidente foi detectado pelo alerta ou pelo cliente?

InfraDev
Interesse
dev.to

I Benchmarked My AI Carb Counter on 400 Meal Photos: 8 Models, 1 Holdout Set

I build Soba, an iPhone app that looks at a photo of a meal and estimates the carbs in it. People with type 1 diabetes use numbers like that to dose insulin, so "it seems to work" wasn't a good enough answer. I ran it on 400 meal photos from two public research datasets where the carbs were weighed or recorded, and published the method, the misses and the per-meal data on the Soba accuracy page. This post is the engineering side of that test: how the benchmark was set up, which of eight models won, and the bugs a production-path test turns up that a separate eval harness can miss. The full write-up on my blog has the per-meal-size breakdown and the comparison with published ChatGPT studies. The photos come from Nutrition5k (Google cafeteria plates, every ingredient weighed, fixed overhead camera) and SNAPMe (95 people in the US photographing their own meals and logging them in a food record). The first is clean, controlled data. The second looks like what users actually shoot. A few choices did most of the work: A script with a fixed seed drew 25 meals from each quarter of the carb range, per dataset, so no part of the range ended up under-sampled by chance. Cafeteria plates photographed within the same ten minutes often look nearly identical, so the script capped how many it took from one ten-minute window. The confidence intervals come from a bootstrap that resamples whole clusters (all photos from one SNAPMe participant, or from one ten-minute cafeteria window), because near-duplicate photos aren't independent samples. There are two disjoint sets of 200. All error analysis and prompt work happened on the first set; the second stayed untouched until a result needed confirming. Every photo was downscaled to 1,024 px on the long side like the app does and sent through the same server code, with the same instructions and model settings. There's no eval-only prompt. The main metric is the share of meals within 10 g of the reference carbs, roughly one bread unit. Faile

IADevMobile
Interesse
dev.to

Best Data Warehouse Schema Documentation Tools (2026): SQLDBM, dbt, DataHub, Atlan & SchemaSpy Compared

Schema documentation used to be the thing teams promised to do "next sprint" and then never did. In 2026, that excuse doesn't hold up. Warehouses are bigger, teams are more distributed, and AI systems are reading your metadata to decide what a column actually means. If your docs are stale or missing, everything downstream suffers. I spent a few weeks digging into the tools people actually use to document Snowflake, Databricks, BigQuery and similar warehouses. Some are modeling-first. Some are catalog-first. One is a free command-line generator that's been around forever. They all approach "documentation" from a different angle, and that difference matters more than most buyer guides admit. Here's my honest take on the five I'd actually consider: SqlDBM, dbt, DataHub, Atlan, and SchemaSpy. I'll explain what each one does well, where it falls short, and who it's really for. I looked at a few things that matter for real documentation work. How quickly a new team member can go from "connected to the warehouse" to "reading a useful description." Whether docs stay in sync with the actual schema or drift the moment someone runs a migration. Support for modern warehouses, especially Snowflake, Databricks, and BigQuery. Governance features like ownership, tags, and glossary. And collaboration, because documentation is a team sport and a one-person wiki always rots. I also weighed pricing honestly, including what you pay in engineering time for the free options. The schema documentation tool that doesn't just describe your warehouse, it governs the blueprint underneath it. After spending real time with every tool here, SqlDBM is the one I keep coming back to. It's cloud-native, browser-based, and code-free. Nothing to install, no local files to babysit, and it handles the full documentation lifecycle in a way the others don't quite match. What makes it stand out in this category is how tightly documentation is woven into the modeling workflow. You don't document after the fac

Dev
Interesse
dev.to

Stop Saying Your System Is "Fast and Scalable." That Is Not a Requirement.

Stop Saying Your System Is "Fast and Scalable." That Is Not a Requirement. Watch the 40-second version on YouTube Every system design interview has a moment where the candidate says the system should be "fast and scalable," and the interviewer's eyes glaze over. That is not a requirement. That is a wish. Wishes do not pick architectures. Numbers do. Here is the split that matters. Functional requirements are what the system does: login, search, checkout, upload a profile photo. Every candidate gets these right, and they are nearly useless, because two systems with identical features can need completely different architectures. Non-functional requirements are how well the system must do it: latency, throughput, availability, consistency, data scale. Name these first, because they pick your architecture for you. "Fast" at 50ms p95 is a CDN, edge caching, and a read path with no cross-region calls. "Fast" at 2 seconds p95 is a plain server and a nap. Same word, different system, different budget, different on-call pain. The non-obvious part: non-functionals are the interviewer's scoring rubric wearing a costume. Every "trade-off" discussion they steer you toward is a non-functional you never wrote down. Strong versus eventual consistency is not a philosophy question, it is a latency number and a conflict-resolution budget. Caching strategy is not a vibe, it is your read-to-write ratio. When you quantify, the design stops being a drawing exercise and starts being arithmetic, and arithmetic is much harder to argue with. This is not interview theater either. Real production outages are almost never "the feature was wrong." They are "nobody wrote down the number," followed by a database melting at 3 a.m. because someone assumed 100 requests a second meant 100,000. So steal this. Before you draw a single box, in an interview or a real design doc, fill in the five lines. It takes 30 seconds and it is the highest-ROI 30 seconds in architecture. REQUIREMENTS, QUANTIFIED (the 3

Infra
Interesse
dev.to

Everyone's Vibe Coding. Nobody's Talking About Verifying It

Everyone's vibe coding now. Prompt, ship, repeat. My feed is full of people building entire products over a weekend, and honestly? I'm one of them. But there's a conversation nobody's having, and it's the one that nearly cost me a launch last week: who verifies what the AI shipped? I'm a solo founder. I build fast, I ship fast — and a few weeks ago I asked an AI agent to do a proper QA pass on VayReach, my WhatsApp follow-up CRM for real-estate teams, before I put it in front of actual property dealers. Real users, real businesses. It came back with a defect log that made my stomach drop: dozens of findings, each with an ID (DEF-019, DEF-020…), a severity, exact reproduction steps, and what "fixed" would look like. Here's the part the "AI 10x'd my output" posts leave out. I fix things in batches using a coding AI, and the agent re-tests every fix on the live build after I deploy. Not "did the deploy succeed." Did the bug actually die. The latest round: 17 defects retested, 12 pass, 5 still failing. Verdict: NOT READY FOR LAUNCH. And the pattern that keeps repeating — the one I think every vibe coder needs to hear — is this: several "fixed" defects came back in a different broken state. One SKU-uniqueness validation stopped throwing a 500 error but started rejecting even valid SKUs. The fix didn't fix it. It changed how it was broken. "Fixed" is a claim, not a fact. Until something adversarial checks the live build, it's just a feeling you had while reading a green deploy log. When I wrote every line myself, I was slow — but I roughly knew where the bodies were buried. Now the AI writes fast, I review fast, and the bugs are confident. They don't look broken. They look shipped. That's what changed: the failure mode of modern solo development isn't "I can't build it." It's "I built it, it deploys, and I have no idea what's silently wrong." As the only developer, I'm structurally incapable of adversarial-testing my own work — AI-written or not. I know what I meant the c

IADev
Interesse
dev.to

Detecting Trust Abuse Around CVE-2026-67278 on RouterOS Devices

Detecting Trust Abuse Around CVE-2026-67278 on RouterOS Devices Vulnerability overview CVE-2026-67278 is a MikroTik RouterOS 7.x flaw in RSA/PKCS#1 v1.5 signature verification, disclosed by CERT Polska on 5 September 2026. Affected devices accept malformed signatures in TLS/X.509 certificate validation and RSA SSH host-key authentication. The complete fix ships in RouterOS 7.23.6 and 7.24.3. Because the device trust store holds a root CA certificate with public exponent e=3, an attacker who controls or redirects an outbound TLS connection can build a trusted intermediate and issue certificates for arbitrary host names without holding any private key. RSA-based SSH authentication is weakened by the same check. The attacker needs a redirection position, and the target must run an affected build. The flaw does not announce itself like a crash or an exploit drop. The visible signal is misdirected trust: outbound connections reaching unexpected endpoints, certificate chains that should not validate, or management automation talking to hosts it was not configured to reach. Left alone, a device can leak configuration or credential material outward. RouterOS 7.x: from 7.0.0 before 7.23.6, and from 7.24 before 7.24.3. Remediated builds are 7.23.6 (long-term) and 7.24.3 (stable). RouterOS 7.23.4 and 7.24.2 carried an incomplete fix. ZoomEye reported 9,559 assets for os="RouterOS" && service="ssh" on 23 September 2026, while vul.cve="CVE-2026-67278" returned 0. The product figure counts RouterOS SSH fingerprints rather than confirmed vulnerable devices, and the zero CVE figure does not establish absence. Search link: https://www.zoomeye.ai/searchResult?q=b3M9IlJvdXRlck9TIiAmJiBzZXJ2aWNlPSJzc2gi Upgrade to 7.23.6 or 7.24.3 and verify the running version. Baseline the outbound destinations each device contacts, then alert on new or changed endpoints. Log and review certificate validation failures rather than discarding them. Bound management access to trusted networks so a redir

SegurançaInfra
Interesse
dev.to

My Eval Said RAG Made Things Up. My Eval Was Wrong.

I maintain django-explain-errors, a Django middleware that catches unhandled exceptions in development and asks an LLM to explain them. It works in two modes: RAG-off (default): the model sees only the Django traceback. RAG-on: the model also sees relevant source code from your project, retrieved from a local sqlite-vec index by vector similarity. The whole argument for RAG-on is grounding. If the model can read your actual code, it should stop guessing at function names and parameters. So I built an eval harness to test that claim, and the first results said the opposite: RAG-on appeared to fabricate more than RAG-off. It took three versions of a single eval question to find out why. The short version: every layer in an eval pipeline can be working from less information than the thing it judges. When that happens, your metric measures the judge's blind spot, not the model. The harness runs against a small, deliberately breakable Django blog app with 15 fixtures. Each fixture is a URL that triggers one realistic failure: a bad queryset lookup, a missing null check, a typo'd template name, a recursive __str__. Ten of them have their cause in the app's own code. Five have a cause the traceback already names. For each fixture, the harness gets two explanations from gpt-4o-mini, one with RAG and one without. A separate judge model (Claude Sonnet via OpenRouter) compares them pairwise. It doesn't know which explanation used RAG, and which one it sees as "A" is randomized every time. The judge answers a fixed set of questions: did it find the cause, point to the fix location, propose a working fix, and explain it for a learner? Notice what's missing from that list. I didn't ask about fabrication at first. But reading the judge's reasoning, I kept seeing it penalize explanations for "inventing" details, usually when the other questions came out tied. The judge was deciding fabrication on its own, as an unstated tiebreaker. That meant fabrication was affecting the scores wi

IADev
Interesse
dev.to

The third most expensive x402 mistake: retrying a payment that already succeeded

The payment settled. You can see it on chain. But the result never came back: the tool never executed, or it executed and the response got lost in a timeout, a proxy, or a crash after settlement. The third most expensive x402 mistake is retrying that payment. It feels like the only option, and it is exactly the move that turns one lost result into two payments. Two traps people walk into: The double-payment trap. The retry signs a fresh EIP-3009 authorization for the same intent. If the first one settled (and a timeout or an opaque error told you nothing about whether it did), you have now paid twice. The protocol is blunt about the ambiguity: a duplicate submission of the same authorization can surface as a contract-level AuthorizationUsed revert, which looks identical to a genuine failure, so you cannot distinguish "already settled, stop" from "actually failed, try again" (x402-foundation/x402#452). Timeouts are worse: they describe what the wire did, not what the facilitator did, and the guidance from the tracker is direct that without a disciplined retry rule, "clients may retry in unsafe ways, potentially leading to duplicate payments" (x402-foundation/x402#831). The double-execution trap. Paying again usually means executing again. If the first execution ran and only the response was lost, the retry re-runs a job you already paid for and already consumed: a paid API call that mutates state, a purchase, a write. This is the double-jeopardy state: one retry, two failure modes, and each fresh signature is a fresh authorization to move funds. Underneath both is a protocol-level gap. x402 moves your money to the seller reliably and then goes quiet about whether you got anything back. As the most-discussed issue in the x402 tracker puts it: "x402 solves how agents pay... None of these layers prove delivery." Escrow, reputation, and orchestration all need to answer "did the agent actually deliver what was paid for," and right now each either skips the check or trusts

Dev
Interesse
dev.to

Running Playwright in GitHub Actions: named checks, sharding, one merged report, and a flakiness policy

A test pipeline has one job: give the team a fast signal it can trust. When a pull request goes red, the author should know what broke without opening a log. When it goes green, nobody should wonder whether a retry quietly hid a problem. This article walks through the pipeline of playwright-qa-showcase, a small public repository I use to show how I set up test automation when I lead QA on a project. It has 56 tests: BDD UI flows against SauceDemo, typed API tests against Restful Booker, axe-core accessibility scans, and unit tests for the test-support code. Every snippet below is taken from the real files, shortened for reading. Every number comes from a real run. My first version had a single Lint, typecheck, format job. It worked, but a red check told you only that "something in quality" failed. So I split it into five parallel jobs, each with its own name:, and each shows up as its own check on the pull request: jobs: lint: name: Lint runs-on: ubuntu-latest timeout-minutes: 10 steps: - uses: actions/checkout@v7 with: persist-credentials: false - uses: actions/setup-node@v7 with: node-version-file: .nvmrc cache: npm - run: npm ci - run: npm run lint # typecheck (Typecheck), format (Format), unit (Unit tests), gherkin (Gherkin): same shape None of the five needs a browser. Unit tests runs the pure-Node Playwright project that covers the helpers (money math, the accessibility baseline diff, a test data builder). Gherkin runs bddgen, which fails when a step has no definition, and then a guard I will come back to. In the real run of the PR that introduced this split, the five jobs finished in 10 to 18 seconds each. The browser tests wait for all of them: test: name: Tests (shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }}) needs: [lint, typecheck, format, unit, gherkin] Duplicating checkout, setup-node and npm ci five times looks wasteful, and on paper it is. In practice the npm cache makes each copy cheap, and the payoff is a PR page that reads like a checklist

Dev
Interesse
dev.to

Bash Isn't a Programming Language. It's a Text Substitution Engine.

Open your terminal right now and type this single line: x = 10 Hit Enter. What happens? bash: x: command not found... If you come from Python, JavaScript, Go, or Java, this error feels like a personal insult. You did not ask Bash to run an executable called x. You just wanted to store the number 10 inside a variable. Why does adding two tiny spaces around an equal sign make your shell lose its mind? For years, developers memorize shell quirks like superstitious rituals. We memorize that x=10 works without spaces, that you must put double quotes around every variable, and that 2>&1 is some magical incantation you copy-paste from Stack Overflow whenever you want to silence a cron job. When you treat Bash like a broken version of Python or JavaScript, every script you write feels fragile. The moment a filename contains a space, or a subshell silently swallows an exit code, your automated deployment breaks at 2 AM. Here is the secret that changed how I look at the command line: Bash is not a programming language in the way you think. It is a text substitution macro engine that glues Unix processes together. Once you grasp this single mental model, every single syntax weirdness in Bash stops being a mystery and starts making complete sense. Let's pull back the curtain on what the shell is actually doing before your code runs. In Python or JavaScript, the parser understands grammar. When it sees x = 10, it recognizes an identifier (x), an assignment operator (=), and a numeric literal (10). Whitespace is mostly cosmetic. Bash does not work like that. Bash sees the world through one simple rule: Every single line you type is treated as: command argument1 argument2 argument3... Before Bash evaluates what you want to do, it splits your raw input string into words separated by whitespace. When you write: x = 10 Bash splits that text into three distinct words: x (The command name) = (The first argument) 10 (The second argument) Bash then searches your system $PATH for an execu

Dev
Interesse
dev.to

DNS Tunneling and Egress Control: Closing the Channel That Almost Always Works

DNS Tunneling and Egress Control: Closing the Channel That Almost Always Works When an egress firewall blocks outbound traffic to the internet, there is one protocol it almost always has to leave open: DNS. Name resolution has to work, or nothing else does. That requirement makes the resolver a channel, and DNS tunneling is what happens when an attacker encodes data into queries and answers to move it in and out of a network. A tunnelling client controls a domain and a name server for it. To send data outbound, the client encodes the data into a label of a query for a subdomain it owns, such as a base32 or base64 string followed by the attacker's domain. The recursive resolver forwards the query, the attacker's name server receives it, and the encoded content is recovered from the label. Detection rests on the fact that most legitimate DNS traffic is boring. Records are cached, names are repeated, and query lengths are short. A tunnel breaks those properties in specific ways. Many organisations route all client DNS through an internal resolver and block direct outbound DNS from clients. That is the right first control, and it closes the easiest version of the attack. It does not close the channel, because the attacker's encoded data still travels through the resolver to the attacker's authoritative name server. Four layers work together. If DNS is closed as a channel, the pressure moves to whatever else egress allows. That is the argument for treating egress policy as an inventory exercise rather than a firewall rule set. Every allowed destination and protocol is a candidate channel, and the honest position is that most networks allow more than they can enumerate. DNS tunnelling works because name resolution cannot be fully blocked. The countermeasure is not to block it but to centralise it, log it, baseline it, and alert on the specific properties that ordinary resolution never produces: long high-entropy labels, high subdomain counts under one parent, unusual quer

SegurançaInfra
Interesse