SShortSingh.

Programming

0
ProgrammingDEV Community ·

How to Estimate LLM Costs Before Running Batch Content Moderation at Scale

Moderating high-volume user content in e-commerce hiring workflows requires cost forecasting before batch LLM jobs begin, not just after. A two-pass pipeline is recommended: a narrow classifier first labels submissions as allow, review, or block, while uncertain or high-impact cases are routed to human reviewers. Token counting before submission and asynchronous batch processing for backlog content help control costs, especially since risk profiles vary significantly across tenants by submission volume. A practical evaluation approach involves running 1,000 representative candidate submissions across tenants, comparing synchronous and batch processing on metrics like actual token usage, retry counts, and false negatives. A lightweight Python estimator can make cost assumptions explicit and tenant-specific, though it must be calibrated against the production tokenizer for accurate accounting.

0
ProgrammingDEV Community ·

China's AI Content Labelling Rules Take Effect September 2025

China's Cyberspace Administration, alongside three other ministries, issued the Measures for Labelling of AI-Generated Synthetic Content on 14 March 2025, with the rules coming into force on 1 September 2025. The regulations require two distinct labels for AI-generated content: a visible mark for human viewers and an embedded metadata mark readable by machines. Obligations are shared across content generators, distribution platforms, app stores, and users, meaning no single party bears sole responsibility. A companion national technical standard, GB 45438-2025, specifies the required metadata fields, file formats, and encoding methods. The new measures build on earlier Chinese regulations covering deep synthesis, generative AI services, and algorithmic recommendations, adding greater specificity to labelling duties previously stated in broader terms.

0
ProgrammingDEV Community ·

AI Models Learn to Predict Chemical Reaction Products Using SMILES Sequences

Researchers have developed AI approaches to forward reaction prediction, which determines what products emerge from given reactants and reagents. Two main methods are used: sequence-to-sequence models that treat reaction SMILES strings as a translation problem, and graph-based models that predict which chemical bonds change during a reaction. Philippe Schwaller and colleagues introduced the Molecular Transformer in 2019, demonstrating that token probability scores can help prioritize predictions requiring expert review. A key challenge is atom-mapping — correctly tracking where each atom ends up — since models scored only on product strings may learn pattern matching rather than true chemical transformations. Inconsistent handling of reactants versus agents across datasets also makes published benchmark accuracies difficult to compare directly.

0
ProgrammingDEV Community ·

How Random Color Sweeps Help Developers Catch Hidden UI Bugs Early

A frontend debugging technique involves replacing all UI colors — text, backgrounds, borders, and SVG fills — with randomly generated values to expose hidden rendering bugs. The method acts as a visual fuzz tester, surfacing issues such as hardcoded hex values, stale state leaking between renders, and CSS specificity conflicts. To keep results reproducible, developers are advised to seed the random number generator and store the seed value alongside captured screenshots for regression testing. The workflow is run in CI pipelines and restricted to opt-in routes, deliberately excluding sensitive screens like billing or authentication. While the approach is effective at catching contrast failures and theme provider blind spots, teams must manage growing snapshot diffs and enforce structured rules to keep results actionable.

0
ProgrammingHacker News ·

Developer Argues Structured Process Can Substitute for Intrinsic Motivation

A blog post by Ben Godfrey on his personal site explores the relationship between process and motivation in productive work. The author suggests that having a defined process can act as a stand-in when intrinsic motivation is lacking. The piece appears aimed at developers or knowledge workers who struggle with inconsistent drive or focus. It proposes that relying on structured routines may help individuals maintain output regardless of their motivational state. The post was shared on Hacker News, where it received minimal early engagement.

0
ProgrammingDEV Community ·

California SB 942 Requires AI Firms to Build Free Public Content Detection Tools

California's SB 942, the AI Transparency Act, was enacted in 2024 and applies to generative AI providers with over one million monthly users accessible in the state. Beyond requiring watermarking disclosures, the law mandates that covered companies build and operate a free, publicly accessible tool allowing anyone to check whether a given file was created or altered by that provider's system. The tool must accept uploaded content, return a confidence-based likelihood assessment rather than a simple yes-or-no result, and expose its functionality via an API for third-party integration. When a disclosure is detected, the tool must output system provenance data — including the provider's name, system version, and creation timestamp — but is explicitly prohibited from revealing the identity of the individual user who generated the content. The threshold definition of 'monthly visitors or users' differs from standard active-account metrics, meaning some providers may unknowingly qualify, and legal counsel is advised to determine applicability.

0
ProgrammingDEV Community ·

California's SB 1001 Bans Bot Deception in Transactions, Not All Bot Use

California's Bolstering Online Transparency Act (SB 1001), in effect since July 2019, is widely misunderstood as requiring all chatbots to identify themselves as automated. In reality, the law only prohibits using a bot with intent to deceive another person specifically to drive a commercial transaction or influence an election vote. A bot that makes no attempt to pass as human falls outside the statute's reach, even if it never explicitly announces its automated nature. The law defines a bot as an automated online account where most or all activity is not driven by a human, a definition shaped around social media that fits other digital tools imperfectly. Operators can avoid liability through a safe-harbour disclosure provision, but many harmful bot behaviours — such as fake grassroots campaigns or non-transactional impersonation — remain outside this law's scope entirely.

0
ProgrammingDEV Community ·

Three Hard Lessons From Actually Building a Production Site With Claude

A development team used Anthropic's Claude not just as a chatbot but as an active collaborator in engineering tasks including bug fixes, feature development, and internal tooling for their own website. They found that AI tools must verify outputs rather than assume correctness, citing a CSS breakpoint bug that only became apparent through live browser inspection. A silent image corruption incident taught them that process discipline — such as moving binary files via shell commands and checking file sizes — matters as much as the AI model's raw capability. The team concluded that AI performs best on obscure, unglamorous technical problems rather than polished demos, and that real lessons only emerge from shipping production work rather than reading about AI in the abstract.

0
ProgrammingDEV Community ·

OpenAI Launches Gated Cyber AI Model as Meta Releases Open-Weight Muse Glimmer

During the week of August 5–12, 2026, OpenAI released GPT-5.6-Cyber, a purpose-built cybersecurity model restricted to vetted defenders through its Daybreak Red approval program, priced at $12.50 per million input tokens and $75 per million output tokens. The model is designed to reduce refusals during legitimate security tasks such as vulnerability research and penetration testing, but requires separate provisioning and will mandate hardware security keys from September 1. In contrast, Meta released Muse Glimmer on August 10, a 30-billion-parameter open-weight model under the Apache 2.0 license that can run on a single consumer GPU with 24GB of memory. The week also saw Cloudflare launch Kitesurf, an agent-first browser built on Workers using V8 isolates and claiming significantly lower CPU and memory usage than Chromium. Broader industry signals included a finalized stateless MCP specification and reports that 2027 DRAM and HBM capacity is largely sold out, with buyers receiving only 60–70 percent of requested volumes.

0
ProgrammingDEV Community ·

How to Convert Relational Database Tables Into Graph Neural Network Inputs

Developers building graph neural networks often start with relational data spread across tables, requiring a structured conversion process. The core rule is straightforward: tables with primary keys referenced by others become node types, while tables that link two keys become edge types. A critical and often silent bug involves node ID remapping, since graph libraries require contiguous integers starting from zero, not raw database keys like UUIDs or gapped auto-increments. High-cardinality categorical columns such as region should remain node features rather than separate node types, as promoting them creates hub nodes that blur distinct entity representations. Dangling foreign keys must also be pruned before conversion, as they can cause phantom nodes or crashes without clear error messages.

0
ProgrammingDEV Community ·

Why AI Models Drift From British to American Spelling in Long Outputs

AI language models often start following British spelling instructions correctly but gradually revert to American spelling as a response grows longer. This happens because each word is generated based on the full context, and American spelling dominates most technical training data, slowly outweighing the original instruction. The drift is self-reinforcing: once an American spelling appears, the probability of further American spellings increases. Technical content such as code, CSS properties, and API names is almost exclusively American by convention, pulling surrounding prose along with it. Reliable fixes require deterministic post-processing rules targeting specific spelling pattern classes, rather than simply repeating or emphasising the original instruction.

0
ProgrammingDEV Community ·

Brazil's AI Bill Clears Senate but Remains Far From Becoming Law

Brazil's PL 2338/2023, a comprehensive AI regulation bill, was introduced in the Federal Senate in May 2023 and approved by the Senate plenary on 10 December 2024. The bill has since been sent to the Chamber of Deputies, where a special committee is examining it, meaning it has not yet been enacted into law. The legislation proposes a risk-tiered framework banning high-risk AI uses like social scoring and biometric manipulation, while imposing governance and oversight obligations on other high-risk applications. If the Chamber of Deputies amends the bill, it must return to the Senate before proceeding to the President for approval or veto. Widespread reporting has incorrectly treated the Senate's approval as final passage, but the bill's text and legal status remain subject to significant change.

0
ProgrammingDEV Community ·

GitLab CE Ships Without a Runner: Why Your CI/CD Pipelines Stay Pending

GitLab Community Edition does not include GitLab Runner by default, meaning pipelines will remain in a pending state indefinitely after installation without throwing any errors. The application and its runner are two separate components, but many users assume they are bundled together, likely because GitLab.com provides shared runners automatically. Administrators can confirm the absence of runners by visiting Admin Area → CI/CD → Runners or running a command-line check on the GitLab server. To execute pipelines, users must separately install and register a runner — options include self-hosting on a spare machine, deploying via Kubernetes, or renting runners from a third-party provider. Each approach carries trade-offs around cost, maintenance, and data residency that teams should evaluate based on their infrastructure and compliance requirements.

0
ProgrammingDEV Community ·

Developer Builds 'Elephant' Tool to Preserve AI Coding Agent Context Across Sessions

A developer has created an open-source tool called Elephant to address a common frustration with AI coding assistants: the loss of accumulated context when a session ends or an agent is switched. When tools like Claude Code hit usage limits mid-task, all the understanding built up during the session disappears, forcing users to manually re-explain the problem to a new agent. Elephant solves this by continuously recording prompts, responses, tool calls, file changes, and session objectives into a local append-only journal in real time. It periodically generates a 'recovery capsule' that a new coding agent can read to resume work without requiring the developer to reconstruct the full history. The tool is available on GitHub and is designed to reduce the manual overhead of acting as a human relay between AI systems.

0
ProgrammingDEV Community ·

Developer Builds GitHub-Based Fundraise Predictor, Backtested Against 219 Startups

A data-focused developer has built a tool that monitors over 4,200 startup GitHub organizations weekly to detect early signs of upcoming fundraising rounds. The system tracks three signals — commit velocity, contributor growth, and new repository creation — combining them into a composite score to classify engineering activity trends. Backtesting against 219 documented fundraises found that startups showing an acceleration pattern raised at roughly 3.4 times the base rate, with the signal appearing 21 to 47 days before public announcements. The methodology has been published as an SSRN preprint with the backtest dataset made publicly available on Zenodo for independent verification. The creator acknowledges a 23% false-positive rate and is open-sourcing the signal computation logic, while also offering a free weekly email and an MCP server for querying live data.

0
ProgrammingDEV Community ·

How Hidden Token Budget Errors Silently Corrupt AI Retrieval Pipelines

When developers switch AI models without updating their text-chunking logic, documents can exceed a model's token limit and fail to ingest correctly. Some API endpoints reject over-length inputs with an error, but many silently truncate the text and return a normal response, meaning critical content may never be stored in any vector database. Chunkers often carry flawed token estimates due to character-based heuristics, hardcoded encoding names, or mismatched tokenizer libraries from different AI vendors. Additional errors arise when system prompts or tool schemas grow over time, quietly pushing total token counts past the model's declared maximum. Auditing codebases for hardcoded numeric constants and character-per-token shortcuts is recommended to surface these hidden budget assumptions before they degrade retrieval quality.

0
ProgrammingDEV Community ·

How Audio Tagging Models Classify Multiple Sounds Simultaneously

Unlike single-label audio classifiers that assume only one sound is present at a time, audio tagging models assign independent probability scores to multiple sound classes simultaneously using per-class sigmoid outputs and binary cross-entropy loss. Google's YAMNet, a well-documented example, processes 16 kHz mono audio into 0.96-second mel spectrogram patches and scores them across 521 AudioSet sound categories, requiring a minimum of 975 ms of input to produce any output. Because AudioSet training labels only confirm a sound occurs somewhere within a ten-second clip rather than pinpointing when, these models learn under weak supervision and are more reliable at detecting whether a sound is present than at locating its precise onset or offset. The choice of pooling strategy significantly affects results: max-pooling across patches captures brief events like a single dog bark, while mean-pooling favors sustained sounds like continuous rain. This architectural distinction makes audio tagging a fundamentally different and more complex task than conventional single-label sound classification.

0
ProgrammingDEV Community ·

How to Evaluate Audio Embedding Models for Sound Library Similarity Search

A technical guide published on DEV Community outlines a reusable evaluation protocol for selecting audio embedding models used in sound library similarity search. The article explains that two models can both return plausible results, making library-specific evaluation essential since benchmarks from other datasets do not reliably predict performance on your own recordings. It covers three pooling strategies — mean, max, and mean-plus-standard-deviation — each suited to different clip characteristics, from homogeneous short effects to long heterogeneous recordings. Three families of audio embeddings are discussed: supervised tagging models like YAMNet and PANNs, self-supervised models like OpenL3, and language-aligned models like CLAP, each encoding different audio properties and excelling in different retrieval scenarios. The guide deliberately avoids reporting model scores, emphasizing that the evaluation protocol itself is the transferable and practically useful output.

0
ProgrammingDEV Community ·

Audio Embeddings vs. Metadata: Why Music Recommendation Design Choices Matter

Music recommendation systems broadly follow two approaches: collaborative filtering, which models user-track interactions, and content-based filtering, which derives recommendations directly from audio embeddings. Collaborative filtering excels at capturing cultural context — such as shared scenes or playlists — but structurally fails for new or obscure tracks that lack interaction data, a problem no amount of additional users can fix. Content-based systems solve the cold-start problem by generating embeddings the moment a track is uploaded, making new releases immediately recommendable. However, audio embeddings primarily capture timbral and rhythmic features like tempo and instrumentation, which do not always reflect how listeners actually group or relate music. The two methods fail in opposite directions, and understanding which failure applies to a given system is central to making sound architectural decisions.

← NewerPage 178 of 1337Older →