Wednesday – June 1, 2016 – Preparing to Retake the Exam

It’s the first day of June and 5 more weeks to the end of the Dojo!!!!

This morning

This morning I arrived at the Dojo at my regular time – 8am. I spent a little time, researching jobs in Angular JS to see what most of the requirements were and to get some motivation on how much more experience I need to be considered for a job.

I spoke with my cohort mate about his project – Basically, I needed to study for my belt exam to ensure I knew the key concepts so I could even start looking for a job. Him and the rest of the group continued on without me, I wasn’t too bummed out because I knew majority of the site was functioning well…He ended up taking over the part where his checkout page needed to access the id of the product page I built up. I still didn’t get a chance to work on the modal but I heard him say that he wanted it all functioning first before that gets completed anyway.

Reviewing for my Exam & Learning New Things

So, I spent the rest of my day going over the last exam I failed and working through it. The part I had trouble with was populating the data so I could access the name of the person who wrote the particular answer to a question – The user information was nested inside of an object array so I had to do a deep populate which is as easy as putting the path and model in an object like so: populate({path: ‘answer._person’, model: ‘Users’}) …Which I learned from our instructor last week. After hours of scouring the internet, looking at the video published on the first exam and just plain thinking it through, I came to the conclusion that all I need to do was to do the same deep populate in my show function! Crazy isn’t it?

You see, I called on my client factory in the client controller for my show function; after calling the server route, I went to the server controller where I found the question by id…the problem is every time my results came back, I wouldn’t have the person who made the comment…I just needed to populate it in while in the server controller and then I had access to the name I needed! Pretty easy.

Another thing I figured out is that if I wanted to call a function (that was already declared in my client controller) as a callback inside of another function in my client controller, I had to save the results of the callback the same as the result of the original function – For example: I saved the results of my show function as $scope.answers…which means when I called it again, I had to save those same results as $scope.answers. My guess is because since you’re calling the same function it has to have the same name for the results or else, in my experience, you get a yucky error.

Ready for the Exam

All in all, I learned a lot today and feel way more confident about taking my exam tomorrow! The things I’m worried about are not having enough time to finish, developing the mongoose schema and not messing up while deploying. In the past, we didn’t have to do a video demo of our exam and we had until the end of day to deploy – I found out over the weekend that our current instructor left for good to go pursue other things so I had to reach out to the lead instructor to see what I needed to include so I won’t get dinged because of things I don’t have…Turns out a demo video is needed within the hour after the exam is completed — I did a practice recording today and feel pretty good about it — I was relieved it was pretty simple!

At any rate, I better get some sleep so I can rise and shine early to take my exam – I work better in the mornings!