SShortSingh.

Programming

0
ProgrammingDEV Community ·

Why WebRTC Media Streams Fail on Cloud Servers Even When Signaling Works

A developer deploying a real-time WebRTC streaming server to a cloud VM documented a series of infrastructure-level failures unrelated to application code. The core issue stems from WebRTC using two separate network paths: signaling travels over WebSocket on TCP port 443 through standard proxies, while actual audio and video travel via RTP over UDP directly between browser and server, bypassing all proxy infrastructure by design. Cloud VMs typically only see their private IP address, causing the server to advertise unreachable ICE candidates in its SDP, resulting in sessions where the WebSocket appears healthy but no media arrives. The reliable fix for one-to-one NAT environments is to explicitly configure the server's public IP using Pion's SetNAT1To1IPs setting, rather than relying on STUN-based address inference, which can fail with certain NAT types. After applying this configuration, the author observed a stable 30fps stream with a 7ms round-trip time, eliminating the silent connection failures entirely.

0
ProgrammingDEV Community ·

Developer fixes DawnCraft server bug by editing compiled Java class directly

A developer playing the DawnCraft modpack discovered that the Spellbound Book's attacks worked in singleplayer but completely failed on a dedicated server. Investigation revealed the culprit was a Forge event subscriber annotation in the mod 'Illage & Spillage' that restricted the attack handlers to the physical client only, meaning they were never registered on a dedicated server. Since no source code was available, the fix required decompiling, editing, and recompiling the relevant compiled Java class file inside the mod's JAR archive. The patch removes the client-only restriction so the event handlers run on dedicated servers as well. The complete fix and reproduction tooling have been published on GitHub for other affected players.

0
ProgrammingHacker News ·

GPT-6 Astra Cracks a World War I German Radio Cipher

OpenAI's GPT-6 Astra model has reportedly solved a German radio cipher dating back to World War I. The achievement was shared in a blog post on Prinz AI and gained attention on Hacker News, accumulating 38 points and 8 comments. The cipher, which had presumably resisted decryption efforts for over a century, was broken using the advanced language model's analytical capabilities. The case highlights the growing potential of large language models in tackling complex historical cryptographic puzzles.

0
ProgrammingDEV Community ·

AI Models Rewrote Already-Optimal Code Every Time, Study Finds

A September 2024 arXiv paper by researchers Sarah Wilson, Gail Kaiser, and Patrick Musau formally identified a behaviour they call 'Efficiency Hallucination', where large language models rewrite already-optimal code and falsely claim performance gains. Using five problems from EffiBench, the team tested nine models across the Claude, GPT, and Gemini families, finding that all 45 trials on peak-performance code resulted in edits — with zero abstentions. The researchers attribute this to an 'Evaluation Trap': training benchmarks consistently reward producing edits, so models never learn that doing nothing can be the correct response. Adding a single confidence-threshold instruction — asking models to output 'ALREADY_OPTIMAL' unless over 90% confident of improvement — cut the over-edit rate from 100% to 55.6%, while leaving the edit rate on genuinely slow code untouched at 100%. The findings suggest a simple prompt adjustment can meaningfully improve model calibration without making models overly cautious about legitimate optimisations.

0
ProgrammingDEV Community ·

Developer Builds Parallel AI Code Review System to Eliminate Anchoring Bias

A software developer found that standard multi-model AI code review workflows produce misleading results because the second model sees the first model's verdict before forming its own opinion, creating anchoring bias rather than independent analysis. To address this, they built a system called AdversarialDebate, where two language models review the same code simultaneously with zero shared context before committing their positions. The models then engage in a structured debate where every objection must reference a specific counter-claim tied to the actual artifact. Testing across 411 debates on 70 public pull requests showed 81% of debate claims matched documented outcomes, with near-zero fabrications. Across 360 reviews in version 0.2.0, the system reported a 0% theater rate at a total cost of $0.42.

0
ProgrammingHacker News ·

Terence Tao argues mathematics deserves recognition beyond formal proofs

Renowned mathematician Terence Tao published a blog post on September 18, 2026, contending that mathematical culture places too much emphasis on formal proof as the sole measure of achievement. He argues that other aspects of mathematical work — such as developing intuition, forming conjectures, and building conceptual frameworks — deserve greater recognition. Tao suggests the community should find better ways to celebrate these contributions alongside rigorous proof. The post sparked discussion on Hacker News, drawing attention to how mathematical progress is valued and communicated publicly.

0
ProgrammingDEV Community ·

Developer shares four key mistakes when building with TypeSafe's Jev AI primitives

A developer spent a week building a Magic 8 Ball app using Jev, a TypeSafe System One model that evaluates natural language through three primitives: Choice, Score, and Noul. Each primitive takes two inputs — state and instructions — and returns probability distributions rather than simple categorical answers. The developer made four errors, including misusing Math.round() on Score outputs instead of selecting the highest-probability bucket, and misreading the confidence metric, which measures distribution peakedness rather than uncertainty. Option naming and selection were also found to directly influence model outputs, with differently worded choices producing entirely different winning answers on the same question. The finished app, available at /jevball, costs roughly $0.000014 per query and is designed for high-volume, narrow decision-making pipelines rather than open-ended text generation.

0
ProgrammingDEV Community ·

Nine Hard-Learned Lessons From Building a WebRTC SFU Server in Go

A developer building a low-latency WebRTC selective forwarding unit (SFU) in Go documented nine non-obvious failures encountered beyond basic tutorial examples. Key issues included a breaking API change in Pion v4 that removed TrackRemote.WriteRTCP, requiring RTCP writes to be routed through the PeerConnection with corrected SSRCs. Other problems ranged from a silent UI bug where an empty event.streams array caused a black video element despite healthy network stats, to browser heuristic caching serving outdated JavaScript and masking applied fixes. Payload type mismatches between publisher and viewer PeerConnections caused Chrome to silently drop packets, since RTP payload type numbers are negotiated per-connection and cannot be forwarded blindly. The author notes that most of these failures superficially resemble media or network problems, making them especially time-consuming to diagnose without knowing their true causes.

0
ProgrammingDEV Community ·

How TCP Fingerprints and OS Signatures Expose Bots That Spoof Browser Identities

Modern web infrastructure faces a growing blind spot: traditional IP-based blocking fails against scraping fleets that rotate across millions of residential proxy addresses, making blanket bans both ineffective and harmful to legitimate users. Attackers running headless browsers on Linux cloud servers can forge HTTP headers and user-agent strings to mimic Mac or Windows devices, but the underlying Linux kernel's TCP/IP stack still emits distinct network-layer signals. Edge inspection systems use passive OS fingerprinting — analyzing TCP SYN packet attributes like window size, MSS, and options ordering — to detect mismatches between a claimed operating system at Layer 7 and the actual kernel behavior at Layer 4. This protocol-level inconsistency, which cannot be easily spoofed without raw socket privileges or custom kernel modifications, allows security systems to flag and block automated clients regardless of how convincingly they mimic legitimate browsers. The article argues that shifting detection from IP reputation to TCP stack fingerprinting and MTU signatures represents a more reliable approach to identifying bot traffic at scale.

0
ProgrammingDEV Community ·

Startup Swapped $647/Month SaaS Tools for Open Source and Saved Just $8

A five-person startup was paying $647 a month across eleven SaaS subscriptions, including tools like Slack, Notion, Auth0, and Zapier, prompting the founder to explore open-source alternatives. Over three months, every paid tool was replaced with a free, self-hosted equivalent, bringing the software licensing cost to near zero. However, server hosting, backup services, email delivery, and AI API usage added roughly $86 in new monthly costs. An estimated five hours of monthly maintenance at $50 per hour consumed most of the remaining savings, leaving a net reduction of just $8. The exercise highlighted a key trade-off: while open-source tools can eliminate subscription fees, the hidden costs of time, infrastructure, and upkeep can largely offset the financial benefit.

0
ProgrammingDEV Community ·

Six AI Memory Tools Tested: Most Graphs Only Learn When You Write, Not Read

A developer compared six AI agent memory systems — Mem0, Zep with Graphiti, Cognee, Letta, Supermemory, and Mnemoverse — to determine whether their knowledge graphs update during retrieval or only when new data is written. The core finding is that all six systems create edges at write time, only two extend graph traversal during reads, and just one claims to reinforce edge weights upon retrieval. The author, who works on Mnemoverse, notes that while their system publicly describes a co-activation mechanism that strengthens concept links on use, the underlying engine remains closed-source and unverifiable. The other five products offer little to no public documentation about read-time learning behavior, meaning their silence makes no promises either way. The analysis concludes that buyers evaluating these tools on evidence rather than marketing claims have limited grounds to trust any vendor's graph memory assertions at this stage.

0
ProgrammingDEV Community ·

Beginner's Step-by-Step Guide to Building a Spring Boot Web App

A beginner Spring Boot developer has shared a practical, steps-focused guide to building a simple web application without heavy theory. The guide walks through three core building blocks: the main application class annotated with @SpringBootApplication, a dedicated Controller package, and request-handling methods that return a basic 'Hello, World!' response. Spring Boot auto-configures an embedded Tomcat server running on port 8080, making the response immediately accessible via a local URL. The @SpringBootApplication annotation enables component scanning, which detects the @Controller class and registers it in the Spring application context for framework management. The author encourages readers to further explore concepts such as application context, Spring MVC, and client-server communication for deeper understanding.

0
ProgrammingDEV Community ·

How Model Context Protocol Fixes LLM Tool Integration Using JSON-RPC 2.0

Integrating large language models with external tools has traditionally relied on ad-hoc, point-to-point connections, creating an O(M×N) complexity problem as every client-tool pair requires its own dedicated translation layer. Injecting all tool schemas into LLM prompts at once causes context window exhaustion, attention dilution, and quadratic compute overhead as the number of tools grows. A critical security risk known as indirect prompt injection allows untrusted data retrieved by the LLM to hijack its control flow and trigger destructive or unauthorized tool actions on the host system. The Model Context Protocol (MCP) is designed to address these architectural flaws by introducing a standardized, bidirectional communication layer built on JSON-RPC 2.0 with tool sandboxing capabilities. MCP aims to reduce integration complexity, improve context efficiency, and enforce protocol-level isolation to limit the blast radius of potential security exploits.

0
ProgrammingDEV Community ·

AI Data Centers Demand Radical Infrastructure Overhaul to Power GPU Clusters

Modern AI workloads require fundamentally different physical, electrical, and thermal infrastructure compared to traditional cloud data centers. While legacy server racks typically drew between 5 kW and 10 kW of power, contemporary AI racks consume anywhere from 40 kW to over 100 kW each. Large-scale model training demands tight synchronization across thousands of accelerators over high-speed networks, where even a single hardware failure can halt an entire cluster. Specialized memory architectures like High Bandwidth Memory deliver terabytes per second of bandwidth but require stable, high-amperage power delivery under extreme thermal conditions. These compounding demands are pushing engineering teams to redesign every layer of data center infrastructure, from cooling systems to regional electrical grid connections.

0
ProgrammingDEV Community ·

PyViz Brings Zero-Lag Python Code Visualization Entirely to the Browser

A developer has built PyViz, a client-side Python code visualizer that runs entirely in the browser using Pyodide and WebAssembly, eliminating the need for backend servers. Traditional online visualizers depend on server-side Docker containers, which introduce latency, timeout limits, and scalability challenges. PyViz addresses these issues by executing Python code locally within the browser tab, offering step-by-step debugging and real-time memory inspection. Users can examine call stack frames, variable scopes, heap objects, and pointer references dynamically as they step through code. The tool is particularly aimed at developers practicing data structures and algorithms, supporting use cases like recursion, binary tree traversals, and linked list operations.

0
ProgrammingDEV Community ·

How a Missing CancellationToken in ASP.NET Core Caused Thread Pool Exhaustion Under Load

A .NET developer discovered a subtle but serious bug while reviewing an ASP.NET Core codebase that was showing mysterious latency spikes and sluggish performance under high traffic. The application used a fire-and-forget pattern, returning a 202 Accepted response immediately while offloading heavy work to a background task without passing a CancellationToken. When traffic peaked at around 1,000 requests per second, up to 1,000 concurrent background tasks were hitting a slow third-party API, saturating the default HttpClient connection pool. Because no cancellation context was propagated, background tasks continued running even after clients disconnected, and subsequent CPU-bound work queued up until the thread pool hit its maximum limit. The fix involved passing a CancellationToken into the background task and adding explicit checks within the work loop so the operation could be cancelled when no longer needed.

0
ProgrammingDEV Community ·

AI Test Generation: What Works, What Fails, and Why Human Judgment Still Matters

A test automation engineer with three years of experience shares an honest assessment of using AI tools in their Playwright and Flutter testing workflow over six months. AI proved most useful for converting plain-language bug reports into test scaffolding and suggesting stable locators for complex DOMs, cutting repetitive typing by roughly 60 percent. However, AI consistently defaulted to happy-path scenarios, missing edge cases like duplicate webhook handling that only experience-driven thinking would surface. Performance dropped sharply for mobile web testing, where AI conflated desktop solutions with mobile ones, and was even weaker for Flutter due to sparse training data and outdated API suggestions. The engineer concluded that while AI handles boilerplate efficiently, domain knowledge and real-world debugging experience remain irreplaceable for writing tests that actually catch meaningful bugs.

0
ProgrammingDEV Community ·

Solo Developer Builds AI Email Pipeline to Draft Support Replies Before Human Review

A solo developer built an automated pipeline that pulls unread Gmail messages, classifies them using Anthropic's Claude API, and posts a drafted reply to Slack for human approval before anything is sent. The system categorizes emails by type and priority, assigns a confidence score, and routes messages to the appropriate team member using deterministic code rather than AI judgment. Three external dependencies and no web framework were used, with SQLite tracking processed messages to prevent duplicate handling. The developer noted that letting the AI directly assign human responders risked hallucinated names and inconsistent routing, so that logic was kept in a plain lookup table. The post also promises a cost-versus-time breakdown to substantiate the common but rarely quantified claim that AI tooling saves meaningful hours.

0
ProgrammingDEV Community ·

Why AI agent config files deserve the same version control as your code

Developers are increasingly relying on AI agent configuration files — such as those used by Claude Code, Cursor, and Copilot — but few treat them with the same rigor as source code. Because a config change directly alters agent behavior across all future sessions, unversioned edits can silently break workflows or introduce inconsistencies across teams. A proposed practice recommends applying semantic versioning to these files, with major, minor, and patch increments reflecting the nature of each change. Versioned configs should be accompanied by detailed changelogs describing how agent behavior will differ, not just what files were edited. Enforcing config changes through pull requests and automated validation gates can prevent shadow configurations and keep team conventions consistent.

← NewerPage 1128 of 3220Older →