SShortSingh.

Programming

0
ProgrammingDEV Community ·

Google's Gemma 4B model passes 2 of 3 Linux sysadmin tasks in QEMU sandbox test

A developer built an open-source evaluation harness called local-agent-sandbox to test whether Google's 4-billion-parameter Gemma model could autonomously diagnose and fix Linux server failures. The setup used QEMU virtual machines with QCOW2 copy-on-write overlays instead of Docker containers, providing stronger isolation and allowing each test environment to be reset in under a second. Gemma was given root SSH access to a headless Ubuntu 24.04 VM and tasked with resolving three distinct DevOps failure scenarios involving Nginx. The model succeeded in two cases — clearing a port conflict and fixing a configuration syntax error — but failed the third by misidentifying a file permission issue and repeatedly rewriting virtual host configs rather than correcting the chmod setting. The experiment concluded that small quantized models can handle real CLI-based system tasks, but require guardrails to prevent them from doubling down on incorrect diagnoses.

0
ProgrammingDEV Community ·

How to Use Raw SQL in Entity Framework Core When LINQ Falls Short

Entity Framework Core provides several escape hatches for developers when LINQ cannot express complex or performance-critical queries. Methods like FromSqlRaw and FromSqlInterpolated allow raw SQL execution while still supporting entity tracking and LINQ composition. To prevent SQL injection, EF Core's interpolated methods extract user-supplied values as parameterized inputs rather than embedding them directly into query strings. For non-entity operations such as UPDATE, DELETE, or INSERT, ExecuteSqlRaw and ExecuteSqlInterpolated handle command execution and return affected row counts. Developers can also define keyless entity types to map custom SQL results, such as aggregations or stored procedure outputs, that do not correspond to a tracked database table.

0
ProgrammingDEV Community ·

Five Angular optimizations cut load times and boosted signups at a 110k-user SaaS

A production case study from Mattrx, a multi-tenant marketing analytics platform running Angular 19 with over 540 components and 110,000 monthly active users, details five performance techniques applied over four weeks. The optimizations included lazy loading with route-level code splitting and the @defer directive, OnPush change detection, Angular Signals replacing BehaviorSubject, standalone components, and trackBy for list rendering. Collectively, these changes reduced initial JavaScript from 1.2 MB to 290 KB, cut Largest Contentful Paint from 4.6 seconds to 1.5 seconds, and dropped Interaction to Next Paint from 420 ms to 80 ms. The share of users rated 'Good' on Core Web Vitals rose from 38% to 91%, and trial signup conversion improved by 12%. The article notes that poor Angular performance typically stems from default configurations rather than the framework itself, and that Core Web Vitals now directly influence both Google search rankings and conversion rates.

0
ProgrammingDEV Community ·

Shopify's draftOrderCreate API lacks idempotency, forcing developers to build their own safeguards

Shopify's draftOrderCreate GraphQL mutation has no idempotency key support, meaning sending the same request twice creates duplicate draft orders — a serious problem for apps converting purchase orders automatically. Unlike payment APIs that allow safe retries via an idempotency header, Shopify's API leaves developers unable to distinguish a true failure from a timed-out request that may have succeeded. A developer building a Shopify wholesale app addressed this by logging every creation attempt in a database table with unique constraints, preventing duplicate operations even from race conditions like double-clicks or queue redeliveries. When a request ends without a response, the operation is marked 'UNCERTAIN' and a reconciliation job later queries Shopify using a correlation token embedded in the draft's tags, custom attributes, and metafields. One undocumented constraint the developer encountered was Shopify's 40-character tag length limit, which caused the first real draft creation to fail until the token format was shortened accordingly.

0
ProgrammingDEV Community ·

Developer finds V8 lazy string hashing caused 30x sort slowdown in Electron app

A developer building a desktop file viewer discovered that sorting a million-row CSV took over a minute in Electron, despite the same code completing in half a second under Node.js. Profiling revealed the bottleneck was V8's lazy string hashing, which computes and caches a hash the first time a string is used as a Map key — a cost that proved significant across a million fresh strings in a memory-heavy renderer process. Replacing the string-keyed Map with a custom FNV-1a integer hash table eliminated the first-touch hashing overhead entirely. The fix also enabled caching integer rank keys per column and using a counting sort, removing per-comparison callbacks on repeat sorts. The developer noted uncertainty about why the same hashing cost does not appear as severe in a Node process and invited V8 internals experts to weigh in.

0
ProgrammingDEV Community ·

Google Gemma 4 Runs on AWS SageMaker NVIDIA T4 at 80% of L4 Speed

A developer has successfully deployed Google's Gemma 4 language model on Amazon SageMaker using an NVIDIA T4 GPU, the smallest GPU instance the platform offers. Benchmarks show the T4 decodes at 77–82% the speed of the newer NVIDIA L4, while producing identical outputs. The deployment required a custom patch to work around a shared memory limitation in vLLM 0.30.0 that normally prevents Gemma 4 from running on older Turing-architecture GPUs like the T4. Among the tested model sizes — 2B, 4B, 12B, and 26B — the 12B variant is the largest that fits within the T4's 16 GB of memory. Python-based MCP tools were also developed to simplify management of the vLLM-hosted deployment on SageMaker.

0
ProgrammingHacker News ·

Opinion: Why We Should Stop Using 'Google' as a Verb for Web Search

A blog post by Adam Farkas argues that using 'Google' as a generic verb for searching the web gives the tech giant undue cultural dominance. The piece contends that the habit reinforces Google's brand monopoly even when users are searching on other platforms. Farkas suggests adopting more neutral language to reflect the broader landscape of available search engines. The post sparked discussion on Hacker News, attracting 47 comments and 44 upvotes from readers engaging with the linguistic and competitive implications.

0
ProgrammingHacker News ·

Why Writing Detailed Commit Descriptions Can Sharpen Developer Thinking

A software developer has published a blog post arguing that writing thorough commit descriptions is more than a documentation habit — it serves as a cognitive tool. The author suggests that articulating the reasoning behind code changes forces developers to think more clearly and catch potential issues before they arise. By treating commit messages as a structured thinking exercise, engineers can improve both code quality and decision-making. The post has gained modest attention on Hacker News, where it was shared with eight upvotes.

0
ProgrammingDEV Community ·

Seven-Year Dev Shares Practical Starter Stack for Beginner Web Developers

A developer with seven years of experience has published a beginner-friendly guide on DEV Community aimed at those new to web development or using AI-assisted coding tools. The guide recommends starting with a focused set of tools — VS Code, Node.js, TypeScript, and a web browser — rather than trying to learn everything at once. It suggests adding PostgreSQL for database needs and NestJS for backend development as projects grow in complexity. The author emphasizes that the stack is not a universal standard but a personal launchpad meant to reduce the overwhelm of choosing between countless frameworks and libraries. Beginners are encouraged to build small projects first and expand their toolset gradually as they encounter real problems.

0
ProgrammingDEV Community ·

How to Build an MVP in 2026: Scope Small, Learn Fast, Avoid Costly Mistakes

Most startups fail not because they cannot build a product, but because they build the wrong one or add too many features before validating demand. A minimum viable product (MVP) is a focused first release designed to test one core assumption with real users in a real context. Founders are advised to define a specific target user, map the single journey that delivers value, and ruthlessly cut any feature that does not help test that assumption. Technology choices should favor tools the team already knows, with off-the-shelf solutions preferred for common needs like payments and authentication. The goal is to learn quickly whether users will actually use and value the product before committing to full-scale development.

0
ProgrammingDEV Community ·

Autodocs CLI Automatically Generates Markdown Docs From Your Codebase

A developer has released Autodocs, an open-source command-line tool designed to help engineers quickly understand unfamiliar codebases. The tool analyzes source code and generates structured Markdown documentation covering architecture, routes, models, and services. It offers two main commands: one for generating full documentation and another for producing a quick codebase explanation. Autodocs requires Node.js 20 or higher and is available via npx under the package name @autodocify/autodocs. The tool is part of the broader Docify platform and is actively being developed, with the creator seeking feedback from developers using it on real projects.

0
ProgrammingDEV Community ·

How to Build Reliable Feature Flag Admin Pages with Safe Writes and Cost Tracking

Feature flag admin pages should read from a single authoritative backend and render a server-side snapshot to avoid stale browser-dependent views. Every write must go through an authenticated, auditable path using compare-and-swap logic to prevent two operators from unknowingly overwriting each other's changes. For AI agent workflows, the exact flag revision evaluated at request start must be attached to latency and cost records, since a mid-rollout change can silently distort spend attribution if only the current flag value is logged at export time. A minimal implementation requires one database table with a versioned flag document, strict validation rejecting unknown keys, and an append-only audit log capturing actor, reason, old and new values, revision, and timestamp. This approach suits modest-scale deployments, though globally distributed services with percentage rollouts may need a dedicated feature flag control plane instead.

0
ProgrammingDEV Community ·

Benchmark reveals token overhead and hidden costs across 7 AI agent frameworks

A developer built an open-source benchmarking tool called agentic-arena to measure the real wire-level costs of popular AI agent frameworks under identical, controlled conditions. Six of the seven frameworks tested fell within a 1.15x token overhead band compared to a hand-rolled baseline loop, but smolagents consumed 3.9 times more prompt tokens due to a redundant system prompt that restated tool schemas already sent separately. The benchmark also found that five of seven frameworks failed to pass shared request timeouts to their HTTP clients, causing them to hang silently for up to 20 seconds on a one-second budget — a bug since fixed and added to CI. On retry behaviour, only smolagents survived three consecutive rate-limit errors, but did so by pausing for up to four minutes per item, which can quietly collapse batch throughput without surfacing in accuracy scores. The project is fully reproducible, with CI regenerating every measurement on a clean install from the public GitHub repository.

0
ProgrammingDEV Community ·

Founders Build Live Mobile Game Studio From Small-Town India Without Moving to a Hub

Three co-founders launched Quantam Core, a mobile game studio, from Bongaon — a small town in India far outside any recognised tech ecosystem. Their game Carrom King Classic is now live on the Google Play Store, built entirely using widely available tools such as Unity, GitHub, AdMob, and Google AI Studio. The team acknowledges real drawbacks, including the absence of an ambient founder network and the extra effort required to build professional relationships deliberately online. However, lower living costs extended their financial runway significantly, and the lack of a support ecosystem forced an early self-reliance they now consider a competitive strength. Their experience challenges the startup-culture assumption that proximity to a hub is a prerequisite for building a serious company.

0
ProgrammingDEV Community ·

Developer Releases 29-Byte Bare-Metal Engine Core Maliklang-V4.1.0 on GitHub

Developer Shailendra Kumar Singh has published Maliklang-V4.1.0, a minimalist execution engine built from just 29 bytes of machine instructions with no external dependencies. The project, released under the MIT License, consists of a small assembly routine and a Python ctypes wrapper that loads the raw binary payload into a static memory buffer. Singh claims the design eliminates heap allocation and third-party libraries, which he argues reduces attack surface and supply chain risk. The assembly core uses three x86 instructions — a register move, an XOR, and a Linux syscall interrupt — totalling six functional bytes padded to 29 with NOP instructions. The source code is publicly available on GitHub under the repository shailendra-codes/Maliklang-V4.1.

0
ProgrammingDEV Community ·

How and Where Passwords Are Stored: Key Security Practices for Users

Password security remains critical in the digital age, with 80% of developers still relying on passwords as their primary security method. Passwords can be stored in various locations including browser password managers, session storage, local storage, cache, and hardware databases on both computers and phones. Experts advise users to log out of accounts on shared or unfamiliar devices and ensure passwords are cleared from all storage points after each session. Writing down passwords is considered unsafe; instead, users are encouraged to store them in encrypted or password-protected files, or on encrypted drives. Regularly reviewing active login sessions across devices is recommended to prevent unauthorized access.

0
ProgrammingDEV Community ·

Compiled stored procedures can silently change behavior during database migration

When migrating stored procedures between databases, a procedure that compiles without errors can still produce different results depending on how edge cases are handled. In PL/pgSQL, SELECT INTO without STRICT silently assigns nulls when no rows are found and discards extra rows when multiple matches exist, while SELECT INTO STRICT raises explicit errors for both conditions. The choice between these modes is a behavioral decision, not a syntax fix, and can alter how a procedure responds to zero or multiple matching rows. Similarly, using RAISE NOTICE instead of RAISE EXCEPTION changes whether a problem is merely reported or causes the transaction to abort. Thorough migration testing should cover edge-case inputs — such as zero or duplicate rows — rather than relying solely on the standard single-match scenario.

0
ProgrammingDEV Community ·

VPS Pricing Guide for Small Businesses: What You Actually Pay After Year One

A practical 2026 guide breaks down VPS sizing and pricing for small businesses, warning that introductory rates from providers like Hostinger and IONOS can more than double at renewal. The key advice is to prioritize RAM over CPU cores, since databases, WordPress, and business apps exhaust memory well before processing power. For most first-time business servers, a 2 vCPU, 8 GB RAM plan on NVMe storage in the $12–25/month range is recommended as the practical sweet spot. Budget providers like Contabo offer the cheapest RAM per dollar but trade off on port speeds and uptime guarantees, making them better suited for internal tools than customer-facing storefronts. Pay-as-you-go options from DigitalOcean and Vultr suit variable workloads, while AWS Lightsail bundles AWS infrastructure into predictable flat monthly fees starting at $5.

0
ProgrammingDEV Community ·

Three Common Redis Caching Mistakes That Can Break Production Systems

A technical analysis highlights three progressive design failures developers encounter when implementing Redis as a caching layer. The first issue involves stale data, where a cache-aside pattern can return outdated values after a database update, creating two conflicting versions of the same record. Adding a Time-To-Live (TTL) setting offers eventual data freshness but forces a trade-off between cache performance and consistency, which may be unacceptable for time-sensitive data like email addresses. Explicit cache invalidation improves freshness but introduces new failure risks, such as a successful database write paired with a failed cache deletion leaving stale data in Redis. A third failure mode, not covered in full, involves high-traffic cache keys whose sudden expiry can trigger a surge of direct database queries, potentially overwhelming the database.

← NewerPage 776 of 3167Older →