SShortSingh.

Programming

0
ProgrammingDEV Community ·

Midnight Network enables private identity verification using zero-knowledge proofs

Midnight Network is a data-protection blockchain that lets developers verify user identities without exposing personal data on-chain, unlike traditional EVM-based systems where all data is publicly visible. It uses a smart contract language called Compact, which separates data into public ledger state and private witness data that never leaves a user's device. The identity pattern works by having users store a cryptographic hash of a private secret on-chain, then later prove knowledge of that secret through a locally generated zero-knowledge proof. Three core components power this system: the ledger for public state, witnesses for private inputs, and circuits that generate ZK proofs before any transaction is submitted. This approach ensures the blockchain only receives mathematical proof that an assertion is valid, without ever learning the underlying secret.

0
ProgrammingDEV Community ·

React Architecture Guide Explains How to Scale Large Frontend Applications

A tutorial published on DEV Community as part of a React Mastery Series outlines principles for architecting large-scale React applications, targeting senior frontend engineers and architects. The guide contrasts small apps with enterprise-level applications that may have over 1,000 components, 100+ pages, multiple teams, and millions of users. It introduces concepts such as high cohesion, low coupling, and clear domain boundaries to prevent features from becoming tightly interdependent. The tutorial recommends organizing code around business domains rather than technical file types, with each feature exposing only a public API via an index file. It also briefly introduces Clean Architecture, separating the UI, application, domain, and infrastructure layers for improved testability and scalability.

0
ProgrammingHacker News ·

SAP Freezes Most Hiring and Travel to Fund Soaring AI Investment Costs

German enterprise software giant SAP has halted most employee travel and paused the majority of its hiring activities. The move is directly linked to the rapidly rising costs associated with the company's artificial intelligence initiatives. SAP is redirecting budget resources to sustain and expand its AI-related operations. The decision reflects a broader trend of large technology firms making significant internal trade-offs to prioritize AI development.

0
ProgrammingDEV Community ·

Build, Buy, or API: A Practical Framework for AI Capability Decisions

A software consultancy has outlined a three-gate framework for deciding whether to build, buy, or use an API for AI capabilities, evaluating each option on competitive differentiation, rate of change, and real-world cost at scale. Commodity capabilities such as text generation, transcription, and OCR are best served by hosted APIs from providers like OpenAI or Anthropic, which typically outperform small in-house teams from day one. Buying a dedicated third-party product makes sense when the required capability is a solved problem and maintaining it in-house would distract the team from core product work. Building in-house is justified only when the capability is a genuine differentiator, proprietary data meaningfully changes the outcome, or per-call API costs exceed a subscription at high volume. Regardless of the choice made, the firm recommends designing for flexibility by placing providers behind a switchable interface and monitoring costs closely, since the optimal decision can shift as volumes grow or vendor terms change.

0
ProgrammingDEV Community ·

How to Design MCP Tool Schemas That Prevent AI Agent Misuse

A software development analysis highlights that input validation alone is insufficient to prevent AI agents from misusing MCP server tools, as language models can send well-formed but semantically incorrect calls. Four recurring failure patterns are identified: selecting the wrong tool, passing valid-but-incorrect arguments, violating preconditions, and receiving unrecoverable errors. The author argues these are interface design flaws rather than validation bugs, and that the solution lies in constraining tool schemas at the design stage. Using real code from the Frihet MCP server, the piece demonstrates how replacing open string fields with enums and bounded numeric ranges eliminates entire categories of agent error. By making illegal states unrepresentable in the schema itself, developers can guide probabilistic AI callers toward correct behavior without relying on documentation.

0
ProgrammingDEV Community ·

EF Core Design-Time Factories Can Silently Target Unintended Databases

A misconfigured EF Core design-time DbContext factory can successfully connect to a database that was never deliberately chosen, creating a hidden safety risk. Unlike a failed connection, an unintended successful one appears legitimate, masking the absence of conscious intent. This issue surfaced during a codebase cleanup where a factory was still falling back to configuration from a decoupled application host, crossing an architectural boundary that had already been separated at runtime. The recommended fix is to avoid broad configuration fallbacks and instead use an unmistakably unreachable sentinel connection string when no explicit target is configured. This separates offline model-inspection capabilities from live database access, ensuring any unintended connection attempt fails with a clear, recognisable error.

0
ProgrammingDEV Community ·

Rust's Next-Gen Borrow Checker Polonius Now Enabled by Default on Nightly

Rust has enabled Polonius, its next-generation borrow checker, by default on the Nightly compiler channel. Polonius replaces the existing Non-Lexical Lifetimes (NLL) system, which was known to reject valid safe code involving conditional branches or complex data structures like HashMaps. The new checker performs more precise control-flow analysis, allowing previously rejected but technically sound code to compile without workarounds. Benchmarks across the top 10,000 crates on crates.io show some compile-time performance regressions, though the Rust team considers them minimal. Polonius is still in alpha, but its rollout signals the Rust project's focus on correctness and developer flexibility over raw compilation speed.

0
ProgrammingDEV Community ·

Developer Uses AI Subtraction Method to Find Unbuilt Ideas in Everyday Objects

A developer has outlined a method for extracting novel ideas from large language models by listing known items in a category and subtracting those that already exist, rather than asking the AI to generate new concepts outright. The approach was tested using four AI assistants — Claude, ChatGPT, Gemini, and Grok — each given identical instructions to act as independent researchers applying the same subtraction logic. The method led to the discovery that no digital UI has ever replicated the resistance behavior of a lever-arch file binder, where the lever jams when overfilled and requires a compressor bar to close. The developer subsequently built an interactive model — both flat and in 3D — that simulates this capacity-dependent behavior, a detail absent from every existing digital folder or binder interface. The author argues this 'subtract, don't ask' framework is a practical application-layer primitive that developers working with AI tools should adopt more deliberately.

0
ProgrammingDEV Community ·

AI Can Write WordPress Code, But Architectural Decisions Still Belong to Developers

A developer shared how AI successfully generated working PHP code for a WordPress requirement, yet he chose not to deploy it immediately. The reason was not code quality but an unresolved architectural question: whether the functionality belonged in functions.php, a custom plugin, or an MU-plugin. He applies a simple rule — if the feature should survive a theme change, it goes into a plugin; if it is presentation-only, it stays in the theme. The author argues that as AI improves at writing code, the developer's value shifts toward architecture, trade-offs, and long-term decision-making. He also advocates prompting AI as a senior architect rather than a code generator, to get reasoning and structure alongside implementation.

0
ProgrammingDEV Community ·

fastapi-crudrouter abandoned; BetterCRUD emerges as modern drop-in replacement

The popular FastAPI CRUD library fastapi-crudrouter has been unmaintained since November 2023, leaving users without support for FastAPI 0.141+ and SQLAlchemy 2.0 async best practices. BetterCRUD has emerged as its actively maintained successor, offering a nearly identical route structure that makes migration largely straightforward. Beyond basic CRUD, BetterCRUD introduces 27 filter operators, flexible pagination modes, relationship query support, soft delete with recovery, and ACL lifecycle hooks. Developers can migrate by replacing the SQLAlchemyCRUDRouter call with a BetterCRUD controller class and a thin service layer, keeping the same URL prefixes and route layout. The new library ships with over 177 tests and 99% code coverage, signaling a focus on production reliability.

0
ProgrammingDEV Community ·

Microservices Often Create Distributed Monoliths, Says Domain-Driven Design Advocate

A software developer with a decade of microservices experience argues that the term 'microservices' is a misnomer, as teams typically split systems along technical or organisational lines rather than true functional boundaries. This approach leads to tightly coupled services that constantly call each other, producing a distributed monolith that is harder to debug than a single application. The author uses a Go-based e-commerce example to illustrate how order management, inventory, and payment services can become interdependent when split incorrectly. The proposed solution draws on Domain-Driven Design's concept of 'bounded contexts', which align service boundaries with actual business domain logic. Structuring services around genuine domain responsibilities, the author contends, makes systems easier to scale, maintain, and reason about.

0
ProgrammingDEV Community ·

BetterCRUD Library Generates Full FastAPI CRUD API From a Single Python Decorator

A Python library called BetterCRUD aims to eliminate repetitive boilerplate code in FastAPI projects by auto-generating a complete CRUD API layer from a single decorator. Applying the decorator to a controller class produces eight ready-to-use routes, covering list, create, bulk create, update, bulk update, delete, and soft-delete recovery operations. The generated endpoints include built-in support for 27 filter operators, pagination modes, and sorting, removing the need to implement these features manually per endpoint. The library integrates with async SQLAlchemy and requires developers to define only a model, Pydantic schemas, and a thin service class. All generated routes are automatically documented via OpenAPI and Swagger, and global or per-route configuration is available through a centralised config initialiser.

0
ProgrammingDEV Community ·

Why Clear Error Messages Matter More Than Ever in AI-Driven Systems

A developer running an AI agent with roughly 100 integrated tools argues that poorly written error messages are the costliest design flaw in agentic systems. Unlike humans, AI agents cannot look beyond an error string to investigate context, so a misleading message causes the agent to act confidently on false information and waste significant time. The author illustrates this with a real debugging session where a stale SOCKS proxy caused browser errors that falsely pointed to DNS failure, costing nearly an hour of misdirected work. They recommend that error messages name the specific layer that failed, indicate whether retrying is useful, and clearly distinguish between empty results and actual failures. As AI agents increasingly act as API clients, the author contends that rich, plain-language error messages are now more valuable than terse numeric codes.

0
ProgrammingDEV Community ·

How Google's V8 Engine Transforms JavaScript Into Optimized Machine Code

V8 is Google's open-source JavaScript and WebAssembly engine, written in C++, that powers Chrome, Node.js, Deno, and Electron. When JavaScript code is executed, V8 does not run it line by line but instead passes it through a multi-stage pipeline involving parsing, bytecode interpretation, and optimized compilation. The engine first builds an Abstract Syntax Tree from source code, then uses its Ignition interpreter to generate bytecode before identifying frequently run code segments. Hot code paths are handed off to the TurboFan compiler, which produces highly optimized machine code for faster execution. V8 also handles memory management and garbage collection, making an understanding of its internals valuable for developers seeking to improve performance and avoid common bottlenecks.

0
ProgrammingDEV Community ·

Switchboard Router Boosts AI Tool Selection Accuracy from 21% to 88%

Developers have built Switchboard, a tool-routing layer designed to help AI agents manage large numbers of MCP (Model Context Protocol) server connections more efficiently. The core problem it addresses is that connecting many MCP servers to a single agent inflates token costs, reduces tool-selection accuracy, and creates operational fragility. Switchboard uses a four-stage retrieval pipeline combining dense and sparse vector search, cosine-similarity filtering, and an LLM judge to dynamically select the right tools per request. In testing against 70 realistic scenarios, the router achieved 85–90% accuracy compared to just 21% for keyword search alone, while reducing token usage for tool descriptions by 99.6%. The system also supports dynamic backend registration, reactive health detection, and a Redis-backed cache to keep the tool index current without redundant reprocessing.

0
ProgrammingDEV Community ·

How Researchers in 2026 Use Public Files to Verify If an LLM Was Built From Scratch

A reproducible method now allows outsiders to assess whether a large language model was genuinely trained from scratch or derived from an existing open-weight base, using only publicly available files on Hugging Face. Three signals — architecture configuration, tokenizer vocabulary overlap, and embedding-space similarity measured via Linear CKA — are combined to estimate a model's lineage. The approach gained mainstream attention in 2026 after several labs outside the US and China made 'self-developed' foundation model claims that were publicly scrutinised and found to be more derivative than advertised. A widely-read Zhihu discussion with millions of views played a key role in shifting the debate from informal opinion to a structured, repeatable verification procedure. One public framework, Model Genome Korea, categorises results into four labels ranging from fully native to fully ported, making provenance assessments easier to communicate and compare.

0
ProgrammingDEV Community ·

Poorly Defined AI Agent Jobs Drive Up Costs More Than Token Prices

The biggest cost driver for AI agents is not the price per token but the lack of clearly defined tasks, according to a technical analysis published on DEV Community. Vague instructions cause agents to read excessive data, retry failed attempts, and use powerful models for routine work, inflating the true cost. A more useful metric is cost per accepted task, which accounts for retries, human review time, tool calls, and whether the output actually passed quality checks. A well-structured agent job should specify a trigger, approved inputs, permitted actions, expected output, acceptance criteria, and escalation rules. Bounding the agent's scope — such as limiting a sales pipeline review to records changed in the past 14 days — reduces unnecessary processing and improves first-pass completion rates.

0
ProgrammingDEV Community ·

Qarinah offers coding agents auditable, evidence-linked memory as replay alternative

Coding agents typically receive project context either through costly transcript replays or compact but hard-to-audit summaries. An open-source tool called Qarinah proposes a third approach: maintaining an authoritative append-only ledger from which searchable views and task-specific context packs are derived. Each piece of retrieved context is tied back to a specific event ID and hash, ensuring claims remain traceable to their original evidence. The system separates authority, retrieval, and model-facing context into distinct layers, preventing any index or rolling summary from silently becoming the source of truth. If sufficient evidence cannot be compiled within configured boundaries, Qarinah returns an explicit 'insufficient evidence' result rather than an uncited but confident-sounding answer.

0
ProgrammingHacker News ·

Mathematician Proves Magic Hexagons Exist for Every Order

A new mathematical result published in August 2026 claims that magic hexagons can be constructed for every order, challenging previous assumptions about their rarity. Magic hexagons are hexagonal arrangements of numbers where rows sum to a constant value, similar in concept to magic squares. The finding was shared by researcher Gukov on a personal math blog, presenting a general construction method. The post gained attention on Hacker News, sparking interest in the recreational mathematics community. The result, if verified, would represent a significant expansion of known results in combinatorial number theory.

0
ProgrammingDEV Community ·

Study finds accessibility overlay widgets make no measurable change to Shopify store markup

A developer tested accessibility overlay widgets on 56 Shopify stores by measuring the same pages twice — once with the overlay script loading and once with it blocked — using axe-core to count accessibility violations. The paired methodology kept all variables constant, making each store its own control and eliminating selection bias. Across six runs and three separate samples, the median change to underlying page markup was zero in every case. An earlier cross-sectional comparison had found stores with overlays carried 78.6% more violation nodes than those without, but the author discarded that finding as uninterpretable due to self-selection bias. The study does not assess whether overlay toolbar features benefit users, only whether the scripts alter a page's accessibility markup.

← NewerPage 54 of 1123Older →