SShortSingh.
Back to feed

Developer builds constraint-based group splitter that avoids true randomness entirely

0
·1 views

A developer set out to build a simple name-list group splitter but discovered that real-world use cases almost always involve constraints, such as keeping certain people apart or distributing roles evenly across groups. The resulting tool contains no Math.random() in its core logic, instead using a deterministic, rule-aware placement algorithm. It first parses and deduplicates names from various input formats, then sorts people by how constrained they are before greedily assigning the most restricted individuals to groups first. The approach mirrors the intuition of packing a suitcase — fitting awkward items in while space is flexible, then filling gaps with easier ones. The trade-off is that two people sharing the same name are silently merged, since the tool treats the name string itself as the unique identifier.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer Builds MERN Stack Blood Donation Platform to Connect Donors and Recipients

A developer has built a Blood Donation Management System using the MERN stack to address the difficulty of finding blood donors during emergencies. The platform allows donors, recipients, and volunteers to connect through a centralized web application, replacing the scattered information typically found across social media and messaging apps. Key features include role-based dashboards, blood group search, request management, and secure JWT and bcrypt-based authentication. The project follows a separated frontend-backend architecture with a RESTful API and responsive UI. The developer plans to enhance the system further with email notifications, citing the project as a valuable exercise in full-stack development and clean code practices.

0
ProgrammingDEV Community ·

Real-World Benchmark Tests AI Coding Agent on Full-Stack Refactor, Not Just Code Generation

A developer published a case study evaluating OpenAI's Codex on a full-stack task-manager project across two phases: an initial greenfield build and a subsequent authentication and database-migration refactor. The first phase, building a React, TypeScript, and FastAPI application with SQLite, was completed in roughly 34 minutes, while the refactor took about 42 minutes of active execution. The second phase involved enforcing user ownership across data models, API contracts, and frontend state, with 16 backend tests, 1 legacy-migration test, and 25 frontend tests reported as passing. The study also observed the agent's ability to recover after a user-initiated interruption without silently losing state. The author cautions that this is a single-environment case study without retained source code or raw logs, and results should not be treated as independently verified evidence.

0
ProgrammingDEV Community ·

n8n Rolls Out AI Workflow Builder to All Cloud Tiers After October Beta

Automation platform n8n has made its AI Workflow Builder generally available to Starter, Pro, and Enterprise Cloud customers following a beta launch in October 2025. The feature allows users to describe a desired automation in plain language, which the tool then converts into a live, editable n8n workflow. A January 2026 best-practices guide from n8n indicates the tool is being treated as an active part of the Cloud product experience. The builder is designed to accelerate the initial setup phase of workflow creation, not replace the need for validation and refinement. Users are guided to review, test, and iterate on AI-generated workflows using both further prompts and direct edits within the existing workflow editor.

0
ProgrammingDEV Community ·

AI Agent Fails 31 Sessions Straight Trying to Earn Money From Zero Capital

A developer gave Claude Code autonomous control over a business with no starting capital, tasking it to generate revenue across 31 sessions spanning five different markets. The AI attempted affiliate sites, open-source bounties, a developer tools plugin, and freelance micro-markets, earning exactly zero dollars in every attempt. Each failure traced back to the same underlying problem: the agent lacked the one resource needed to convert its outputs into income, whether that was search traffic, a marketplace, an audience, or human presence. Freelance platforms revealed that most real demand was for physical or continuous human tasks — voice acting, video editing, inbox access — not the intellectual artifacts an AI can produce. The experiment highlights a structural gap between what current AI agents can generate and what existing markets are actually set up to pay for.