Week 3

First off, I’d like to apologize to all my faithful readers.  It is now Tuesday evening and I still haven’t updated you guys on how Week 3 went.  That’s because this past weekend I actually had a social life!  Yup, went for the full trifecta and went out on Friday, Saturday, AND Sunday.  Yes, yes shame on me.  All those good hours I could’ve spent coding wasted on family and friends.  In my defense I coded before going out each night and my homework wasn’t due until Wednesday.  So I don’t feel terribly guilty about not dedicating my entire weekend to coding.

Back to week 3.  Everything is going pretty well.  I felt better at the end of week 3 than I did at the end of week 2.  I feel like I have a decent grasp on the JavaScript and jQuery material we’ve covered so far.  Check out this Game of Thrones trivia I made using JS and jQuery.

Game of Trivia

I had originally written all the questions out in the HTML.  After looking at the giant wall of text in my HTML file I figured there was probably a better way of doing this with JavaScript.  And sure enough there was.  Placed the questions and choices in an object.  Then created a loop and used jQuery to write it to the HTML.

That’s the beauty of JavaScript.  If you can think of a solution to your problems there’s usually a way to do it in JS.  A classmate had an issue “grading” her trivia.  As part of the instructions for the homework in addition to the right and wrong answers we also had to take account of the unanswered questions as well.  Her problem was accounting for the unanswered questions.  This was also the hardest part I had with the homework.  It took me a while to figure out the solution for my homework, but with the guidance of my TAs and instructor I was able to figure it out.  Because of the way I had written my code the solution to my problems ended up being pretty complicated.  So naturally when I was trying to help my classmate I was trying to implement the things that I learned from my own problem to hers.  Our code ended up being drastically different and I wasn’t able to implement a solution that was similar to what I had done.  Later that day I checked in with my classmate to see if she was able to get it working.  Turns out she had found a really simple solution to her problem.   Had I not been so focused on the way I solved my own problem and took a step back to look at the big picture I may have been able to see the simple solution that was right there.  And I guess that’s the beauty of coding.  Even though we had the same exact problem, the solutions couldn’t have been more different.

The lesson there is to always be looking at the big picture.  What exactly is it that you’re trying to do?  What are the things that you’re currently working with?  Is this enough to do what you’re trying to accomplish?  If not, what else do you need?  I’m still really enjoying this learning process.  The more I learn and understand the better I get.  And getting better is fun.  I’ve never been in an educational setting that was so instantaneously gratifying.  I can only hope the remainder of the boot camp goes the same.

 

Week 2: JavaScript and jQuery

Well the boot camp is definitely starting to get harder.  Instead of the end of day burnouts I had during week one, I actually found myself getting burnt out during the class on some of the days.  I guess with HTML and CSS most of the concepts have a visual aspect to them so it isn’t as hard to conceptually visualize how things should work.  However with JavaScript and jQuery since a lot of the concepts are more dynamic and kind of take place behind the scenes it requires a bit more brainpower to digest.

One of the most difficult aspects of learning JavaScript is that there’s just so much to learn.  The best way I can describe it is that in class we’re taught how to put sentences together, but we don’t know enough to make a paragraph.  And in most cases we need to be making paragraphs, not sentences.  When I was working with HTML and CSS if I had parts of the paragraph missing I could usually describe what I needed to search for to fill in the blanks.  With JavaScript it’s a lot harder since there’s so many different ways of going about doing the same thing.  Even if you’re able to find a solution to your problem it might not even apply to the method you’ve used.

The homework assignments have also started to increase in difficulty.  In week one the homework assignments were more time consuming than they were hard.  Planning, AKA pseudocoding, is very important.  I’ll admit, planning has never really been my style.  I’m more of a throw it against the wall and see if it sticks type of guy.  But it didn’t take me long to learn that if I wanted to work efficiently I would need to take the time to pseudocode and figure out step by step what I needed to do.

Even after all the planning in the world, I’m still my own worst enemy.  Debugging code as a newbie is definitely a frustrating experience.  Does my code actually work?  Did I write it correctly?  Are there any typos?   How about a missing semicolon?  Do my conditions have the right number of equal signs?  Are you sure there aren’t any typos?  Are all my parentheses and curly brackets closing the right things?  Is everything in the right scope?  Lexical !@#$ing scope…  If you have no idea what lexical scope is I wont burden you with an explanation.  Just imagine Schrödinger’s cat meets Inception.

I think my head is still above water at this point, but I do feel myself sinking a bit.  While most people will spend this MDW at the beach or BBQing, I’ll be spending a majority of it trying to stay on top of all the material we’ve covered, maybe one BBQ…

Catception