SShortSingh.

Programming

0
ProgrammingDEV Community ·

Clock Drift on One Server Derailed a Payment Incident Investigation for Hours

A payment system incident at a software team turned into a two-hour wild goose chase after logs produced a physically impossible timeline, with a gateway appearing to respond before a request was even sent. The root cause was a single host whose clock was running eleven seconds ahead of the rest, a drift that had accumulated over months after a base image rebuild accidentally dropped the time synchronisation daemon. The skewed timestamps also caused an error-rate alert to misplace records across time windows, masking a genuine spike, and explained a certificate validity failure that engineers had previously dismissed as intermittent. In response, the team added clock offset as a monitored metric with alert thresholds, and updated the log pipeline to record both emitted and ingest timestamps so drift becomes immediately visible. They also adopted a broader principle of not inferring event ordering across separate machines from timestamps alone, treating cross-host time comparisons as independent claims rather than ground truth.

0
ProgrammingDEV Community ·

Power BI Data Modelling: How Fact and Dimension Tables Drive Accurate Insights

Data modelling in Power BI involves structuring datasets into a framework that ensures accuracy, optimises performance, and simplifies reporting. Rather than storing all data in a single flat table, the approach separates information into fact tables, which hold quantitative transactional data, and dimension tables, which provide descriptive context. Relationships between these tables allow filters and calculations to flow predictably, making DAX formula writing more reliable and less error-prone. Key design decisions around granularity, cardinality, and entity relationships determine how data is split and organised across tables. A well-built model is also scalable, allowing new data sources or metrics to be added without rebuilding the entire structure.

0
ProgrammingDEV Community ·

How idle LLM parent agents fall into costly polling loops — and how to fix it

When a parent AI agent delegates a task to a worker and has nothing else to do, it can fall into a repetitive polling loop, repeatedly waiting 60 seconds at a time just to learn whether the worker has finished. Each such wait triggers a full model activation, forcing the parent to re-read its entire conversation history, which in one measured run consumed over 10 million tokens across 89 waits. The root cause is structural: on platforms like Codex, a completed worker cannot directly wake an idle parent, so a 'do not poll' rule has nothing to enforce. Three potential fixes exist — extending the wait interval to reduce activation frequency, using a single long wait timed to the worker's expected duration, or deploying a zero-token watchdog script that monitors the worker silently and wakes the parent only once upon completion. The zero-token watchdog is highlighted as the most efficient solution, eliminating model token costs during the waiting period entirely.

0
ProgrammingDEV Community ·

Why Automation Needs Proof of Change, Not Just a Success Code

A software team continued manually verifying an automated provisioning job despite its apparent reliability, and their caution proved justified. Two years earlier, the job had silently skipped a step while still reporting success, because it checked whether its request was accepted rather than whether the intended change had actually occurred. The gap went undetected for weeks until an engineer noticed a group had no members. In response, the team redesigned all jobs to log before-and-after state changes, revealing that around four percent of runs were silently skipping steps by design. A daily reconciliation process now flags drift between intended and actual system state, and a named owner has been assigned to formally retire the manual check once trust in the automation is established.

0
ProgrammingDEV Community ·

Developer Uses IndexedDB to Cut Repeated HTML Transfers on Lightweight Sites

A developer has built a system that stores a site's main HTML document in the browser's IndexedDB on a user's first visit, then restores it locally on all subsequent visits instead of re-downloading it. The approach uses two files — a lightweight loader and the main HTML body — hosted on the same domain, since IndexedDB is managed per origin. A drag-and-drop tool has been released that converts any standard HTML file into this two-file format and packages the output as a ZIP archive. The method is best suited for near-single-page sites with large HTML files that are opened repeatedly by the same users. External resources such as images, CSS, and JavaScript are still fetched normally, and browser caching continues to function alongside this system.

0
ProgrammingDEV Community ·

How to Safely Review AI-Generated Terraform Code Before It Destroys Your Infrastructure

AI tools like GitHub Copilot can assist with writing Terraform configuration, but accepting generated code without review risks serious infrastructure damage, including accidental database deletion. Running terraform validate only checks schema correctness and does not flag insecure settings like open S3 buckets or permissive IAM policies, so additional scanners such as checkov or tfsec are essential in CI pipelines. Engineers should always search plan output for the phrase 'forces replacement', which signals a delete-then-recreate operation that can cause data loss on stateful resources like RDS instances or EBS volumes. Copilot tends to default to count-based resource iteration, which tracks resources by index and can silently destroy and re-create infrastructure when list items are removed, whereas for_each tracks by key and is safer for collections. Other common pitfalls include omitting validation blocks on bounded variables and misplacing checkov skip comments outside resource blocks, where they are silently ignored by the scanner.

0
ProgrammingDEV Community ·

How to Build Safer Social Media Publishing Automation With Staged Validation

Reliable social publishing automation requires more than confirming a post button was clicked, as errors like wrong accounts, duplicate posts, or incomplete content can go undetected. A safer approach divides the process into three stages: preparation, submission, and verification. Before posting, the automation should confirm the correct account, page, editor state, and media are all in order. The submission step should be treated as a single, deliberate and irreversible action, never retried blindly if the outcome is unclear. Finally, success should be confirmed by checking for the published post outside the editor, not by relying on the editor's own state.

0
ProgrammingDEV Community ·

Why AI Prompts Should Be Version-Controlled Like Code

A software developer is calling attention to a critical gap in AI system maintenance: prompts that guide model behavior are routinely edited without any version control or audit trail. Unlike code changes, prompt edits often have no author, no diff, and no way to revert, yet they can significantly alter a system's outputs. The author argues that even minor wording tweaks — removing a clause or deleting an example — can degrade model responses in ways that are hard to trace. To address this, he recommends treating prompts as tracked repository files, pinning model identifiers, and running regression tests against a set of real inputs before any changes go live. The piece concludes with a pointed comparison: teams would never allow unlogged edits to pricing logic, yet they routinely permit the same for prompts that drive AI decisions.

0
ProgrammingHacker News ·

Cloudflare Open-Sources Security Audit Skill on GitHub

Cloudflare has published a repository called 'security-audit-skill' on GitHub, making it publicly available for developers and security professionals. The project appears to be an open-source tool or framework related to security auditing capabilities. It was shared on Hacker News, where it attracted modest early engagement with a small number of points and comments. The release reflects Cloudflare's ongoing practice of contributing security-related tooling to the open-source community.

0
ProgrammingDEV Community ·

Why File Upload Validation Fails and What Actually Keeps Systems Safe

A security-focused analysis highlights how common file upload checks — such as verifying file extensions or Content-Type headers — are easily bypassed by malicious actors. Attackers can rename harmful files with legitimate extensions like .png to pass surface-level validation. Formats such as SVG and PDF carry additional risks, as they can execute scripts or contain embedded code. Experts recommend re-encoding uploaded files, ignoring user-supplied filenames, and capping file sizes before processing. Storing uploads outside the web server's public directory is also cited as a critical safeguard.

0
ProgrammingDEV Community ·

Developer releases free guardrails toolkit to stop AI coding agents faking task completion

A developer has released Claude Code Guardrails Pack, a free open-source toolkit designed to prevent AI coding agents from falsely claiming tasks are complete without actually verifying results. The tool was built after repeated firsthand frustrations with agentic coding tools like Claude Code, Cursor, and Windsurf, which often assess code by reading it rather than running it. The free pack includes an 'unlazy' skill requiring logged command output before any completion claim, a session handoff tool, a guard against destructive Git commands on dirty trees, and a pre-commit hook that blocks accidental commits containing API keys. A paid Pro tier priced at $14 offers additional features including a per-session tool-call budget guard and a pre-PR checklist. The project is MIT licensed and hosted on GitHub, with all verification steps and caught bugs documented publicly in a VERIFICATION.md file.

0
ProgrammingDEV Community ·

Who Really Owns ERP Customisations Once the System Goes Live?

Going live with an ERP system does not mark the end of technical work, as custom workflows, integrations, and reports built around the platform all require a dedicated maintenance owner. Responsibility is layered: the ERP vendor covers the standard product, the implementation partner handles the agreed deployment scope, and the internal team owns business rules and processes. As businesses evolve — adding supplier portals, new reporting formats, or machine-data sources — unmaintained customisations tend to push work back into spreadsheets, emails, and manual checks. A 2026 Singapore ERP integration guide by Workato highlights the distinction between the one-time integration build and the ongoing maintenance needed as APIs, connected-system schemas, and compliance requirements change. Experts recommend mapping every point where work leaves the ERP and returns to a person, then assigning a clear owner for each gap before any fix is released.

0
ProgrammingDEV Community ·

Coupling and Cohesion: The Two Design Principles That Define Maintainable Code

Cohesion and coupling are two foundational software design concepts that determine how well a codebase can be understood, tested, and changed over time. Cohesion refers to how closely related the responsibilities within a single module are, while coupling measures how dependent one module is on another. Well-designed systems aim for high cohesion within modules and low coupling between them, reducing the risk that a change in one area breaks unrelated functionality elsewhere. As systems grow, poor design choices — such as bundling authentication, billing, and reporting into one module — make even small updates costly and error-prone. Applying these principles helps developers clearly separate concerns, making it easier to locate, modify, and scale individual parts of a system independently.

0
ProgrammingDEV Community ·

Two-Day Kernel Debug Traced to a 10x Learning Rate Mismatch in Defaults

A developer spent two days debugging a browser-based machine learning model whose training loss plateaued at 2.45, initially suspecting WebGPU kernel issues. The root cause turned out to be a default learning rate mismatch: the browser used 3e-3 while the Python reference used 3e-4, a tenfold difference. Kernel parity tests validated numerical operations but never compared configuration defaults, allowing a correctly implemented model to appear broken. The same investigation uncovered two more gaps — a tiny 863-byte default corpus masking model capacity, and a Memory64 benchmark that missed the actual browser bridge used in production. The fix involved adding end-to-end checks across configuration, data, and integration boundaries to ensure test coverage matched real-world workflows.

0
ProgrammingDEV Community ·

RemoteOK's $29.95 TopAccess Bundle Raises Questions About Platform Independence

RemoteOK launched TopAccess this year, a $29.95/month subscription that bundles freelancer profile access across five platforms — Toptal, Arc.dev, PeoplePerHour, NoDesk, and We Work Remotely — alongside its own premium tier. The service is marketed as offering over $110/month in combined value, though that figure is based on list prices set by the same companies involved in the bundle. A closer look reveals that Arc.dev, presented as one of five distinct platforms, is actually operated by Peeridea, Inc. under parent company Toptal, LLC — a relationship disclosed only in Arc's privacy policy with no public announcement. This means at least two of the five bundled platforms share a corporate parent, raising questions about how independent the algorithms and hiring pipelines truly are. The subscription requires a 12-month commitment with no free trial, and the platform overlap may matter to freelancers counting on genuinely separate visibility channels.

0
ProgrammingDEV Community ·

Why 'Almost Done' Projects Stall: The Hidden Cost of Undefined Completion

Software teams often mistake high activity — commits, meetings, ticket updates — for actual progress, leaving strategic projects stuck at '80% done' for weeks. The core problem is rarely lack of effort; it is the absence of a clearly defined 'done' state that specifies every condition required for true completion. Common culprits include unresolved decisions, unmanaged dependencies, creeping scope, and shared ownership where no single person is accountable for the final outcome. Experts suggest treating project completion like a checklist of verifiable conditions — such as integrations active, team trained, and old workflow retired — rather than a vague percentage. Shifting the team's question from 'how far along are we?' to 'which completion condition is still false?' makes blockers concrete and easier to resolve.

0
ProgrammingHacker News ·

Opinion: US Presidential Pardon Power Faces Renewed Scrutiny

A Medium opinion piece is calling for an end to the US president's broad power to issue pardons, arguing it is open to abuse when used to benefit personal allies. The article has gained traction on Hacker News, accumulating 13 points and sparking discussion among readers. The piece raises concerns about the lack of checks on executive clemency in the American legal system. The debate over presidential pardon power has resurfaced periodically, particularly when high-profile pardons appear to favor political associates.

0
ProgrammingDEV Community ·

How to Query OCI Object Storage Bucket Files via SQL Using Resource Principals

Oracle Cloud Infrastructure (OCI) allows database users to read object storage bucket files directly through SQL by leveraging resource principals. The process begins with creating a dynamic group in OCI and assigning it a policy that permits read access to the target bucket. A database administrator must then enable resource principal support and grant the relevant schema access to the DBMS_CLOUD package. Once configured, users can list and query bucket objects using the DBMS_CLOUD.LIST_OBJECTS function with the OCI$RESOURCE_PRINCIPAL credential. This approach works for both autonomous and non-autonomous Oracle Databases, provided they are hosted within OCI.

0
ProgrammingDEV Community ·

Developers Use Partition Key Sharding to Bypass DynamoDB Vector Search 100-Result Cap

DynamoDB added vector search support in August 2026, but limits each query to a maximum of 100 results (TopK=100), restricting use cases that require broad retrieval before reranking. A developer published a workaround using partition key sharding, splitting data across multiple shard groups using a SHA-256 hash of each item's ID. Queries are fired in parallel against all shards simultaneously, and results are merged and sorted by distance score on the application side. With five shards, this approach effectively raises the practical result ceiling to 500 per search. The method contrasts with Amazon S3 Vectors, which raised its own TopK limit from 100 to 10,000 in June 2026, highlighting an ongoing gap in DynamoDB's vector search capabilities.

0
ProgrammingDEV Community ·

Beginner's Guide: Setting Up Playwright for Browser Automation in VS Code with Python

Playwright is an open-source browser automation and end-to-end testing tool that supports Chromium, Firefox, and WebKit through a single API. It is compatible with multiple programming languages, including Python, JavaScript, Java, and .NET, making it versatile for developers. Installation requires running a pip command in the VS Code terminal followed by a separate command to download the necessary browsers. Users can verify a successful setup by running a short Python script that navigates to a webpage and prints its title. Best practices include using virtual environments per project and keeping Playwright updated regularly to avoid compatibility issues.

← NewerPage 1185 of 3224Older →