Skip to content

rfloarea/rock-paper-scissors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Project: Rock Paper Scissors

Live demo here

Thank you to The Odin Project, and to Michal Osman for his code. He doesn't know it, but he was my Miyagi for this one.

Plog (project log)

Sunday, January 7, 2024 @8:59pm

I am stupid proud of myself for getting this thing working. And it's not even fully built out yet!

I coded out the foundational game loop in one day. I've never really coded before. I've poked around here and there, but never found a project, planned it out, and worked through the solution until it worked.

It's so cool! What a confidence builder! This just makes me want to add functionality and make it interactive and just a joy to use.

Notes to my future self:

  1. Learn to write pseudocode in your sleep. This is an absolute essential tool. It's not just planning. It's organizing your thinking into functional blocks.
  2. Learn to use the Devtools debugger in your sleep. Stepping through this little script was essential to actually understanding what was going on. Bonus: it helps you learn how JS moves through a script. With enough use you should begin to internalize the call stack. Which I'm sure is very important.
  3. Learn more about scope. Pay attention to this concept when you get back to coding. I think this is going to trip you up a lot in the near future.

Tuesday, January 9, 2024 @5:20pm

I did it! I figured out how to create a single loop of the game, but using functions this time! Dam that tied my brain up. But only because I didn't really understand how to implement the logic.

My understanding of functions was very bad yesterday, so I got all messed up and struggled for hours. Which was good to experience. It taught me that it's really helpful to ACTUALLY UNDERSTAND WHAT YOU ARE DOING AND WHY. Huh, who knew.

Now all that's left (for right now) is to create a way to keep score over many rounds and count the rounds as they go.

Notes to future self:

  1. Remember this feeling. Remember how bad it feels to not find a solution while it feels so close. Remember how good it feels to spend the time to understand, and then see a solution.

Wednesday, January 17th @11:22am

I've completed the first pass of the ui. Having the major pieces of the ui in place helps so much in conceptualizing how the js code should be written. Now that I can see where all the changes are going to go and where all the events are going to come from, it feels much clearer to design a program to handle this simple game.

That bears repeating: THIS IS A SIMPLE GAME.

I just need to remind myself of this sometimes. I tend to want to do so much with every little idea. It's like every little spark has to turn into this massive blaze. When practically, I'm not equipped to handle a massive blaze. I'm just learning how to start and grow a small fire. Just enough to keep me warm until the next one.

later that same day @2:10pm Today I learned that putting the script tag at the bottom of the html page helps. I'm sure it has something to do with page load and eventing. I'll become fluent some day. But for now, it's good enough to know to do it.


Thursday, January 18th @8:44pm

I finished the game. Or what I will call the first version of the game.

I'm smiling.

Notes to me future self (or, things I've learned):

  • It is beneficial to separate my concerns as much as possible in the code. For example, using one function to do one thing was huge. Also mentally assigning html classes to css rules and ids for js element selectors. Setting this standard for myself smoothed things much more than I would have guess.
  • Stop coding if I don't understand. Stop trying to understand if I can't think clearly. If I can't think clearly, rest.
  • It's okay to see how other people solved things. I would say that at this early point in my learning journey, it's even okay to rely heavily on someone else's work. Just as long as I take the time to understand why they did what they did. The point isn't to copy and paste. The point is to emulate and understand the decisions of people who are more capable than I am.
  • I've felt what it's like to have a good programming posture. I'll just leave it at that.

Time for our next project!!!

About

A rock, paper, scissors game using HTML, CSS, and JavaScript.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages