SShortSingh.

Programming

0
ProgrammingDEV Community ·

Docker Images vs Containers: Key Differences Every Beginner Should Know

Docker images and containers are related but distinct concepts that often confuse newcomers to the platform. An image is a read-only template stored once on disk, while a container is a live, running instance created from that image — similar to a class and an object in programming. Multiple containers can be launched from a single image simultaneously without duplicating files on disk, making Docker storage-efficient. Each container gets its own thin writable layer on top of the shared image, meaning changes in one container do not affect others. However, this writable layer is temporary and is deleted when the container is removed, so persistent data requires the use of Docker volumes.

0
ProgrammingDEV Community ·

How to Fix 'Permission Denied' Error on Docker Daemon Socket in Linux

Linux users running Docker commands may encounter a 'permission denied' error when trying to connect to the Docker daemon socket at /var/run/docker.sock, because the socket is accessible only to root and members of the docker group. The permanent fix is to add your user account to the docker group using 'sudo usermod -aG docker $USER', after which Docker commands work without sudo. A new login session must be started for the group membership change to take effect, since existing shell sessions retain the old group list. A quick but temporary workaround is to prefix commands with sudo, though this is not recommended for regular use. Users should avoid the commonly suggested 'chmod 666' fix, as it exposes the Docker socket to all users and processes on the machine, creating a serious security risk.

0
ProgrammingDEV Community ·

Developer Shares Step-by-Step Guide to Cleaning Messy HR Data Using PostgreSQL

A data practitioner published a detailed walkthrough on DEV Community demonstrating how to clean a corrupted HR dataset using PostgreSQL. The raw dataset contained spelling errors, missing values, and inconsistent data formats that made it unsuitable for business reporting. The process began by creating a staging table to preserve the original data before any modifications were made. Cleaning steps included standardizing column names to snake_case, removing prefixes from employee IDs, and deleting records with null or empty identifiers. The project aimed to transform unstructured HR records into an analysis-ready dataset accessible even to beginners in the data field.

0
ProgrammingDEV Community ·

Ollama vs llama.cpp in 2026: Key Differences and When to Use Each

Ollama and llama.cpp are two popular ways to run large language models locally, but they serve different use cases rather than being direct competitors. Ollama functions as a managed service that wraps a patched version of llama.cpp, handling model storage, scheduling, and automatic loading with a simpler interface. Direct llama.cpp, by contrast, gives users granular control over GPU placement, KV cache settings, and runtime flags, making it better suited for advanced or production configurations. Ollama is generally recommended for users who want a quick, low-friction setup for local chat, coding assistants, or scripting tasks. Those who need fine-grained performance tuning, immediate access to new llama.cpp features, or native Prometheus metrics are better served by running llama-server directly.

0
ProgrammingDEV Community ·

Developer Builds Proactive Discord AI Bot with Built-In Safety Monitoring System

A developer has built an autonomous Discord AI companion in Python that initiates conversations on its own, rather than waiting to be mentioned or commanded. The bot uses a probabilistic timing mechanism to decide when to speak, generating topics via the Gemini API to keep interactions feeling natural. A dual-channel safety system runs in the background, auditing messages for toxicity, prompt injection, and sentiment imbalance before they reach users. Server admins can monitor activity through a dedicated back-end logging channel, and a killswitch can immediately halt autonomous messaging if a safety issue is detected. Both the companion bot and the security monitor have been released as open-source projects on GitHub.

0
ProgrammingDEV Community ·

Google Now Treats AI Answer Manipulation as Spam, Risking Deindexation

Google updated its spam policies on 15 May 2026 to explicitly classify attempts to manipulate generative AI responses in Search as spam. The revised policy extends the existing spam framework — which can result in lower rankings or complete removal from search results — to cover AI Overviews and AI Mode. Tactics such as seeding fake mentions on forums, stuffing promotional phrases to influence AI recommendations, or paying services that promise guaranteed AI citations now fall under this definition. The policy change does not introduce a new penalty but broadens the scope of existing spam enforcement to include AI-generated answer surfaces. Legitimate optimization, such as creating high-quality content that AI models may naturally cite, remains acceptable under the updated guidelines.

0
ProgrammingDEV Community ·

Why AI Agent Loop Detectors Fail and How to Fix Them in Hours

A production AI agent was found repeating actions for 40 steps without triggering any errors or exceptions. The commonly recommended repetition detector failed because it only checked whether an action was repeated, not whether any real-world change had occurred. This subtle but critical flaw means agents can appear to be functioning normally while actually making no progress. The proposed fix involves implementing a progress signal that monitors changes in the environment rather than tracking the agent's own actions. Developers running unattended agents are advised that addressing this gap typically requires only a few hours of work, not a full system rebuild.

0
ProgrammingDEV Community ·

Open-Source Background Agents Brings Four-Layer Fault Tolerance to Long-Running AI Tasks

Background Agents, an open-source project built on the Open-Inspect framework, is designed to handle multi-hour autonomous coding sessions that typical agent demos cannot sustain. It implements a four-layer fault-tolerance system that escalates failures through limited retries, fallback model hand-off, parallel evaluator shadow monitoring, and feedback-injected reruns. The project runs tasks inside isolated Docker sandboxes, allowing parallel sub-tasks with independent file systems and git directories, while a control plane manages sandbox provisioning and graceful shutdown on failure. The architecture is based on an approach Ramp described publicly, but this open-source release exposes the orchestration logic that most agent frameworks leave undocumented. The project has reached 3,057 GitHub stars and is currently trending fourth among TypeScript repositories.

0
ProgrammingDEV Community ·

How 3 SMEs Cut Email Overload by Over 50% Using Client Portals

A service agency documented outcomes from deploying custom client portals across three small businesses over 18 months, including a marketing consultancy, an accounting firm, and a web agency. The marketing consultancy saw email volume fall by around 58% within six weeks, while file-retrieval time for the four-person team dropped to near zero. The accounting firm reduced routine client status emails by roughly 65% and cut client onboarding time in half, though an overly complex initial dashboard limited early adoption to just 40%. Simplifying the portal interface to three core elements pushed adoption to 71% within 30 days. The deployments highlighted that portals work best by eliminating low-value communication rather than replacing all client interaction.

0
ProgrammingDEV Community ·

Critical Sogou Input Method Flaw Lets Hackers Deploy GrayRabbit Backdoor via Single Link

A critical vulnerability (CVE-2026-51990) in Tencent's Sogou Input Method for Windows is being actively exploited by threat actor UNC3569 to deploy the GRAYRABBIT backdoor. Attackers send victims a crafted sgbiz: URI link that chains an unvalidated parameter, an outdated sandboxless Chromium 80 instance, and a separate V8 exploit (CVE-2021-38003) to achieve remote code execution with a single click. Once executed, a downloader drops legitimate 7z.exe alongside a malicious DLL and encrypted payload into C:\Users\Public\Documents\, ultimately loading GRAYRABBIT into memory via DLL sideloading. The backdoor communicates with a command-and-control server over raw RC4-encrypted TCP on port 443, supporting shell access, file transfer, and in-memory plugin loading. Tencent has released a patch in version 16.3.0.3498, and users are urged to update immediately and audit process chains and network traffic for signs of compromise.

0
ProgrammingDEV Community ·

GraphQL @oneOf Directive Now Standard, Enforcing Exactly One Input Field in Schemas

The GraphQL specification's September 2025 edition officially standardizes the @oneOf directive, which enforces that exactly one field is supplied in an input object. Previously, developers had to choose between multiple root fields or nullable arguments with manual resolver-level validation — both error-prone approaches. By marking an input type with @oneOf, the schema itself rejects invalid combinations before a resolver ever runs, moving constraint logic out of application code. The directive also enables polymorphic inputs, filling a long-standing gap since GraphQL has supported union types only on the output side. Major server libraries including GraphQL.js v16+, GraphQL Ruby, GraphQL Java, and others already ship support for the feature.

0
ProgrammingDEV Community ·

Python Basics Explained: Functions, Error Handling, and File Operations

A new developer guide published on DEV Community breaks down core Python programming concepts without requiring prior coding experience. The guide covers how functions work, including parameter types such as positional, keyword, default, and variable arguments, as well as scope and return values. It also outlines eight common built-in exceptions in Python, explaining the conditions that trigger each error. The article further explains error handling using try, except, else, finally, and raise blocks to manage runtime failures gracefully. Finally, it addresses file operations, covering read, write, and append modes alongside the context manager for safe resource handling.

0
ProgrammingHacker News ·

ChaosTree: Open-Source Java Library Offers Four Tree Implementations With No Dependencies

A developer has released ChaosTree, a zero-dependency Java library that implements four sorted tree data structures: AVL Tree, Red-Black Tree, B-Tree, and B+Tree. The library targets JDK 21 and above, implementing standard Java interfaces such as NavigableSet, NavigableMap, SequencedSet, and SequencedMap. The project grew out of the developer's personal effort to deepen their understanding of data structures, evolving from a Set-only library into a full Set and Map solution with attention to memory layout and JVM performance. ChaosTree has been validated through multiple testing approaches including Guava Testlib compatibility checks, property-based testing with jqwik, and differential testing against Java's built-in TreeMap and TreeSet. The source code and benchmarks are publicly available on GitHub, and the developer is actively seeking community feedback on API design and benchmark methodology.

0
ProgrammingHacker News ·

pkgsrc: The Cross-Platform Package Manager Worth Knowing About

pkgsrc is a cross-platform package management system originally developed by the NetBSD project. It allows users to install and manage software across a wide range of operating systems, not just BSD variants. The system is valued for its portability and consistency across different Unix-like environments. A 2021 blog post resurfaced on Hacker News highlighting its practical advantages for developers and system administrators. Despite limited discussion, the post drew attention to pkgsrc as an underappreciated tool in the open-source ecosystem.

0
ProgrammingDEV Community ·

Developer Launches SeedSQL to Auto-Generate Relational SQL Test Data with Key Integrity

A developer has built SeedSQL, a free web tool designed to simplify the creation of realistic mock data for complex relational database schemas. The tool addresses common pain points such as foreign key mismatches, format errors, and the time-consuming task of writing manual seed scripts. SeedSQL automatically maps parent-child table dependencies, ensuring referential integrity across linked tables like users, orders, and payments. Users can export generated data as SQL insert scripts or CSV files compatible with PostgreSQL and MySQL. The free tier supports up to 1,000 rows and includes localization features for country-specific data formats.

0
ProgrammingDEV Community ·

AI Agents Can Help Automate Shopify, But Production Failures Are Costly

A developer and e-commerce consultant shares hard-won lessons from deploying AI agents on Shopify, warning that real-world results often fall short of the marketing promise. One client spent $5,000 in LLM credits on a product description agent that repeatedly hallucinated features unrelated to their store. In a separate case, an inventory automation agent misread Shopify's API and accidentally zeroed out stock across entire product categories. Customer service bots built with frameworks like CrewAI have also been observed entering endless clarification loops, burning API costs while failing to resolve basic refund requests. The author concludes that AI works best for repetitive, low-stakes tasks like drafting bulk product descriptions, but requires strict guardrails, human review, and robust error-handling before it can be trusted in production.

0
ProgrammingDEV Community ·

Five Common Data Leakage Traps That Make ML Models Look Better Than They Are

Data leakage is one of the most frequent reasons machine learning results appear stronger than they actually are, yet few practitioners check for it systematically. The five main culprits include duplicate or near-duplicate rows shared across training and test sets, temporal look-ahead leakage from random splits on time-series data, and features that inadvertently encode the target variable. A real-world demonstration using the EEG Eye State dataset showed a model's AUC score collapsing from 0.971 to 0.546 simply by switching from a random split to a time-respecting one. To address this, the author developed two open-source Python tools — LeakHound, which detects all five leak types and reports honest versus inflated scores, and safesplit, which prevents leakage by enabling group-aware, time-aware, and sequence-aware data splitting.

0
ProgrammingDEV Community ·

Why AI Agent Reports Are Not Proof: The Case for Independent Artifact Verification

A software engineering post argues that session reports generated by AI agents are self-descriptions, not independently verifiable evidence. The author contends that approving a report — even with multiple reviewers — only means one observation has been read multiple times, not independently confirmed. The post cites a real example where a test suite was reported stable and approved twice, yet a fresh rerun against the actual files on disk revealed two failures in sixteen runs. The recommended practice is to check the exact worktree, read the actual diff, run the declared command, and preserve its output for others to inspect. The core principle is that a report serves as a map to the artifact, not a substitute for re-running and directly observing it.

0
ProgrammingDEV Community ·

Dev Builds 5 Vanilla JS Browser Games, Documents the Bugs That Taught Him Most

A developer created a free browser game center hosted on GitHub Pages using only vanilla JavaScript, HTML, and a CDN-loaded Three.js library — no frameworks, no build tools, and no backend. The project was designed so anyone, including children on school laptops, could play without creating accounts or installing software. To comply with ad network policies, three games were split into separate wrapper and raw canvas pages using iframes, ensuring ads only appeared alongside publisher content. For a 3D real-time strategy game, a switch to instanced mesh rendering reduced draw calls from hundreds to just five, regardless of the number of on-screen tanks. The developer also discovered that headless Chrome uses a software rasteriser that silently fails shadow rendering, a debugging lesson that cost significant time before the root cause was identified.

← NewerPage 1267 of 3231Older →