Coding Log — January 23rd, 2018 — Day 29
Coding Time: Half Day
Here’s what I did today:
I was really dreading debugging the last two requirements of this project. I dont know why.
I read a rule recently – Every day, tell yourself you only need to code for 1 minute. Chances are, once you get past that minute, you’ll want to keep going. It’s a good rule that would’ve helped me today. Just get started and the fun of the challenge kept me going.
I added a lot of programming knowledge to the requirement that said to stop the numbers from going up once someone is declared a winner (by going green). I tried something and got bugs, I tried re-ordering and got other bugs. So, it’s kind of a 70-line mess. In the end, I got it to work, though. That’s what matters most.
Requirement #6, which was to update the “Playing To” without needing to click a button was very easy. One Google search, one MDN check (it’s starting to grow on me), and two event listeners for
The biggest difference between this project and the project on Day 2 was that I made this bug-proof. I checked every possible outcome. There was a weird bug for a while where (assuming your Playing To is set to 5), if one player reached 4 and the other was still at 0, you couldn’t increase that 0 to 1. If it was 4-3, it could be 4-4. It was only at 4-0 or 0-4. And, I had to walk through that programming logic to figure out why that was happening, what did I do that said that was the action the code is supposed to take?
And that debugging is what made the code really long. I spent a lot of extra time just trying to check every single possibility.
But, I did it. I’m forcing myself to watch the 30 minute tutorial in the Web Developer Bootcamp I was supposed to code along with instead of coding from scratch. I’m sure Colt will make it deceptively easy.
Double also, GitHub Pages updates very slowly and my new testing ground for deploying projects live is Glitch. If something isn’t working in the main link, double check with rmorabia.glitch.me.
Thoughts after seeing Colt’s code: Welp. Totally different thought process on how to approach the problem. My code is 66 lines, his is 53 lines. It’s a negligible difference.
There’s only two things I want to change about my code after that.
I didn’t use the best event listener for the input value. I had two –
keyup. I can combine that into one called
I also didn’t reset the scores each time the playing to value changed. Whoops. One bug I missed testing for.
I want the info, I want a few examples of how to apply it, and then I just want ideas for projects that I can break down on my own.
Continued watching The Web Developer Bootcamp
It’s really hard to focus when I already know something or I mentally feel finished with something. I watched the code along for the score keeper project on 2x speed and it was still slow and boring.
Here’s the map again:
- Introduction to this Course 7/7
- Introduction to Front End Development 4/4
Introduction to HTML 5/13 Intermediate HTML 0/13 Introduction to CSS 0/13 Intermediate CSS 0/16 Bootstrap 0/15
- DOM Manipulation 13/13
- Advanced DOM Manipulation 8/8
- Color Game Project 0/10
Intro to jQuery 0/9 Advanced jQuery 0/5
- Todo List Projects 0/11
- Project: Patatap Clone 0 / 9
Start the Color Game Project tomorrow.
Possibly build another small component like a carousel or an accordian.
If I have extra time, I want to try reading Books #1 and #2 (or the equivalent video courses) of You Don’t Know JS again.
Note: This is being pushed late because my Wifi went out… again.