SShortSingh.
Back to feed

How to Build a Daily Challenge Feature Without Any Backend or Database

0
·2 views

A developer behind Classroom Games, a free learning platform for teachers, has shared a technique for powering daily rotating challenges using only client-side JavaScript. The approach uses a deterministic hash function applied to the local date string, ensuring every user on the same calendar day sees the same category pick without any server calls. To avoid the same category appearing on consecutive days, the algorithm checks the previous day's result and steps forward one index if a collision is detected. Player progress is stored in localStorage under a date key, with error handling included for school-managed browsers that may restrict or clear site data. The method requires no accounts, no cron jobs, and no API, making it lightweight enough to reset automatically at each user's local midnight.

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 ·

Guide: Deploy Google Gemma 4 on Amazon SageMaker Using vLLM and MCP Tools

A developer has published a step-by-step guide for deploying Google's Gemma 4 E2B language model to an Amazon SageMaker real-time endpoint running on a single NVIDIA L4 GPU. The setup uses AWS's published vLLM container and relies entirely on standard AWS CLI commands, making each step reproducible manually or through an MCP server. A Python-based MCP server built on the MCP SDK 2.x provides tools for managing the deployment, with Claude Code acting as the MCP client via stdio transport. SageMaker handles infrastructure concerns such as container placement, health checks, request routing, and logging to CloudWatch, eliminating the need to manage instances or load balancers. The project is open source and available on GitHub, requiring Python 3.11 or newer, AWS CLI v2, and a SageMaker endpoint quota for a compatible L4 GPU instance type.

0
ProgrammingDEV Community ·

Developer builds free daily app to help Java programmers keep up with new versions

A software developer created NextPatch, a free web app designed to help Java developers stay current with the language's fast-moving release cycle, which ships a new version every six months. The tool offers short daily exercises — taking roughly three minutes — that cover language changes across version jumps such as Java 8 to 11 and Java 21 to 25. Each session includes a brief summary of one feature change paired with a coding challenge, such as fill-in-the-blank or bug-fixing tasks, graded server-side without executing user code. The app supports English, Spanish, and Catalan, includes XP tracking, streaks, and leaderboards, and requires no payment or subscription. Currently in beta and running on a Raspberry Pi via a Cloudflare Tunnel, the developer is seeking user feedback to guide future development.

0
ProgrammingDEV Community ·

Developer Builds Open-Source Stock Prediction App Using 7 ML Algorithms as Learning Project

A university student learning machine learning built an open-source stock price prediction application called Stock Price Prediction, available on GitHub under the handle ankit02327. The app incorporates seven ML algorithms — including Linear Regression, Random Forest, SVM, ARIMA, and an Autoencoder — applied to data from 1,001 US and Indian stocks. It features five years of historical data, 38 technical indicators, offline-first functionality, and automatic USD/INR currency conversion, requiring no API keys to run locally. The project has grown to include 27 contributors and 14 releases since its launch. Planned upgrades include a FastAPI migration, Redis caching, PostgreSQL integration, Docker Compose support, and a news sentiment analysis module.

0
ProgrammingDEV Community ·

Mom Returns to Gym After Three Years of Raising Twins Without Childcare

A mother living in Spain returned to the gym for the first time in three years after spending that period raising her twin boys without daycare while working full time alongside her husband. The twins recently started school in Spain, freeing up several hours a day that she had not had access to since they were born. On her first day back, she admitted feeling like a beginner, having forgotten how to use the equipment and finding her body out of practice. She described the milestone as a celebration of everything she and her husband had accomplished during an intense few years that also included a work promotion. Now currently between jobs and actively interviewing, she plans to make regular gym sessions a priority once her schedule stabilises.