Saturday, January 23, 2016

Day 176: FCC, Intermediate Algorithm Scripting, "Pig Latin," "DNA Pairing," and "Missing Letters"

Today I'm working on the 6th problem in the Intermediate Algorithm Scripting section of FCC, the problem is called "Pig Latin."  All right, it's 1 p.m., and I solved it!  This is great, it's Saturday morning and I've already got one problem knocked out!

Here's the problem:




And here's my code:




Neat.  I made the variables easy to understand.  Yes, they're long, but the next time I read the code, it will be easy to understand.  Another option would be to put long notes explaining what each variable is on the line above where the variable is declared, then use a shorter variable name, but this code is much more readable than my usual code, so I really like it, and I also think that readability helped me complete this problem pretty quickly and without too much difficulty.

The next Intermediate JavaScript Algorithm is called "DNA Pairing."  Here's the challenge:





First, I need to understand the problem.  O.k., I got it.  So, basically, we return a bunch of two item arrays, the first item in each array is one of the letters provided in the parameter, while the second letter in each array is that letter's pair.  There's only two pairs, AT and CG, so whatever letter is in the parameter, we return the other letter, for example, if the parameter letter is A, the other part of the pair is T, and vice versa.

This is pretty straightforward, so I just need to make some code that generates arrays within an array.

I solved it!!!  And I solved it on my first try!  Well, ok, on my first try with a valid output (I had some typos in my first draft).  Also, I used a function to run through inputs generated by a for loop, I don't think I've done that before.

This is awesome...

So, the next Intermediate JavaScript Algorithm is called "Missing Letters."  Here's the challenge:




I'm thinking about how to approach this one.

So, the challenge suggests using .charCodeAt() and .fromCharCode().  I'm not familiar with those methods, so the first thing I will do is read up on them.  I'm also glad that the challenge suggested these, as I like learning new methods and and then finding ways to apply them to new challenges.  It's a rewarding process.

I'll take a break, though, the coffeeshop opened the doors to the outside an hour or so ago, and it's been a bit too chilly for my tastes (but I stayed because I got really into that last challenge), I'm going to grab some healthy groceries, then head home and continue!

SUMMARY OF CODING SKILLS

Total Treehouse Points: 5,503

Treehouse Points by Subject Matter (Miscellaneous not included): 
HTML:                                663 
CSS:                                1,599 
Design:                            1,193 
Development Tools:            747 
JavaScript:                      1,239

Treehouse Ranking (%): "You have more total points than 93% of all students."

Treehouse Courses Completed:
How to Make a Website
HTML
CSS Foundations
CSS Layout Techniques
Aesthetic Foundations
Design Foundations
Adobe Photoshop Foundations
Adobe Illustrator Foundations (66% complete, switched focus from web design to web dev)
Console Foundations
Git Basics
Introduction to Programming
JavaScript Basics

Codecademy (& other) Courses Completed:
HTML and CSS (Codecademy) 

Books Read or in Progress:

Completed: "Head First HTML and CSS," by E. Robson & E. Freeman
Completed: "A Smarter Way to Learn JavaScript," by Mark Myers 
Completed: "HTML and CSS," by Jon Duckett
Completed: "JavaScript and JQuery," by Jon Duckett

My Progress on The Odin Project:
1.  Introduction to Web Development                                             100% Complete
2.  Web Development 101                                                               33% Complete 
Note: I switched to FCC for the great online community and better updates/support.

My Progress on Free Code Camp (FCC): 
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 JavaScript                                                                                 Complete
7. Object Oriented and Functional Programming                                     Complete
8. Basic Algorithm Scripting                                                                   Complete
9. Basic Front End Development Projects                                                Complete
10. Intermediate Algorithm Scripting                 On 8 of 21 (#13 and #14 also done)

11. JSON API's and Ajax
12. 
Intermediate Front End Development Projects
13. Claim Your Front End Development Certificate
14. Upper Intermediate Algorithm Scripting
15. Automated Testing and Debugging
16. Advanced Algorithm Scripting
17. AngularJS
18. Git
19. Node.js and Express.js
20. MongoDB
21. Full Stack JavaScript Projects

22. Claim Your Full Stack Development Certificate

After the 800 hours of FCC work above, there are 800 more hours of non-profit coding projects.


Hours Spent Coding Today: 2
Total Hours Coding: 847

No comments:

Post a Comment