SShortSingh.

Programming

0
ProgrammingDEV Community ·

What Is RAG? A Beginner's Guide to AI That Reads Your Own Documents

Retrieval-Augmented Generation (RAG) is a technique that allows AI models to answer questions using your own documents rather than relying solely on their training data. The process involves loading files, splitting them into small chunks, converting those chunks into numerical vectors, and storing them in a vector database organized by meaning. When a user asks a question, the system embeds the query, finds the most relevant document chunks, and passes them to a large language model to generate a grounded response. This approach reduces AI hallucinations by giving the model access to specific, up-to-date source material before it writes an answer. RAG is increasingly used by companies to build internal AI assistants that can reference proprietary documents like HR policies, product manuals, or technical guides.

0
ProgrammingDEV Community ·

Developer Shares SQL Schema for Role-Based Access Control System

A developer on DEV Community has published a complete SQL table structure for implementing Role-Based Access Control (RBAC) in relational databases. The schema consists of five core tables: users, roles, permissions, and two many-to-many junction tables linking users to roles and roles to permissions. The permissions table supports multiple types including menus, buttons, and API endpoints, each with configurable paths and HTTP methods. All tables are built on InnoDB with UTF8MB4 encoding and include soft-delete flags, status toggles, and timestamp fields for auditability. The design is intended to serve as a reusable foundation for access control in backend applications.

0
ProgrammingDEV Community ·

Python Basics: Keywords, Built-in Functions, and Golden Rules for Beginners

A beginner-focused Python tutorial covers the basics of predefined functions such as print() and len(), explaining their roles in handling sequences. It demonstrates how to retrieve Python's full list of reserved keywords using the keyword module, which includes terms like 'if', 'while', 'class', and 'return' that cannot be used as variable names. The article introduces control flow concepts including if-elif-else conditions and while loops, using practical examples such as printing numbers from 1 to 100. The author also shares a set of programming principles, including writing a dry run on paper before coding, following the input-process-output model, and prioritizing logic over syntax. The piece encourages beginners to adopt a problem-solving mindset rather than being intimidated by translating everyday logic into code.

0
ProgrammingDEV Community ·

Why Payment Webhooks Silently Fail and Leave Orders Stuck as Unpaid

When a customer completes a payment, the payment provider sends an automated notification called a webhook to the merchant's server to update the order status. However, many small online stores experience silent failures where the server misses, delays, or double-processes these notifications, leaving orders stuck in a pending state despite successful transfers. The root causes include server downtime during delivery, slow response times triggering duplicate webhook sends, and the absence of idempotency checks that would prevent the same payment event from being processed more than once. Security vulnerabilities also arise when developers disable signature verification after struggling to implement it correctly, exposing endpoints to fraudulent status updates. Developers are advised to implement idempotency, validate raw request signatures, and set up bounded retry queues with human-visible failure logs to handle webhook edge cases reliably.

0
ProgrammingDEV Community ·

pivot-diag CLI audits Excel pivot tables for conflicts before refresh errors occur

A developer has released pivot-diag, a free, open-source command-line tool that scans Excel workbooks for pivot table configuration problems before they cause errors. The tool detects issues such as overlapping pivot placements, intersecting source ranges, and cache references pointing to renamed or deleted sheets. It works by directly parsing the OOXML structure inside .xlsx and .xlsm files using only Python's standard library, requiring no third-party dependencies. pivot-diag is strictly read-only and never modifies the workbook being analyzed, making it safe to run on production files. The tool is available on GitHub and is designed to surface hidden problems — particularly broken sheet references — before a user triggers a refresh in Excel.

0
ProgrammingDEV Community ·

Astral's endorsement of four Python Packaging Council candidates raises governance concerns

Astral, the OpenAI-owned company behind tools like uv and Ruff, publicly endorsed four of the five candidates running for the inaugural Python Packaging Council just as voting opened on September 5, 2026. The council, established under PEP 772 in April 2026, holds formal authority over Python packaging standards, making it directly relevant to Astral's own products. One of the four endorsed candidates, William Woodruff, is an Astral employee, while the others are respected independent contributors to the Python ecosystem. Critics raised concerns that a commercially invested vendor influencing the composition of its own regulatory body creates a structural conflict of interest, regardless of individual candidates' qualifications. The episode has reignited longstanding community worries about corporate influence over Python's open-source governance, particularly following Astral's acquisition by OpenAI in March 2026.

0
ProgrammingDEV Community ·

Developer releases local-first tool to map code change impact across multiple repositories

A software developer has built and open-sourced a tool called 'Where Am I' to help engineers trace how a single code change ripples across multiple repositories. The MIT-licensed, Node.js-based tool combines Git diffs and static code analysis to generate an interactive, clickable impact graph. It is designed to run entirely locally, ensuring that source code is never uploaded to an external service. The tool identifies relationships between frontend wrappers, backend routes, database calls, API docs, and tests, linking each connection back to a specific file and source line. Released as an early MVP on GitHub, it is intended as supporting evidence during code review rather than a replacement for tests or engineering judgment.

0
ProgrammingDEV Community ·

Web3 prototype VALYVRA shares two key authentication lessons for developers

Developer building VALYVRA, a Web3 prototype addressing illiquid asset sales, documented two critical authentication lessons during development. The first involves atomically managing challenge verification and session creation across separate database transactions to prevent race conditions and avoid holding SQLite's writer lock during external network calls. The second lesson concerns Python's sqlite3 connection lifecycle, where the context manager handles transactions but does not close connections, requiring explicit closure using contextlib's closing utility. The team updated 27 transaction contexts with explicit connection closure and built a 44-test suite covering two-factor verification, rate limits, and Flask integration. Changes were validated in an isolated candidate image before deployment, though the team notes these do not constitute a full security audit of the platform.

0
ProgrammingDEV Community ·

Matomo Tops Unprompted AI Mentions Across 30 Analytics Brands in 2026 Study

A study conducted on September 12, 2026, queried four AI engines — ChatGPT, Perplexity, Claude, and Gemini — with buyer-style questions about 30 analytics and data software brands, generating 360 total answers. Matomo stood out as the only brand volunteered without being directly asked about, appearing unprompted in responses related to 11 of the 30 brands tested. The four engines showed notable disagreement in brand visibility, with Gemini naming brands in 54.4% of its answers compared to Perplexity's 36.7%, a gap of nearly 18 percentage points. Fifteen brands were recognized by all four engines, while one brand, Fathom, went unmentioned by any of them. Notably, over half of all brand mentions (51.8%) were as alternatives rather than first recommendations, suggesting high visibility does not always translate to top-choice status.

0
ProgrammingDEV Community ·

Intel i9-14900HX 'Vmin Shift Instability' found to cause widespread game crashes

Owners of ASUS ROG Strix SCAR 16 laptops with Intel's i9-14900HX processor have reported universal 0xC0000005 access-violation crashes across multiple unrelated games. Despite Intel's official stance that mobile chips are not affected by the Vmin Shift Instability issue — previously linked to 13th and 14th gen desktop CPUs — community reports suggest otherwise. A case on Intel's own forum involving the same mobile chip showed an identical, progressively worsening crash pattern under clean RAM, driver, and BIOS conditions. The issue can be mitigated by using ThrottleStop to cap CPU power limits to 80W (PL1) and 100W (PL2), and by disabling CPU boost via Windows power settings. Users whose laptops are still under warranty are advised to contact their OEM, citing the specific term 'Vmin Shift Instability' and Intel's published advisory on the defect.

0
ProgrammingDEV Community ·

Developer Indexes 1,000+ Claude Agent Skills, Reveals Key Patterns in AI Ecosystem

A developer spent six months cataloguing over 1,000 open-source Claude agent skills drawn from Anthropic's public repositories and major community collections, consolidating them into a single searchable index. The analysis found that most skills cluster into five categories: document manipulation, codebase navigation, external tool orchestration, content production, and data extraction. A critical finding was that a skill's description field functions as a routing trigger rather than documentation, and poorly written descriptions cause skills to either never activate or fire indiscriminately. Only about one in twelve skills included negative clauses specifying when not to activate, yet those consistently performed better. The developer also concluded that pairing skills with executable scripts outperforms prose-based instructions on reliability, token efficiency, and debuggability.

0
ProgrammingDEV Community ·

Developer speeds up Russian-syntax language 130x by transpiling to Python AST

A developer building SkyForge, a Russian-syntax programming language, found their original tree-walking interpreter written in Python was 30–100 times slower than CPython, with a Fibonacci(32) computation taking 60 seconds instead of 0.4. To fix this without a full rewrite, they chose to transpile SkyForge's AST directly into Python's native AST using the standard library's ast module, then pass it to compile() to generate CPython bytecode. The resulting transpiler is around 600 lines of Python with no external dependencies, and converts source code to bytecode in just three function calls. Key challenges included correctly handling line numbers required by Python 3.12 and distinguishing between arithmetic operators and comparison operators in the AST. The project is open source, with the transpiler code available on GitHub for others building similar language tools.

0
ProgrammingDEV Community ·

AI Models Confirm Bugs Regardless of Prompt Framing, Controlled Experiment Finds

A developer ran a pre-registered controlled experiment on 200 code samples from the OWASP Benchmark to test whether flagging language in security-scanning prompts inflates AI vulnerability confirmation rates. Three models — gpt-4o-mini, gpt-4o, and Gemma — were each given the same code slices under two prompt conditions: one that mentioned a static-analysis flag and one that did not. The key prediction — that removing the flag would cut gpt-4o-mini's false-confirm rate by at least 15 percentage points — was refuted; the drop was only 6 points and statistically insignificant. Both models confirmed real vulnerabilities at near-identical rates across both prompt arms, suggesting the over-reporting tendency is not driven by sycophantic deference to the flag. The experiment was shaped by reader feedback that pushed for pre-committed predictions and stricter statistical methods before results were collected.

0
ProgrammingDEV Community ·

Python Loops Explained: for, while, break, continue and enumerate

Loops are a core Python feature that allow a block of code to execute repeatedly without manual repetition. A for loop iterates over a known sequence — such as a list or a numeric range — while a while loop continues running as long as a specified condition remains true. Control keywords like break and continue let programmers stop a loop entirely or skip individual iterations, respectively. The enumerate() function adds extra utility by returning both the index and the value of each item during iteration. Together, these tools become especially powerful when combined with conditionals and lists to handle real-world tasks like grading students or tracking savings goals.

0
ProgrammingDEV Community ·

Why a Developer Chose a Long-Lived Node Process Over Serverless for Real-Time Apps

A developer building a live dashboard with thousands of persistent connections chose a long-lived Node.js process over a serverless architecture, arguing that serverless economics are fundamentally misaligned with real-time workloads. While serverless excels at short request-response tasks, its pricing model charges per invocation and connection-minute, making it costly for applications that maintain continuous open connections. Running an in-process state model eliminated repeated Redis round trips and turned fan-out to thousands of subscribers into a simple memory loop instead of thousands of billable calls. The trade-off required roughly a week of additional infrastructure work — covering graceful draining deploys, manual scaling decisions, and memory management — paid once upfront. The developer's broader takeaway is that engineers should identify the core constraint of their product before defaulting to the most popular architectural recommendation.

0
ProgrammingDEV Community ·

How React Flow Can Serve as a Live Control Plane for AI Agent Systems

Developer Arman Safikhani rebuilt the IntegrateX platform so that its React Flow canvas functions as an active runtime control plane rather than a static workflow diagram. In this approach, nodes represent capabilities such as triggers, agents, tools, and outputs, while edges act as typed contracts that validate connections at draw time, eliminating entire categories of runtime errors. A key architectural principle keeps the visual render graph separate from the derived run graph consumed by the executor, ensuring UI metadata does not pollute execution logic. Applying this separation — dubbed the Trinity Architecture — reduced serialization payload size by 94% on IntegrateX, resolving sync stalls and payload bloat. The result is a single live artifact that product managers, support staff, and engineers can all read, modify, and debug without maintaining a parallel DSL or shadow configuration files.

0
ProgrammingDEV Community ·

How a 200-Controller Laravel SaaS Was Deployed on Shared Hosting Without SSH

A development team successfully ran a large-scale Laravel application — featuring over 200 controllers, 130+ models, CRM, payments, and campaign tooling — on standard cPanel shared hosting with no SSH access, no Artisan CLI, and no queue workers. Deployments were handled via zip uploads through the file manager, with cache clearing managed through a secret-token-protected HTTP route as a substitute for Artisan commands. Database migrations were rewritten as idempotent SQL files safe to execute multiple times, since running standard migrate commands was not possible on the constrained environment. The team also encountered unexpected bugs, including a Blade parser issue where CSS media queries inside directive parentheses caused raw output above the doctype, and a production outage triggered by an unquoted space in an .env variable. Despite the limitations, the constraints forced modular, self-contained table design, which later allowed two modules to be reused in other projects without modification.

0
ProgrammingDEV Community ·

AI Shifts Software Engineers from Code Writers to Solution Architects

A software engineering practitioner argues that AI is not replacing programmers but fundamentally changing their role in the industry. While AI can now handle repetitive tasks like generating boilerplate code, writing unit tests, and detecting bugs within seconds, it still struggles with complex system design, understanding specific business contexts, and making sound long-term architectural decisions. This shift means the most valuable engineering skills today are system design, critical thinking, and a product-oriented mindset rather than familiarity with specific languages or frameworks. The practitioner advises engineers who feel threatened by AI to adapt by leveraging it for routine work while investing freed-up time into higher-level competencies. The core takeaway is that AI will not replace engineers, but engineers who use AI effectively will have a clear advantage over those who do not.

0
ProgrammingDEV Community ·

SvelteKit vs Next.js in 2026: How to Choose the Right Framework for Your Project

The debate between Next.js and SvelteKit remains relevant in 2026, with the choice now centering on runtime efficiency and team workload rather than features alone. Next.js, backed by React 19 and Server Components, benefits from a vast ecosystem but its 'use client' and 'use server' model can complicate development workflows for those unfamiliar with the concepts. SvelteKit takes a leaner approach as a compiler-based framework, meaning most heavy processing happens at build time, resulting in significantly smaller client-side bundles. This makes SvelteKit particularly advantageous for projects targeting mobile users on unstable connections. Ultimately, teams already proficient in React may prefer Next.js for its library support, while those prioritizing raw performance and developer experience may find SvelteKit the better fit.

0
ProgrammingDEV Community ·

Developer releases kv-one, a zero-dependency KV store for browser, Node.js and Cloudflare Workers

A developer has released kv-one, an open-source key-value storage library designed to work uniformly across browser, Node.js, and Cloudflare Workers environments. The library provides a single async API that automatically detects the runtime and selects the appropriate storage backend, eliminating the need to write separate boilerplate for each platform. It includes built-in TTL support implemented at the library layer, namespacing for multi-tenant use cases, and a React hook for reactive state management. The package has no runtime dependencies and weighs 31 KB in total, while also offering typed error classes for safer debugging. The project was created to address recurring pain points around inconsistent storage APIs and missing features like TTL and Cloudflare Workers support in existing solutions.

← NewerPage 1376 of 3314Older →