SShortSingh.

Programming

0
ProgrammingDEV Community ·

SSH 'Permission Denied (publickey)' Explained: Common Causes and How to Fix Them

The SSH error 'Permission denied (publickey)' means the network connection succeeded but the server rejected the user's authentication key, not a firewall or connectivity issue. The most frequent cause is incorrect file permissions on the server's ~/.ssh directory or authorized_keys file, which must be set to 700 and 600 respectively, or the server silently ignores them. Users can diagnose the problem by running SSH with the -vvv verbose flag to see whether their key is being offered and rejected, or not loaded at all. Mismatched key pairs, an empty SSH agent, or a forgotten public key upload are also common culprits that can be resolved using ssh-add or ssh-copy-id. AWS users face additional pitfalls, including using the wrong default username for their AMI and attempting to connect with a key pair different from the one assigned at instance launch.

0
ProgrammingDEV Community ·

Developer Builds AI Agent That Detects Contradictions in Structured Content Using Sanity

A developer has built an AI agent called Nebula Agent as part of the Sanity Challenge, designed to query structured content and identify conflicting information across sources. The agent uses GROQ queries against a Sanity Content Lake in real time, rather than relying on simple keyword searches. Built around a fictional board game called Nebula, the agent demonstrated its capability by flagging a contradiction between the game's core rulebook and an official errata document over differing starting token counts. When two sources disagree, the agent presents both claims side by side along with their respective source URLs. The project runs as a command-line tool built on Node.js, using Google's Gemini model and Sanity's GROQ query language for content retrieval.

0
ProgrammingHacker News ·

Study Finds Chat Templates Alter How LLMs Refer to Themselves

A research paper published on arXiv examines how chat templates influence the self-referential voice of large language models (LLMs). The study focuses on the phrase 'as a language model' and similar expressions used by AI systems when describing themselves. Researchers found that the structure of chat templates can shift how models frame their own identity and capabilities. The findings have implications for how AI systems communicate their limitations and nature to users.

0
ProgrammingDEV Community ·

How a misconfigured RevenueCat entitlement silently charged users and unlocked nothing

Globie Earth, a tree-adoption app built with Capacitor, uses a single RevenueCat facade to handle in-app purchases across both Android and web platforms via two separate SDKs. The team discovered a critical silent failure where users were successfully charged but received no access, because the entitlement 'guardian_premium' was linked to the wrong product instead of the one the app actually sold. RevenueCat's purchasePackage call resolved without throwing any error, leaving no visible indication that the unlock had failed. The fix required just one dashboard change — attaching the entitlement to the correct product — alongside a code-level check to never assume a successful transaction means an active entitlement. The incident highlighted a key pitfall: RevenueCat does not error on mismatched entitlement-product configurations, making explicit post-purchase validation essential.

0
ProgrammingDEV Community ·

Ankita v2.4.3 adds integrated browser AI can control alongside chat

Developer Ankita has released version 2.4.3 of its open-source desktop AI assistant, introducing a live browser panel that sits alongside the chat interface. The assistant can now actively interact with web pages — opening URLs, clicking elements, scrolling, and filling forms — rather than being limited to read-only web access as before. Security measures include password redaction from model snapshots, approval requirements for any page-mutating actions like clicks or form submissions, and per-plugin domain allowlists restricted to HTTP and HTTPS. The release also includes performance improvements on Windows, such as offloading command and process operations to background workers and optimizing file inspection to reduce per-call overhead. Additional hardening covers workspace boundary enforcement for file tools, atomic writes with unpredictable staging files, and credential redaction across approval logs and MCP diagnostics.

0
ProgrammingDEV Community ·

Tutorial: Build a Real-Time Word and Character Counter Using Vanilla JavaScript

A tutorial published on DEV Community walks developers through building a real-time word and character counter using HTML, CSS, and vanilla JavaScript, with no external libraries required. The tool tracks word count, total characters, and characters without spaces, updating instantly as users type, paste, or delete text. The implementation uses JavaScript's input event listener, the trim() and split() methods with a regex pattern, and the length property for character counting. The guide also flags a key limitation: JavaScript measures string length in UTF-16 code units, meaning certain emoji and Unicode characters may be counted as more than one character. The author suggests extending the project with features like a reading-time estimator, sentence counting, and a character limit indicator to deepen understanding of DOM manipulation and string processing.

0
ProgrammingDEV Community ·

How Sequence Mocks Let You Test Retry and Recovery Logic Without a Real Backend

Testing retry logic is difficult because static mocks always return the same response, meaning failure-and-recovery scenarios never actually execute during development. A tool called ScenarioMock addresses this with a 'Sequence' scenario that returns different responses based on how many times an endpoint has been called. Developers can configure an ordered list of steps — for example, two 503 errors followed by a 200 success — to verify that clients back off correctly, stop at retry limits, and recover cleanly. The setup requires no code changes, supports configurable delays to simulate timeouts, and can be scoped per IP so each caller gets an independent counter. A public demo endpoint is available for testing without sign-up, though its global counter is shared across all users.

0
ProgrammingDEV Community ·

DepWarden offers free, anonymous dependency vulnerability scanning without sign-up

DepWarden is a free software composition analysis tool that scans dependency manifests, lockfiles, and SBOMs for security vulnerabilities without requiring user accounts or uploading source code. The tool matches components against the OSV vulnerability database and enriches results with CISA KEV and FIRST EPSS data to prioritize fixes based on active exploitation and patch availability. It also detects typosquatted packages, assesses dependency health via OpenSSF Scorecard, and generates batch remediation plans with copy-paste fix commands. DepWarden supports over a dozen ecosystems including npm, PyPI, Maven, Go, and Cargo, and can be connected to GitHub, GitLab, Bitbucket, or Azure DevOps for scheduled automated scans. The tool is available at depwarden.in and retains no tokens or source code beyond the duration of each scan.

0
ProgrammingDEV Community ·

containerd 2.2 mount manager slower and buggier than manual disk setup

A developer benchmarked containerd 2.2's new mount manager against a manual four-command sequence for formatting and attaching a 200MiB ext4 image as a loopback device. The mount manager's Activate call took between 29.6ms and 47.2ms per run, while the manual approach consistently finished in 23.5 to 25.9ms. Beyond being slower, the manager also panicked once, leaked a raw BoltDB error, and left an orphaned loop device that could not be recovered. The overhead stems from BoltDB writes, symlink creation, and bookkeeping rather than any difference in the underlying formatting tools, since the manager shells out to the same mkfs.ext4 binary as the manual path. The mount manager is designed for composability within snapshotters and runtime shims, not for raw performance, and the developer tested against containerd v2.2.2 bundled with Docker Engine 29.3.1.

0
ProgrammingDEV Community ·

AWS Lambda Durable Functions Harbor a Silent Replay Bug in AI Approval Workflows

A developer building a human-in-the-loop AI agent workflow using AWS Lambda durable functions—released in late 2025—discovered that the system executed a different action than the one a human had explicitly approved. The root cause was the replay mechanism central to how durable functions work: when a paused workflow resumes, Lambda reruns the handler from the top and reinjects checkpointed results, which can silently mismatch with runtime state if code is not structured carefully. The workflow was designed to let an AI agent propose an action, pause for human approval, then execute only the approved action—but the replay behavior caused it to execute the wrong one. The bug was not in business logic or a race condition, but in a misunderstood framework feature that can affect any multi-step workflow with external callbacks. A single structural code fix was found to reliably prevent the issue, and the author validated the solution both locally and on a live Lambda deployment.

0
ProgrammingDEV Community ·

AI Student Builds Trade Analytics Boilerplate Using Streamlit and Plotly

An AI/ML student and freelance developer created LandedIQ, a trade analytics dashboard that calculates landed costs by combining base price, import duty, freight, and insurance. Built with Streamlit and Plotly, the project was born after the developer repeatedly rewrote the same currency conversion and charting logic across multiple client projects. Key technical decisions included using Plotly over streamlit-echarts due to Python 3.13 compatibility issues, and caching exchange rate API calls hourly to prevent redundant requests. The app is deployed on Railway, requiring a manual start command to bind to all network interfaces rather than just localhost. The developer has since packaged the project as a purchasable boilerplate, complete with documentation and a PDF setup guide, listed on Gumroad and Contra.

0
ProgrammingDEV Community ·

Google Paper Cuts Quantum Attack Resource Estimates, Raising Blockchain Security Urgency

A March 2026 Google Quantum AI paper, co-authored with researchers from the Ethereum Foundation and Stanford, found that Shor's algorithm could break 256-bit elliptic curve cryptography — the basis of Bitcoin and Ethereum wallet security — using roughly 10 times fewer computational resources than previously estimated. The authors used a zero-knowledge proof to validate their findings without publicly releasing the attack circuits, making the results verifiable but not independently reproducible. Experts highlight two distinct threats: a future 'Q-day' when quantum hardware becomes capable enough to break live keys, and the already-active 'harvest-now-decrypt-later' risk, where adversaries collect signed transactions today to decrypt them once hardware matures. Unlike ephemeral web traffic, blockchain transaction data is permanently public, meaning exposed public keys remain vulnerable indefinitely. Wallet infrastructure builders are urged to begin post-quantum migration planning now, regardless of uncertainty around the exact timeline for cryptographically relevant quantum computers.

0
ProgrammingHacker News ·

LightCloud Launches Hosting Platform Organised Around Folder-Based Projects

A new hosting platform called LightCloud has been introduced, structuring cloud infrastructure around folders rather than traditional service-based navigation. Each folder acts as a self-contained unit holding all resources a project requires. This includes frontend hosting, APIs, databases, environment variables, and per-branch previews. The platform was shared on Hacker News as a community showcase post. LightCloud aims to simplify cloud console management by mimicking a familiar file system layout.

0
ProgrammingDEV Community ·

How PDF Text Extraction Tool Distinguishes Real Line Breaks from Soft Wraps

A Windows application called PDF Privacy Checker uses character coordinate data to determine which line breaks in extracted PDF text are genuine paragraph boundaries versus soft-wrapped lines. The challenge arises because pdfium, the PDF rendering engine used by Chrome, inserts a line break after every visual line, fragmenting sentences mid-paragraph. Simply removing all breaks causes lists, tables, and structured content to collapse into unreadable strings. The tool rebuilds visual lines from character bounding boxes and applies eight conditions to each pair of neighbouring lines, joining them only when all conditions are met. Tested on 3,751 labelled breaks across 10 articles and 29 business PDFs, the method correctly restored 89.8% of soft wraps with 95.2% join accuracy.

0
ProgrammingDEV Community ·

Sovereign Edge Architecture: Using Git, Python, and Signal Networks for Autonomous Agents

A new architectural framework proposes building autonomous, distributed systems that process data and make decisions at the network edge rather than relying solely on centralized cloud infrastructure. The approach uses Git as a traceability and desired-state layer, Python as an orchestration core, and event-driven signal networks inspired by protocols like MQTT and NATS. The goal is not to eliminate cloud dependency but to ensure that external services do not become single points of failure or decision-making. This design is particularly relevant for robotics, industrial automation, sensors, and any system requiring local operation under intermittent connectivity. The framework emphasizes sovereignty, traceability, and operational control as explicit architectural properties rather than afterthoughts.

0
ProgrammingDEV Community ·

How Misused Third-Party Script Tags Silently Slow Down Your Next.js Site

Copy-pasted third-party script tags for chat widgets, analytics, and ad networks are render-blocking by default, delaying key performance metrics like Largest Contentful Paint and Time to Interactive. Next.js offers a built-in Script component with a strategy prop that gives developers precise control over when external scripts load. The three available strategies — beforeInteractive, afterInteractive, and lazyOnload — each serve distinct use cases based on how critical a script is to initial page function. Most non-essential embeds such as chat bubbles or social share buttons should use lazyOnload, which defers loading to idle browser time without any noticeable impact on user experience. Common mistakes include applying beforeInteractive to low-priority scripts or leaving all scripts on the default afterInteractive setting, both of which unnecessarily compete for browser resources during critical load phases.

0
ProgrammingDEV Community ·

Open-Source BetterWebSearch MCP Cuts AI Agent Token Use by 86% Without API Keys

A developer has released BetterWebSearch MCP, a free, open-source Model Context Protocol server that enables AI agents to search the web, extract content, and conduct research without requiring an API key or account. The tool uses DuckDuckGo by default and supports optional providers like Brave Search and Tavily. It employs a three-tier extraction pipeline that progressively escalates from basic HTTP fetching to full browser rendering via Playwright only when necessary, keeping processing efficient. A benchmark across 12 live-web research questions showed the tool reduced returned text by 86.5% and cut response time from 137 seconds to under 50 seconds compared to traditional multi-step agent workflows. The project is available on npm and GitHub and can be run immediately with a single npx command.

0
ProgrammingDEV Community ·

How a Coding Agent Reshaped One Developer's Approach to A/B Test Analytics

A developer building a price-tag scanning screen for a retail Android app faced an indecisive team vote between three interface designs, prompting a live A/B/C test with real store staff. A coding agent generated all three layout variants and the underlying screen code, but the more valuable contribution came in designing the telemetry architecture. Rather than logging dozens of individual user actions, the agent proposed modeling a 'scan session' entity captured by just two events — a session start and a session finish — each carrying rich contextual parameters. This approach allowed the team to analyze complete scan attempts rather than isolated clicks, a shift the developer says he would not have arrived at independently. The project also surfaced practical pitfalls in exporting Firebase Analytics data to BigQuery, including deduplication traps and the limitations of using averages instead of percentile metrics.

0
ProgrammingDEV Community ·

How to Debug a Real Incident Using Metrics, Logs, and Traces Together

A DEV Community tutorial series concludes by deliberately introducing a performance bug into a PHP mini-app to simulate a real production incident. The injected code causes 15% of requests to slow down by 2–4 seconds and 5% to return HTTP 500 errors, mimicking a failing payment service dependency. Using a pre-built observability stack — Prometheus, Loki, and OpenTelemetry — the author walks through how rising p95/p99 latency on dashboards first signals that something is wrong. Log queries then reveal a specific business-level error message pointing to a payment service timeout, narrowing the investigation further. Trace data from the OpenTelemetry collector confirms the two distinct request-duration clusters, linking slow requests and failures to the same root cause without ever viewing the source code.

← NewerPage 873 of 3176Older →