SShortSingh.

Programming

0
ProgrammingDEV Community ·

How Eager Loading and Indexing Fix the N+1 Query Problem in Web Apps

The N+1 query problem occurs when an application fires one database query to fetch a list of records and then an additional query for each record to retrieve related data, causing severe performance slowdowns under load. A developer discovered this issue after a feature launch pushed page load times to six seconds, tracing it back to 101 separate database queries for just 100 blog posts. The fix involves eager loading — using tools like Django's select_related for foreign-key relationships and prefetch_related for reverse or many-to-many relations — to consolidate multiple queries into one or two. Adding database indexes on frequently filtered columns, such as published_at, can further reduce query execution from seconds to milliseconds by avoiding full table scans. Together, eager loading, proper indexing, and careful query construction form a layered approach to keeping database-driven applications fast and scalable.

0
ProgrammingDEV Community ·

Developer builds RAG system from scratch in Python without frameworks

A developer has published a detailed walkthrough on building a Retrieval-Augmented Generation (RAG) system in Python without relying on high-level frameworks like LangChain. RAG allows large language models to answer questions about private or current documents by retrieving relevant text snippets before generating a response. The tutorial covers the full pipeline, including chunking documents into semantically meaningful pieces, converting text into vector embeddings using a sentence transformer model, and performing similarity-based retrieval. The guide also addresses hybrid search combining vector and keyword methods, re-ranking results, and attaching source citations to answers. The author emphasizes that chunking strategy is the most critical decision in a RAG pipeline, recommending 100–250 word chunks with 10–20% overlap and preserved metadata.

0
ProgrammingDEV Community ·

Dev Shrinks DistilBERT Model 4x for Full Browser Inference Using ONNX and Int8

A developer fine-tuned DistilBERT on the Banking77 dataset to classify 77 banking intents, achieving 92.2% accuracy, but faced a deployment challenge with a 256 MB model too large for a serverless static site. By exporting the model to ONNX format using Hugging Face Optimum, inference speed improved 1.58x over standard PyTorch without any accuracy loss. Applying dynamic int8 quantization then reduced the model size from 256 MB to 64 MB, though it unexpectedly increased latency by 8% on Apple Silicon due to quantize/dequantize overhead. The final model runs entirely client-side in the browser via Transformers.js, downloading once at 64 MB and requiring no backend server or infrastructure. The developer notes that ONNX export and quantization are distinct performance levers, with export delivering speed gains and quantization delivering size reduction rather than further speed improvements.

0
ProgrammingHacker News ·

Developer Claims to Have Built World's Fastest PHP Web Server

A developer has shared a project called QbixServer, claiming it to be the fastest PHP web server in the world. The announcement was posted on Hacker News, linking to the project's website at qbixserver.com. At the time of posting, the submission had received 5 points and no comments. Insufficient detail was available in the source material to independently verify the performance claims or describe the server's technical specifics.

0
ProgrammingDEV Community ·

DEX Encryption vs VMP: How to Pick the Right Android App Protection

Android app protection broadly falls into two technical approaches: DEX encryption, which hides code files from static analysis tools, and VMP (Virtual Machine Protection), which converts core methods into custom virtual instructions executed by a native interpreter. DEX encryption secures the code container but remains vulnerable to runtime analysis, while VMP protects the underlying code logic by making reverse engineering significantly harder. Tools like XopProtector combine both approaches alongside SO file protection and RASP, offering a multi-layered security model for Android APKs. Developers are advised to apply VMP selectively to security-sensitive logic — such as authorization or encryption algorithms — to avoid unnecessary runtime performance overhead. The choice between these methods ultimately depends on how critical the code being protected is and what level of reverse-engineering resistance the application requires.

0
ProgrammingDEV Community ·

PrismML's Bonsai 2 27B Compresses a Full AI Model to 5.9GB With Minimal Loss

On September 17, 2026, AI company PrismML released Bonsai 2 27B, a heavily compressed version of Alibaba's open-source Qwen3.8-27B model that fits into just 5.9GB — down from the original 54GB. The compression uses a ternary weight system, assigning each model weight one of only three values, combined with a mathematical technique called Hadamard rotation to preserve information quality. PrismML claims the compressed model retains 98.2% of the full-precision model's average benchmark score, outperforming conventional 2-bit quantization methods by more than 12 benchmark points while also being smaller in file size. Notably, the model holds up on demanding reasoning tasks like competition mathematics and code generation, areas where standard low-bit compressed models typically degrade significantly. The release is available under the permissive Apache 2.0 license, raising questions about whether high-quality local AI models could reduce reliance on paid subscription services.

0
ProgrammingHacker News ·

The Mystery of Pre-Greek: A Lost Language Buried in Ancient Greek Words

Ancient Greek contains a significant layer of vocabulary that does not derive from Proto-Indo-European roots, pointing to an earlier, unidentified language spoken in the region. Linguists refer to this mysterious substrate as 'Pre-Greek,' believed to have been used by populations inhabiting the Aegean area before Greek-speaking peoples arrived. Many common Greek words — including names for plants, animals, and everyday objects — are thought to originate from this lost tongue. Despite decades of research, Pre-Greek has never been deciphered or linked conclusively to any known language family. The study of this substrate offers a rare window into the linguistic landscape of the ancient Mediterranean world before recorded history.

0
ProgrammingDEV Community ·

AdvoHQ Builds In-House Case-Law Database to Cut Legal Research Costs

AdvoHQ, a legal technology platform, is developing its own structured case-law database to reduce reliance on costly third-party research services. The database is designed to offer judgment search, court and citation-based filtering, AI-assisted summaries, and similar-case discovery. Unlike standalone research tools, the system will be integrated directly into a lawyer's workflow, allowing them to link judgments to active matters, arguments, and drafts within a single workspace. The initiative targets independent lawyers and smaller firms who struggle to afford premium legal research platforms. AdvoHQ's broader goal is to combine research, matter management, drafting, document handling, and risk intelligence into one affordable but fully capable platform.

0
ProgrammingDEV Community ·

Why Modular Monoliths Are Beating Microservices for Most Engineering Teams

Software architects are increasingly advocating for modular monolith architecture as a smarter default over microservices, particularly for teams of fewer than 50 engineers. Unlike traditional monoliths, a modular monolith is a single deployable unit with enforced module boundaries, schema-per-module ownership, and an internal event bus for decoupled communication. Teams that have migrated back from microservices report infrastructure cost cuts of up to 90% and CI pipeline times shrinking from 45 minutes to under five. The approach avoids the so-called 'distributed systems tax' — including network latency, brittle service contracts, and complex debugging — before teams actually need distributed scale. Experts stress that boundaries must be enforced through automated CI tools, not informal conventions, to keep the codebase cleanly extractable if scaling needs eventually arise.

0
ProgrammingDEV Community ·

Developer Demonstrates Sending Raw TPM 2.0 Commands via Windows TBS in Rust

A developer has published a technical walkthrough on using Windows TPM Base Services (TBS) to send raw TPM 2.0 commands directly through Rust code. The guide covers the full TPM2_GetRandom workflow, including creating a TBS context, marshalling the command, submitting it, and parsing the response to retrieve random bytes. TPM2_GetRandom was chosen as the example because it requires no session and has minimal parameters, making it one of the simpler TPM commands to implement. The tutorial relies on the windows-sys crate and highlights key details such as big-endian byte encoding for TPM command headers. Notably, the TPM may return fewer random bytes than requested if it cannot generate the full amount in a single operation.

0
ProgrammingHacker News ·

Devin AI Introduces Code Scans Feature for Automated Codebase Analysis

Devin AI has announced a new feature called Code Scans, introduced via its official blog. The tool appears designed to automatically analyze codebases, helping developers identify issues or gain insights into their projects. The announcement was shared on Hacker News, where it received minimal initial engagement. Code Scans represents an expansion of Devin AI's capabilities as an AI-powered software engineering assistant.

0
ProgrammingDEV Community ·

CLI-based AI code review tools offer real alternatives beyond GitHub Apps

Most well-known open-source AI code review tools are built as GitHub Apps, making them effectively unavailable for GitLab self-managed, Azure DevOps, or Bitbucket environments. Alibaba's Open Code Review, reviewed in September 2026, is a CLI tool under Apache-2.0 that reads Git diffs locally and posts structured comments via a configurable LLM, supporting any forge that allows local cloning. It requires Git 2.41+, Node.js 18+, and an LLM API key, and publishes the AACR-Bench dataset to back its precision-over-recall performance claims. PR-Agent, donated by Qodo to the open-source community and now MIT-licensed, offers another self-hostable option with documented support for GitLab, Azure DevOps, and Bitbucket via Docker, CI pipelines, or webhook servers. For teams on non-GitHub forges, both tools sidestep forge-specific integrations entirely by operating on local clones rather than platform App installations.

0
ProgrammingHacker News ·

2021 Book Explores the Culture and Technical Infrastructure Behind Warez Piracy

A 2021 work titled 'Warez' examines the underground world of digital piracy, covering both its technical infrastructure and its distinct visual and cultural aesthetics. The book has resurfaced on Hacker News, attracting attention from readers interested in the history of online piracy scenes. A copy of the work is accessible via the Internet Archive. The post garnered 38 points and a small number of comments on the platform.

0
ProgrammingDEV Community ·

Flutter 'LEGO Architecture': Writing Modular, Reusable Code Like Interlocking Bricks

Developer Atuoha Anthony published a detailed guide on freeCodeCamp on September 11, 2026, explaining how to structure Flutter code using a concept called LEGO Architecture. The approach treats each widget, class, or service as a LEGO brick with a single responsibility and a standardized interface — called a 'stud' — that allows it to connect with other components without knowing their internal details. A common Flutter widget like Padding is used as a practical example, since it handles only spacing and accepts any widget as a child, making it inherently reusable. The guide contrasts this with tightly coupled widgets, such as a PriceTag that simultaneously manages both visual styling and content, which limits reuse and forces code duplication. Atuoha also emphasizes that good modular design should allow behavior to be swapped out — for example, a cart button should not need to know whether it calls a REST API, writes locally, or logs to a console.

0
ProgrammingDEV Community ·

Harness Engineering: Why AI Context Design Is Now a Core Dev Responsibility

Harness Engineering refers to the practice of building structured environments that control how AI models access tools, context, and resources — going beyond simply choosing which model to use. A real-world example illustrates the cost of ignoring it: a product manager querying ChatGPT about a production bug received a hallucinated table name because the model had no schema context, wasting significant debugging time. A well-designed harness addresses this through steering files, targeted MCP servers that return only relevant data, and model routing — one team observed token usage drop from roughly 50,000 to 15,000 on a specific task after improving context precision. Mature harness setups also include granular permissions, mandatory human-in-the-loop checkpoints for sensitive actions, and full observability with audit trails and cost metrics. The article argues that developers who understand harness design have a responsibility to propagate it across their organisations, equipping non-technical colleagues like PMs with safe, context-aware AI tooling rather than leaving them to rely on generic chat interfaces.

0
ProgrammingDEV Community ·

AI Speeds Up Drafting But Coordination Bottlenecks Still Delay Business Workflows

AI tools can rapidly generate draft responses to complex business documents like security questionnaires, but the overall process often stalls due to unresolved approvals, unclear ownership, and coordination gaps that drafting assistance cannot fix. A faster draft can actually worsen bottlenecks by flooding a small group of reviewers with more material to check alongside existing workloads. The core issue is that completing a business process requires decisions, verified evidence, authorized sign-offs, and proper handoffs — steps AI currently struggles to replace. Experts argue that AI investments should be evaluated against the full workflow rather than just the drafting stage, since a populated document is an intermediate step, not a finished deliverable. Before adopting new tools, organizations are advised to audit recent workflows to identify exactly where delays occurred and what finally resolved them.

0
ProgrammingDEV Community ·

How to Fix DNS Record Write Failures Caused by Invalid Zone ID Validation

DNS record writes can be rejected when a zone ID — such as an opaque reference like 'z_7f31' — is not properly resolved and matched against the canonical domain name before the write is attempted. The correct approach is to resolve the opaque reference, canonicalize the returned domain name by stripping trailing dots and lowercasing it, and verify it matches the requested owner. DNS names are case-insensitive and trailing root dots are presentational, meaning 'Example.Dev.' and 'example.dev' should be treated as identical during comparison. Retention of verification evidence should be handled carefully: storing every raw provider response wastes storage and risks sensitive data exposure, while keeping only a boolean outcome makes disputes impossible to reconstruct. Best practice is to retain normalized identity fields, request IDs, and policy version, while expiring raw responses on a documented schedule.

0
ProgrammingDEV Community ·

Fountain City reveals 2-month operational data from its autonomous SEO agent system

Thai AI consultancy Fountain City published a detailed account in September 2026 of its autonomous SEO system, which has been running in production since early 2026. The system uses four specialised agents handling research, writing, analytics, and distribution, producing over 40 research briefs per month. Fountain City distinguishes true 'agentic SEO' from the more common 'AI-assisted' workflows, offering a three-level framework to help teams assess which automation tier suits their needs. The company noted that most teams do not require a fully autonomous Level 3 system, and that jumping from Level 2 to Level 3 requires a full architectural overhaul rather than incremental upgrades. To reduce pipeline delays, they replaced fixed cron scheduling with a completion-triggered model, allowing a single content piece to move from brief to published draft in one continuous flow.

0
ProgrammingDEV Community ·

AtomCut adds 337,000 free icons to its browser-based video editor with self-drawing animation

AtomCut, a free browser-based motion design and video editor, has launched an Icons panel featuring over 337,000 icons from 208 open-source sets, including Lucide, Tabler, Phosphor, and Material Symbols. Icons can be dragged directly onto the canvas or timeline, where they animate themselves by inking in stroke-by-stroke over roughly 900 milliseconds. The tool sources icon data via the Iconify API, routed through a Cloudflare Worker for edge caching, rather than building a separate pipeline. A licence filter reduced the available sets from 238 to 208, ensuring only icons permitting commercial use in exported video are offered. Icons are imported through the existing SVG importer, meaning each arrives as editable, keyframeable path layers rather than a new layer type — keeping the editor's architecture consistent.

← NewerPage 1159 of 3222Older →