SShortSingh.

Programming

0
ProgrammingDEV Community ·

MongoDB's 16MB document limit can silently crash AI agents storing chat history

MongoDB enforces a hard 16MB BSON document size limit that cannot be raised through any server configuration, and AI agents that store growing conversation histories in a single document are vulnerable to silent failures when this limit is breached. When a document exceeds the limit, the write is rejected entirely — nothing is truncated or partially saved — which can cause agent runs to stall without any visible error or stack trace. A real-world case surfaced in the Mastra framework, where long-running agent workflow snapshots crossed the size threshold, causing the snapshot to be deleted and the stream to hang indefinitely. Developers can identify oversized documents using MongoDB's $bsonSize aggregation operator to rank documents by size and isolate which fields are consuming the most space. The recommended fix is to separate growing message histories into their own collection and use MongoDB's $push with $slice to cap array length atomically, keeping snapshot documents lean and within safe limits.

0
ProgrammingDEV Community ·

How a Foreign Key Silently Causes PostgreSQL Deadlocks in Concurrent Transactions

A developer building a multi-currency ledger on PostgreSQL discovered a recurring deadlock despite following standard lock-ordering practices. The root cause was an implicit FOR KEY SHARE lock that PostgreSQL automatically acquires on a referenced row whenever a foreign key constraint is checked during an INSERT. When two concurrent transactions each inserted a deposit row pointing to the same account, both held a FOR KEY SHARE lock on that account row. Attempting a SELECT FOR UPDATE afterward caused each transaction to wait for the other to release its lock, creating a deadlock. The fix requires replacing FOR UPDATE with FOR NO KEY UPDATE, which is compatible with FOR KEY SHARE and prevents the conflict entirely.

0
ProgrammingDEV Community ·

How Internal Developer Platforms Create a 'Golden Path' for Engineering Teams

An Internal Developer Platform (IDP) is a curated set of tools, workflows, and self-service capabilities designed to help engineering teams build and deliver software faster and more consistently. Rather than every team independently solving the same infrastructure, CI/CD, and security challenges, a dedicated platform team solves them once and makes the solutions broadly available. The concept of a 'golden path' describes a well-maintained, well-documented default route that developers choose voluntarily because it is genuinely easier than alternatives. IDPs commonly fail when they are built on assumptions instead of developer feedback, or when they introduce bureaucratic friction that pushes engineers toward workarounds and shadow IT. A well-structured IDP typically spans four integrated layers — infrastructure, orchestration, self-service, and a developer portal — collectively reducing the cognitive load of operating modern software systems.

0
ProgrammingDEV Community ·

How AI text watermarking embeds hidden signatures in word choices

AI text watermarking works by subtly influencing which words a language model selects during text generation, without altering the model's underlying weights or making the output appear unusual. A secret key combined with preceding tokens assigns hidden scores to candidate words, and a method called tournament sampling uses these scores to determine which word is chosen. The resulting text looks entirely normal but carries a detectable pattern that persists even when copied across platforms. Google DeepMind introduced the underlying technique, SynthID-Text, in a 2024 Nature publication, and Anthropic adopted a version of it for its Claude model in August 2026. Anthropic stated the move is intended to satisfy transparency requirements under the EU AI Act.

0
ProgrammingDEV Community ·

Developer builds local tool to break down AI coding costs after $1,278 project bill

A developer discovered their side project cost $1,278 in API tokens across 542 prompts and 36 hours of work, prompting them to build an open-source tool called Bough. Bough reads the session transcript files that AI coding agents like Claude Code and Codex automatically save to a user's local machine, then visualises spending by task and sitting. The tool requires no account, API key, or internet connection, and is installable via a single command on Mac, Linux, or Windows. One key insight the tool surfaced is that most token costs come from the model re-reading prior conversation context on every reply, not from generating new code. The developer notes the dollar figures reflect published API rates, so users on flat subscriptions can treat the number as a measure of what their plan saved them.

0
ProgrammingDEV Community ·

Freelance Full-Stack Developer Offers 2 Project Slots for November

Vicente Reyes, a freelance developer since 2018, is accepting two client projects for November 2025. He has completed 25 projects for businesses across the UK, US, and Australia, including 11 production Shopify stores. Limiting intake to two slots ensures each project receives his full attention. Prospective clients can book a discovery call or send a project brief via direct message, with a response guaranteed within 24 hours. His portfolio is available at vicentereyes.org for those wishing to review his previous work.

0
ProgrammingDEV Community ·

AI coding agent Empryo outspends pi on cost using Opus 5 in four-bug benchmark

Developer and Empryo creator published a benchmark on 16 August 2026 comparing two AI coding agents, Empryo and pi, on their ability to fix four bugs sourced from the hono and opencode repositories. Both agents successfully resolved all four bugs when running on the Opus 5 model, making cost the key differentiator in this comparison. Empryo completed the round at a total cost of $2.27 versus pi's $3.10, though pi was cheaper on one individual task involving a cookie-mangling bug. The author notes the benchmark used a limited number of attempts per task and compared specific configurations — Empryo with 37 tools and a code map, pi with four tools — so results may not reflect all possible setups. A broader report covering six models acknowledges that pi can still be the cheaper option on less expensive models.

0
ProgrammingDEV Community ·

Developer builds free in-browser media tool to replace paywalled online converters

A developer frustrated with online file conversion services charging up to $15 per month for basic tasks has built a free browser-based alternative called SolveMyMedia. The tool runs entirely on the user's device using WebAssembly technologies, specifically ffmpeg.wasm and WebCodecs, meaning no files are uploaded to remote servers. Processing is handled locally by the user's own CPU or GPU, making conversions faster and keeping private data off third-party infrastructure. The project was shared on DEV Community, where the developer is seeking feedback on performance across different browser engines.

0
ProgrammingDEV Community ·

Rust Supports Custom Method Receivers Beyond &self and &mut self

Rust's ownership system extends beyond the commonly used &self and &mut self method receivers to include arbitrary self types such as self: &Arc and self: &Mutex. These specialized receivers are rarely seen in everyday application code but become valuable when designing concurrent and multi-threaded systems. Standard receivers cover shared borrowing, exclusive mutable borrowing, and full ownership transfer, while arbitrary self types allow methods to directly require smart-pointer wrappers. For example, a method declared with self: &Arc can internally clone the Arc and spawn async tasks without the caller needing to handle the clone explicitly. This feature lets developers encode thread-safety requirements directly into method signatures, making concurrent Rust APIs more expressive and harder to misuse.

0
ProgrammingHacker News ·

Go Developers Warned Against Tightly Coupling Code to GitHub

A software engineering blog post is urging Go developers to avoid building tight dependencies between their code and GitHub as a platform. The concern centers on the risks of relying on GitHub-specific features or infrastructure within Go projects. Such coupling can create fragility, making codebases harder to migrate or maintain if the platform changes or becomes unavailable. The post, shared on Hacker News, has sparked early discussion among developers about best practices for platform-agnostic Go development.

0
ProgrammingDEV Community ·

AI-Run Site Gets 125 Impressions, Zero Clicks on Top Git Query

An experimental website where AI agents handle writing, deployment, and measurement logged 125 impressions but zero clicks over seven days for the query 'git undo last commit keep changes.' The site ranked at position 10 on search results, with related keyword variants adding roughly 250 more impressions and equally no engagement. Editors diagnosed the problem as a trust gap rather than a keyword issue, responding with internal linking from stronger pages and refined meta descriptions. The site has since built an eight-post cluster around the topic, introduced a 48-hour fix rule for zero-click queries, and banned topic rotation without search data to justify it. Weekly visitors rose to 245 against a baseline of 79, though Google Search Console — the team's primary editorial tool — accounts for only about 11% of actual traffic.

0
ProgrammingDEV Community ·

How One Developer Built Reliable Human Interruption for 8-Voice AI Group Calls

A developer built AI Group Call, a mobile app that places up to eight AI voices — including Claude, GPT, Gemini, and Grok — on a single live voice call to help users think through ideas. The biggest technical challenge was not coordinating multiple AI speakers but enabling humans to reliably interrupt them mid-conversation. The solution involved custom energy-based voice activity detection on raw audio, a server-side conductor model to manage speaker turns, and layered echo cancellation after Android devices caused AI voices to loop back into the microphone. Multiple safeguards were stacked across capture, client, server, and transcript levels to distinguish genuine human speech from echo or background noise. The system prioritizes pausing an AI briefly over the far costlier mistake of talking over a human.

0
ProgrammingDEV Community ·

Developer Builds Camera Autofocus Agent That Only Cites Verified Manufacturer Quotes

A developer has launched 'Will It Focus,' a web-based AI agent that answers whether a given camera body, lens, and adapter combination will autofocus together. The tool covers viewfinder, live view, and video scenarios, and also works across different mounts and third-party adapters. Every quote the agent displays is verified against its original manufacturer document by code after the model responds, and any paraphrased text is flagged as such. If no manufacturer data exists for a queried combination, the agent declines to speculate rather than guessing. The project was built using Sanity's content platform and is publicly accessible without a login at will-it-focus.vercel.app.

0
ProgrammingDEV Community ·

How to Shrink Large PDFs Without Noticeable Quality Loss

Oversized PDFs are typically caused by high-resolution images, embedded fonts, duplicated content, and leftover metadata from incremental saves. Compression tools reduce file size by downsampling images, re-encoding them at lower quality, and stripping unused objects — some steps are lossy while structural cleanup is lossless. For screen viewing, 96–150 dpi images suffice, while standard printing calls for around 300 dpi. Experts recommend compressing a copy rather than the original, checking legibility after compression, and avoiding repeated compression cycles to prevent stacking quality loss. Scanning in grayscale, using 'web' export presets, and resizing photos before embedding them are practical ways to keep PDFs lean from the start.

0
ProgrammingDEV Community ·

AI Agent's Dev.to Post Hit by Phishing Bot Comment Within 38 Seconds

An AI agent publishing on Dev.to via API received a phishing comment just 38 seconds after its article went live at 01:04 UTC. The comment, posted by an account named 'Dev Support', urged account verification through a shortened link with a 12-hour deadline — classic signs of a phishing attempt. The agent identified the scam through standard red flags: no legitimate platform requests login credentials via a comment or a link shortener. However, because the Dev.to comment API returns 404 errors for both DELETE and POST requests, the agent was unable to remove the phishing comment or warn readers beneath the post. The incident highlights a security gap where API-based publishers can post content but have no ability to moderate or respond to harmful comments on their own articles.

0
ProgrammingDEV Community ·

Developer Fixes Broken Referral Program That Paid Out Nothing Due to Bad URL

A developer building a referral program for their Android app discovered the invite button had been pointing to an incorrect URL with no referral parameter, meaning no referrals were ever tracked. The flaw went unnoticed until the developer reviewed unrelated wallet code and found that users' balance fields could be written directly from their own devices without server-side verification. This security gap prompted a broader fix before the referral payouts could safely go live. The rebuilt system uses Android's Install Referrer API to properly attribute new installs, and limits referral code claims to within 60 minutes of account creation to prevent abuse. The developer advises others to close any client-writable balance or loosely verified action vulnerabilities before launching incentive features, rather than retrofitting fraud prevention afterward.

0
ProgrammingDEV Community ·

The true cost of building in-house AI answer tracking: a practical breakdown

Building an in-house AI visibility tracking system involves far more than avoiding API fees — engineering time, maintenance, and infrastructure all add significant cost. Each AI consumer product like ChatGPT, Perplexity, and Gemini requires its own custom parser, data-quality monitoring, and compliance review, multiplying effort with every engine added. Silent failures, interface changes without notice, and market-by-market collection needs make this a substantial distributed-systems project. A cost formula is proposed comparing build versus buy over a planned time horizon, factoring in engineer-months, infrastructure, and one-off legal reviews. The analysis highlights that build costs accrue before any value is delivered, maintenance scales with engine count rather than usage volume, and every engineer hour spent on collection is one not spent on higher-value analysis work.

0
ProgrammingDEV Community ·

Orca ADE Lets Developers Run Multiple Coding Agents in Parallel via Git Worktrees

Orca is an open-source Agent Development Environment (ADE) designed for agentic coding workflows, allowing users to manage multiple tasks simultaneously without conflicts. It leverages git worktrees to give each agent an isolated copy of the repository, preventing interference between concurrent changes. Rather than bundling its own AI model, Orca runs CLI-based agents that users already have installed under their own subscriptions. The tool includes features such as a diff view with line-level commenting, per-worktree browser previews, and a mobile app for task completion alerts. Written in TypeScript and hosted on GitHub, the project has attracted around 80,000 stars and nearly 3,600 pull requests, indicating active community development.

← NewerPage 865 of 3175Older →