How would you improve the code?
Posted by Stuepp-2@reddit | learnprogramming | View on Reddit | 4 comments
Hello, I went back to working on a small project—it took longer than I imagined to be able to touch it again, but here I am.
This code is part of a follow-up question that I made some time ago:
https://www.reddit.com/r/react/comments/1s4q1gm/how_would_you_improve_this_useeffect_or_the_code/
Now I have post the complete code on GitHub: https://github.com/Stuepp/Typing-Speed-Test
with a few more things I have done. The start of this learning project came from https://www.frontendmentor.io/challenges/typing-speed-test
My idea is to not use AI, as I want to learn, and to avoid getting direct questions when coding because I want to improve myself and the knowledge on the stack and its coding patterns.
I'm looking up ways to improve how I should code, to learn coding patterns that I'm not following, and to be on the code, GitHub and commits. Feel free to point out my mistakes and how I should improve; just please don't be rude.
ps: I know about having to create branches for refactoring and features, but I was thinking at the same time, is something just for me and not that big either.. So I didn't make branches and pull requests; I only committed directly on the main.
Dry_Builder_1251@reddit
"My idea is to not use AI, as I want to learn"
Hats off to you, you got spine and right attitude. You will get far.
I'll take a look after work.
Unique_Avocado_3691@reddit
respect for that mindset, learning without shortcuts makes you way stronger in long run
just took quick look at your repo and overall structure looks pretty clean for typing test. will check the components more detailed later but already can see you're thinking about separating concerns which is good
one thing i noticed in commits is you could make them bit more descriptive - instead of "update" try something like "fix timer reset bug" or "add keyboard highlighting" makes it easier to track what changed when
Stuepp-2@reddit (OP)
Thank you.
I tried to follow a bit of the conventional commits (https://www.conventionalcommits.org/en/v1.0.0/), but your point touches exactly on one of the things I got stuck on with git commits: "How descriptive must I be?".
I don't want to be vague, but at the same time I don't want to be redundant or write too much.
Again, thank you; I'll try to be a bit more descriptive with my commits.
Stuepp-2@reddit (OP)
Thank you!