SShortSingh.

Programming

0
ProgrammingDEV Community ·

Router-First Architecture Beats LLM Cascades for Latency-Sensitive Apps

For interactive applications, choosing between LLM routing and cascading is a critical engineering decision that directly affects latency, cost, and user experience. A predictive router selects a single model before generation, adding only 2–35ms overhead while delivering predictable tail latency and no redundant token processing. Cascades, by contrast, send every request through a cheap model first and escalate to stronger models when a verifier fails — meaning even a 1–3% escalation rate can eliminate most cost savings. Experts recommend a router-first approach for apps with strict response-time requirements, especially when traffic includes clearly classifiable tasks like extraction, summarization, or FAQ responses. Cascades remain preferable only when outputs are easily verifiable and accuracy matters more than tail latency.

0
ProgrammingDEV Community ·

How LectuLibre Built a Chunking Pipeline to Translate Full Books Using AI

Startup LectuLibre developed an AI-powered book translation pipeline after discovering that sending entire books to large language models in one request was too costly, unreliable, and prone to quality degradation over long contexts. The team split books into overlapping token-aware chunks of roughly 3,000 tokens each, using tiktoken for precise token counting after finding LangChain's character-based splitter caused chunks to exceed model limits. Each chunk is translated using Anthropic's Claude 3.5 Sonnet alongside a dynamic context buffer containing a running glossary of character names and terms, plus a rolling summary of previously translated chapters stored in PostgreSQL. After translating each chunk, the pipeline extracts new terminology and generates a short summary to carry forward into the next chunk, preserving stylistic and narrative consistency throughout. For a typical 120,000-word novel, this approach produces around 60 chunks, with the assembled output forming a complete, context-coherent translated book.

0
ProgrammingDEV Community ·

Microsoft Agent Framework Harness enables autonomous multi-step AI agents in C#

A developer tutorial published on DEV Community explains how to use Microsoft Agent Framework's Agent Harness to build autonomous, multi-step AI agents in C#. The Harness wraps an IChatClient with a bounded loop runtime, eliminating the need to manually write iteration logic, tool approval, and context management. The article walks through a real example called TopicResearchAgent, a console app that autonomously researches a given topic by decomposing it into questions, running multiple Tavily Search queries, and compiling a structured report. The agent decides on its own when sufficient evidence has been gathered, using a LoopEvaluator as the stopping condition. Full source code for the example is available on GitHub.

0
ProgrammingDEV Community ·

Mutation Testing Tools Tested for File Cleanup After Forced Kills

A developer built a conformance suite to test whether four popular mutation testing frameworks — mutmut, cosmic-ray, Stryker, and PIT — leave source files in a mutated state when forcibly terminated mid-run. The test method hashed the source tree, launched each framework, waited until a file was visibly mutated on disk, killed the process, then hashed the tree again. Three of the four tools — mutmut, Stryker, and PIT — were found to be architecturally safe because they either mutate copies or work entirely in memory, never touching the original source files. cosmic-ray, however, edits the actual source file and restores it only after completing a mutation cycle, meaning a SIGTERM signal sent by a timeout before restoration leaves the file permanently mutated. The finding is described as narrow in scope, affecting only interrupted runs of cosmic-ray rather than its normal operation, but it highlights how architecture provides stronger safety guarantees than signal handling alone.

0
ProgrammingDEV Community ·

How a Unique Database Constraint Solves Duplicate Payments in Fintech Systems

A developer building a double-entry payments ledger on AWS EKS discovered that handling duplicate 'send money' requests was far harder than managing cloud infrastructure. A naive check-then-insert approach in Python appeared safe but contained a concurrency window where two simultaneous retries could both pass the duplicate check and trigger double debits. The real fix came from a single database-level UNIQUE constraint on the idempotency key, combined with a Postgres ON CONFLICT clause, making deduplication atomic at the storage layer rather than relying on application logic. An ElastiCache layer was added for performance, but only as a cache written after database commit, ensuring Redis failures affect latency rather than financial correctness. The key lesson: sequential tests cannot expose this class of bug, making concurrency-aware design and database-enforced constraints essential in payment systems.

0
ProgrammingDEV Community ·

GeneSign Agent Screens DNA Sequences for Biosecurity Threats Before Physical Synthesis

A developer has submitted GeneSign to the Sanity Challenge, an autonomous biosecurity agent designed to screen genetic sequences against a structured knowledge base before physical DNA fabrication occurs. The system queries a Sanity-hosted Content Lake using GROQ to retrieve pathogen taxonomies, biosafety classifications, and CDC-regulated sequence motifs, enabling context-aware threat assessment beyond simple keyword matching. NVIDIA Nemotron, a large language model, generates compliance rationales and can trigger automated interlocks if a sequence is flagged as high-risk. If a sequence clears screening, GeneSign embeds tamper-resistant Ed25519 cryptographic watermarks into coding sequences using synonymous codons, preserving the original amino acid translation. The open-source project includes a live web application with 3D DNA visualization and a threat ledger, with its codebase publicly available on GitHub.

0
ProgrammingDEV Community ·

Developer Uses Grok API to Auto-Deliver Curated AI Updates via Messaging App

A software engineer built a lightweight automation pipeline to receive curated AI news each morning without having to browse X (formerly Twitter). The system chains the Grok API, Google Apps Script, and the LINE messaging app to deliver a short daily digest on a scheduled basis. Grok handles both retrieving content from X and filtering it down to topics relevant to software engineering, such as coding agents, developer tools, and CI/CD workflows. The developer found that crafting precise selection criteria in the prompt — rather than simply asking for 'important AI news' — was the most critical step in making the output genuinely useful. The project was motivated by a desire to access fast-moving technical information on X while avoiding the mental fatigue associated with scrolling the platform directly.

0
ProgrammingHacker News ·

SDCC: Open-Source C Compiler Designed for Small Embedded Devices

SDCC, which stands for Small Device C Compiler, is a free and open-source compiler optimized for use with small microcontrollers and embedded systems. It supports a range of processor architectures commonly used in low-resource hardware development. The project is hosted on SourceForge and has been available to developers as a community-driven tool. SDCC enables programmers to write C code that targets constrained devices where memory and processing power are limited. The project recently surfaced on Hacker News, drawing brief attention from the developer community.

0
ProgrammingDEV Community ·

How a Playwright test clicked a button real users could never reach

A developer shipped a blog editor inside a dashboard that accidentally rendered in a fixed, non-scrollable shell due to a missing exclusion condition, cutting off the bottom of the form for all users. The end-to-end test still passed because Playwright's click() method automatically scrolls elements into view via JavaScript, bypassing the overflow:hidden restriction that blocked mouse and keyboard input. This revealed a key misunderstanding: an element with overflow:hidden still has a live scrollTop property and can be scrolled programmatically, even though users cannot scroll it manually. The bug was fixed with a two-word code addition and an inline comment to warn future developers. The incident highlights how automated tests can silently succeed on interactions that are genuinely inaccessible to real users.

0
ProgrammingDEV Community ·

Laramod: A Lightweight Laravel Module System Built for Large Applications

A developer has released Laramod, a Laravel package designed to organise large applications into self-contained feature modules, each holding its own routes, controllers, models, migrations, and views. The tool addresses a common pain point where growing Laravel projects end up with hundreds of loosely related files sorted by type rather than by feature or purpose. Laramod was built after the author found existing solutions such as nWidart/laravel-modules and Laramod's lighter alternative too heavy or insufficiently flexible for their workflow. The package aims to let developers register a module with a single line, keep module configuration transparent and readable, and treat installed Composer packages identically to local modules. It draws conceptual inspiration from Django's app-based architecture and is designed to work with plain Laravel conventions without introducing proprietary abstractions.

0
ProgrammingDEV Community ·

Short-Lived AI Agent Tokens Can Limit Damage From Leaked Credentials

A September 2026 VentureBeat report found that exposed AI agent credentials were used to breach 395 organizations, highlighting how long-lived machine-to-machine tokens create serious security gaps. Unlike human passwords, AI agent credentials often remain valid for hours or days, meaning a leaked token stays exploitable long after it is compromised. A developer tested two agent configurations against identity provider Kinde — one using a static token valid for 24 hours and another that automatically rotates its token every 120 seconds before expiry. The rotating agent ensures that any stolen copy of its token becomes useless within minutes, dramatically shrinking the window of exposure. Both agents use the standard OAuth client-credentials flow, with Kinde's per-application token lifetime settings — not the grant type itself — determining how quickly each token expires.

0
ProgrammingDEV Community ·

Quant Trading Firm Open-Sources Gray-Scale Risk Model to Replace Binary Trade Vetoes

A quantitative crypto trading team has published its approach to replacing binary risk management with a dynamic 'gray-scale' scaling system. Traditional rule-based engines issue hard vetoes when recent win rates drop, potentially blocking high-confidence signals that still carry statistical edge. The new method instead reduces position size and tightens stop-losses proportionally, keeping strong signals active while limiting capital exposure. In a worked example involving a 90/100 confidence SHORT signal on NEARUSDT, the system cut position size by 30% and tightened the stop-loss by 10% rather than cancelling the trade outright. The team argues that hard vetoes destroy long-term expected value by conflating normal statistical variance with genuine model failure.

0
ProgrammingDEV Community ·

Developer Builds 227,000-Match Football Odds Analysis Pipeline Using LLM Architecture

A developer spent six months building an open-source football data analysis pipeline called PitchQuant, processing over 227,000 historical matches to study what signals exist within betting odds. The system combines de-vigging, ELO ratings, Dixon-Coles Poisson modelling, and Kelly criterion calculations, with an LLM coordinating a strict multi-step inference process governed by 34 knowledge files and 238 automated checks. By combining individually weak statistical signals with calibrated weighting and rigorous backtesting, the pipeline improved directional accuracy from 48% to roughly 55%. Key findings include that Asian handicap movement is a stronger indicator than European odds alone, and that low-odds favourites with shallow handicap shifts win far less often than assumed. The project, released under an MIT licence on GitHub, is intended solely for academic research and explicitly does not claim to predict match outcomes.

0
ProgrammingDEV Community ·

Automation gap exposed: manual browser step silently stalled a 7-post cross-publishing queue

A five-step content cross-posting pipeline stalled for 72 hours with seven unmirrored articles, even though all automated components remained fully operational. The bottleneck was step four — a human or agent manually pasting content into a browser editor — which had been deliberately kept manual after the target platform moved its write API to a paid tier in May. The team had built automation around every adjacent task, shrinking the manual step to its minimum, but the manual step itself was simply not being completed. A monitoring system correctly flagged the backlog in amber for days, yet each session reviewing the dashboard assumed responsibility lay elsewhere since the automated steps were all green. The incident highlighted a process failure rather than a technical one: an amber alert requiring human action was repeatedly deferred because no session owned the incomplete manual step.

0
ProgrammingDEV Community ·

Schema and Entity Fixes Boost University Lead Conversion by 20%, Study Finds

A higher education marketing case study involving two university partners found that addressing entity gaps and updating structured data improved AI search visibility and conversion outcomes. One partner saw AI-related citations rise roughly 75%, from about 24,000 in January 2026 to approximately 42,000 by July 2026. Across both partners, the lead-to-payment conversion rate climbed from 7.8% in 2025 to 9.4% between January and August 2026, a gain of around 20%. The study, highlighted by Search Engine Land, emphasizes that AI citation growth is only commercially meaningful when it translates into qualified leads and completed transactions. Authors caution that the findings reflect a specific program and do not guarantee identical results from schema updates alone.

0
ProgrammingDEV Community ·

Developer Unveils Pudu, a New Statically Typed Language Targeting Services and Native Apps

A developer named Chris Michael has created Pudu, a statically typed, expression-oriented programming language designed for building services, developer tools, and native applications. The project is approaching its first 0.1.0 pre-release and already includes a standard library, testing infrastructure, editor integration, and documentation. Pudu is built around the principle that program uncertainty — such as potential failures or absent values — should be made explicit through the type system rather than handled implicitly. The language emphasizes exhaustive pattern matching, meaning the compiler flags cases where newly added type variants are not handled in existing code. The source code is publicly available on GitHub, and the creator has begun sharing the language's design goals and long-term vision more openly.

0
ProgrammingDEV Community ·

How to speak to AI agents effectively: key differences from human communication

A developer on DEV Community has outlined why dictating instructions to an AI agent requires a fundamentally different approach than speaking to a human or recording notes for yourself. Unlike a human listener, an AI agent treats every spoken word as a direct instruction with no one reviewing or interpreting it in between, meaning offhand remarks and implied constraints carry the same weight as explicit commands. The author identifies three core pitfalls: burying constraints as asides instead of stating them upfront, using multiple names for the same thing, and relying on spoken intonation to convey structure or emphasis — none of which survive transcription. They also caution against overloading a single session with multiple subjects, noting that even well-formed instructions get lost when too many decisions compete in one conversation. The practical advice is to state constraints before goals, use consistent terminology, number steps explicitly out loud, and type any literal details like file paths or commands rather than speaking them.

0
ProgrammingDEV Community ·

CVE-2024-1086: Critical Linux Kernel Flaw Allows Local Privilege Escalation to Root

A high-severity security vulnerability, CVE-2024-1086, has been identified in the Linux kernel's mac80211 wireless networking subsystem. The flaw exploits a use-after-free memory error, allowing a local attacker with limited access to escalate privileges all the way to root, gaining full control of the affected system. Major distributions including Debian and Ubuntu have confirmed the impact and released patches — DSA-5604-1 and USN-6640-1 respectively. Users are strongly advised to update their kernels immediately, as the attack vector involves unsecured Wi-Fi connections, raising the risk in public network environments. As a temporary measure until patching is possible, administrators can consider restricting local user access, isolating Wi-Fi networks, or disabling the mac80211 module if it is not required.

0
ProgrammingDEV Community ·

Why AI Coding Agents Fail in Production: The Forced Continuity Defect Explained

Modern AI coding agents trained on large language models perform well in clean, controlled environments but struggle in real-world production systems where software behaves in discrete, unpredictable ways. The core issue, termed the 'Forced Continuity Defect,' arises because transformer models operate on smooth mathematical probability curves and inherently assume gradual transitions between states. Production software, however, is governed by abrupt, cliff-like logic — a single missed asynchronous gap, integer overflow, or failed database transaction can cause catastrophic failure. A simple two-line AI-generated code snippet, for instance, may look correct but completely ignore the 200-millisecond network gap during which a user navigates away and the app crashes. This fundamental mismatch between how AI models reason and how real software behaves means that simply scaling compute or adding more rules cannot fully resolve the problem.

← NewerPage 1132 of 3220Older →