Day 47: Applied to LaunchCode and Getting Help at CodeNewbie Slack Channel

So, my original plan was to start JavaScript tonight. Instead, I ended up applying to LaunchCode and starting their test by mistake, scrambling to answer at least one question and then learning how to use the .reduce method to solve the hole math problem. Let me explain.

I have been wanting to find a job where I can start learning more daily while using the skills I have now as best I can. I came across LaunchCode and decided to apply. While I selected I would be willing to relocate to St. Louis, I would still prefer to stay close to where I am now. I answered the other questions on the application like so:

Please tell us how your interest and experience in technology progressed.

When I first left high school, I was working tech support at a local internet service provider in New Bern, NC. I found this job after working for 6 months running a movie theater and not really liking the experience. I knew very little about computers at the time and before the interview, I read up and learned as much as I could. I have had a love of computers since. I never thought I could be a programmer but recently I have found myself longing for a career in tech and decided to try it out online. I love it! I rush home daily to study more each day and I am tracking my progress on a blog. Between my first tech adventure and now, I have had many sites online through WordPress or others. I now have found something I am passionate about!

Tell us about a project you have worked on that you take a great deal of pride in. Provide links if available.

I recently completed my first program ever in Ruby. It is a book tracking app that prompts the user to enter the book, author, whether they read or listened to it and then a short, one sentence review. I am extremely proud of the app. I learned how to write loops, I learned to use YAML to save information between sessions and I learned how to search for answers on Google which is invaluable. Most importantly, I learned that I can do this, and had a lot of fun in the process. I blogged about the experience at nickqueen.com. It is located here: https://github.com/demosthenes131/book_tracker

Day 46: Finishing jQuery

Exciting! I have finished the jQuery part of the FreeCodeCamp map and can now move on to JavaScript Basics! Let’s take a look at the code from the last stage of the jQuery Basics track at TreeHouse. First, my badge:


Creating a Simple Drawing Application badge

and now, a quick walkthrough of the app.js file where the magic happens:

Sets variables for color, $canvas, context, lastEvent and mouseDown. Explain these more throughout the code…

OK, this part of the code switches between the sibling elements, moving the selected class between them. The current color is cached once it is the selected color.

This toggles the New Color selector up and down.

OK, so this is where the new color is created. There are three range sliders that look like this:

and when you move the sliders they go through a range of 0 to 255. By moving through them you can create all sorts of colors. Like so:

This function takes the number selected in each range and puts it in the proper rgb code and outputs the number, creating the color and adding it to css.

OK, so this takes the color created above and appends it to the list when Add Color is pressed. Goes from this:

To this:

This last code is where we are able to actually write on the canvas. So it uses mouseEvents to determine where in the X/Y Axis you are on the canvas, where you press the mouse down, where you release it and also releases the mouse if you leave the area!

On to JavaScript!

Day 45: More jQuery

My goal today is to finish another jQuery Basic stage. Let’s get to it!

Creating a Password Confirmation Form badge

Let’s take a look at the code like we did last time:

and the last file:

And, now, let’s go through the jQuery code:

OK, these two “var” creates a variable for $(“#password”); and $(“#confirm_password”);

And then we create three functions. The first, isPasswordValid, checks to ensure that the $password is greater than 8 characters in length.

The next, arePasswordsMatching, checks to see whether $password and $confirmPassword are equal.

The last, canSubmit, will allow the submit button to be clicked if both isPasswordValid and arePasswordsMatching are true.

OK, this function first checks if the password is valid by calling the function creating above, and then if it is valid it hides the tooltip hint which is the next child, or if it is invalid it shows the tooltip hint.

Very similar to the last chunk of code. It ensures the passwords matches by running the created function above. If they match it hides the tooltip hint. If they don’t match it shows the tooltip hint.

OK, another new function. This one assigns the property disabled to the id “submit” if the canSubmit function created above is false. If it is false it adds “disabled” to the submit button, making it not work.

Ok, first line is for the password form, which basically uses a focus on the form and keystrokes to run the passwordEvent function. This one also runs the confirmPasswordEvent to ensure whether the passwords match. The next line does similar. At the end of each the keystrokes will also trigger the enableSubmitEvent to ensure whether the form is valid and can be submitted.

Lastly, the last line runs the enableSubmitEvent to call it.

OK, back tomorrow to finish jQuery and move on to JavaScript!

Day 44: Continuing with jQuery

OK, so I returned to work on jQuery at Treehouse. The lesson I am on is about creating a mobile drop down menu for a site depending on the resolution. I will show the code here, and then explain the jQuery bits:

OK, so that I can ensure I am getting this, let me try to explain what is happening in the .js file.

So, here we create a variable called $select that creates a select bar on the page. Then, it goes to the

Day 42: Continuing with jQuery at Treehouse

So I am back at work at Free Code Camp utilizing the Treehouse jQuery track. Here is my progress so far at Free Code Camp:

I have changed my format a bit because I did not want to just be posting code and nothing else. I think I may do a review or summary in the future after I complete each section. Not sure yet. My main focus, however, remains learning as much as I can.

Here are some random thoughts on the experience so far, however:

  • Andrew Chalkley does a great job with not only teaching jQuery, but also explaining the thought process in planning and implementing the solution. His breakdown is amazing and really helps me get my head around the work a developer does.
  • This does seem a little more challenging. I noticed that Free Code Camp puts jQuery before Javascript. Treehouse puts Javascript before jQuery. Not sure which is the best path.


Creating a Simple Lightbox badge