Wednesday, November 26, 2014

What I Did On My Thanksgiving Vacation

I had planned several months ago to take vacation around the Thanksgiving holiday. It was a bit of luck that by doing so, I would have several days to concentrate on Project 3 - and right at the time that I needed to be able to dive deep into adding to the project.

Just like I did with the start of the project, I found that adding code in iterations - one feature at a time - I was able to make a lot of progress in very short amounts of time. I also noticed that using git version control helped immensely, as I could branch off a feature, and if it worked like I wanted, I could simply merge that branch back into master. There was only one case where I tried to do something, and had to completely scrap that idea. Being able to delete that branch and pick up where the master branch had left off, saved me a lot of backtracking or trying to undo the work I had done for the previous few hours.

After a day and a half of coding, I had finished the main game play as I wanted it to be. I started into adding an intro, and tried to think of a way to make the game feel more like a real video game. My thought was to keep as much going on in the canvas object as I could, instead of moving this information into the index.html file, or splitting it out into other files.

I was at a point, where the intro worked, but the game would not start. If I changed a few function calls and a variable, I could play the game, but there was no intro. I went over the code again and again, but could not see where I was having issues. So, off to Piazza I went, posting about my issue and hoping someone would spot the logic flaw I was missing.

I woke up this morning to several emails, advising that my post had been answered. Between Kevin Mayo and Matthew Prather, they had come to the same conclusion, and revealed something I had missed. Basically, I had assumed that since I had established a local variable and its value, and then tried to turn it global, I was essentially not seeing the same variable in the other JS file.

From Matthew's response:
Maybe the problem is the variable "intro" inside of Engine always being true.
So when you set "intro" false elsewhere, it's setting a global variable "intro" false, but Engine sees the intro in its own scope first.
That hit the nail on the head. I assumed that since I was redefining the variable as a global variable, that it would always take the global value. However, I had initially defined the variable inside the Engine object, and JavaScript reads variables from inside outward. Since the variable was defined inside Engine locally, it never went far enough out to see the value in the global version of that variable.

Reassigning the variable outside of Engine got things working immediately, and I learned something in the process.

It's been great to be a part of this cohort, just from the interaction and willingness to help others that I have seen in Piazza and HipChat. I've done my best to help where I can as well, and give back to this same community.

As for this project, I have a little bit of styling to do on the main HTML page to make it look "better", and then cleanup of the commenting in the JS files. Hopefully by the end of the week, this project will be ready for submission.

I can't wait to see what comments I get on the final product.

Saturday, November 22, 2014

Project 3

I spent some time going through the Piazza discussions regarding Project 3 (arcade game clone), and through the discussions there (as well as the Office Hours discussion Wednesday), I think I have a better feel for how the project should be approached.

To my surprise, I was able to meet the minimum specs and have a working game within just a few hours. Taking things one by one (getting the player to show up on the screen, coordinating movement, preventing the player from falling off the canvas) really did make this a lot simpler than I thought it would be. As the coaches have said, a lot of the background work has been done in the resources and engine JavaScript files, allowing us to concentrate on the app.js file for our code.

Now comes the fun part: customization!

Several students have gone well beyond the requirements, and made some excellent games. The variations have been fun to see, but I'm wanting to stand out a bit, not going too overboard but still making it memorable and fun to play.

I need to come up with a checklist of what I would like to have, and see how realistic it will be. The plan for now is to have it more Udacity themed, including the backstory (why the player does what they do) and the characters involved. I've already gotten permission from Miriam and Mike (two Udacity leaders for our cohort) to use their names as the names of the player options. I was able to modify some of the game assets to represent each person in game.

Cute Udacity shirts, yes? 

I have a lot of other ideas, but I won't detail them out just yet - some things should be left as surprises. I just hope that I don't try to put too much into this, and end up frustrated with the outcome, or spend way too much time on it. The deadline for the project is several months off - and I don't intend to spend THAT much time on it - but I've delayed the start of the project, and really want to make something good.

I know I can pass the evaluation, but now it's all about being Udacious!

Saturday, November 15, 2014

Project 2 - Passed!

Just after finishing my last post, I received an email from Udacity advising that project 2 had been reviewed, but they were going to do a followup interview before marking it complete. Only one week from submission to completion - definitely better than the first project.

The result of the evaluation was...

I was so happy to see that on the evaluation, because I really did try to get the extra "make it yours" touch into the project.

The exit interview for the project was interesting. I was scheduled to be interviewed by Dimka, one of the Udacity coaches. She was nice to talk to, and supportive of the project and the program as a whole. I found the questions to be a bit more generic than I expected, but I assume that is a requirement on Udacity's part, as their students range from non-technical, first time developers to veterans in the field looking for certification of their skills.

There were quite a few questions on my opinions on the project. I think the interview is really two fold - the coach gets to check and make sure you know the material, and they request feedback on the project itself: what you liked, what you didn't like, what could be improved. I found that to be the hardest part of the interview, as I had prepared to review my code, and didn't really consider how to rate the course that teach the project, from my view as a student.

The whole interview took about 15 minutes, and shortly after, an email arrived with my code to enter in the Udacity site, to mark the project complete. So, two down, and a few more to go!

Link to project 2: resume on Github Pages

Thursday, November 13, 2014

Now For A Real Challenge... OOJS

I think I have finally come up against something that is going to take time to figure out - Project 3.

Project 1 (HTML and CSS) and Project 2 (JavaScript) were based on concepts that I have used for a while in my work activities. I sat down and watched the class material for Project 3 (Object Oriented JavaScript), and like my previous attempts to understand any OO programming - Java, Perl, PHP all have OO-type constructs that can be used, and Java specifically relies on it from what I have learned -  I read the material, understood what it meant, but felt lost as to how to apply it. Java was particularly an issue, as I ended up with several months between the class itself, and trying to apply the concepts to a task.

I don't know what the cause is, but object oriented concepts seem to not stick with me. The lessons make sense as I am in the classroom, but I can't seem to make them work when presented with a challenge that requires their use.

A class is simple enough: an object that contains properties (values) and methods (functions). I can create a class with few problems. I know how to construct an instance of a class, so that I can modify those values and use them as a unique 'version' of that object. It's when you get to inheritance, and polymorphism, and the interaction of classes with each other, that seems to be my hangup.

I could be overthinking it. It could be a mental block, and I may actually understand this but not be confident in my application of it.

It has been almost a week since watching the lesson, and though I feel like I get the concepts, I still haven't started Project 3. I even went through Piazza to get some hints, based on what others have said. I have not looked though anyone's code or repositories though, as I would hope to at least take a decent stab at it before falling back on others' assistance.

But something is keeping me from even attempting it - and that is not helpful.

Friday, November 7, 2014

Project 2 submitted

I finally sent my version of Project 2 into the reviewers at Udacity.

I say "finally", as I had basically finished the project about a week ago, but I wasn't pleased with the final result. I didn't change the layout drastically after all, though I did test a two column version, but liked the clean look of the single column look. However, I did figure out a few tweaks to make my version unique.

First, I used info from the Piazza forums to figure out how to update the infoWindows in the Google map to use custom data.

Then, using info from StackOverflow, I found a way to color code the pins themselves.

At that point, I wanted to do something that I had not seen yet - let's map the pins to the places on the resume that they refer to!

After a little tweaking with the helper.js file, I was able to get the pins to show up in the separate resume locations. I was pretty happy with that. I modified the colors of the resume, to make it look less drab, and figured I was good to go.

Of course, sleeping on it brought additional ideas forward, and so I thought: what if you click on the pin in the resume, and it takes you to the map?? It turns out, this was the most time consuming portion of the modifications, as any time I tried to use an <A> tag, it broke the layout of the page in a big way. I finally settled on adding an inline javascript command and a little CSS trickery to get the pins to look like clickable links.

Hopefully, there is enough different in this version for the evaluators to consider it "beyond expectations."

Sunday, November 2, 2014

Project 1 - Passed!

I just received my evaluation for Project 1 in the Front End Web Dev nanodegree program, almost exactly two weeks after submitting it. And the result...


According to the evaluation, I did exactly what was expected. I thought I had gone beyond by actually including all six projects for the nanodegree on my portfolio page, but compared to many other submissions, I really didn't do a lot more than was required. Some of the students are VERY talented, and did a wonderful job exceeding expectations. 

I'm still happy that I passed before v.2 of the project was required. I didn't find Bootstrap to be necessary, since I could get flexbox to do everything I needed. I do see the reason for teaching Bootstrap, and I can think of several projects at work that could benefit from the framework. It just seemed to be more than what was required, to make my page work.

Passing this project evaluation has been the highlight of the day, since I'm a little under the weather today. But at the same time, it compels me to really put extra effort into project 2. I have it completed, and matching the way the version in the class looks. Hopefully I will feel better later this week, and can add my own spin to the project. 

I think that is a good thing to remember about these classes: get the project to look and work like it is supposed to, then add details to make it stand out after.