Tuesday, May 10, 2016

Day 239, 240, and 241: First Day Working on Node and RPG Project!

All right, I had to choose whether to dive into React or Node first, and although I prefer to go with React first to really solidify my front end education, the UT Boot Camp will be going into Node heavily before we even touch React, and since my priority right now is excelling in the boot camp and helping my fellow students excel, that means I need to get a good grounding in Node first, so I can be prepared to help my classmates out when the time comes.

Okay, so let's get to it!

I organized my Udacity courses on Node, so those are waiting for me now, but I'm starting off with some Treehouse material, since I've used them before and they're pretty solid, sometimes a bit too much hand-holding, but I'm ok with that right now in regards to Node, since this is my first exposure to it.

All right, so the instructor in the video said that writing an application in Node.js is writing an application in javaScript, but outside the browser.

Also, I'm going through the Eloquent JavaScript book whenever I get a chance to on my new kindle, it's pretty neat.  Here's a function that multiplies the argument entered by every number below it:

function fac(n) {
if (n == 0) {
      return 1;
    }
else {
      return fac(n-1) * n;
    }
}


fac(4);

So that yields 24, as in 4 x 3 x 2 x 1.  24.

Okay, I had to start working on a homework assignment, so I set aside my Node work for now.  Here's what I have so far on the homework assignment:



It's a game where the characters fight each other, and we've got to build it in jQuery.  It's coming along.  

In these last few days I attended two 4 hour classes for the boot camp, read a bit of the Eloquent JavaScript book, explored how the stack works in recursive functions like the one earlier in this post, got started (very briefly) on an introduction to Node.js, and started working on the code for the project pictured above, using jQuery, since that's what we're going over this week.

Tomorrow's Saturday, I'll have class for four hours and then I'll continue my work on this project.

SUMMARY OF CODING SKILLS 
Books:                                                                                               Status
"Head First HTML and CSS," by E. Robson & E. Freeman                      Complete
"A Smarter Way to Learn JavaScript," by Mark Myers                          Complete
"HTML and CSS," by Jon Duckett                                                        Complete
"JavaScript and JQuery," by Jon Duckett                                            Complete
Team Treehouse (Front End Web Dev Track Complete):                    Status
How to Make a Website                                                                     Complete
HTML                                                                                                Complete
HTML Forms                                                                                      Complete
HTML Tables                                                                                     Complete
HTML Video and Audio                                                                       Complete
CSS Foundations                                                                                Complete
CSS Basics                                                                                         Complete
CSS Layout Techniques                                                                      Complete
CSS Layout Basics                                                                              Complete
CSS Selectors                                                                                     Complete
Responsive Layouts                                                                            Complete
CSS Flexbox Layout                                                                            Complete
Framework Basics (Bootstrap and Foundation)                                    Complete
Git Basics                                                                                          Complete
Console Foundations                                                                          Complete
Introduction to Programming                                                              Complete
JavaScript Basics                                                                               Complete
JavaScript Loops, Arrays, & Objects                                                   Complete
AJAX Basics                                                                                       Complete
JQuery Basics                                                                                    Complete
Interactive Web Pages With JavaScript                                               Complete
Object-Oriented JavaScript                                                                Complete 
Accessibility                                                                                      Complete
Website Optimization                                                                        Complete
Front End Performance Optimization                                                  Complete
Aesthetic Foundations                                                                        Complete                 
Design Foundations                                                                            Complete  
Adobe Photoshop Foundations                                                            Complete
Adobe Illustrator Foundations                                                      66% Complete

Other Courses:                                                                                     Status
HTML and CSS (Codecademy)                                                               Complete
Introduction to Web Dev (The Odin Project)                                         Complete
Web Dev 101 (The Odin Project)                                                    33% Complete

Free Code Camp (FCC)                                                                           Status
1. Get Started with Free Code Camp                                                     Complete
2. HTML5 and CSS                                                                                 Complete
3. Responsive Design with Bootstrap                                                      Complete
4. Gear up for Success                                                                          Complete
5. jQuery                                                                                             Complete

6. Basic Front End Development Projects                                              Complete
7. Basic JavaScript                                                                                Complete
8. Object Oriented and Functional Programming                                    Complete
9. Basic Algorithm Scripting                                                                   Complete

10. JSON API's and Ajax                                                                         Complete
11. Intermediate Front End Development Projects                                  Complete
12. Intermediate Algorithm Scripting                                                     Complete
13. Advanced Front End Development Projects                                       Complete
14. Claim Your Front End Development Certificate                              Complete

The Coding Boot Camp at UT Austin                                              Status (starts 4/19/2016)
Week 1-6: Mastering the Browser (HTML, CSS, JavaScript, JQuery)         In Progress
Week 7-10: API & JSON (RESTful API"s, parsing JSON, AJAX)
Week 11-14: Server Side (Node.js, MySQL, MongoDB)
Week 15-18: PHP (WordPress, CodeIgniter, Laravel) 
Week 18-21: Full Stack Coding
Week 22-24: Final Project


My Web Dev Portfolio: www.adamcamacho.com
CodePen Projects: http://codepen.io/Adancode/
GitHub Projects: https://github.com/Adancode
LinkedIn Profile: https://www.linkedin.com/in/adamcamacho1
Team Treehouse Profile: https://teamtreehouse.com/adamcamacho
Free Code Camp Profile: http://www.freecodecamp.com/adancode

Hours Spent Coding Today: 13
Total Hours Coding: 1,270

Friday, May 6, 2016

Day 237 and 238: Completed the Hangman Project & Tutored My Fellow Students!

Today I'm spending almost all day working on the Hangman project.  Here's what I've got so far:




So far so good...

Okay, I had to completely rewrite my code, because the instructors wanted it inside of an object (they sent out the homework instructions some time after letting us know what the homework was).

Ok, so I re-wrote it, and now it's complete and deployed to heroku, here's a screenshot:



I then spent 6 hours tutoring a group of my fellow students on functions, scope, and DOM manipulation.

I'm super busy right now so I don't have time to write a detailed blog post.

I'm jumping into Node.js right now, on my own, and for the first time, so I can be prepared when we get to it in class.  I'll also review prototypal inheritance if I can squeeze it in.

SUMMARY OF CODING SKILLS 
Books:                                                                                               Status
"Head First HTML and CSS," by E. Robson & E. Freeman                      Complete
"A Smarter Way to Learn JavaScript," by Mark Myers                          Complete
"HTML and CSS," by Jon Duckett                                                        Complete
"JavaScript and JQuery," by Jon Duckett                                            Complete
Team Treehouse (Front End Web Dev Track Complete):                    Status
How to Make a Website                                                                     Complete
HTML                                                                                                Complete
HTML Forms                                                                                      Complete
HTML Tables                                                                                     Complete
HTML Video and Audio                                                                       Complete
CSS Foundations                                                                                Complete
CSS Basics                                                                                         Complete
CSS Layout Techniques                                                                      Complete
CSS Layout Basics                                                                              Complete
CSS Selectors                                                                                     Complete
Responsive Layouts                                                                            Complete
CSS Flexbox Layout                                                                            Complete
Framework Basics (Bootstrap and Foundation)                                    Complete
Git Basics                                                                                          Complete
Console Foundations                                                                          Complete
Introduction to Programming                                                              Complete
JavaScript Basics                                                                               Complete
JavaScript Loops, Arrays, & Objects                                                   Complete
AJAX Basics                                                                                       Complete
JQuery Basics                                                                                    Complete
Interactive Web Pages With JavaScript                                               Complete
Object-Oriented JavaScript                                                                Complete 
Accessibility                                                                                      Complete
Website Optimization                                                                        Complete
Front End Performance Optimization                                                  Complete
Aesthetic Foundations                                                                        Complete                 
Design Foundations                                                                            Complete  
Adobe Photoshop Foundations                                                            Complete
Adobe Illustrator Foundations                                                      66% Complete

Other Courses:                                                                                     Status
HTML and CSS (Codecademy)                                                               Complete
Introduction to Web Dev (The Odin Project)                                         Complete
Web Dev 101 (The Odin Project)                                                    33% Complete

Free Code Camp (FCC)                                                                           Status
1. Get Started with Free Code Camp                                                     Complete
2. HTML5 and CSS                                                                                 Complete
3. Responsive Design with Bootstrap                                                      Complete
4. Gear up for Success                                                                          Complete
5. jQuery                                                                                             Complete

6. Basic Front End Development Projects                                              Complete
7. Basic JavaScript                                                                                Complete
8. Object Oriented and Functional Programming                                    Complete
9. Basic Algorithm Scripting                                                                   Complete

10. JSON API's and Ajax                                                                         Complete
11. Intermediate Front End Development Projects                                  Complete
12. Intermediate Algorithm Scripting                                                     Complete
13. Advanced Front End Development Projects                                       Complete
14. Claim Your Front End Development Certificate                              Complete

The Coding Boot Camp at UT Austin                                              Status (starts 4/19/2016)
Week 1-6: Mastering the Browser (HTML, CSS, JavaScript, JQuery)         In Progress
Week 7-10: API & JSON (RESTful API"s, parsing JSON, AJAX)
Week 11-14: Server Side (Node.js, MySQL, MongoDB)
Week 15-18: PHP (WordPress, CodeIgniter, Laravel) 
Week 18-21: Full Stack Coding
Week 22-24: Final Project


My Web Dev Portfolio: www.adamcamacho.com
CodePen Projects: http://codepen.io/Adancode/
GitHub Projects: https://github.com/Adancode
LinkedIn Profile: https://www.linkedin.com/in/adamcamacho1
Team Treehouse Profile: https://teamtreehouse.com/adamcamacho
Free Code Camp Profile: http://www.freecodecamp.com/adancode

Hours Spent Coding Today: 13
Total Hours Coding: 1,257

Thursday, May 5, 2016

Day 236: Paper, Rock, Scissors, and Hangman Project!

All right, let's get to it, I'm really stoked, this project isn't due until next Thursday, a week from now, but I want to make sure I knock it out of the park, so I'm starting on it today.

I really don't want to sleep (it's 3:12 a.m.), I want to work on hangman, but the responsible thing to do is to get some rest, so I'm going to do that, then I'll start on hangman in the morning.

Good night, I'll make an effort to write more in the blog, since I've been so busy with coding I haven't been blogging as much. 

Here's a forEach loop from class:

zooAnimals.forEach(function(n){
console.log(n);

})

Having fun today.  We made a paper, rock, scissors game in class today:

<!DOCTYPE html>
<html>
<head>
<title>Rock Paper Scissors Part 1</title>
</head>
<body>

<p>Press r, p, or s to start playing</p>

<div id="game">

</div>

<script type="text/javascript">

// Create an array that lists out all of the options
var options = ['r','p','s'];

var wins = 0;
var losses = 0;
var ties = 0;

var html =
        "<p>wins: " + wins + "</p>" +
        "<p>losses: " + losses + "</p>" +
        "<p>ties: " + ties + "</p>";

        document.querySelector("#game").innerHTML = html;   

// Captures Key Clicks
document.onkeyup = function(event) {

// Determines which exact key was selected. Make it lowercase
var userGuess = String.fromCharCode(event.keyCode).toLowerCase();

// Alerts with user guess
alert(userGuess);

// Create code to randomly choose one of the three options (Computer)
var computerGuess = options[Math.floor(Math.random()*options.length)];

// Alerts with Computer guess
alert(computerGuess);

    function updateScore() {
        var html =
        "<p>wins: " + wins + "</p>" +
        "<p>losses: " + losses + "</p>" +
        "<p>ties: " + ties + "</p>";

        document.querySelector("#game").innerHTML = html;
    }

var compare = function(choice1, choice2) {
    if (choice1 === choice2) {
        ties++;
        updateScore();
    return("The result is a tie!");
      

    }
    else if(choice1 === "r") {

        if(choice2 === "s") {
            wins++;
            updateScore();
            return("You win!");
        }
        else {
            losses++;
            updateScore();
            return("Computer wins");
        }
    }

    else if(choice1 === "p") {

        if(choice2 === "r") {
            wins++;
            updateScore();
            return("You win!");
        }
        else {
            losses++;
            updateScore();
            return("Computer wins");
        }

    }

     else if(choice1 === "s") {

        if(choice2 === "r") {
            losses++;
            updateScore();
            return("Computer wins");
        }
        else {
             wins++;
            updateScore();
            return("You win!");
        }
        
    }
   
};

console.log(compare(userGuess, computerGuess));
}

</script>
</body>

</html>

That was fun.

I started work on the Hangman project also, check out a screenshot:




So I'll be trying to complete the Hangman project tomorrow, so I can learn about React.

SUMMARY OF CODING SKILLS 
Books:                                                                                               Status
"Head First HTML and CSS," by E. Robson & E. Freeman                      Complete
"A Smarter Way to Learn JavaScript," by Mark Myers                          Complete
"HTML and CSS," by Jon Duckett                                                        Complete
"JavaScript and JQuery," by Jon Duckett                                            Complete
Team Treehouse (Front End Web Dev Track Complete):                    Status
How to Make a Website                                                                     Complete
HTML                                                                                                Complete
HTML Forms                                                                                      Complete
HTML Tables                                                                                     Complete
HTML Video and Audio                                                                       Complete
CSS Foundations                                                                                Complete
CSS Basics                                                                                         Complete
CSS Layout Techniques                                                                      Complete
CSS Layout Basics                                                                              Complete
CSS Selectors                                                                                     Complete
Responsive Layouts                                                                            Complete
CSS Flexbox Layout                                                                            Complete
Framework Basics (Bootstrap and Foundation)                                    Complete
Git Basics                                                                                          Complete
Console Foundations                                                                          Complete
Introduction to Programming                                                              Complete
JavaScript Basics                                                                               Complete
JavaScript Loops, Arrays, & Objects                                                   Complete
AJAX Basics                                                                                       Complete
JQuery Basics                                                                                    Complete
Interactive Web Pages With JavaScript                                               Complete
Object-Oriented JavaScript                                                                Complete 
Accessibility                                                                                      Complete
Website Optimization                                                                        Complete
Front End Performance Optimization                                                  Complete
Aesthetic Foundations                                                                        Complete                 
Design Foundations                                                                            Complete  
Adobe Photoshop Foundations                                                            Complete
Adobe Illustrator Foundations                                                      66% Complete

Other Courses:                                                                                     Status
HTML and CSS (Codecademy)                                                               Complete
Introduction to Web Dev (The Odin Project)                                         Complete
Web Dev 101 (The Odin Project)                                                    33% Complete

Free Code Camp (FCC)                                                                           Status
1. Get Started with Free Code Camp                                                     Complete
2. HTML5 and CSS                                                                                 Complete
3. Responsive Design with Bootstrap                                                      Complete
4. Gear up for Success                                                                          Complete
5. jQuery                                                                                             Complete

6. Basic Front End Development Projects                                              Complete
7. Basic JavaScript                                                                                Complete
8. Object Oriented and Functional Programming                                    Complete
9. Basic Algorithm Scripting                                                                   Complete

10. JSON API's and Ajax                                                                         Complete
11. Intermediate Front End Development Projects                                  Complete
12. Intermediate Algorithm Scripting                                                     Complete
13. Advanced Front End Development Projects                                       Complete
14. Claim Your Front End Development Certificate                              Complete

The Coding Boot Camp at UT Austin                                              Status (starts 4/19/2016)
Week 1-6: Mastering the Browser (HTML, CSS, JavaScript, JQuery)         In Progress
Week 7-10: API & JSON (RESTful API"s, parsing JSON, AJAX)
Week 11-14: Server Side (Node.js, MySQL, MongoDB)
Week 15-18: PHP (WordPress, CodeIgniter, Laravel) 
Week 18-21: Full Stack Coding
Week 22-24: Final Project


My Web Dev Portfolio: www.adamcamacho.com
CodePen Projects: http://codepen.io/Adancode/
GitHub Projects: https://github.com/Adancode
LinkedIn Profile: https://www.linkedin.com/in/adamcamacho1
Team Treehouse Profile: https://teamtreehouse.com/adamcamacho
Free Code Camp Profile: http://www.freecodecamp.com/adancode

Hours Spent Coding Today: 6
Total Hours Coding: 1,244