code-typing

Crates.iocode-typing
lib.rscode-typing
version0.1.3
created_at2025-12-31 12:48:00.513223+00
updated_at2026-01-03 09:12:31.01112+00
descriptionA terminal-based typing game for Rust programmers. Practice typing real Rust code snippets to improve your coding speed and accuracy.
homepagehttps://github.com/wooyukit/code-typing
repositoryhttps://github.com/wooyukit/code-typing
max_upload_size
id2014635
size2,450,066
WOO Yu Kit Vincent (wooyukit)

documentation

https://github.com/wooyukit/code-typing#readme

README

âŒ¨ī¸ Code Typing

Crates.io License: MIT

A terminal-based typing game for Rust programmers. Practice typing real Rust code snippets to build muscle memory for Rust syntax and special characters.

Code Typing Demo

Code Typing Screenshot

🤔 Why Code Typing?

Traditional typing tests use regular English text, but Rust programming requires typing special characters like {}, =>, ::, |x|, <T>, and &mut. Code Typing bridges this gap:

  • đŸĻ€ Rust-focused — 100 curated Rust code snippets
  • đŸŽ¯ Real patterns — algorithms, data structures, traits, iterators, and more
  • ⚡ Real-time feedback — see correct/incorrect characters instantly
  • 📊 WPM & accuracy tracking — measure your improvement over time
  • 📤 Output preview — see the expected output after completing code with println!

🚀 Installation

From crates.io

cargo install code-typing

From source

git clone https://github.com/wooyukit/code-typing
cd code-typing
cargo install --path .

đŸŽŦ Usage

code-typing

That's it! Start typing the code you see on screen. The timer starts on your first keystroke. âąī¸

🎮 Gameplay

Visual Meaning
🎨 Syntax-highlighted text Correctly typed characters
🔴 Red underlined text Incorrect characters
🟡 Yellow cursor Current position
📊 Progress bar Shows completion percentage

When you complete a snippet:

  • 📤 Output panel appears showing the expected println! output (if any)
  • đŸŽ–ī¸ Performance rating based on WPM and accuracy: 🏆 LEGENDARY, ⭐ EXCELLENT, ✓ GOOD, or → COMPLETE
  • ⏎ Press Enter for a new snippet or Esc to quit

âŒ¨ī¸ Controls

Key Action
← → 🔀 Change code sample (before typing starts)
Tab âžĄī¸ Insert 4-space indentation
Enter â†Šī¸ Auto-indent newline (during typing) / Next snippet (after completing)
Backspace âŦ…ī¸ Delete last character
Esc 🔄 Restart current sample (during typing) / đŸšĒ Quit (before typing or after completing)

📚 Code Samples Include

  • Algorithms — QuickSort, Binary Search, Merge Sort, DFS, BFS, Dijkstra
  • Data Structures — Linked List, Binary Tree, Stack, Queue, HashMap, BTreeMap, VecDeque
  • Classic Problems — FizzBuzz, Two Sum, Valid Parentheses, Fibonacci
  • Rust Patterns — Iterators, Closures, Traits, Generics, Error Handling
  • Smart Pointers — Box, Rc, RefCell, Arc, Cow, PhantomData
  • Traits — From/Into, Drop, Deref, AsRef, Default, Display, PartialEq/Ord, Hash, Index
  • Concurrency — Mutex, RwLock, Channels, Threads, Arc
  • Design Patterns — Builder, Newtype, Type State
  • Advanced Iterators — fold, reduce, partition, peekable, flatten, flat_map

📋 Requirements

  • Rust 1.70+ (for installation)
  • Terminal with Unicode support
  • Works on macOS, Linux, and Windows

💡 Tips for Improving

  1. đŸŽ¯ Focus on accuracy first — Speed comes naturally with muscle memory
  2. ⚡ Pay attention to special characters — {}, (), <>, ::, => are common in code
  3. 📐 Practice indentation — Use Tab for consistent spacing
  4. ☕ Take breaks — Short, focused sessions are more effective

🤝 Contributing

Contributions welcome! Feel free to:

  • Add more code samples
  • Support other programming languages
  • Improve the UI/UX
  • Report bugs

📄 License

MIT Š Vincent Woo

Commit count: 0

cargo fmt