SShortSingh.
Back to feed

Deterministic elf name generator uses a hash so the same input always yields the same name

0
·5 views

A developer built a Christmas toy that turns a first name and birth month into a two-part elf name and a workshop job. The core design rule was that identical inputs must always produce identical output, so the tool avoids Math.random() and relies on a deterministic hash instead. Input is normalised by trimming, collapsing whitespace and lowercasing before a 32-bit FNV-1a style hash selects an index into each word list. Each pick is salted separately so the name parts and job title stay roughly independent, and unsigned shifts keep array indexes non-negative. The tool runs entirely in the browser with no backend, and the author invites readers to share their own repeatable-random techniques.

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
ProgrammingHacker News ·

OpenAI posts preprint claiming disproof of smooth four-dimensional Poincaré conjecture

OpenAI has shared a preprint on GitHub titled 'Exotic four-spheres detected by Khovanov homology,' dated December 4, 2026. The paper, circulated as a PDF, is reported to argue that the smooth four-dimensional Poincaré conjecture is false. The source material available is limited to the link and a Hacker News discussion thread with 31 points and 2 comments. The claim has not been reviewed or confirmed by independent mathematicians in the material provided. Readers should treat the result as a preprint claim pending expert scrutiny.

0
ProgrammingHacker News ·

Tinybrowser: A Browser Built to Run Inside Another Browser

A Hacker News post shared a project called Tinybrowser, which presents a web browser that operates within a web page. The project is hosted at a dedicated site linked from the post. The submission gathered 15 points and 10 comments from the community. The source material provides little beyond the title and link, so details about its technical implementation are not described here.

0
ProgrammingDEV Community ·

Fixing wget Resume 416 Errors: Diagnosis and Safe Recovery

Running wget -c on a large file can end with a 416 Requested Range Not Satisfiable response, which wget reports as a fully retrieved file. The message is misleading because wget only infers that the local copy is complete rather than verifying it. The article reproduces this response using a small local Range-capable server that the reader controls. It explains what the HTTP headers mean and separates four common causes, including a fully downloaded local file, a changed remote file, a server that ignores or rejects range requests, and keep-alive stalls. It closes with a preflight and postflight script that checks range support, Content-Range, final size, and checksum before trusting a resumed download.

0
ProgrammingDEV Community ·

Managing Instagram for work without Reels: Business Suite, web, or app

Using Instagram for business doesn't have to mean passing through the Reels feed, since Meta Business Suite and instagram.com on a computer let users post, schedule, answer messages and comments, and review insights. Meta describes Business Suite as a free tool that handles activity across Facebook, Instagram and Messenger, with an Inbox covering direct messages and comments. Business Suite has no Reels tab or Explore page, which makes it better suited to account management than casual browsing. The mobile Instagram app still places Reels one tap away, so the article suggests a phone-side option that hides those tabs. Because Meta frequently changes menus, the author advises checking current screens before building a routine around specific steps.