Development Journey

Let’s see if I can remember how to WordPress.

This may be a sloppy and disorganized start to this, but that’s okay. The theme of this is “Development Journey,” not “Hey Look How I Have Mastered This!” And by the way, if I ever do create a thread, blog, or anything to that effect, someone slap the grandiose out of me.

I choose today to be my 1st day of recording my journey as a developer. Right now, I am learning/improving/brushing up on my JavaScript. I did a bit of a dive into in college, but I have decided to take what little I know and expand it to a whole new level. It won’t be a quantum leap; it won’t even be linear. But if this is the proverbial “Point A,” and 100 days from now, the ‘Point B,’ there will be a clear differential of progress. Yep, I am taking the 100 Days of Code Challenge.

I am aware of only two rules:

Code for a minimum of an hour per day. Tweet your progress.

I am not much on Twitter/X, so I suppose I will share my blogpost everyday to Facebook. The point, as I see it, is to commit to this challenge and hold myself accountable. So I accept. Starting today, I will make at least one post per day, summarizing what I learned that respective day. And with that, that is starting with today. This doesn’t count, this is just the introductory. So at the end of this day, there will be a summary of what I have done. Challenge accepted. Let’s do some coding!

Day 5

Okay, so we’re getting thicker into the woods of JavaScript. Things like destructuring objects, the spread and rest function, short circuting, the Nullish Coalesce operator (??).

Basically what I have learned is to take incoming data and sort it into channels. It could be from a web API, a file, or whatever. This is a powerful concept to learn. And I am going to have to get my reps in on it. But here is an example, made up by yours truly, to illustrate this:

CODE:

OUTPUT:

This probably seems a bit trivial and silly, but learning this concept is powerful and can be scaled up to much more robust applications.

This has been fun so far, and actually the course I have been following is 68+ hours in lecture videos, not counting the time I have to spend on coding challenges and problems. As of today I am 37% of the way through this course.
I started this course before I started this coding challenge blog, but as I got about 20% into this course, I learned about the 100 Days of Coding Challenge, so naturally, that’s where I started.

For all other learners out there. Yes it gets tough and you’ll be tempted to quit, but TRUST ME when I say that it is so worth you powering through and grasping the concepts. You will feel confused and frustrated. It’s completely natural! But the goal on the other side is so worth it, and it feels so good to make these epiphanies and breakthroughs.

day ++;

Day 4

Today I went over and over with the scopes of variables: global, function, and block. I learned about hoisting, and why it’s a bad idea to use “var” as a declaration in JavaScript. I played around with the “this” method for functions, and also method borrowing. Learning the limits and possibilities of JS, dynamically, has been pretty interesting. I have been focusing on a lot of theory today. I was introduced to the JavaScript Engine, the Callstack, the Heap, Variable Environment, Scope Chain, Execution Context, and so on.
A lot of these concepts I knew intuitively, but it was really beneficial to take a deeper dive as to the “why,” in terms of seeing how things work under the hood. A lot of these concepts I still find confusing, but with time and practice, I fully expect to know them by heart.

day ++;

DAY 3

It was just one of those days where nothing comes easy. I believe it to be especially important to stick to your commitments on these days. If you can do work on the hard days, then doing work on the easy days should be more of a snap, right?

So I worked on a small game, based in HTML, CSS, and JavaScript. Per this coding challenge, JavaScript is the language I have been working in.
The point of this project and exercise is more DOM manipulation, and getting the logic right. To be honest, this has been frustrating- especially today, given my tiredness. But the frustration is natural, I know. And the end result is rewarding.
I was given the template of a simple game that simulates rolling dice. The object is to roll the dice until you reach 100. If the dice rolls a 1, the player loses their points and the other player has a chance to roll as much as they want. You can choose to roll again after each roll, but you risk rolling the 1. There is also a button that says “hold,” and if you select it, the player holds their points and then passes on to the other player.
So I had to code this logic. I had to create functions that would “roll the dice.” Every roll, I would check to make sure it wasn’t a 1, and I check for that as seen below:

If it wasn’t 1, I would take the number that it did roll, and add it to the current player’s score. Other wise ( the ‘else’ of the loop ) I had a “switch player” function ready, which would clear the current player’s score and give the turn to the other player.

As I type all this, I cannot believe that I actually stepped through and coded this. In the course I am following, I am being taught to break the problem down into more manageable chunks, and solve it, one piece at a time. It’s a lot like math: if you look at the entire equation at once, it will overwhelm you. It’s all about knowing how and where to start.

day ++;

DAY 2

Some more DOM manipulation. Learned the concept of constructing a For Loop with an event listener and handler.
Targeting CSS classes and IDs with document.querySelector(). From JavaScript, you can manipulate the CSS class by adding “hidden” with the .add() function, and that will make the HTML element in question disappear.
Learning to use addEventListener(‘keydown’) method. Printing the method itself, I could see it was effectively an object, as it has key-value pairs.
by appending .key to the method, I was able to log the exact key pressed on the site. In this case, it was “Escape.” I scripted it to where if escape was pressed, then the modal would disappear.

BONUS: I successfully installed Linux on a PC today. The distro in Ubuntu and it’s a lot of fun!

day++;

DAY 1

Today was nothing above and beyond, but it was still productive.
In JavaScript, I worked out some code for a game- a number guessing game. I refactored some code, meaning that I removed redundant code in the logic. This is part of the DRY, or don’t repeat yourself, concept.
The logic consists of a few loops, and I condensed it into a bigger, more comprehensive loop, that uses a ternary operator.
I did some DOM manipulation, with the document.querySelector() method.
I then declared a variable that stores the aforementioned methods. It takes one parameter, so I simplified that process.

I was already familiar with IF/ELSE loops, but I am glad to get the reps in so that I can become better, in a muscle memory sense, at writing these with more ease.

Day 1 is a wrap!

let day = 1;
day++;