SShortSingh.

Programming

0
ProgrammingDEV Community ·

Developer Builds Code-Repair Benchmark That Tests Beyond Prompt Examples

A software developer created 'invariant-repair-suite', a Python benchmark with eight code-repair cases, while participating in the Kaggle Benchmarking Challenge. The benchmark is designed to test whether AI models can preserve code behavior not explicitly demonstrated in the prompt, targeting quiet bugs that pass visible examples but break production invariants. Each case provides a contract, a buggy implementation, and two visible examples, while scoring weights hidden edge cases at 75% and visible regression checks at 25%. Reference fixes scored a perfect 1.0 overall, while the buggy starter implementations scored 0.57, confirming the harness can distinguish correct from plausible-but-incomplete code. The author outlines three core design rules: keep hidden test conditions out of the prompt, penalize regressions, and prefer executable assertions over model-based judgment.

0
ProgrammingDEV Community ·

How to Install Docker Engine on Debian 13 from the Official Repository

Docker can be installed on Debian 13 by adding the official Docker repository, which provides more up-to-date versions and timely security updates compared to Debian's own docker.io package. The process involves downloading Docker's GPG key, registering the official repository, and installing the Docker Engine along with the Compose plugin via apt. Once installed, users can verify the setup by running a test container and checking that the service is active. To avoid using sudo for every Docker command, the current user can be added to the docker group, though this grants effective root-level access on the server. Common issues such as missing package candidates or permission errors can be resolved by verifying the repository configuration or refreshing the SSH session to apply group membership changes.

0
ProgrammingDEV Community ·

How to Configure UFW Firewall on Debian to Secure Your Server

UFW (Uncomplicated Firewall) is a straightforward tool for hardening a Linux server by blocking all incoming connections except those explicitly permitted. The setup involves installing UFW on Debian, setting default policies to deny all incoming and allow all outgoing traffic, then allowlisting SSH, HTTP (port 80), and HTTPS (port 443) before activating the firewall. The critical step is allowing SSH access before enabling UFW to avoid locking yourself out of the server. Once activated, UFW runs automatically on system startup and supports both IPv4 and IPv6 rules. Users are advised to verify connectivity from a second SSH session before closing the original, and can recover from a lockout using a VNC console if needed.

0
ProgrammingDEV Community ·

What Working on a Japanese Engineering Team Actually Looks Like Day to Day

Daily work on Japanese engineering teams centres on frequent status updates rooted in the cultural practice of hou-ren-sou, where communicating problems early is valued over working silently. Technical decisions are engineer-led but go through multiple rounds of review involving many stakeholders, making approvals slower yet smoother to execute once reached. Overtime is legally capped under Japan's 2019 labour reforms, but the limits still permit close to 80 hours of overtime monthly, and violations carry criminal penalties. Foreign engineers are often caught off guard by 'fixed overtime pay', a common salary structure where a set number of overtime hours is already bundled into the headline figure, effectively lowering the real base pay. Candidates are advised to ask explicitly during interviews whether a salary includes fixed overtime and how many hours are assumed.

0
ProgrammingDEV Community ·

New Attention Technique Cuts Transformer KV Cache Memory by 45% With Minimal Accuracy Loss

Grouped Value Attention (GVA) is a new approach to transformer memory management that reduces persistent key-value cache scalars by approximately 45–47% compared to existing grouped-query attention methods. Instead of storing a full key matrix, GVA stores only grouped values and reconstructs keys on the fly during decoding. Tested on a 350-million-parameter model across five tasks, GVA matched GQA's average accuracy to within 0.01 points. Separately, DeepSeek-V4.1-Flash achieves even greater compression, shrinking its KV cache footprint to around one-eighth of its predecessor while reportedly improving performance. Both approaches show promise for enabling longer context windows on less powerful hardware, though real-world latency and throughput gains on commodity GPUs have yet to be confirmed.

0
ProgrammingDEV Community ·

How a calibration flaw taught a fraud detection AI to approve fraudulent transactions

A developer building an AI-powered fraud investigation system on TigerGraph discovered that a miscalibrated risk score threshold was causing the agent to incorrectly clear fraudulent transactions as legitimate. The system was designed as an agentic investigator using LangGraph and a TigerGraph graph database, where the AI gathers evidence iteratively before recommending an action and approval route. A key architectural decision kept all regulatory-critical logic — including the Bayesian ledger, policy engine, and approval routing — in a separate core module that is structurally prevented from importing any LLM library. To retrieve relevant past cases, the system fuses vector similarity search with graph traversal, addressing the shortcomings of using either method alone. The project highlights how measurement and calibration errors in underlying data can silently undermine even well-architected AI decision systems.

0
ProgrammingDEV Community ·

Developer Shares Key Lessons from Building Backend-Free Browser Tools with WebAssembly

A developer has shared architectural insights gained from building client-side browser utilities that handle tasks like PDF manipulation, image conversion, and cryptographic hashing without a backend server. The key finding was that offloading heavy computations to Web Workers prevents UI lag and maintains smooth 60 FPS performance when processing large binary files. Compiling native libraries to WebAssembly delivered near-native execution speeds for demanding tasks like document parsing and compression. Built-in browser APIs such as SubtleCrypto and Canvas API proved highly efficient for hashing and graphics rendering, adding no extra bundle weight. The developer also flagged memory management as a critical concern, noting that detached ArrayBuffers are not always immediately reclaimed by the browser's garbage collector.

0
ProgrammingHacker News ·

Jev-Based AI Code Review Tool Released on GitHub

An open-source code review tool called Jev Code Reviewer has been published on GitHub by egma-ai. The project leverages Jev, an AI-based framework, to automate the code review process. The repository was shared on Hacker News, where it received modest early engagement with 5 points and 2 comments. The tool appears aimed at developers looking to integrate AI-assisted code analysis into their workflows.

0
ProgrammingDEV Community ·

How to verify drand randomness beacons in your app using 30 lines of code

Developers building agents that rely on random numbers often use HTTP relay APIs, but these relays cannot be independently trusted to deliver unaltered data. The drand project, operated by the League of Entropy, publishes a public randomness beacon every three seconds using BLS signatures, allowing anyone to verify results offline with a pinned public key. By fetching the same round directly from drand's own endpoint and comparing it against the relay's response, developers can confirm the beacon has not been tampered with or replayed. A small code example using the drand-client npm package demonstrates how to perform this cross-verification in under 30 lines. The approach reduces reliance on relay trust and enables reproducible, auditable random sampling for use cases like reviewer selection, tie-breaking, or raffles.

0
ProgrammingDEV Community ·

Matrix tool verifies AI agent actions against Gmail instead of trusting agent logs

A new developer tool called Matrix, launched on day one at matrixverify.dev, addresses a key reliability gap in AI agents: they can report successful actions that never actually occurred, with observability tools showing clean traces because they rely solely on the agent's self-reporting. Matrix bypasses the agent's own account and queries the authoritative external system — currently Gmail — to return one of three verdicts: confirmed, contradicted, or inconclusive, each with supporting evidence. The tool distinguishes between two failure types: a missing tool call in the trace, where absence itself serves as evidence, and a call that completed cleanly but produced no real-world result, which only the mailbox can reveal. Inconclusive is treated as a valid first-class outcome, meaning the tool withholds judgment rather than risk falsely flagging a functioning agent. Currently limited to Gmail and compatible with LangChain or the SDK, the tool does not yet catch cases where an action was real but directed at the wrong target.

0
ProgrammingDEV Community ·

Developer releases npm tool to auto-generate aligned comment dividers in code

A developer frustrated with manually aligning comment-based section dividers in code files has published an open-source npm package called code-divider. The tool replaces lightweight inline markers like @reg and @sec with fully formatted, centered header blocks that consistently end at column 79. Users can run it from the command line, point it at a specific file or directory, or configure it to trigger automatically on save via editor extensions. The package supports over a dozen languages including TypeScript, Python, Go, Rust, and SQL, using each language's native comment syntax. Unlike editor snippets, the tool dynamically sizes the filler characters around each label so all headers remain uniform regardless of label length.

0
ProgrammingDEV Community ·

AI-Powered Intrusion Detection Systems Are Not Foolproof, Security Experts Warn

Artificial intelligence has significantly improved how organizations detect network threats, but AI-based intrusion detection systems (IDS) remain vulnerable to deliberate manipulation. Attackers can use evasion techniques to craft traffic that mimics normal behavior, slipping past a model's detection threshold without altering the attack itself. A separate threat called data poisoning can corrupt a model's training data over time, causing it to develop blind spots that are difficult to identify. Security researchers recommend defenses such as adversarial training, ensemble detection methods, and human analyst oversight to reduce these risks. Experts emphasize that the goal of AI-driven security is not invulnerability but making evasion costly, difficult, and detectable.

0
ProgrammingDEV Community ·

Tail Risk Costs Are Nonlinear: The Difference Between -25% and -31% Is Enormous

Financial researchers argue that crisis damage functions are not linear, meaning a marginally deeper market drawdown can carry vastly greater social and economic costs. Studies show that output losses from severe financial crises can persist for decades, with some estimates placing cumulative GDP losses between 63% and 302% of pre-crisis per-capita output. Historical data from 151 banking crises indicates that crisis severity follows a heavy-tailed distribution, similar to catastrophe insurance models used for natural disasters. Political consequences compound the economic damage: research covering over 800 elections found that far-right parties gain roughly 30% in vote share after financial crises, a pattern absent in ordinary recessions. The analysis uses a 2,000-path simulation to demonstrate that policy-induced leverage amplifies both the frequency and cost of crossing critical drawdown thresholds where cascading failures and political instability begin.

0
ProgrammingDEV Community ·

12-Week Roadmap Outlines How Developer Tools Should Use Full Repo Context

A newly published 12-week Developer Tools and Code Intelligence roadmap lays out a structured approach to building smarter, safer developer tooling. The plan begins with code review, static and dynamic analysis, and testing infrastructure as distinct but complementary evidence sources. A middle phase focuses on repository context, including codebase graphs, blast-radius analysis, and IDE or CLI integration to reflect real workflows. The final phase introduces coding agents, supply-chain health checks, and automated remediation, with an emphasis on transparency around why changes are suggested and how outcomes will be verified. The roadmap argues that effective developer tools must be repository-aware rather than generic, with measurable value and clearly visible limitations.

0
ProgrammingDEV Community ·

How Multi-Agent AI Swarms Cut a 45-Minute Task to Minutes Using Hive Logic

Software engineer Derek Wang argues that running AI agents serially creates a hard ceiling on efficiency, with elapsed time growing linearly and coordination costs mounting quickly. Drawing on Kevin Kelly's observations about decentralised bee colonies, Wang proposes splitting large tasks into independent parallel subtasks rather than relying on a single sequential agent. Instead of a central scheduler, his team adopted a work-stealing model where idle agents pull jobs from busier agents' queues, eliminating the bottleneck of fixed task assignment. A recurring failure mode — agents hanging unattended and wasting 30-plus minutes before human intervention — was resolved by adding a watchdog that automatically detects stalled agents, redistributes their work, and recovers within five minutes. Wang frames the key insight as structural: parallel task design provides automatic fault recovery, not just speed gains.

0
ProgrammingDEV Community ·

Dev Team Builds Graph-Powered Fraud Investigation Agent at TigerGraph Hacker House Goa

A development team participating in the TigerGraph Hacker House Goa challenge built an AI-driven fraud investigation agent that mirrors how a human analyst would review suspicious transactions. The agent uses TigerGraph to examine a card's transaction history, device profile, billing region, and past bank decisions on similar cases before recommending any action. It incorporates a LightGBM classifier trained on transaction data from July to October, achieving an AUC of 0.905 compared to the bank's own score of 0.866. When evidence is insufficient to act, the agent is designed to seek customer verification before blocking any transaction, following built-in fraud policy rules. The team also used graph algorithms to uncover a 28-card fraud ring linked to a single device and identified burst-purchase patterns tied to known benchmark cases.

0
ProgrammingDEV Community ·

Developer builds serverless multiplayer browser game using real orbital physics

A developer has released Lagario 3: Órbita, a free multiplayer browser game inspired by agar.io where players navigate planets governed by inverse-square gravity and real momentum. The game runs entirely without a dedicated game server — the room creator's browser hosts the simulation via a Web Worker, while other players connect through WebRTC using Nostr relays for signalling. To handle host disconnections, the system automatically migrates hosting to the next peer in roster order, restoring the latest world checkpoint and bumping an epoch number to resolve conflicts. Physics are shared between host and client through a single module, with gravity tweaked for playability by scaling pull relative to each planet's thrust capacity. The game is playable for free on desktop and mobile at lagario.thomasar.dev with no account required.

0
ProgrammingDEV Community ·

CDN and Edge Caching: How Distributed Networks Cut Latency by 10x

When a web application hosted on a single origin server goes viral, users in distant regions like Australia can experience latency of 300–500ms due to the physical distance data must travel. A Content Delivery Network (CDN) solves this by maintaining servers at multiple global locations, serving cached content from the node closest to the requesting user. This can reduce latency to as low as 30–50ms, roughly a tenfold improvement in response speed. CDNs are best suited for static assets such as images, CSS, JavaScript, and rarely changing API responses, while dynamic or user-specific pages like login or checkout screens should not be cached. To handle cache invalidation challenges, developers can use cache-busting techniques such as appending content hashes to file URLs, ensuring browsers and CDNs fetch updated files when content changes.

0
ProgrammingDEV Community ·

AI Agent Spent Two Weeks Optimizing YouTube Links That Were Never Clickable

An autonomous AI agent managing a digital-products side project spent two weeks attempting to optimize links placed in YouTube video descriptions, unaware the links were non-functional. Of the 34 videos carrying the product link, 33 were YouTube Shorts, which have not supported clickable description links since August 31, 2023. The agent repeatedly proposed wording and placement changes, interpreting flat product-page traffic as a messaging problem rather than a platform limitation. The error was traced to an unchecked assumption: that a link written in a description could actually be clicked by viewers. The issue was resolved by flagging Shorts links as non-clickable in the codebase and redirecting effort to the channel profile link, the one clickable placement YouTube Shorts does support.

← NewerPage 941 of 3187Older →