Week 1 of Project Week:

It’s been a pretty productive week for me at the Dojo.

Monday:

On Monday, I was pulled aside by the instructor who went over a few things about my exam that I missed. Needless to say I didn’t pass the exam. I felt it was helpful, he returned my test to me and told me to go back over it. I spent most of my Monday doing that. In the afternoon, I started working on the group project with a few of my other cohort-mates…one of the guys wanted to build an e-commerce site for his mother. We had met that morning so I knew I was in charge of the create products page and the page to display all the products. I managed to add the pages physical pages and push them to github…Another person was working on the HTML/CSS for the main page and someone else’s job was the main dashboard page which would be the central hub for the admin to keep track of the purchases.

Tuesday:

On Tuesday, I spent my day working on preparing to re-take my exam for tomorrow. My biggest issue are the associations in mongoose, I always have trouble getting the user information to appear in the other collection in order to display the information needed and the fact that I’m not very good in deciding what all I would need for a schema.

Wednesday: 

On Wednesday, I took the test and immediately figured out that I would have to take it again. The associations tripped me up again! I did what I could figure out and turned my test in before I ran out of time. I spoke with the instructor that day and let him know that I got further than I did last time but still didn’t finish. I spent the rest of my day finishing the exam…I finally finished that night! It took way longer than it should have but I did it on my own and I felt really good about it. There was just one little thing I was missing…I was unable to display the name of there person who answered the question, which seems simple but all I could get to display was the Id of the person not there name.

Thursday:

On Thursday, I spoke to the instructor about it and he informed that since I had my association to the other table nested inside of an object, in an array I would have to do a little bit more work to retrieve it. I had to use the object keyword path in order to define which attribute of the collection I wanted to retrieve as well as the name of the table I wanted to retrieve the data from.   I thought I would finally complete it until I realized that I was still not saving the data correctly in my database…it would show up when I console.logged it after retrieving the one item of data! I decided to return to that after I finished making some headway on the group project. Thursday morning, I managed to get the functionality of adding products, saving them to the database and displaying the products to work so I pushed that up to github.

That afternoon, majority of my group was going to an event at the House of Blues where startups pitch their ideas to investors, we went to that. There were some good ideas presented but my favorite would have to be teaching kids to learn to code. It’s something I believe in, I used to volunteer to teach kids to code through a non profit so when I heard it presented at the event I perked up. I think it’s important to present it to kids at an early age along with the math and science classes. The startup that presented has already implemented the program in a few private schools in the Texas area. After hanging out for a bit, we returned back to the Dojo and after reviewing our experience with the instructor and a couple folks that didn’t go, I was about to head out for the day. I checked in with my cohort mate about the project and told him what all I completed and he informed me that he needed a button implemented after the user adds a product to purchase, so I implemented that and pushed my changes to github and left for the day.

Friday:

On Friday, I worked at home that morning – Turns out the exam I was working on had broken more since I left it, I was unable to view the information I needed about each product, I later on found out that I just uncommented out the function that was used to show the product when clicked on. That afternoon I went out of town to a graduation – my cousin was graduating high school, she made class valedictorian of her school! Super proud of her and her accomplishments. Anyways, I was still scratching my head about how to get the name of the person to show up on the question they answered for most of the 2 hour trip so I decided to turn to the video the instructor made – He recorded a lecture of the first exam I took, going over the answer in detail. I decided to spend some time going over that step by step…I looked at the video Friday morning but I didn’t code with him.

Saturday

On Saturday morning, I awoke in the hotel room from the alarm accidentally going off – My mom accidentally turned it on and couldn’t turn it off so I woke up to turn it off. I couldn’t go back to sleep and that was about 5am…I normally wake up at 5:20am anyway so I stayed up and started coding with the video. I plan to finish that today and then redo the exam I took on Wednesday…I probably won’t retake the exam until Monday or Tuesday when I’m more confident with creating schema associations and displaying the correct data.

Full MEAN Process

It’s been a good 10 days since my last post and many assignments have happened since then. I have been working on everything from sockets to full mean projects. I honestly don’t know where to start with this post so I’ll just start with what I’ve been working on for the past week.

FULL MEAN:

At this point, we’ve been learning things on the back end using the Mongo db, Express, Node js and on the client side with Angular.

I’ve learned the process of receiving information from the user the time the user selects an action. I can add that information to the database and display that information back to the user via JSON response objects.

The first couple assignments were to use an older assignment to incorporate the full mean process, that is, storing information into the database and deleting information in the database. I have to admit, I was really excited to finally start putting everything together so I could get used to the flow of things.

A couple of my favorite assignments were the Orders and Customers and the Mini Mean Store.

Orders and Customers:

This project was to add customers to the database, have the ability to remove that customer from the database, and display a full list of customers that are in the database.

Screen Shot 2016-05-22 at 8.56.01 PM

The second part was to pick a customer from a list and add order information associated with the customer such as the product ordered and quantity ordered.

 Screen Shot 2016-05-22 at 8.56.17 PM

In doing this, we had to use partials to able able to display the customers and orders page. The information to take an order had to be displayed in drop down lists. I have to admit, this part stumped me, in the end, I used ng-options in order to grab the user selection to be able to use it to print out a table of all the orders submitted by each customer.

On both pages, we were to be able to filter the page, I filtered both of my pages by customer name.

MINI MEAN STORE: 

I spent about 6 hours working on this assignment. This was the second assignment using Full MEAN and my favorite assignment yet!!!

The propose of this project is to create a ‘store’ with 4 partials: one as a dashboard to view all the products, customers joined (added to database) and orders submitted. I revisited this assignment Friday afternoon after completing it on Thursday to add Bootstrap to it to make it look more presentable.

Screen Shot 2016-05-22 at 9.12.10 PM

I decided to just use the photos from itunes to order albums plus, I love music!

The next page is the products page, the customer is allowed to add a new product to the page, adding the url to display the image of that product. I ended up using ng-src to display the list of products added to the database.

Screen Shot 2016-05-22 at 9.12.29 PM

Next, is to order a product…This page again uses a drop down list to display the options for a user to chose from such as Customer name, quantity ordered, product selected (similar to the orders and customers project).

Screen Shot 2016-05-22 at 9.12.42 PMScreen Shot 2016-05-22 at 9.22.13 PM

Also, once an item is ordered, it is subtracted from the database based on the quantity ordered. Once the customer clicked the order button, the client server connected to my addOrder function in the orders controller.

Screen Shot 2016-05-22 at 9.35.44 PM

Once there, I set the data to a new $scope variable to loop through all the products in the database to compare it with the selected, once found, I set it to a variable to send it to the update function in the ProductFactory, which then sent it to the routes on the server side. The update factory function sent a put a request, along with the product id and order data, to the products controller on the server side to find the product by the id. Once the product is found, I used the quantity form the database to subtract the quantity selected from the user (using req.body.qty).

Screen Shot 2016-05-22 at 9.34.56 PM

I then saved this new quantity to the database. The result is then sent back as a JSON object from the controller, http response, to the factory. The factory send the http response to the controller based on the callback function, in my case it was the allOrders function in order to display all the others.

Screen Shot 2016-05-22 at 9.35.29 PM

It grabbed all the updated orders via the $scope variable I set to the data received back from the function. Then I displayed my data using ng-bind on the Orders page.

The final page was just to add, display and have the ability to delete a customer.

Screen Shot 2016-05-22 at 9.13.00 PM

Below is my controller to add and delete a customer to the page.

Screen Shot 2016-05-22 at 9.39.46 PM

Overall, I throughly enjoyed the MEAN stack and really hope to revisit the Mini Mean Store project in order to add functionality to log in/log out, to only have the admin add products, and to automatically update the product when the quantity is less than 5.

OTHER STUFF

I also ended up taking my belt exam on Friday, I didn’t do great but I did good and I know where I need improvement…Joins in Mongoose, I plan on re working the exam this week and retake it on Wednesday. We originally had the choice to take the test either on Friday or Wednesday…All but 2 (including myself and other cohortmate) decided to take it on Wednesday so only two of us took the test on Friday. It wasn’t really difficult, I just had trouble in the end to get one item to show because I didn’t create the correct Mongoose schema, I should have passed in the object id to the second database in order to use to get the data associated with that user.

THIS WEEK

Starting this week, we have 2 weeks for project week. After focusing on prep to retake my exam, I really want to implement the changes I spoke above to the Mini Mean Project and start a new project…Although, I ‘m not quite sure what the project will be. I talked with a few other cohortmates last week about helping out on a project idea one of them had and since the time will fly by, that may be the only project I have time for but I’m hoping I’m able to work on a small project on my own…We shall see.

Express.Js – Survey Form

Express.JS:

Turns out that creating on server on Express.js is significantly easier than in Node.js!

I went through the practice material and starting the first assignment to create a survey form which I figured out relatively easy, which surprised me a little.

The assignment was to have the user fill out a survey form below:

Screen Shot 2016-05-08 at 7.51.09 PM

This information should then be saved in app.post, using a callback function to save the data into an array that will later be used to display the results on a different page called /result.

Having the data appear on a separate page was fairly simple and the syntax to have the data display the results was similar to how we did in PHP which was to access the key (in this case: users) and the name of the field to be displayed such as name, location etc.

Screen Shot 2016-05-08 at 7.55.40 PM (2)

We were to have a button ‘Go Back’ to go back to the main page where the form was originally displayed. Initially, I had a input type submit with a value of “Go Back” wrapped into a form which would send a get request to get the page of index (the original page). I was having trouble with this though because the url had a ? mark next to the localhost like this: localhost:8000/? which I found out is because it’s expecting data from get but since it receives nothing, it returns a question mark. The instructor told me a better way which is to create a button and wrap it in a link with a href pointing to the home page. Now, it works like a charm.

My server.js file below:

Screen Shot 2016-05-08 at 7.52.58 PM (2)

Node.js

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.

Starting the MEAN Stack With Javascript

Looking Back – Starting MEAN – First Up – Javascript

Algorithms:

This week we’re doing morning algorithms with Stacks and Queues and boy is it excited! J/K, not really.

I think once I get past the LIFO and the FIFO principles to decide how to retrieve values from a linked list or an array, I’ll feel much better about these guys.

I finally received my results back from the retake of my exam and I earned a 9/10 which I knew I where I had issues and I talk my instructor about it when I returned to the Dojo so there was no surprise on that part. I accumulated enough points to receive my Red Belt! It’s definitely not the black belt I was hoping for BUT I certainly have come along way these past 4 weeks than I ever did on my own so I am happy about that.

Javascript:

We started Javascript  on Monday going through the fundamentals, Tuesday we went through object oriented principles and then Wednesday we complete the Advanced topics of Javascript. Since, we’ve been doing all our morning algorithms in Javascript and have already conquered one stack, I was feeling pretty confident about the Javascript assignments.

My favorite was the Deck of Cards Assignment where you create a deck of 52 cards, shuffle them and deal then to a player all outputting into the console. I was pretty proud of myself for getting that far with the assignment. This project can be found here: https://github.com/tthompson899/deck_of_cardsJS, currently it only shuffles and deals to a player. In our last stack we had the same assignment in LAMP, unfortunately, I was too behind to even try to attempt it, this time, the MEAN stack was unlocked on Sunday when I’ve been working for the past weeks so I was able to look at the material and do the first assignment which definitely boasted my confidence.

I managed to tackle the assignment creating the Fibonacci numbers in the Advanced Javascript section, it was the last mandatory assignment and it took me a pencil/paper, lots of thinking and about an hour or so to figure out but I managed to get it working by creating a temp variable to hold my sum value in for my else statement. I played with the temp a little bit until I ran it and figured out that it had finally executed correctly. Felt great, to get the spend so much time racking my brain and then to finally come up with a solution! I put this on github, check it out here: https://github.com/tthompson899/Fib-Nacci_JS

Looking Back April 28, 2016- April 29, 2016

Looking Back:

Thursday April 28, 2016:

The next day, we took our belt exams, I didn’t pass but I went in knowing I probably wasn’t going to but instead, knowing the exam would be great practice for my retake. In turns out, I wasn’t the only person who did poorly, majority of the cohort with the exception of 3 had to retake the exam. We spent the day after the exam taking turns going up completing part of the exam as a group as we did as a smaller group the days before but this time using github to collaborate. This process again took much of the day so I didn’t do much additional practice on my own. I spent my weekend catching up on assignments and starting to go back over the exam on my own so I was comfortable with the entire process from creating an ERD in MySQL workbench to deploying on Amazon Web Services.

It was project week and since I had to retake my exam, I spent the week preparing for the test by redoing the exam we just took but on my own this time. This process to much of my time as I wanted to make sure I understood what was going on at each point so I wouldn’t make the same mistakes when I finally took the exam. The rest of the week was filled with algorithms featuring linked lists, folks doing their projects and others studying for their exam retake.

I decided to not go into the Dojo on Thursday so I could have some quiet to take my test. Many times, I need to talk things out and am not able to hear myself think with others having their own conversations so I stayed at home and started my test at about 8am. The whole test takes 4 1/2 hours and I know I needed to deploy my project as well, which I needed to watch the video that was prerecorded by our instructor, even though I’ve watched it in the past, I wanted to follow it step by step and knew I hadn’t learnt the instructions by heart as of yet.

I was working on a tough query when I had about an hour left, I felt confident on everything else but was unable to execute this query to get the information I had knowing that it would take me longer than I had available so I bit the bullet and decided to work on deploying since I knew it from taking the test last time that it was worth a healthy portion of our scores. I was doing well until I ran into an error with my SQL table – For Amazon Web Services, you have to change the localhost and password in order for it to work on Ubuntu server. Before I noticed this, I remember putting my files into another folder, by doing so caused the changes I had made to the database file to not take place in my current folder. Thus in such, causing the demise of me getting a black belt in the LAMP stack. I researched, couldn’t find anything and time was running out so I decided to go ahead and turn in what I had along with the ip address where my project was supposed to running on AWS. While turning in it, the exam platform didn’t recognize the zipped file I had uploaded so I rushed to e-mail it to the instructor also sending him a message on Slack explaining the situation.

I was pretty frustrated so I took a step back from the computer after the test and came back after a while to redeploy my project…I was going to get it up and running one way or another. I was able to deploy but it was under a different ip address than my instructor had so I knew it didn’t count but it did allow me to see where I made my mistakes and to ensure I did not do that again.

FRIDAY – April 29, 2016:

It was the last day of project week and I was pretty anxious considering I didn’t have a project and we didn’t have access to our next stack yet so my instructor suggested I look at AJAX, so I did. In the afternoon, there were 2 project presentations and afterwards I called it an evening.

Looking Back – Finishing up the LAMP Stack

Looking Back – Finishing up the LAMP Stack

Thursday April 28, 2016:

The next day, we took our belt exams, I didn’t pass but I went in knowing I probably wasn’t going to but instead, knowing the exam would be great practice for my retake. In turns out, I wasn’t the only person who did poorly, majority of the cohort with the exception of 3 had to retake the exam. We spent the day after the exam taking turns going up completing part of the exam as a group as we did as a smaller group the days before but this time using github to collaborate. This process again took much of the day so I didn’t do much additional practice on my own. I spent my weekend catching up on assignments and starting to go back over the exam on my own so I was comfortable with the entire process from creating an ERD in MySQL workbench to deploying on Amazon Web Services.

It was project week and since I had to retake my exam, I spent the week preparing for the test by redoing the exam we just took but on my own this time. This process to much of my time as I wanted to make sure I understood what was going on at each point so I wouldn’t make the same mistakes when I finally took the exam. The rest of the week was filled with algorithms featuring linked lists, folks doing their projects and others studying for their exam retake.

I decided to not go into the Dojo on Thursday so I could have some quiet to take my test. Many times, I need to talk things out and am not able to hear myself think with others having their own conversations so I stayed at home and started my test at about 8am. The whole test takes 4 1/2 hours and I know I needed to deploy my project as well, which I needed to watch the video that was prerecorded by our instructor, even though I’ve watched it in the past, I wanted to follow it step by step and knew I hadn’t learnt the instructions by heart as of yet.

I was working on a tough query when I had about an hour left, I felt confident on everything else but was unable to execute this query to get the information I had knowing that it would take me longer than I had available so I bit the bullet and decided to work on deploying since I knew it from taking the test last time that it was worth a healthy portion of our scores. I was doing well until I ran into an error with my SQL table – For Amazon Web Services, you have to change the localhost and password in order for it to work on Ubuntu server. Before I noticed this, I remember putting my files into another folder, by doing so caused the changes I had made to the database file to not take place in my current folder. Thus in such, causing the demise of me getting a black belt in the LAMP stack. I researched, couldn’t find anything and time was running out so I decided to go ahead and turn in what I had along with the ip address where my project was supposed to running on AWS. While turning in it, the exam platform didn’t recognize the zipped file I had uploaded so I rushed to e-mail it to the instructor also sending him a message on Slack explaining the situation.

I was pretty frustrated so I took a step back from the computer after the test and came back after a while to redeploy my project…I was going to get it up and running one way or another. I was able to deploy but it was under a different ip address than my instructor had so I knew it didn’t count but it did allow me to see where I made my mistakes and to ensure I did not do that again.

FRIDAY – April 29, 2016:

It was the last day of project week and I was pretty anxious considering I didn’t have a project and we didn’t have access to our next stack yet so my instructor suggested I look at AJAX, so I did. In the afternoon, there were 2 project presentations and afterwards I called it an evening.

An Update 6 Weeks Into Bootcamp

Looking Back:

It’s been an exhausting 6 weeks full of learning and constant ‘Aha’ moments at the Coding Dojo.

I joined the cohort on March 21st, along with 12 others hoping to delve deep into coding in hopes of finding work in the end. Along the way, 12 turned into 10, turned into 9…There’s only 9 faithful people left as we enter the 7th week of the program. I’m not going to lie, it’s been pretty tough, I’ve thought about giving up a few times myself but the alternative would be not having anything to go back to. You see, I quit my job of being an Analyst on March 18th so, this is really my only option; I don’t have any regrets though, I would do it all over it again in a heartbeat and wish I would have done it sooner.

At the Dojo, I am constantly challenged, there’s many things I don’t know and few that I actually do. I came into the program with some knowledge of HTML/CSS, PHP and MySQL but couldn’t fit all the pieces together into a program that actually made sense.

The Format:

My schedule for the past 6 weeks has been waking up at 5:15am (which I don’t mind, I’m more productive in the mornings), catching the train out to Downtown Dallas at 7:14am, arriving at the Dojo at 7:55am, settling in, morning algorithms at 8:30am, lecture at 10am, lunch at 12/12:30pm, group project in the afternoon and catch the train at 6:59pm. I get home about 7:45pm, eat and am back on my computer by 8:30pm and usually don’t get off until 10:30-11pm after which, I go to bed and repeat the next day. I’m glad I get to stay busy, I get anxious/restless when there’s nothing to do.

With a program that’s 14 weeks long and 3 stacks to learn, I’ve learned to do my best, grasp the basics and feel comfortable with it and not sweat about the things I don’t know right now. There’s so much to learn in programming there’s no way you can learn everything. We have belt exams for every stack to take everything we learn and build a site or application with it to grade our skill level.

First 2 Weeks – Web Fundamentals:

We started the first 2 weeks with web fundamentals – HTML/CSS, thinking back on it, everything we did seems so easy to execute now although at the time, it was kind of frustrating to make everything centered on the page and all the divs line up correctly…those were the good ‘ol days. In web fundamentals, you earn a yellow belt if you pass the exam. I had to take the exam a second time in the second week because of the aforementioned statement (couldn’t get my divs to line up)…I got it right the second try though; Practice does indeed make almost perfect 😉 (I got a 9.5 out of 10).

Our first stack – LAMP:

The 3rd week we started out with MySQL, I was fairly comfortable with CRUD statements so it was breeze until we started joining, not that I never heard of it, it just took more brain power to figure out which joins needed to happen when to get the data you wanted. We also started on PHP which was pretty good, I enjoyed that part. The following week we moved on toward Object oriented Programming and boy did that throw me for a loop at first only because I was still fuzzy for the marrying of PHP and MySQL together. After many group activities and assignments in the Coding Dojo platform, I understood the purpose of it. Then we moved on to using the MVC framework CodeIgniter and boy was that a bully at first. Again, I’ve heard of MVC but wasn’t sure how to the flow worked. After understanding, that the controller does most of the bossing around and model and view can never speak to one another, the only thing left to do was insert your code and make things appear on the screen. The week of our belt exam for PHP/MySQL/CodeIgniter: the instructor gathered the people who weren’t so confident in the framework to work on a project together – there ended up being 5 of us total working on a project from the platform which included: displaying a list of products, adding a product and removing the product. We all decided it was great practice to help us prepare for the exam so we gathered together the next day to work on an larger project which would take up most of the day with the instructor being available to help when needed. This project resembled the old Facebook platform in which you login, you can post messages, others can post replies to your messages and you can post messages on their page. It was pretty tough when we had to get the messages from other users to post on the person that’s logged in (the queries had to be just right to get the information you needed). It was definitely well worth taking the time out to complete as a group.

I’m going to wrap this post up here and continue on another post – Don’t want it to be too long. I hope to post more frequently since we’re starting a new stack this Monday.