SShortSingh.

Programming

0
ProgrammingDEV Community ·

Unix Timestamp Bug Explained: Why Mixing Seconds and Milliseconds Breaks Dates

A common programming bug causes dates to display incorrectly — either as January 1970 or the year 55,840 — when Unix timestamps in seconds are confused with milliseconds, or vice versa. JavaScript's Date object expects milliseconds, so passing a seconds-based timestamp without multiplying by 1,000 results in a date just 19 days past the Unix epoch. Conversely, multiplying a milliseconds timestamp by 1,000 again pushes the date tens of thousands of years into the future. A practical rule of thumb is to count digits: a 10-digit value is likely in seconds, while a 13-digit value is likely in milliseconds. Developers are advised to confirm the unit from API documentation and convert explicitly rather than relying on digit-counting heuristics in production code.

0
ProgrammingHacker News ·

Mathematicians Confirm Existence of Complex 'Miller's Monster' Polyhedron

Mathematicians have verified the existence of a complex uniform polyhedron known as the Great Dirhombicosidodecahedron. This shape, colloquially called 'Miller's Monster,' has a highly intricate geometric structure. The confirmation resolves a long-standing question in the field of mathematical visualization and polyhedron theory. The discovery was discussed on the Hacker News forum, where it garnered attention from the tech community.

0
ProgrammingHacker News ·

Bild AI Seeks Founding Product Engineer for Early-Stage Startup

Bild AI, a startup backed by Y Combinator's Winter 2025 batch, is currently hiring a Founding Product Engineer. The role is an early-stage position, typically involving significant responsibility in shaping the product from the ground up. The job listing was posted on Y Combinator's company job board. No further details about the role's requirements or compensation were publicly available in the listing.

0
ProgrammingDEV Community ·

27B LLM Squeezed Under 6GB via Ternary Quantization, But CPU Speed Disappoints

A developer tested Prism's Ternary-Bonsai-2-27B, a ternary-quantized large language model that compresses a 27-billion-parameter model into under 6GB, on a budget Hetzner VPS with no GPU. The model uses an aggressive PTQ1_0 format where each weight is reduced to one of three values, requiring Prism's custom llama.cpp fork since the format is not yet supported upstream. While Simon Willison had reported 20–44 tokens per second on Apple Silicon with Metal acceleration, the CPU-only test on the VPS yielded just 2–3 tokens per second. At that speed, the model is viable for background batch processing but impractical for real-time interactive use. The tester also noted an unexplained throughput variance of up to 40 percent between server restarts with no configuration changes.

0
ProgrammingDEV Community ·

Why AI Systems Need New Observability Metrics Beyond Latency and Uptime

Traditional software monitoring tools are inadequate for AI-native systems because they measure technical success rather than output quality, missing failures like hallucinations, biased responses, or unsafe content. A technically successful HTTP 200 response can mask serious problems such as fabricated information, ignored retrieval context, or policy violations. Large language models introduce non-deterministic behavior, meaning identical inputs can produce varied outputs and quality can degrade silently after model or prompt updates. Experts advocate for a dual observability strategy that combines conventional infrastructure metrics with AI-specific Service Level Indicators (SLIs) measuring trustworthiness, relevance, and safety. Without these specialized SLIs, organizations risk deploying AI systems that appear operationally healthy but are fundamentally unreliable or harmful in real-world use.

0
ProgrammingDEV Community ·

URL Encoding Pitfalls: Why %20, +, and Special Characters Break APIs

URLs are composed of distinct parts — scheme, host, path, query string, and fragment — each with its own encoding rules, and treating them as uniform text is a common source of bugs. Characters like &, #, =, and ? carry structural meaning in URLs, so user-supplied data containing these must be properly encoded before being inserted into a URL component. A frequent source of confusion is that spaces can be represented as either %20 or + depending on context: standard percent-encoding uses %20, while HTML form encoding uses +, and a literal plus sign must be encoded as %2B to avoid being misread as a space. JavaScript developers often misuse encodeURI() and encodeURIComponent(), where the former preserves URL-structural characters and is unsafe for encoding individual values, while the latter correctly encodes characters like & and = within a single component. Using dedicated APIs such as URLSearchParams and the URL constructor is generally the safer and clearer approach for building URLs with dynamic query parameters.

0
ProgrammingDEV Community ·

Developer audits 2 months of Claude Code sessions, finds $1,675 in API costs and 117 risky deletes

A developer building an AI safety tool called Paveo replayed 59 days of their own Claude Code sessions to stress-test the product before releasing it publicly. Across 106 sessions and over 8,000 model calls, the usage would have cost $1,674.75 at standard API rates, with one single session reaching $452.92. A starter safety policy, when applied retroactively to all tool calls, would have blocked 670 actions, including 117 recursive force-delete commands and 3 forced git cleans. The developer notes that not every blocked command would have been a genuine mistake, but argues that a false refusal is preferable to an unrecoverable data loss. Paveo, which runs locally without any network access and supports multiple AI coding tools, is set to become publicly available this week.

0
ProgrammingDEV Community ·

Strong Coding Fundamentals Matter More Than AI Prompting Skills, Developer Argues

A developer named Cesar Aguirre published a career-focused article on DEV Community on September 28, addressing anxiety around artificial intelligence in the tech industry. The piece targets programmers experiencing 'FOMO' — fear of missing out — over the rapid rise of AI tools. Aguirre argues that solid programming fundamentals provide more lasting value than simply learning to craft AI prompts. His central message is that chasing AI hype is less effective than building timeless core skills as a developer.

0
ProgrammingDEV Community ·

How to Build a Desync-Free Next.js Shop Inside Telegram Mini Apps

Developers building e-commerce experiences inside Telegram Mini Apps using Next.js frequently encounter state desynchronization, iOS viewport bugs, and client-side security vulnerabilities. The core issue arises when React state updates are not properly synced with Telegram's native MainButton, a global SDK element, causing stale cart data or duplicate transactions. A secure checkout flow requires routing invoice generation through a Next.js Route Handler that validates Telegram's initData server-side, preventing bot token exposure. iOS WebView also mishandles viewport height when the keyboard appears or the MainButton toggles, pushing UI elements off-screen. A React Context Provider wrapping the Telegram WebApp SDK helps manage SSR compatibility and ensures the SDK is safely initialized only on the client side.

0
ProgrammingDEV Community ·

Asynclay Offers Lightweight HTTP-Based Job Scheduling Without Redis or Workers

A developer has built Asynclay, a tool designed to simplify delayed task execution for backend applications by reducing the need for complex queue infrastructure like Redis and dedicated workers. The system works by accepting a target URL, payload, and optional execution time, then independently persisting, executing, and retrying the job. It uses PostgreSQL's FOR UPDATE SKIP LOCKED mechanism to safely distribute work across multiple instances, and employs lease-based job locking to handle worker failures mid-execution. Delivery is guaranteed on an at-least-once basis, with stable job identifiers provided to target endpoints to support idempotency. The project is now seeking developer feedback, particularly on scenarios where this HTTP-centric scheduling model may fall short or raise trust concerns around external background execution.

0
ProgrammingDEV Community ·

Why Prompt Engineering Alone Cannot Scale Enterprise AI Workflows

AI adoption is following a pattern similar to cloud computing, moving from basic prompt use to hitting production-scale failures before requiring full architectural redesign. Companies scaling simple prompts into production environments encounter issues like context contamination, unstable output schemas, and silent non-deterministic failures. Experts argue that enterprise AI reliability demands modular system engineering — including task isolation, deterministic JSON contracts, and multi-agent pipelines — rather than prompt refinements. Without this infrastructure shift, AI workflows remain fragile and prone to breaking under real-world complexity. The core argument is that lasting value in applied AI comes from fault-tolerant, deterministic system design rather than optimizing individual prompts.

0
ProgrammingDEV Community ·

How to Enable Touch ID Authentication for sudo Commands on macOS

Mac users can configure Touch ID to replace password prompts when running sudo commands in the Terminal. On macOS 14 Sonoma and later, this involves copying a built-in template file at /etc/pam.d/sudo_local.template and uncommenting a single line to activate the pam_tid.so module. Users on macOS 13 Ventura or earlier must manually add the same line to the /etc/pam.d/sudo file, though this change gets overwritten with each system update. A third-party command-line tool called mole, installable via Homebrew, can automate the configuration process on either macOS version. Once set up, a Touch ID fingerprint prompt replaces the password dialog whenever sudo is invoked in a new Terminal session.

0
ProgrammingDEV Community ·

How to Build a Reliable AIoT Pipeline for Pharmaceutical Manufacturing

Pharmaceutical manufacturing facilities generate data from diverse sources including sensors, RFID readers, BLE trackers, and enterprise systems like MES, ERP, and LIMS, making data integration a core engineering challenge. Experts recommend designing such systems as event-processing architectures, where each data point carries identity, timestamp, and context to remain meaningful. Edge computing plays a key role by filtering invalid sensor readings, removing duplicates, and standardising protocols before data reaches central systems. A master-data mapping layer is also essential to reconcile inconsistent equipment identifiers across platforms, preventing AI models from misidentifying the same physical asset. Specialists advise establishing a clean, trusted data foundation before selecting any machine learning model, and treating AI-generated scores as inputs to a broader decision layer rather than standalone conclusions.

0
ProgrammingDEV Community ·

Developer builds Claude Code plugin using a yes/no decision model to cut LLM overhead

A developer has released jev-tools, an open-source Claude Code plugin that offloads routine binary decisions — such as rule checks and skill selection — to a lightweight model called OpenJev that returns only probabilities rather than free text. The model, served by a platform called Codiv, answers typed yes/no, pick-one, or scoring questions in tens to hundreds of milliseconds, avoiding the cost and latency of full LLM calls for simple judgments. The plugin includes features like a rule enforcement hook, a git diff review pre-checker, and a skill picker, with hooks designed to fail open during outages so edits are never blocked unintentionally. Live testing revealed issues including 403 errors from a rejected User-Agent, false rule violations on clean edits, and unstable goal-detection probabilities in the browser navigator, all of which were subsequently addressed. The project is MIT-licensed, built on Python 3.10+ with no external dependencies, and ships in shadow mode by default so it only logs actions until the user opts into active enforcement.

0
ProgrammingDEV Community ·

Developer finds his AI benchmark grader was reading prompt numbers, not model answers

A developer discovered that his homemade arithmetic grading harness was incorrectly evaluating AI model responses by capturing the first number in a string rather than the actual answer. The bug, traced to a single regex line using re.search, caused 7 of 8 arithmetic tasks to be graded against a number from the prompt instead of the model's output. This led to false failures across 9 models, with Claude Opus 4.8 incorrectly marked wrong on all 60 runs of a float subtraction task despite answering correctly every time. The developer confirmed all three models tested had consistently provided the right answers when their responses were checked directly. Replacing the vague prompt wording 'Give the number to one decimal place' with 'Give only the number' or 'Number only' eliminated the issue, as models stopped restating the problem and returned bare numeric answers that the grader could correctly evaluate.

0
ProgrammingDEV Community ·

Why SMEs Need Incident Response Playbooks and Runbooks Before a Crisis Hits

Cybersecurity guidance published by ClearPath Security highlights the importance of preparing incident response playbooks and runbooks before a live security event occurs. A playbook defines the decision-making framework for specific scenarios such as ransomware or account compromise, while a runbook provides step-by-step technical instructions for repeatable tasks like isolating an endpoint or disabling an account. The guidance is aimed particularly at UK small and medium-sized enterprises, where informal knowledge-sharing often breaks down during out-of-hours or high-pressure incidents. Organisations are advised to start with a small set of high-priority scenarios, link playbooks to alert sources and MITRE ATT&CK mappings, and validate them through tabletop exercises. Well-structured response documents reduce containment time, limit execution errors, and support consistent handling of incidents across teams and external partners.

0
ProgrammingHacker News ·

Researchers Develop Moisture-Absorbing Wallpaper That Generates Electricity Indoors

Scientists have developed a new type of wallpaper capable of harvesting electrical energy from indoor humidity. The material works by converting moisture in the air into usable electric power, while simultaneously helping to regulate indoor humidity levels. The research was published in the journal Advanced Energy Materials. This dual-function approach positions the wallpaper as a potential passive energy source for smart homes and buildings. The innovation could contribute to low-power indoor sensing and energy harvesting without requiring external power infrastructure.

0
ProgrammingDEV Community ·

How CI/CD Pipelines Leak Secrets and Key Steps to Stop It

Secret leakage in CI/CD environments typically stems from small, incremental design flaws rather than a single catastrophic breach, according to guidance published by ClearPath Security. Common leak paths include hard-coded credentials in source control, verbose build logs, environment variables exposed to unintended processes, and build artefacts containing sensitive configuration files. Because CI/CD pipelines connect source code, cloud APIs, package registries, and production systems, an attacker who gains pipeline access can move laterally without ever exploiting the application itself. Recommended mitigations include using short-lived, scoped credentials, isolating untrusted workflows, scanning logs and artefacts for accidental exposure, and separating production access from build and test jobs. The guidance frames CI/CD secret hygiene as a software supply chain risk requiring proactive detection and rapid rotation, not merely a configuration afterthought.

0
ProgrammingDEV Community ·

Automate Data Quality Checks on Pull Requests Using Great Expectations and GitHub Actions

A developer tutorial published on DEV Community outlines a method to catch bad data at the pull request stage, before any code is merged. The approach combines a YAML-based data contract, a Python validation script using Great Expectations 1.x, and a GitHub Actions workflow that runs on every pull request. Instead of checking production data, the setup tests what the pipeline code does to a known sample input, keeping checks fast and predictable. The YAML contract defines column-level rules such as required fields, allowed values, and value ranges, making rule changes visible as reviewable diffs. Together, these three components cause a pull request to fail automatically in GitHub if the code would produce data that violates the defined contract.

← NewerPage 777 of 3167Older →