ranelpadon / ngram-type

Touch typing trainer using N-grams as data source, with options to customize the auto-generated lessons and specify the minimum typing performance needed. There are sound/color effects as well.
208 stars 39 forks source link

WPM doubles when restart line #5

Closed iandunn closed 2 years ago

iandunn commented 3 years ago
  1. Set top 50 bigrams, combination 10, repetition 1, wpm 80, accuracy 100
  2. Slowly type all of the bigrams except the last one
  3. Pause for 15 seconds
  4. Press command backspace to delete all the text you typed
  5. Quickly type all the bigrams

The WPM should be very low, but instead it's much higher. It seems like the timer resets when the input is deleted, but the word count doesn't.

ranelpadon commented 3 years ago

@iandunn Sorry for the late reply. Been busy with work recently. On your concerns:

Thanks

iandunn commented 3 years ago

No worries, thanks for the reply!

Why would you use Cmd+Backspace ...?

It's what I'm already familiar with, since I use it in all text editing. That's easier for me that remembering things that are unique to a specific site.

Does using Tab or Esc instead of Cmd+Backspace have similar WPM result?

I tested with esc and it did reset everything correctly 👍🏻

Given that, I'd consider this a pretty low priority, possibly low enough that it's not worth doing.

ranelpadon commented 3 years ago

@iandunn I got the idea of Tab key to reset the texts in MonkeyType:

Screen Shot 2021-10-01 at 11 31 40 PM

Ah I see:

It's what I'm already familiar with, since I use it in all text editing.

In the meantime, I think you could use Tab key since it's very convenient to type also (or Esc if you prefer it), and less keystrokes than Cmd+Backspace. I'll try to replicate your issue also and see if I could have a workaround.

Thanks for your feedback.

iandunn commented 3 years ago

Sounds good, thanks!

ranelpadon commented 3 years ago

@iandunn Based on the code, anytime the text field is cleared (in whatever way), all stats will be cleared also:

watch: {
   ...

   typedPhrase: function() {
        // Make sure to reset any error color when moving to next lesson,
        // lesson being reset, all chars being deleted, etc. 
        if (!this.typedPhrase.length) {
            this.resetCurrentPhraseMetrics();
        }
    }
}

So, in these steps:

    1. Set Top 50 bigrams, combination 10, repetition 1, wpm 80, accuracy 100
    2. Slowly type all of the bigrams except the last one
    3. Pause for 15 seconds
    4. Press command backspace to delete all the text you typed
    5. Quickly type all the bigrams

Step 1-3 will be reset once you do Step 4, hence the WPM is effectively based on Step 5 only. Theoretically, should have no difference when using Tab, Esc, Cmd+Backspace. So, you could use any of them. Let me know if it is still not the same in your case.

Since the slow typing in Step 1-3 is ignored, only the fast typing in Step 5 is computed which is correct/reasonable:

The WPM should be very low, but instead it's much higher.

Unless you're expecting Step 1-3 to be included in the computation even though you reset/cleared your previously typed words in Step 4? Resetting stats in Step 1-3 is more sensible though. Otherwise, the computed WPM will be too low since we're still including old/cleared data.

ranelpadon commented 2 years ago

Closing this since this is not really an issue. Let me know if you think otherwise. Thanks :)

iandunn commented 2 years ago

👍🏻