SShortSingh.

Programming

0
ProgrammingDEV Community ·

Claude Code picked Resend in 88% of TypeScript email API tests, study finds

AgentAnalytics ran 64 automated attempts using Claude Code to implement transactional email features across four common SaaS tasks, requiring the AI agent to research providers independently before each attempt. Resend was selected in 56 of 64 runs and passed all available validators, while Postmark was chosen in the remaining eight attempts, all for delivery webhook tasks. Seven of those eight Postmark implementations failed a provider-specific authentication check due to reliance on HMAC signature verification that Postmark's own documentation does not support. The study found that Claude's decisions were heavily shaped by third-party comparison pages, as 93% of search results were comparison sites and no provider documentation page was directly fetched. Researchers noted the results reflect one model, one task family, and one retrieval setup, and do not constitute a general ranking of email provider capabilities.

0
ProgrammingDEV Community ·

Developer Finds Real AI Agent Traces Break Assumptions Built on Mock Data

A developer building agent-exec-trace, an OpenTelemetry-style observability layer for AI agents, discovered that testing against real-world data exposed critical flaws in the tool's design. During an initial pass over 100,000 agent traces from Hugging Face, one detector fired on every single trace while 28 of 35 rule-based detectors never triggered at all. The root cause was not faulty detector logic but incorrect assumptions about the shape of real traces, assumptions that had been validated only against well-behaved mock data. The project aims to go beyond traditional observability by capturing behavioral paths — including tool calls, planning steps, and cost spikes — to explain why an agent run went wrong, not just that it did. The developer's key takeaway is that field testing with real systems must happen early, before the rest of a project begins to feel complete.

0
ProgrammingDEV Community ·

STRIDE Framework: A Structured Approach to Identifying Application Security Threats

STRIDE is a threat-modeling framework designed to systematically uncover security vulnerabilities in applications, APIs, and cloud architectures. Each letter in the acronym represents a distinct threat category: Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, and Elevation of Privilege. Every category maps to a core security property, such as authentication, integrity, confidentiality, availability, and authorization. The framework is typically applied to a data-flow diagram by analyzing components like processes, data stores, and trust boundaries to determine which threat types apply. Common real-world examples include forged authentication tokens, unauthorized data modifications, and users exploiting role-based access controls to gain admin privileges.

0
ProgrammingDEV Community ·

Four Misconfigurations Behind Most WordPress Sitewide Outages, Ranked by Recovery Time

The vast majority of WordPress sitewide outages stem from just four misconfigurations: a plugin or theme update triggering a PHP fatal error, PHP resource limits set too low, a database failure due to MySQL hitting its limits or a full disk, and incorrect wp-config or site URL values. Recovery time, rather than frequency, is the more useful way to rank these failures, as the most common issue is also the easiest to fix, while rare InnoDB corruption on a full disk typically requires a full backup restore. Because wp-admin is usually unavailable during a sitewide outage, command-line tools like WP-CLI are often the fastest recovery path. Key preventive measures vary by user type — from locking down plugin auto-updates on shared family sites to isolating PHP-FPM pools per site for freelancers managing multiple installs. Every safeguard that prevents a bad change from causing an outage comes with a trade-off: added friction to routine site management.

0
ProgrammingDEV Community ·

Developer Builds RAG Pipeline Using Vision Language Model to Handle Mixed Document Formats

A developer has redesigned a semantic retrieval pipeline to address the challenge of processing heterogeneous input formats such as PDFs, spreadsheets, and images. The solution uses a Vision Language Model (VLM) as an extraction layer, converting each document page into an image and sending it to the model via the Ollama API for summarization and keyword extraction. The resulting text summaries are embedded and stored in PostgreSQL using the pgvector extension, enabling semantic search by an AI agent. The pipeline was optimized by switching from the Qwen3.5 20B model to the smaller 4B variant, improving processing speed and reducing resource consumption. Additionally, the model's built-in reasoning mode was disabled after it caused empty outputs on some pages by exhausting the token limit, with conciseness and retrieval quality remaining acceptable after the change.

0
ProgrammingDEV Community ·

Study: Human Oversight of AI Agents Misses 1 in 3 Threats, Developer Turns to Automated Testing

A browser-based game simulating AI agent oversight collected data from 40,000 runs and over 409,000 approve/deny decisions, revealing that average players correctly identified threats only 66.3% of the time. Nearly a third of all game sessions ended with a net negative score, highlighting what Anthropic calls 'permission fatigue' — the tendency for human attention to degrade as approval requests accumulate. A senior software engineer at BS23 in Dhaka used these findings to argue that human-in-the-loop review is equally unreliable at the software testing layer, not just at the command-approval level. In response, the engineer restructured the test suite for a Spring Boot AI agent to run 31 automated tests without any calls to a live language model, covering tools, services, vector search, and the web layer. The approach ensures that CI pipelines require no GPU or running model server, with only final end-to-end behavior checks left to manual review.

0
ProgrammingDEV Community ·

Tutorial: Build a User-Controlled Operating Mode Layer for AI Voice Companions

A developer tutorial published on DEV Community addresses a core design tension in AI voice companions: users want AI behavior to be predictable and controllable without approving every response. The proposed solution replaces over-reliance on system prompts with an explicit application-owned control layer that enforces one of three user-selected modes — Listen, Explore, or Advise. Built in TypeScript, the architecture places the application between speech recognition and the LLM, validating response types, tracking mode revisions, and managing stale or out-of-order replies. The tutorial integrates with Tencent RTC's Conversational AI platform, which handles real-time voice transport while the application retains ownership of session state, consent, and moderation. Key tools used include Zod for schema validation and a structured proposal system that ensures the LLM's output is checked against active policy before reaching the user.

0
ProgrammingDEV Community ·

Drop the System button: your theme toggle only needs two states

Web developer and standards advocate Lea Verou has argued in a new post that the common three-option theme toggle — Light, Dark, and System — exposes internal developer logic rather than serving actual user needs. Her core reasoning is that users only reach for a theme toggle when the current appearance is wrong for them, making a 'follow system' button redundant in that moment. She proposes a two-state toggle that stores no preference by default, writes light or dark only when the user overrides their OS setting, and clears that override if the user toggles back to match the OS. Crucially, the stored preference should never be silently cleared just because the OS setting happens to align with it later. Verou does allow for a full three-option control inside dedicated settings panels, but argues it has no place in a site's main header or footer.

0
ProgrammingDEV Community ·

Why pricing pages go stale: the case for observed data over estimates

A developer building a metered LLM product raised a common dilemma: usage allowances on pricing pages are either too abstract to be useful or too specific to stay accurate. The core problem, as analyzed in a post on DEV Community, is one of tense — estimates make forward-looking promises that quietly become false as models, features, and customer behavior evolve. The proposed fix is to replace forecast-style claims with time-stamped observations drawn from real customer data, such as reporting the median usage recorded in a specific recent period. This approach cannot decay because it describes something that already happened, and it gives prospective customers more meaningful context than a raw credit figure or a vague approximation. The author also recommends publishing top-decile usage figures so heavy users can self-select into higher tiers before hitting limits.

0
ProgrammingDEV Community ·

How a Single API Key and JSON Schema Can Unify Multi-Provider AI Classification

A software architecture pattern proposes replacing separate OpenAI, Claude, and Gemini client integrations in Node.js apps with a single scoped API key backed by a strict JSON output contract. In this design, a Python classification worker translates incoming requests into chat completions, validates responses, and returns provider-neutral results, while a routing layer maps profiles like 'interactive' or 'batch' to specific models. Application code never receives or selects a provider model ID, keeping the caller isolated from backend routing decisions. The architecture emphasizes that the real value lies not in the shared key itself, but in a reusable eval suite that makes any model route change measurable and reversible. Without logging which model versions produced each result, the approach warns, model routing remains difficult to audit or defend.

0
ProgrammingDEV Community ·

React useEvent Hook Solves Stale Closure Bug With Stable Callback Identity

React developers have long faced a dilemma when passing event handlers to child components or effects: either accept unstable function references that break memoization, or use useCallback and risk stale closures reading outdated state. The stale closure problem — where a handler captures an old snapshot of state rather than the current value — is considered one of the most common bugs in production React code. A solution called useEvent, originally proposed in an official React RFC in 2022, is now available via the @reactuses/core package and also exists as useEffectEvent in React 19.2. The hook returns a function with a permanently stable reference across renders, while its body always reads the latest state and props at call time. Developers are cautioned against calling the returned function during the render phase, as the hook is designed strictly for event and effect callbacks.

0
ProgrammingDEV Community ·

Why Quant Models Outperform Human Traders by Removing the Render Layer

A developer essay argues that human traders are fundamentally limited by how their brains 'render' raw market data into emotionally charged patterns, such as seeing a 'head and shoulders' formation in a price chart. This cognitive rendering process attaches memories, feelings, and associations to data before any conscious decision-making occurs, making purely disciplined trading nearly impossible. In contrast, machine learning models like XGBoost operate on plain numerical tables, splitting data by measurable thresholds and building hundreds of small decision trees without any emotional interpretation. The essay is the third in a series exploring the concept of the 'render layer' — the brain's tendency to collapse raw input into a subjective scene — and how it applies to both human cognition and AI systems. The author concludes that quantitative finance is one domain where keeping the render layer out of the decision process is not just preferable but essential.

0
ProgrammingDEV Community ·

Developer Advocates Building Small Projects and Shipping Early Over Perfection

A developer on DEV Community has shared reflections on the value of building small, independent projects. Their key takeaway is that simplicity and early shipping tend to be more effective than pursuing perfection. Even modest projects, they note, offer meaningful lessons in coding, deployment, design, and real-world user behaviour. The developer plans to periodically share personal development notes and experiments on the platform.

0
ProgrammingDEV Community ·

Developer Shares 4 Hands-On AI Guardrail Experiments With Real Model Outputs

A developer has published a practical guide demonstrating AI guardrails across four common failure modes: toxic output, hallucination, PII leakage, and role drift. Each experiment uses system prompt changes on the same model, making the difference in outputs immediately visible. The experiments are freely runnable via a Google Colab notebook using Groq's API, with no credit card required, and can be adapted for other OpenAI-compatible providers with just two lines of code. Production-grade tools highlighted include Llama Guard, Guardrails AI, Microsoft Presidio, and NeMo Guardrails. The author argues that guardrails should be treated as a foundational architectural layer rather than a last-minute safety addition.

0
ProgrammingDEV Community ·

Developer builds video-transcription SaaS for $5/month using Cloudflare free tier

A developer built Scriptery, a no-account video-to-text tool that generates timestamped transcripts and supports TXT, SRT, and VTT exports, frustrated by paywalls and time limits on existing tools. The entire web app runs on Cloudflare's free tier, using a single Worker to handle both the frontend and backend, while Workers AI powers transcription via OpenAI's Whisper model at no direct cost within daily limits. A $5-per-month VPS running yt-dlp handles video extraction, since Cloudflare Workers cannot run the tool and datacenter IPs face bot-checks from platforms like YouTube. Data storage relies on Cloudflare D1 for user and transcript records, and KV for rate limiting anonymous users by IP and cookie. The developer notes that marginal cost per new user is effectively zero at current scale, making the free tier sustainable and the paid tier highly profitable.

0
ProgrammingDEV Community ·

Wrong API Endpoint Made MCP Tool Return Drafts Instead of Published Articles

A developer discovered that a DEV.to MCP server tool called list_articles was silently returning unpublished drafts instead of published articles due to a wrong API endpoint. The tool's docstring promised published articles, but the underlying code called /articles/me, which returns all articles with drafts sorted first, rather than the correct /articles/me/published endpoint. Because the default page size was set to 10, any account holding 10 or more drafts would receive only drafts in the response, with no error or empty-list signal to indicate something was wrong. The bug went undetected across multiple code audits because the tool had never actually been executed in the developer's sandbox environment. The issue was confirmed through a reproducible test using a stubbed fixture, and fixed by updating the endpoint to /articles/me/published.

0
ProgrammingDEV Community ·

ModelPlane's BYOK Model Separates Gateway Keys from Provider Credentials

ModelPlane, an LLM gateway platform, has detailed its Bring Your Own Key (BYOK) security architecture designed to reduce risks from leaked API credentials. The system uses two distinct credential types: a gateway key that authenticates tenants and a separately stored backend key that holds the actual provider API credentials. Gateway keys are stripped from requests before they reach any upstream provider, ensuring a leaked gateway key cannot expose underlying OpenAI or Anthropic accounts. Provider keys are stored encrypted in Cloudflare Workers KV rather than in a standard database, limiting exposure from SQL injection or insider threats. The model aims to replace the common but risky practice of hardcoding or sharing provider keys across services by treating credentials as tenant-isolated infrastructure managed by the gateway.

0
ProgrammingDEV Community ·

New Open-Source Tool Detects Cross-Tenant Data Leakage in Multi-Tenant SaaS Apps

A developer has released mcp-tenant-isolation, an open-source static analysis scanner designed to catch tenant isolation failures in multi-tenant SaaS applications and MCP servers. The tool addresses a security blind spot left by popular scanners like Snyk, Semgrep, and CodeQL, which do not understand tenant context or track organizationId boundaries in database queries. It ships with 57 deterministic rules across seven categories, covering database queries, file storage, cache key scoping, IDOR vulnerabilities, logging, and MCP-specific patterns. The scanner can be installed via npm and run from the command line, producing a pass/fail verdict with detailed, actionable remediation guidance for each finding. It also supports SARIF output for direct integration with GitHub Code Scanning, making it suitable for CI/CD pipelines.

0
ProgrammingDEV Community ·

How Random Forests Use Distributed-System Logic to Make Stabler Predictions

A random forest is a machine learning algorithm that builds hundreds of independent decision trees, each trained on a random data resample and a random subset of features, then combines their outputs via majority vote. This design mirrors distributed systems thinking: no single point of failure, and errors cancel out because each tree fails differently. The key distinction from simple bagging is the forced feature randomization at each split, which ensures trees remain genuinely diverse rather than converging on the same dominant predictors. However, the approach breaks down when that diversity is illusory — trees trained on a biased dataset share the same blind spots, producing confident but uniformly wrong predictions. Random forests remain a widely used baseline for tabular business data before teams consider more complex deep learning solutions.

← NewerPage 39 of 1059Older →