Projects: Etch-A-Sketch & Rock-Paper-Scissors

It's been a while since I wrote a blog post. December has been challenging. I've felt pretty depressed but somehow I've continued my learning journey and here I am, at 95% of the foundation's course from The Odin Project.

This project indeed was exciting. I tried to implement everything I've learned so far —especially the programming thinking of diving problems into simpler ones. Keeping this in mind, my design process was to first establish a basic HTML boilerplate, then add a little bit of CSS styling using Flexbox and then add the JavaScript logic. I really enjoy using Flexbox. I had to research how to make a grid using Flexbox and it is extremely easy to do. To implement a grid for the Etch-A-Sketch first I made sure I understood how to set up a 2x2 grid. Once I knew how to do that, I knew I had to use a double for loop to set a grid of nxn. Using a pen and paper to write down notes and a pseudocode of how to set up a grid is definitely useful.

I'm still learning how to manipulate the DOM, but now I feel more confident using arrow functions. I still need to practice using eventListeners though. I was proud of myself when I had a little breakthrough and I understood that I needed to add an eventListener for all column divs that made up the grid and to do that I needed to use the foreach method. I thought it was pretty cool understanding that.

Even though I struggled for a while when I wanted to implement a button that changed the color of the pen randomly, eventually I managed to overcome that obstacle by having two functions that referenced the event itself. I'd say that I struggled a little bit with some things, mainly the eventListener section I just mentioned, but all in all, I think it's a pretty good sign that I managed to complete this project in a single day.

Yesterday I also completed the Rock-Paper-Scissors project, I didn't write a post when I first completed it, which was just writing the JS code for the program. I intended to write a blog post whenever I finished adding the UI which took me two days, even though it's an extremely simple UI (I swear I will come back to it and make it better). To be honest, I forgot to write the blog post, coding is hard and challenging and I often finish right before going to bed. I'll try to accommodate some time to write these posts since I truly believe blogging is some kind of therapeutic form of learning by reflecting on the lessons and struggles I went through during the development of these projects.

As always I'm extremely grateful to The Odin Project, I am learning a lot about Web Development every day. I hope I can contribute in some way or another someday soon.

Here is the Etch-A-Scketch project: https://adriangutierrezgomez.github.io/Project_Etch-A-Sketch/

Here is the Rock-Paper-Scissors: https://adriangutierrezgomez.github.io/Rock_Paper_Scissors/