Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Building a reading speed test that can't be gamed by skimming

Our book review site needed a feature readers would actually use, and that other sites would want to link to. We settled on a reading speed test, then found that most existing tests share a flaw: skim the passage, press stop, and you're suddenly reading at 1,000 words per minute. Here's how we built one that pushes back, in a single React client component inside a Next.js app. The flow The…

A new reading speed test has been developed for the book review site, a feature that is actually useful and desirable for linking to. Most existing tests have a flaw: readers can skim the passage and instantly claim a high reading speed. The new test addresses this issue.

The component, written in React and integrated into a Next.js app, moves through four stages: intro, reading, quiz, and result. Three original passages, each about 300 words, are used, with no copyright concerns. Timing is done using performance.now(), which is more reliable than Date.now(). The timer updates every four seconds, but the score is calculated using the exact start and end values.

A 5-second delay is added to the "I'm done" button to prevent a reflex click from producing a score. The reading speed is calculated using the formula: words / (seconds / 60). A comprehension check is also implemented, with three questions appearing after the passage disappears. If the score is below 2, the user is suggested to retake the test at a slower pace.

To prevent skimming, any score above 900 words per minute is labeled "Too fast to measure" and not saved. The rationale behind this limit is that comprehension drops sharply when people push past normal reading speeds. The Open Library search API is used to get book details, with only necessary fields requested to minimize the response size. The total words, minutes, and days are calculated using simple math formulas.

The developer plans to add more passages for repeat visitors and separate averages for reading on a phone and desktop. A working prototype can be tried at Reading Speed Test.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

NL Health Guide

This is a submission for the MLH x DEV Writing Challenge What We Built Project Story-NL Health Guide Many middle-aged and older adults in Newfoundland and Labrador find it difficult to understand…

how my 1.17 mb player renders webvtt subtitles on a canvas (no amoled burn-in, no dom churn)

i'm the dev behind RKMovies , a 1.17 mb native 4k player for android, with a 29.5 mb windows build on the side. one constraint i gave myself early: subtitles must not burn in amoled screens, and total…

  • RKMovies player renders webVTT subtitles using canvas overlay
  • Avoids AMOLED burn-in and DOM churn with canvas approach
  • Parses and renders subtitles in memory, keeping APK under 1.17 MB

More from Monday 23 November →