SShortSingh.

Programming

0
ProgrammingDEV Community ·

Developer builds Muffle app to auto-silence Android phones after prayer embarrassment

A developer created Muffle, an Android app that automatically manages a phone's sound profile based on location, time, or prayer schedules, after witnessing an embarrassing ringtone disruption during Friday prayers. The app was designed as a lightweight, privacy-respecting utility that works without cloud accounts or internet connectivity. Building it required navigating Android 14's aggressive background process management, which actively limits or kills background services. The developer combined WorkManager for reliable scheduled tasks and a Foreground Service for real-time sound adjustments, while using setExactAndAllowWhileIdle alarms to ensure triggers fired even in Doze mode. A priority queue system was also implemented to handle overlapping rules and determine which scheduled routine should control the device's sound state at any given time.

0
ProgrammingDEV Community ·

Unguarded AI API calls can silently drain budgets and trigger 504 errors in production

An analysis of 1,662 public posts from app builders identified 215 verified failure cases, with AI model and API issues accounting for 4% of them. Six cases share a common pattern: outbound AI calls made with no timeout, no spending budget, and no fallback logic. Because failed calls cost almost nothing, monitoring dashboards show normal spend while users silently receive fallback responses or experience long hangs. Default OpenAI and Anthropic Node SDKs allow up to 10 minutes per attempt and retry up to twice, meaning a single hung request can stall for over 15 minutes before infrastructure layers like Vercel or Cloudflare terminate it with a 504 or 524 error. Developers are advised to set explicit timeouts and budget limits within their own code rather than relying on platform-level cutoffs.

0
ProgrammingHacker News ·

Pac-Bench tests AI models ability to build Pac-Man in one HTML prompt

A new benchmark called Pac-Bench evaluates how well AI language models can generate a functional Pac-Man game from a single prompt. Each model receives exactly one instruction — 'Create a Pac-Man game in a single HTML page' — with no follow-up prompts or corrections allowed. The project uses the Harness framework to run and compare model outputs consistently. It was shared on Hacker News, where it drew early community attention. The benchmark aims to measure one-shot coding capability across different AI models in a fun, visual way.

0
ProgrammingDEV Community ·

How to Measure AI Visibility Reproducibly: Fixed Question Bank and Explicit Denominators

Brasil GEO, a Brazilian AI visibility monitoring firm, has published a reproducible protocol for measuring brand mentions across AI search engines including ChatGPT, Claude, Gemini, and Perplexity. The methodology treats AI visibility as a distribution variable, reporting mention rates as the share of executions in which a brand appears, always paired with sample size, time window, variance, and collection coverage. The protocol requires a frozen bank of 30 to 40 real-customer questions, a minimum of 5 executions per question for continuous monitoring and 30 for before-and-after comparisons, with all parameters fixed before the first data collection round. In a sample run from August 29, 2026, covering 37 questions across four engines, the combined brand mention rate was 21.1 percent, but per-engine rates ranged from 16.2 percent on ChatGPT and Claude to 35.1 percent on Perplexity, underscoring why aggregated averages can obscure meaningful platform-level differences. The approach draws on findings from a January 2026 SparkToro and Gumshoe.ai study of nearly 3,000 prompts, which found that even category-leading brands appeared in only 55 to 77 percent of responses.

0
ProgrammingDEV Community ·

GEONMI-MEMS Architecture Claims 40% Weight Cut for VLEO Satellites via Plasma Harvesting

A developer has proposed the GEONMI-MEMS VLEO Architecture, a software-defined system aimed at extending the operational life of satellites flying at approximately 250 km altitude, where atmospheric drag rapidly depletes conventional fuel. Rather than countering drag, the design harvests ambient ionospheric plasma at orbital velocities of around 7.5 km/s to assist micro-propulsion, while safely redirecting electrostatic discharge away from onboard batteries. The system comprises two subsystems — GEONMI-MEMS VLEO Engine 2 for autonomous propulsion modeling and AeroCore-3 for real-time energy harvesting — both governed by deterministic C++17 software running at a fixed 100Hz control loop. The developer claims the architecture reduces satellite wet mass by 40%, potentially stretching VLEO satellite lifespans from months to years and allowing more revenue-generating payloads per launch. The project is described as proprietary intellectual property intended for civil and commercial space applications, with source code published on GitHub.

0
ProgrammingDEV Community ·

Why a Three-Model AI Jury Can Create False Confidence Instead of Safety

Using three AI models to reach a consensus decision — a design pattern called a three-model jury — is gaining traction in agentic AI systems as a form of cross-validation. However, models trained on overlapping data can share the same biases, meaning unanimous agreement may reflect a shared blind spot rather than correctness. Running three models in parallel also significantly increases token usage and latency, while non-deterministic outputs mean quorum outcomes can shift unpredictably with model temperature settings. Engineers are advised to log not just the majority decision but also dissenting rationales and abstentions, as minority reports often expose ambiguities the majority ignored. Without instrumentation tracking dissent, abstentions, and correlated failures, the author argues the setup functions as three copies of the same guess rather than a genuine safety mechanism.

0
ProgrammingDEV Community ·

Developer rebuilds 28-year-old Turkish IRC network in Go and WebAssembly

A solo developer has completely rewritten Yudum.NET, a Turkish IRC network originally launched in 1998, replacing its legacy C daemon and scripted bots with a modern platform built entirely in Go. The new system runs as a single binary on one VPS, combining an IRC daemon, user services, a website, and a webchat into one unified process backed by a SQLite database. Notably, the webchat and interactive site components are compiled to WebAssembly using TinyGo, eliminating the need for hand-written JavaScript and reducing a class of cross-site scripting vulnerabilities by design. The platform retains classic IRC connectivity for existing clients while adding social feeds, table games, voice rooms, and media discovery features accessible directly within the chat window. The rebuild was motivated by the failure of traditional IRC interfaces to retain casual users who gravitated toward modern apps like Discord and WhatsApp.

0
ProgrammingDEV Community ·

Retrying entire AI workflows on Gemini 500 errors causes duplicate side effects

Developers using Google's Gemini or Vertex AI APIs often respond to intermittent 500, 502, 503, or 429 errors by adding broad retry logic around their entire automation workflow. However, retrying the full workflow replays every side effect, leading to duplicate CRM updates, Slack alerts, Jira tickets, and inconsistent database states. The root cause is misplaced retry boundaries: the retry logic should wrap only the isolated model call, not the steps before or after it. Google's Gemini Python SDK already handles transient failures with exponential backoff by default, meaning raw HTTP clients or full-workflow retries are the more likely culprits. The recommended fix is to isolate the LLM call into a dedicated sub-workflow or worker, so that a transient model failure triggers only that step to retry while downstream writes execute exactly once.

0
ProgrammingDEV Community ·

Why Image Compression Is a Multi-Constraint Engineering Problem, Not Just a Size Target

Compressing an image to a specific file size involves satisfying multiple simultaneous constraints — file format, dimensions, byte count, and visual quality — not just one. Simply targeting a quality setting or a rounded label like '100 KB' is unreliable, since encoders do not reduce file size proportionally and byte definitions can vary between systems. A practical approach involves iterating over candidate quality values, measuring actual output blob sizes, and retaining only results that genuinely satisfy the size bound. When dimension requirements are fixed, a tool should clearly report failure rather than deliver a falsely optimistic result; when resizing is permitted, that should be a separate, explicit user choice. Format conversions such as switching to JPEG or WebP also carry trade-offs like loss of transparency and must be surfaced to the user before download.

0
ProgrammingHacker News ·

AI Agent Accountability: Who Bears Responsibility for Unintended Harmful Actions?

A blog post published on greenpants.net has sparked discussion on Hacker News about accountability when AI agents cause harm unintentionally. The article examines the legal and ethical questions surrounding who should be held responsible — developers, deployers, or end users — when autonomous AI systems act in damaging ways. The post has attracted 16 comments and 17 upvotes on the platform, indicating growing community interest in the topic. As AI agents become more capable and widely deployed, the question of liability for accidental malicious behavior is becoming increasingly pressing for regulators and technologists alike.

0
ProgrammingDEV Community ·

How to Fix Blurry Marketplace Product Images by Classifying Assets Before Encoding

Blurry marketplace thumbnails often stem not from encoder failure but from applying a single universal compression policy to visually distinct asset types like photos and graphics. Engineers are advised to classify each asset separately, since photographs can tolerate gradual texture loss while logos and transparent graphics degrade visibly even from minor compression. The recommended fix involves logging six key fields per image transformation — including asset class, alpha channel presence, output format, encoded bytes, and policy version — to isolate which asset category is failing before adjusting any encoder setting. Separate service-level indicators should be defined for photo-like and graphic assets, with quality thresholds validated against a human-reviewed reference set drawn from the actual product catalog. Leading signals such as rising bytes-per-pixel ratios, unexpected alpha removal, or format distribution shifts should be tracked on dashboards so on-call engineers can diagnose quality breaches before user complaints surface.

0
ProgrammingDEV Community ·

Fixed Crop vs Smart Crop: Key Trade-offs for Avatar Image Pipelines

A technical analysis on DEV Community outlines four core trade-offs developers face when choosing between fixed and smart cropping for profile photo pipelines. Fixed cropping uses a stable center anchor, ensuring predictable geometry and consistent results across directory grids, while smart cropping shifts the anchor based on subject detection to better frame off-center faces. The recommended approach for B2B SaaS platforms is to generate both crop candidates and select the fixed crop when it passes subject-safety checks, falling back to smart crop only when it offers a meaningfully safer composition. Smart cropping is flagged as unsuitable for logos, abstract images, or cases where subject signals are ambiguous, with manual focal-point controls suggested as a fallback for complex group shots. The article emphasizes that confidence thresholds should be calibrated against a platform's own image data rather than borrowed from model demos.

0
ProgrammingDEV Community ·

kubectl rollout undo and az vm create do more than their names imply

A developer on Day 52 of a DevOps learning journey completed two tasks on the KodeKloud Engineer platform: rolling back a Kubernetes deployment and creating an Azure virtual machine. Running kubectl rollout undo does not rewind a deployment but instead triggers a new rollout using the pod template from an older ReplicaSet, meaning it behaves like any other update. The command only restores the pod template, leaving any changes to scaling or strategy in place, and the rollback is incomplete unless the source manifest or commit is also corrected. On the Azure side, az vm create did far more than provision a single VM, automatically generating a virtual network, security group, public IP, network interface, and an extra data disk that should not be used for persistent storage. A key billing risk noted is that deleting an Azure VM by default leaves its associated disks, NICs, and public IPs intact and still billable, making resource group deletion the cleaner teardown option in lab environments.

0
ProgrammingDEV Community ·

How One Team Built an AI Feedback Dashboard After 47 Tickets Went Unnoticed for 3 Days

A product team discovered a critical gap in their feedback process after a 41-point sentiment drop on July 12 went undetected for three days, by which time 47 customers had already been affected by the same crash. Their existing triage workflow relied on support leads manually spotting patterns and passing vague summaries to engineering, creating a 2-5 day lag between customer pain and actionable response. To fix this, the team built an automated feedback pipeline using a memory system called Hindsight, which continuously ingests support tickets and social posts, extracts entities and facts, and forms higher-level observations without requiring a human to ask the right questions. The system uses retain, recall, and reflect operations to power an interactive dashboard that surfaces visual sentiment trends and specific evidence, including clickable cause nodes linked to ticket clusters. The team found that enriching ingested data with metadata such as app version and source significantly improved the precision of the insights the system generated.

0
ProgrammingDEV Community ·

IMAP vs POP3: Key Differences and When to Use Each Protocol

IMAP and POP3 are the two protocols used by email apps to receive mail, and choosing between them affects how your messages are stored and synced. IMAP keeps emails on the server and synchronises read status, folders, and deletions across all devices in real time. POP3 downloads messages to a single device and typically removes them from the server, making it a simple but isolated solution. For most users with multiple devices, IMAP is the recommended default, while POP3 suits those who read mail on one computer and are willing to manage their own local backups. Neither protocol handles sending — that task falls to SMTP, which is required separately regardless of which receiving protocol is used.

0
ProgrammingDEV Community ·

Developer publishes practical guide on applying game mechanics to web and app design

A web application developer has released a book titled 'Press Start: El camino de la gamificación en juegos, web y aplicaciones', drawing on personal experience with full-stack development and game mechanics. The book covers topics ranging from the psychology of motivation and Octalysis theory to technical implementation of points, badges, leaderboards, and streak systems. It also examines real-world case studies from apps like Duolingo and Strava, alongside software architecture patterns and ethical considerations such as avoiding dark patterns. The guide is aimed at web and mobile developers, UI/UX designers, and students seeking to understand how gamification principles can improve user retention and experience. The book is currently available for purchase on Amazon.

0
ProgrammingDEV Community ·

How Problem Constraints Act as Clues to Choosing the Right Algorithm

A common struggle in competitive programming is selecting the correct algorithm when faced with a new problem, often leading to brute-force attempts that exceed time limits. One developer shares a constraint-first framework: identifying hard constraints in the problem statement — such as a sorted array or bounded values — and mapping them directly to classic algorithms. For example, a sorted array with a two-sum requirement points immediately to the two-pointer technique, which runs in linear time versus the O(n²) nested-loop approach. The framework extends broadly: bounded integer ranges suggest counting sort, limited character sets suggest sliding window, and sorted matrices suggest corner-based search. Adopting this mindset, the author argues, transforms algorithm selection from guesswork into pattern recognition.

0
ProgrammingDEV Community ·

How Developers Can Reduce Latency in Voice AI and TTS Pipelines

Latency in voice AI refers to the delay between sending text to a text-to-speech engine and the user hearing the first sound, with even a few hundred milliseconds noticeably disrupting conversation flow. The main contributors to this delay are network round-trips and audio synthesis, which together can account for 250 to 1,000 milliseconds in a typical pipeline. Developers can reduce perceived latency by caching frequently used audio clips locally or on a CDN, eliminating repeated API calls for common phrases. Streaming audio in small chunks rather than waiting for a full file download allows users to begin hearing a response while synthesis continues in the background. Balancing cloud-based and local inference approaches, alongside optimizing each pipeline stage, is key to achieving the sub-400ms response times expected in real-time voice applications.

0
ProgrammingDEV Community ·

HexBytes Library Version Silently Changes Signature Format, Breaking API Validation

A subtle breaking change in the Python hexbytes library causes EIP-712 cryptographic signatures to be returned in different formats depending on the installed version, with no runtime error or warning raised. In version 0.3.x, the HexBytes.hex() method returned a 0x-prefixed string, but version 1.0.0 removed that override, causing the method to return bare hex without the prefix. This means server-side regex validation of signature headers can silently fail — the client code runs without error, but the server rejects the malformed value. The issue is compounded by a naive fix of prepending '0x' manually, which produces a double-prefixed string on older versions and gets rejected for incorrect length. A version-safe workaround using prefix normalization rather than concatenation is recommended to ensure consistent output across all affected hexbytes releases.

0
ProgrammingDEV Community ·

Analysts Use Anchor Keyword Trick to Compare Unlimited Terms in Google Trends

Google Trends restricts comparisons to five search terms at a time, and separate queries cannot be directly combined because each chart is independently normalized to its own 0–100 scale. To work around this, analysts insert a single stable 'anchor' keyword into every group of four new terms, then use the anchor's varying values across groups to calculate a scaling factor. Applying these factors aligns all groups onto one common scale, which can then be re-normalized to produce accurate relative rankings across any number of keywords. A developer has automated this method into a cloud-based tool on Apify, which accepts unlimited keywords, supports multiple countries, and returns results as a unified comparable dataset with CSV export. The tool also handles Google's rate-limiting by routing requests through residential proxies.

← NewerPage 829 of 3171Older →