SShortSingh.
Back to feed

How to Build a Reliable Typing Speed Test That Holds Up to Engineering Scrutiny

0
·1 views

Developers building typing speed features face a deceptively complex challenge: the words-per-minute metric is easy to game and hard to defend in code reviews. A key decision is choosing between the classic 5-character word convention and linguistically grounded whitespace-delimited token counting, as both yield noticeably different results for the same user. Naive timing implementations that measure from first to last keypress are flawed because idle pauses, cold-start delays, and backspace handling can all distort scores in ways that surface as real bug reports. Industry convention separates raw speed from accuracy — computing raw characters per minute over all committed keystrokes while tracking accuracy separately — to avoid the two metrics appearing to trade off against each other. Monitoring the ratio of active typing time to total elapsed time can also help detect automated paste events rather than genuine keystrokes.

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 ·

How to Handle Environment Variables Safely in Node.js Apps

Environment variables are the standard method for keeping sensitive configuration like API keys and database URLs out of application source code. Developers should centralise env var access in a dedicated config module that validates required variables at startup and crashes immediately if any are missing. Tools like dotenv, envalid, and joi help load, type-check, and set defaults for these variables, reducing scattered process.env calls across a codebase. Secrets should never be hardcoded as fallback defaults, logged in full, or committed to version control — a .env.example file with placeholder values should be used instead. Separate credentials per environment, regular key rotation, and platform-native secret management tools further reduce the risk of accidental exposure.

0
ProgrammingDEV Community ·

Developer Builds Privacy-First Android App to Auto-Silence Phones Without Cloud

A developer created Muffle, an Android app that automatically adjusts phone sound profiles based on scheduled routines and location, after being inspired by a disruptive ringtone during a mosque sermon. The app was deliberately built with a zero-cloud architecture, meaning all data and logic remain entirely on the user's device. It uses Android's AlarmManager, ForegroundService, and GeofencingClient alongside a local Room database to manage sound rules without any server dependency. Prayer time calculations are handled on-device via the Adhan library, avoiding the need for cloud functions or external APIs. A key technical hurdle was Android's Doze mode, which delayed alarm triggers and required additional engineering to ensure timely sound profile transitions.

0
ProgrammingDEV Community ·

Deleting an API Key From Your Profile Doesn't Kill It in Running Processes

A developer discovered that deleting three API keys from their shell profile and verifying the change with a clean-room shell test did not actually revoke access for already-running processes. A long-lived editor process that had launched days earlier had frozen the old environment variables at startup and continued injecting them into every child process it spawned, including a reconnected review tool that authenticated successfully with the supposedly deleted key. This exposed a critical distinction between editing a config file on disk and having that change take effect in live processes. The env -i verification command only tests newly spawned shells and cannot detect stale values held in memory by existing parent processes. The author concluded that confirming a config fix requires checking three separate things: the file on disk, the environment frozen in any long-lived parent process, and the inherited environment of each child process spawned from that parent.

0
ProgrammingDEV Community ·

A 41-Second Timeout Gap Silenced an Automated Affiliate Article System for 3 Days

A developer built a fully automated system using shell scripts and Claude Code to publish three affiliate articles daily to Hatena Blog without human involvement. For three consecutive mornings, the system ran without errors but produced zero articles, logging 'published today: 0 / target: 3' each time. The root cause was a misconfigured timeout set at 300 seconds, while the actual article-generation process required 259 seconds — leaving only a 41-second margin that was consistently exceeded. Doubling the timeout to 600 seconds resolved the issue immediately, restoring the system to its full three-article daily output. The system is designed around idempotency, meaning each scheduled run checks how many articles have already been published and generates only the remaining shortfall, ensuring the daily target is always met across morning, midday, and evening batches.

How to Build a Reliable Typing Speed Test That Holds Up to Engineering Scrutiny · ShortSingh