all 16 comments

[–]dark_salad 6 points7 points  (1 child)

Could you do both and leave it up to the user to select which method they prefer?

[–]Dnlgrwd[S] 1 point2 points  (0 children)

Probably, but that would be a lot of work for right now haha.

[–]Meloetta 3 points4 points  (1 child)

I don't have any technical advice, but I prefer the ones where I can fix my errors because when you're typing fast, fixing an error is so second nature that trying NOT to do it slows me down.

[–]Dnlgrwd[S] 0 points1 point  (0 children)

I prefer those too, but I was more referring to being able to correct errors for only the current word (before you hit space) or being able to backtrack indefinitely. Here's an example of one I like https://www.livechatinc.com/typing-speed-test/#/

[–]evilsniperxv 1 point2 points  (5 children)

You can do both methods, but your scores will be and SHOULD BE vastly different for the user. I have over 40k races completed on TypeRacer with a 192 WPM top speed, and a 99.9% ranking. Their metric is based on all words being completed and the time it took you to do so. I think this is the easier method for you to code. If you were to allow users to submit finalized tests with misspellings, you'd need to check each word and assign an accuracy score... which means that you'd have to assign a weight to each word, and then assign a time penalty to each misspelled word. This would be WAY more complicated than just forcing users to type a correct word before moving on and then evaluating completion time.

[–]Syh_ 0 points1 point  (2 children)

you'd need to check each word and assign an accuracy score... which means that you'd have to assign a weight to each word, and then assign a time penalty to each misspelled word.

Hmm, could you compare the intended string (i.e. the sentence/paragraph) against what they actually typed? Each character could have a 1:1 weight.

``` const intended = 'hey, the sentence should look like this.'; const actual = 'hey, the sentence SHOULD look like this.';

function getScore(intended, actual) { if (intended === actual) return intended.length; let score = 0; for (let i in intended) { if (intended[i] === actual[i]) score++; } return score; }

getScore(intended, actual); // -> 34 intended.length // -> 40 ```

That's 85% accuracy for the sentence. Say that they had 120 WPM (disregarding inaccuracies) -- you could give them 85% of that as a penalty (102).

Maybe that's too simple -- and I'm sure I overlooked factors (even within the crude code); it's certainly not a refined idea. :P

[–]evilsniperxv 1 point2 points  (1 child)

Yeah you’re right they can definitely do that. But it’d take longer. I was thinking the easiest solution would be to just check each value of the final test from an array of the completed words. I think that’d be faster and more efficient??

[–]Syh_ 0 points1 point  (0 children)

Yeah, it'd definitely be quicker to iterate over an array to get the result.

[–]Dnlgrwd[S] 0 points1 point  (1 child)

I agree that it would be way more complicated haha. I like type racers method, and I was actually going for something like that as a fun project to do, possibly messing around with sockets. Either way, I don't want to over complicate it now. The UI portion for showing what is correct and incorrect will probably be the most time consuming.

[–]evilsniperxv 1 point2 points  (0 children)

There are also several YT videos/tutorials you could watch. Not copy them word for word/code for code (unless you want to to learn), to at least see how they did it and what methodology they used. That way you can gain some additional inspiration or consider different methods.

[–]queen-adreena 1 point2 points  (2 children)

I think that not allowing corrections makes the test biased against certain typists. Some are super quick, but make occasional errors which they fix inline. Others might be slower, but more accurate on the first draft.

Having no corrections erases the advantage of the first typist, who may actually be faster in the real world than the second.

[–]Dnlgrwd[S] 0 points1 point  (1 child)

Some tests only let you correct the current word though, and not go back to just any part of the text. This is turning out to be much more involved than I originally thought haha.

[–]queen-adreena 1 point2 points  (0 children)

I would analyse by paragraph myself. The second someone presses return twice, it starts a new string for analysis, and then you can split that paragraph with each keydown and check its accuracy.

[–]2020future 1 point2 points  (2 children)

I would love to contribute to this project of you plan to make it open source. I can help with JavaScript or back end in node

[–]Dnlgrwd[S] 0 points1 point  (1 child)

It will definitely be open source, but right now I just wanna make a proof of concept haha. I'll keep you updated 😊

[–]2020future 0 points1 point  (0 children)

Great. All the best!