Day 23: Small Bumps in the Road

I got stuck doing something relatively simple. This is exactly why I needed this review. Using React so much has limited my skills in pure JavaScript. But I faced the question “Is it better to set styles in JavaScript or purely in CSS?”. I have heard conflicting views on this. I have not come to a decision yet but I generally try to use CSS as much as I can until it makes more sense to use JavaScript. Maybe I will look back at this project and realize my mistakes.

TLDR;

Okay, so here are the highlights of what I did:

  • Practice -> Started building the first feature of the Etch-a-Sketch project in “The Odin Project” curriculum. Here is the GitHub Repo for those that want to follow along. This feature involved constructing the divs that represent the pixel units of the Etch-a-Sketch. I ran into some problems because I thought I could simply use the CSS grid display to responsively arrange my canvas’s pixels on the page. I now realize I needed to calculate the canvas’ columns and rows based on the number of units selected. The default is 16px. I can then set the CSS grid template columns and rows to match that value.
  • Filling in Blanks -> Reviewed CSS Grid display properties and HTML the Element’s width and height properties accessible in JavaScript. Found this good article on getting an element’s width.


Goal For Round 7 of the #100DaysofCode Challenge

This is my seventh round of the “#100daysofcode” challenge. I will be continuing my work from round five and round six into round seven. I am currently working through the book “Cracking the Coding Interview” by Gayle Laakmann McDowell. My goal is to become more familiar with algorithms and data structures. This goal was derived from my goal to better understand operating systems and key programs that I use in the terminal regularly e.g. Git. This goal was in turn derived from my desire to better understand the fundamental tools used for coding outside of popular GUIs. This in turn was derived from my desire to be a better back-end developer.

I have no idea if my path is correct but I am walking down this road anyways. Worst case scenario I learn a whole bunch of stuff that will help me out on my own personal projects.