Starting NODE.js:

Nodemon didn’t like this:

Screen Shot 2016-05-08 at 7.42.50 PM

I had my curly brace and parenthesis in the wrong order, should be }); works like a charm now.

I like that it shows you where you made a mistake in your code and what line in what file.

I had a pretty lousy day at the algorithm board this morning: this morning’s challenges were to make a copy of a stack using only a queue for storage and to create a queue function using two stacks. I thought I had a great idea for the copy stack, I looked at it the night before until I asked the opinion of the instructor who led me to realize that I didn’t know if the stack given was an array or a linked list. My group of 2 other cohort mates were stumped trying to figure this out but we didn’t give up trying, we kept writing ideas for algorithms on the board. Afterwards, a couple of our fellow cohort mates came up to us and started walking us though what we had and explained why it wouldn’t work and what we should have done. I went through, writing on the board, interpreting what they were saying… I have to say I appreciate the feedback from them. We didn’t finish the algorithms and when another group presented the copy stack function it seemed we were heading in the right direction, we just didn’t get the answer. Nonetheless, I understood their solution. The same goes for the other algorithm, I just didn’t get enough time to really think about it considering we spent our time on the first one. Stacks and Queues together are quite tricky. I need to spend more time on them this weekend going over the basics again and using that to build some of the functions that are presented as challenges in the book. (The book being the Algorithm Challenges book created by Martin, an instructor for the Dojo and he went through the program when the founder was teaching the program).

I ran into some little problems, like the one above as well as when I worked on an assignment where we condense the code we need to run the .html, .css, images and .js files…I merely didn’t realize, my server was trying to open a directory named images/images/_img.jpg because I specified it to look in the images folder and on my html I put the image src as /images/_img.jpg…I scratched my head looking at this one for about 30 mins before asking the instructor to take a look at it…He explained to me the problem I had above and I fixed the code.

Man, it’s always a little thing that’s the problem.

It was a pretty light day, I finished the whole Node.js section, including all the assignments and was feeling like a boss but that thought quickly faded because tomorrow we start Express.js which is supposed to make the server a lot more easier for us, this is also when we start to put into practice MVC which from doing LAMP last month seems like an easy concept to grasp just finding the right syntax in javascript to execute it properly.

I skipped out early today as did a couple other of my cohort mates after I tried to help a fellow co-horter with an assignment. It turns out he isn’t running Nodemon(which automatically updates your server for you without you having to restart it) on his machine because he was unable to install in properly. I was unaware of this so I was thinking the problem was in his server.js file which technically it was, the server hadn’t been restarted…Another cohort mate reached that conclusion after tinkering with it for a few minutes and I left out shortly thereafter.