SShortSingh.

Programming

0
ProgrammingDEV Community ·

Developer builds image copy-detection tool using search engines instead of web crawling

Software developer Harman Singh built Sealify in 2023, a copy-detection tool that identifies edited or redistributed versions of images and videos across the web without running its own crawler. Instead of indexing the web independently, Sealify uses existing reverse image search from Google, Bing, and Yandex as a broad first stage, then applies local verification on a single Mac mini to filter out false matches. The approach was driven by both practical and environmental concerns, as building a proprietary web index requires continuous crawling, large-scale storage, and significant energy and water consumption. Singh notes that data centers consumed roughly 66 billion liters of water in the US alone in 2023, and that duplicating existing infrastructure produces no new value. By reusing indexes that already exist, Sealify aims to deliver accurate copy detection while avoiding the hardware, energy, and e-waste costs of a redundant system.

0
ProgrammingDEV Community ·

SQL Queries Don't Run in the Order You Write Them — Here's Why It Matters

Although SQL queries are written starting with SELECT, databases process them in a different sequence that affects both results and performance. The actual execution order follows these steps: FROM, WHERE, GROUP BY, HAVING, SELECT, DISTINCT, ORDER BY, and finally LIMIT or OFFSET. Early stages like FROM and WHERE handle table selection and row filtering, which can significantly reduce the data processed in later steps. HAVING differs from WHERE in that it filters grouped results rather than individual rows. Understanding this execution order helps developers write more efficient queries and troubleshoot unexpected outputs.

0
ProgrammingDEV Community ·

How and Why to Split a PDF Into Pages or Sections Safely

Splitting a PDF allows users to extract specific pages or sections—such as a single chapter or signature page—into separate files without affecting quality. Common methods include splitting by page range, extracting selected pages, or generating one file per page, depending on the use case. Users should note that printed page numbers may not match file positions, and internal links or form field connections can break when pages are separated into different files. Encrypted PDFs typically require the password to be removed before splitting can proceed. When sharing extracted pages from sensitive documents like contracts or IDs, it is advisable to scroll through the output file first to confirm no unintended content is included.

0
ProgrammingDEV Community ·

Why Single-Purpose AI Agents Outperform All-in-One Setups

A software developer found that running one AI agent across all projects caused it to misapply rules and produce inconsistent output, such as writing landing page copy in the tone of a commit message. Drawing on software engineering principles, he refactored his setup so each agent handles only one clearly defined job within its own isolated workspace. The key insight is that an agent's memory becomes unreliable when it stores rules from multiple contexts, since a rule valid for one project can be actively harmful in another. Isolated agents coordinate indirectly through a publish-subscribe event system overseen by a supervisor agent, rather than communicating directly with each other. The author reports that narrower workspaces produce more accurate, compounding memory and make it far easier to audit what an agent has learned.

0
ProgrammingDEV Community ·

How to Give AI Coding Agents Just Enough Context to Work Effectively

AI coding agents perform better when given focused, task-specific context rather than access to an entire codebase. Providing unnecessary files introduces noise, increases token usage, and obscures what actually matters for the task at hand. A more effective approach treats context as intentionally designed, similar to how a new engineer is briefed on only the relevant parts of a project. Developers are advised to identify task boundaries first, then supply only the interfaces, models, and conventions the agent needs. Separating what a system does from how it works internally is one practical way to keep context lean without limiting the agent's effectiveness.

0
ProgrammingDEV Community ·

Four Production Gaps Blocking AI Agent Budget Approvals, Says Infrastructure CEO

An AI infrastructure company leader says many teams have working agent prototypes but struggle to secure budget approval due to unresolved production-readiness gaps. The core issues identified are unpredictable costs, lack of auditable execution records, inability to recover in-flight tasks during deployments, and tight coupling to specific frameworks. Finance teams are said to reject proposals not because of model choices but because agent failures can silently inflate token costs in ways that are hard to explain. Regulatory requirements such as the EU AI Act further demand signed, step-by-step execution logs rather than vague references to agent decisions. Addressing these four gaps — cost predictability, evidence trails, task recovery, and framework independence — is presented as the key to unlocking production deployment budgets.

0
ProgrammingDEV Community ·

Domain-Driven Design: Aligning Code Structure with Business Language

Domain-Driven Design (DDD) is a software development approach that prioritizes business logic over database or framework concerns, ensuring code reflects real-world business processes. A core principle called Ubiquitous Language requires developers and business stakeholders to share the same terminology, so concepts like 'Customer' and 'Order' appear identically in both conversations and code. DDD introduces Bounded Contexts to handle situations where the same term carries different meanings across departments, such as 'Customer' meaning different things in Sales, Shipping, and Support. The approach also defines Entities (objects with unique IDs whose state changes over time) and Value Objects (immutable objects identified purely by their values), grouped into Aggregates that enforce consistent business rules internally. When an Aggregate's state changes, it fires a Domain Event, making DDD a natural fit for event-driven and microservices architectures.

0
ProgrammingDEV Community ·

How to Evaluate Encoding and Compression Settings for IoT Time-Series Data

A technical guide aimed at developers outlines best practices for testing storage efficiency in IoT deployments where data is retained over months or years. The guide emphasizes that storage settings should be treated as part of application design, since databases handling millions of measurements must balance history retention, continuous ingestion, and predictable query performance. It explains that encoding determines how values are represented before storage, while compression reduces redundancy in that encoded form, with Apache IoTDB V2.0.x offering options such as TS_2DIFF, RLE, and GORILLA for encoding, and LZ4, SNAPPY, GZIP, ZSTD, and LZMA2 for compression. The guide recommends changing one storage variable at a time and measuring metrics including stored size, CPU and memory usage, write throughput, and query behavior under realistic, mixed-signal workloads. It cautions that a setting performing well in short tests may behave differently once the system has accumulated a representative data history.

0
ProgrammingDEV Community ·

Teen Developer Builds Cookieless Scroll Tracking Tool for Privacy-First Analytics

Eighteen-year-old applied AI developer Om Yaduvanshi has built Cloudline, a cookieless alternative to Google Analytics that tracks scroll depth without storing cookies or IP addresses. The tool works by attaching scroll depth data directly to each anonymous pageview rather than linking events through a session cookie. It reports how far visitors scroll in four buckets — 25, 50, 75, and 100% — sending only a bucket number alongside page, referrer, screen size, and timestamp. Because scroll depth is treated as a property of the pageview itself, no visitor-level data needs to be stored or stitched together. Cloudline is currently free for early users and can be added to any site with a single script tag under 2 KB.

0
ProgrammingDEV Community ·

Developer shares prompt engineering lessons from building AI text-to-video tool

A developer building CineGen, an AI text-to-video generator, discovered that prompting for video requires a fundamentally different approach than image prompting. Unlike static image prompts, effective video prompts must specify what is in the frame, what is moving, and how the shot evolves over time. The developer found that using cinematography vocabulary — such as shot types, camera movements, and lens descriptions — significantly improved output quality and reduced visual artifacts. Structuring prompts around a three-beat arc of establish, action, and resolve also helped eliminate the disjointed, slideshow-like effect common in AI-generated clips. The key takeaway is to use motion-focused, verb-driven language and direct the camera explicitly, rather than relying on descriptive adjectives alone.

0
ProgrammingDEV Community ·

Empty config lists should trigger errors, not grant unlimited access

A widespread security flaw in software configuration allows empty or missing access lists to silently default to full, unrestricted permissions rather than denying access. This pattern, dubbed 'privilege by omission,' can arise from routine actions like refactoring, accidental line deletions, or simple typos that cause carefully written rules to be ignored. Unlike an explicit 'allow all' marker that is visible during code review, these silent defaults leave no obvious trace that maximum privilege has been granted. Developers argue that systems should instead reject empty grants with a loud error at load time, forcing the issue to be noticed and fixed immediately. The recommended fix requires that unrestricted access be declared explicitly, such as with a wildcard marker, and that any grant naming no capabilities at all be treated as a configuration error.

0
ProgrammingDEV Community ·

How to Split and Redact PDF Chapters Safely for High-Volume Fintech Documents

A technical guide outlines a structured approach to splitting and redacting large PDF bundles used in fintech, such as financial statement packages. The method involves parsing a document's table of contents to map printed page numbers to zero-based PDF indexes, then deriving chapter boundaries from those entries before any data is shared. Developers are advised to validate page ranges for duplicates, descending numbers, or out-of-bounds starts, and to reject problematic bundles entirely rather than attempt a best-effort split. When a parsed table of contents is unavailable, native PDF outline destinations or page classification serve as fallback methods, each with defined rejection paths. The core principle is that an uncertain boundary should trigger a manual review rather than risk exposing personal data in an incorrectly split file.

0
ProgrammingDEV Community ·

Security Audit Flags Critical Reentrancy and Access-Control Flaws in Gemini DeFi Protocol

A security audit conducted between October 1 and October 21, 2024, on Gemini, a cross-chain DeFi protocol with approximately $5.65 billion in total value locked, identified ten vulnerabilities across its core smart contracts. Auditors found two critical and two high-severity reentrancy flaws, along with one critical and three high-severity access-control weaknesses. The most serious issue involves GeminiVault's withdrawal function, which transfers tokens before updating internal balances, making it exploitable via malicious ERC-777 token callbacks for potential losses exceeding $500 million. A second critical flaw exposes the protocol's fee-recipient admin function to a single-point-of-failure takeover due to insufficient role-based access controls. The overall risk score was rated 8 out of 10, though auditors noted that fixes can be implemented with minimal gas overhead.

0
ProgrammingDEV Community ·

Auth0 Guide Shows How to Replace Dev Keys with Production Google OAuth in React

A tutorial published on DEV Community by Layla, Senior Developer Advocate at Auth0, walks developers through setting up production-ready Google Sign-In in React applications. The guide covers creating a Single Page Application in the Auth0 Dashboard and integrating the @auth0/auth0-react SDK using the Auth0Provider and useAuth0 hook. It also explains how to wire up a custom Google Sign-In button using the loginWithRedirect method. A key focus is replacing default Auth0 development keys with custom OAuth 2.0 credentials created in the Google Cloud Console to ensure production safety. The tutorial aims to help developers avoid shipping insecure development keys in deployed applications.

0
ProgrammingDEV Community ·

WClickHouse Brings Fast Upserts to ClickHouse Using ReplacingMergeTree and FINAL

WClickHouse, an open-source Python library, introduces a streamlined approach to handling upserts in ClickHouse without relying on slow UPDATE mutations. The library leverages ClickHouse's ReplacingMergeTree engine with a version column, allowing data to be appended quickly while deduplication happens in the background during merges. Developers can query the latest deduplicated state using the FINAL keyword, avoiding stale or duplicate records in analytical queries. The solution is designed to support Python versions 3.9 through 3.14 and integrates with Apache Arrow and Pydantic v2. WClickHouse is available on GitHub and PyPI, and claims over 95% test coverage against real ClickHouse instances.

0
ProgrammingDEV Community ·

WClickHouse library brings fast upserts to ClickHouse using ReplacingMergeTree

WClickHouse, an open-source Python library, enables efficient upsert operations in ClickHouse without relying on slow SQL UPDATE mutations. The library leverages ClickHouse's ReplacingMergeTree engine, which deduplicates records in the background using a version column, keeping writes fast. Developers can query the latest state of records using the FINAL modifier, avoiding outdated results in analytical queries. The tool is designed to handle streaming event pipelines where duplicate state updates are common. WClickHouse supports Python 3.9 through 3.14, integrates with Apache Arrow and Pydantic v2, and is available on both GitHub and PyPI.

0
ProgrammingDEV Community ·

wFabricSecurity adds token-bucket rate limiting to protect Hyperledger Fabric endorsement nodes

The open-source wFabricSecurity library has introduced token-bucket rate limiting to safeguard Hyperledger Fabric endorsement peers from denial-of-service-style attacks. Without such controls, a looping worker flooding peers with thousands of signature requests can exhaust CPU resources, since ECDSA signature verification is computationally expensive. The new RateLimiter component enforces per-participant quotas based on Common Name or IP address, rejecting abusive request spikes before cryptographic processing begins. A RateLimitError exception is raised when a participant exceeds their token allowance, allowing legitimate traffic to continue uninterrupted. The library is compatible with Python 3.10 and above and is available on both GitHub and PyPI.

0
ProgrammingDEV Community ·

Token-Bucket Rate Limiting Tool Shields Hyperledger Fabric Endorsement Nodes

An open-source Python library called wFabricSecurity has introduced token-bucket rate limiting to protect Hyperledger Fabric endorsement nodes from resource exhaustion attacks. The tool addresses a key vulnerability where ECDSA signature verification, being computationally intensive, can be exploited by flooding nodes with excessive requests. wFabricSecurity throttles incoming endorsement requests on a per-node basis using Common Name or IP address, rejecting abusive spikes before costly cryptographic operations are triggered. The library supports burst handling while enforcing sustained rate caps, and raises a RateLimitError when limits are exceeded. It is compatible with Python 3.10 and above, and is available on both GitHub and PyPI.

0
ProgrammingDEV Community ·

How Tokenization Could Open Vietnam's Real Estate Market to Small Investors

Vietnam's real estate market faces structural barriers including high capital requirements, illiquidity, fragmented information, and the difficulty of dividing ownership among multiple investors. Tokenization proposes converting property assets — such as commercial buildings, warehouses, and rental housing — into digital units on a blockchain, allowing fractional ownership at lower entry points. A hypothetical example illustrates issuing one million digital tokens against a VND 100 billion asset, letting investors hold as few as ten units. A hybrid platform model is suggested, combining traditional databases for legal and personal data with blockchain for ownership records, transfer rules, and automated settlement. Proponents stress that local regulation must be established first before any pilot can be responsibly launched in Vietnam.

0
ProgrammingDEV Community ·

wauth Library Offers Native Async Secret Management for FastAPI Applications

A Python library called wauth provides native asynchronous methods for managing API secrets and cryptographic operations without blocking the event loop. The library introduces async_set, async_get, async_delete, and async_valid methods designed specifically for use in async frameworks like FastAPI. Synchronous database and cryptography calls are a known concurrency bottleneck in async microservices, and wauth addresses this by offloading cryptographic operations safely. Developers can inject the library directly into async route dependencies, reducing latency when validating API keys at scale. The open-source project is publicly available on GitHub and can be installed via pip.

← NewerPage 852 of 3173Older →