A Bad Case of DOM

Joshua Hunt
2 min readJun 9, 2017

--

Today was the day it happened. My frustration peaked. I almost threw my computer out a window. (This is for Alex ;) ) DOM was intimidating today. It was a tough pill to swallow, but I think I am getting the grasp of it. I will never go back to the color clock project again though.

The color clock was a in class project to create a clock that displays the time in real-time. It shows HH:MM:SS. You have to make use of the DOM so the page doesn’t refresh every second. The issue was I had no idea about “new Date()”. I thought I was going to have to create a series of if statements and tons of other logic to increase the seconds and minutes and hours… oh man my head is spinning thinking about it. Apparently, the hard work has already been done and it is called “new Date()”. I spent 20 minutes sitting there trying to find a starting point and getting more and more frustrated. Finally the instructor called time and showed the simple solution using “new Date()”. FML.

After getting rattled by that project I had to try and start the end of day project. I am finally getting the hang of document.createElement() which has to be followed by an appendChild() to actually put the element you created somewhere. It seems so simple to think about now, but at the time I think I was lost in the long syntax names. Lots of this.that.how[i] kind of things that look rather intimidating.

Overall, today was by far the hardest and most frustrating day I have had. Good news, I think I have figured out most of the concepts that were confusing the hell out of me. Now I have a weekend to sit on it and work on my new weekly project.

--

--

Joshua Hunt

Former chemist, The Iron Yard student, future web developer in perpetual training