Code TypeRacer

Type real code snippets as fast as you can. Tracks WPM, accuracy, and highlights mistakes in real time.

0
WPM
100%
Accuracy
0.0s
Time
Bash
Language
You
0 wpm
Slow & Steady
13 wpm
Pace Setter
21 wpm
Mechanical Keys
26 wpm
#!/usr/bin/env bash
set -euo pipefail

SOURCE_DIR="${1:-/var/log}"
BACKUP_DIR="${2:-/var/backups}"
RETENTION_DAYS="${3:-30}"

if [ ! -d "$SOURCE_DIR" ]; then
    echo "source directory not found: $SOURCE_DIR" >&2
    exit 1
fi

mkdir -p "$BACKUP_DIR"

TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
ARCHIVE="$BACKUP_DIR/logs_$TIMESTAMP.tar.gz"

echo "creating $ARCHIVE..."
tar -czf "$ARCHIVE" -C "$SOURCE_DIR" .

if [ -f "$ARCHIVE" ]; then
    SIZE=$(du -h "$ARCHIVE" | awk '{print $1}')
    echo "ok: $SIZE"
else
    echo "archive missing after tar" >&2
    exit 2
fi

find "$BACKUP_DIR" -name "logs_*.tar.gz" -type f \
    -mtime "+$RETENTION_DAYS" -print -delete

echo "done"

Top racers · Code

About Code TypeRacer

Code TypeRacer is a free typing-speed test built for developers: instead of prose, you race to type real code snippets accurately. It measures your words-per-minute and accuracy on the punctuation, symbols, and indentation that actually slow programmers down.

How to play

Type the shown snippet exactly — including brackets, semicolons, and whitespace — as fast as you can. Your WPM and accuracy update live. Tip: accuracy beats raw speed; a single typo forces a correction that costs more time than typing carefully in the first place.

FAQ

How is coding WPM different from normal typing speed?

Code is dense with symbols and shifts (, (), =>), so most people type it noticeably slower than plain English — which is exactly what this measures.

Which languages are included?

Snippets span common languages like JavaScript, Python, and more, so you practice the syntax you actually use.

SharePost

More games like this