Saturday, October 31, 2015

Day 8

More SQL Queries


The homework for SQL Queries were actually pretty fun. Like I wrote in my previous entry, figuring out the queries and how to get the information you want from the databases is a lot like plotting a route in a maze. You look at tables and see what information they have and you look at the relationships to help you determine your starting point and your ending point.

Unfortunately for me, I always get screwed on easy questions because of a small thing that I overlooked. The question was write a query that will return all movies that are in the drama genre and has a rental rate of 2.99. Seems pretty straight forward, and I saw in the ERDs that I'm going to be joining quite a bit of tables to get my answer (shown below).



I would go from categories table all the way to the payment table. Or so I thought. The film table actually has a rental rate column that I overlooked. Which led to me scratching my head and doubting my confidence in my joining abilities.

I don't like looking at the answer sheet unless I am truly stuck. But after spending an hour trying to figure out where I go wrong, I gave in and realized how dumb my mistake was.

This just goes to show how merciless databases can really be. Or that I need better vision.
Anyways, I only had enough time to finish the mandatory SQL assignments. I plan on going back to it this weekend when I have time.

Day 7

MySQL Queries


And just when I thought I understood databases, SQL queries messed me up. Now I grasped SQL a lot easier than I did ERDs, probably because I spent so much time on ERDs. The trickiest part of SQL queries is joining tables. CodingDojo's website had .gifs showing each step of the query and how it is visualized. What I learned is that when creating queries for data that you want, it's like creating a trail through different tables. 

How queries works:
select (the data that you want from the query)
from (select a table - usually the table that you have a specifying feature)
(insert any sort, order, join commands);

How join works:
from table1
join table2 on table1.id (or whatever is the primary key's name) = table2.id (the foreign key)
join table 3 on table2.id = table3.id etc.

One feature that I learned for join is that you can join another table without referencing the previous table that is joined (which is the most common type of joins).

from table1 
join table2 on table1.id = table2.id
join table 3 on table3.id = table2.id

I also learned self-joins, which became very meta very quick. Self joins are basically tables referencing itself. Think of a table with users connected to a friendship table. You have a foreign ID from the users table in your friendship table to reference the users. But you also have a friend ID that is not referencing any other tables but itself (since you have the users, those are your friends). Confusing? It gets better; 

How self-joins work:
select 'something'
from table1
join table 2 on table1.id = table2.(foreign key #1)
join table1 as table1'  on table1'.id = table2.(foreign key #2)

This might not be the best illustration but if I find a better way to describe self-joins then I'll edit this entry!

Day 6

ERDs


I remember when I worked at ADP, I would use Access a lot to pull information from our databases. Today I learned how to set up those databases and pulling information is a lot easier than creating them... ERD are known as entity relationship diagrams. I learned about the 3 relationships: 
  1. One-to-one 
  2. One-to-many 
  3. Many-to-many
When first going through the videos, it makes a lot of sense; have unique IDs for every table, foreign keys in the tables you want information on, and many to many relationships have to have a joining table. Then the normalization rules:
  1. Each column have can only have 1 value (think address street, city, state, zipcode being broken up into separate columns)
  2. If not foreign or primary key, cannot repeat values. This prevents repetition of data.
  3. Non-key columns cannot be dependent on non-key columns. Meaning, that if you have a column in a table that affects other columns, (like zip codes determining state and city), then you must create another table for that column and have a foreign ID put into the original table.
Here's a picture to illustrate:


















Then, after learning just these 6 things, they start asking questions on the assignments that slowly didn't make sense. I don't know why it took me so long to understand these concepts. The only cure was to keep practicing and answering a variety of questions. But the one question that will stick to my mind is: can A have multiple B? Can B have multiple A? To determine what relationships the two objects have with each other.

The assignments weren't too difficult and didn't take a long time although the instructions could be clearer. All in all, the more assignments I finished, the more I understood the subject although now my issue is that I can't fully explain my decision about creating relationships between tables. I can't believe that most DBs can have 50+ different tables when I'm struggling with just 5!

Day 5

Yellow Belt Exam


So I absorbed quite a bit of information the past week. Today I took my yellow belt exam, which was just to re-create a website; pretty much the same as what I've been doing with the CSS assignments. I had 4.5 hours to finish the exam, and am able to use anything help me to finish the test. I got the website that had a lot of color gradients, which is irksome since I like to be perfect with what I'm creating. Anyways, I finished the exam in 2.5 hours. The one thing that I know I'm gonna get marked down for is using a div container for only one element. But for some reason, I couldn't figure out how to properly position my text next to the image. 

Anyways, the test wasn't that hard although it is disconcerting that I couldn't fix the text next to image issue. Probably going to go to Kris, my instructor, about how to fix the issue. For this weekend, I'm just gonna review over what I've learned so far - Git/Terminal + HTML/CSS.

Monday, October 26, 2015

Day 4

jQuery


Having done the CodeAcademy track for jQuery, I went through this section pretty quickly. jQuery is definitely a useful tool for adding cool animations onto websites. The section was pretty straight forward, learned the basic syntax of $(document).ready(function(){}); and the first homework assignment went through a lot of different methods (by having you write them). 

I was kinda surprised that we didn't use a separate file for jQuery scripts. But then again we didn't do too many animations. The first assignment that made me think was the one that had you click a picture which changes into another corresponding picture that fits like a puzzle (so think a picture divided horizontally 5 times. And when clicked, it would change to another picture that is also a puzzle. I'm pretty proud of being able to write it in one line of jQuery:

$(this).attr('src', attr('src').replace('ninja', 'cat'));

The attribute method allows for change, specifically in this case the source of my image. Since each image (ninjas0, cat0) have the same numbers to represent its vertical placement, I decided to just change the name of the image.

For the last assignment, it asked us to do a fade in/out of images as you hover over them and this is where I cheated a little and used the same pictures for the 4 images they wanted us to have. This part is where you get to use parameters and I wrote a pretty short piece of code. That's when a friend of mine in the cohort asked me, "what if all the images had to be different" and that got me to thinking about how you can have the same effects but not repeat the code. Obviously I had to use a variable but specifically do I put in it? A method? But with what parameters?

And thats when my friend and the previous assignments instruction started to make sense; use "data-alt-src" and store it as a variable so that it's hidden but the data is still there and use jQuery to surface it! There's an advanced jQuery section but that's not until later. The next unit is ERD and MySQL!

Day 3

Terminal and Git


Sorry for the late posts! Met up with Allen from my cohort today at the Regional Library. I worked on Terminal and Git for the longest time. The assignments weren't hard but for some reason I just couldn't understand how to do them that quickly. I think the weirdest part about Terminal is that you have to tell it exactly what to do and which directory to do it from. It was pretty annoying to have to change my directory all the time so I can change into the correct folders. For example, when I create a directory on my desktop and enter it, I can't just change into another directory, I have to go up one level (in this case, back to my desktop) and change into another directory that's a child of desktop.

That might sound really confusing to some, and maybe I'm just not explaining it well but think of it like branches (which ironically was another part I got stuck on in Git), you can't jump from skinny branches to another skinny branch parallel to it, you have to retrace your steps to a thicker trunk and then go into another smaller branch. I don't know if I made it more complicated but there it is!

Using Git and GitHub was interesting...and since we have been taught how to use terminal I decided to use terminal for the last assignment. What I ingrained in myself today is that process to do anything with a file in a local repository and how to export it (or push) into my GitHub account. 
  1. Always stage the file via git add . or git add file.extension
  2. Then git commit -m "initial commit"
  3. Make changes.
  4. Repeat step 1-2.
That was the easy part..the confusing part for me was the last assignment when I had to clone a copy from GitHub, add then commit, then create a branch, enter that branch, make changes, then re-add and re-commit. Then finally push it out into GitHub. I spent FOUR HOURS on this assignment and the stupid thing is the very first step that I didn't do; I didn't freaking FORK the file. I was so confused why I couldn't add my edited file into the GitHub repository, re-did the assignment probably 20 times. I guess the only good thing that came out of it is that I have since became very comfortable using Terminal and Git...but the next unit is going to be jQuery so I'll update about that next!

Wednesday, October 21, 2015

Day 2

Git and Terminal...


Today we had our first lecture via Google Hangout. Our instructor, Kris, just went over the basics and the first assignment on the CSS sheet. I was half-listening and half trying to learn terminal commands. I was still able to see how Kris did his webpage in a much faster time than I did. One cool feature was his use of outline property on CSS to outline which containers are which. I've been using borders to see where everything is but outline was the property I was looking for since it outlines the edges of the container rather than the outside border. 

Kris used the inspect element A LOT. He actually just tested all his CSS on the inspect element and when he was satisfied with what he saw, he would just re-write the code on the editor. This was pretty neat since I think it saved a lot of time but also I think you have to be pretty adept at using html/css to be comfortable knowing where to put everything although it's definitely another way I can make webpages faster!

As mentioned in the yesterday's post, I kinda breezed through the twitter bootstrap and LESS optional assignments. I definitely need to find time this weekend to at least get a deeper look. Twitter bootstrap just seems to be a bunch of pre-set code and all you have to do is change classes and whatnot to fit your desired webpage layout. LESS, from what I understand is a principle of how to write less CSS code. Although you have to run it through a program so that it works. One thing I've read and am pretty excited about is the fact that you can use variables in your CSS. This makes editing your webpage later on so much better since you can insert a variable and just change the variable at the top and see it cascade through all your selectors!

Anyways I'm meeting up with a bunch of fellow cohort people tomorrow at the regional library for a study session. It should be a pretty good experience getting to know each other.

Tuesday, October 20, 2015

Day 1

I still have lots more to work on:


So today was the first "official" day of the bootcamp, but it is still remote until the 3rd week. We had a Google Hangout that was basically our orientation with our Python instructor, Kris, going over some details. All in all wasn't too eventful but did start utilizing the Slack app to communicate with other people in my cohort; set up a study session for Wednesday with 2-3 people.

I finished up the JQuery track from CodeAcademy and it seems pretty easy to use although I can see how once you have nested selectors, it can get really confusing and might sometimes create issues. The track itself took only 2-3 hours to finish and you really only learn the syntax with the website telling you which function to write down. It's pretty similar to CSS' variety different styles; you're probably going to be googling any styles that you don't have memorized.

I also finished the CSS track on CDojo's website. The new domain has a couple of features that were pretty cool - namely, giving you the answer sheet to the assignments. I was stuck on creating a periodic table assignment for the longest time because I didn't know how to write the CSS file with small bits of code. I need to keep reminding myself that not everything has to be perfect; because the instructors themselves didn't match the page perfectly. A cool bit of coding that made it easier was how they formatted the elements - write a general rule for any columns of elements (create a fixed size border, margins etc.) and used additional classes to shift down any elements that contained one less element (like column 2).
















This last assignment humbled me because I realized that my containers within containers method is not the solution to every problem, and that there are probably dozens of different solutions via HTML/CSS that I haven't even thought of or seen yet! 

Thursday, October 15, 2015

The Week Before

What I've done so far...




So more than a week went by and preparing has gotten that much more strenuous. CDojo has emailed us to complete the pre-bootcamp work which is just a short 2-3 hour long session of watching Michael, the founder, talk about what to expect and how the school is ran and taught. What's funny was, Eric, my close friend was almost in all of the interviews. The messages across all students seems similar; work hard, don't worry about knowing everything, you're going to get frustrated multiple times throughout the course. It sounds daunting, and personally for me, not understanding all the aspects the first time will be a challenge to overcome since I'm so detail-oriented.

The second part of the pre-bootcamp work is the algorithm app. It's basically a series of small algorithm challenges and they said that all students before the camp should be able to do these with ease and in under 1-2 minutes. For the most part the algorithms just asked a lot of simple test questions like "What is the output of this program" and "Write a program that will do this" and it focused a lot on arrays. I went through it pretty quick and finished the 2 challenges they had before finishing the assessment at the end.

After all this, I began to work on the Web Fundamentals course. The HTML course was pretty short, and was a quick review of what I've been studying the past couple of months; tags, divisions, spans and simple HTML syntax (like !doctype html). The course also reviewed the history of the internet and how things came to be currently (HTML5). The two assignments were pretty easy and upon finishing, I went into the CSS course.

The CSS course was again, review but quickly the assignments became rather interesting. They stressed a lot about containers, with the first assignment being about creating random blocks of differing colors and moving/stacking upon each other using display: inline-block. I really didn't understand inline-block even after finishing the assignment; I just used past videos to copy what their code was like and make it my own. The second assignment got a bit more tricky and started to test html + css skills. The main objective was to figure out which tags to use, how to move texts and put them in the right order.

I thought of creating containers within containers so that any texts (within their own containers) can be moved separately without changing other stylings in the CSS file. The project took me a good 2-3 hours to finish and the main concept I learned from it was using the idea of containers within containers to move objects around.

Now the third assignment took me by surprise since it was replicating an entire webpage. I was pretty surprised how quickly the level of difficulty jumped but after a good 4-6 hours of working on it, I was very happy with the result. Not all the colors were perfect, it looked very similar and I was very proud of my work. The fourth assignment was replicating another webpage that had more images and learning from the third assignment, I didn't panic. I just slowly mapped out my containers and built the webpage piece by piece. This took around 6 hours and there were a lot of planning and re-writing code because there were multiple pieces that were the same, that can be written with one CSS properties. I think the hardest part about these two assignments, particularly the last one was that, when you finished almost everything and you're on the last part, one new line of CSS might screw up all the margining. So most of the time isn't spent writing the code or creating the webpage but tweaking for 3 hours the code you wrote in 15 minutes.

The next part of CSS is the yellow belt exam. I will not be taking it now, since CDojo emailed us about a new learning platform. I saw J-Query and the Command-Line as the next two topics covered in Web Fundamentals, so I will be taking a break from CSS and get a solid foundation in J-Query and the Command-Line on CodeAcademy!

Expect my next post pretty soon!


Wednesday, October 7, 2015

The Beginning/Pre-Bootcamp

About Me:


I was inspired to create a blog about my coding experience from my friend, Ted Whang's Blog. This blog serves any potential programmers or students that want to get into programming and see what a bootcamp is like. I also wanted to do this for myself so after I'm done with the bootcamp and some odd years down, I have a collection of my struggles, achievements and everything in-between to look back on. In my humble opinion, you're not really living unless you're moving from place to place and this blog will catalogue my trip! 

A little about myself: my name is Eugene and a (sort-of) recent graduate from the University of Washington, Class of 2014. I graduated with a BS in Physiology and a minor in mathematics. From the time I graduated to now I spent my graduation summer working at Express before landing a job as a compensation analyst at ADP. I was pretty satisfied to land a decent paying job that was not related to my major but that satisfaction soon became stale. 

Although I learned a lot about the corporate world and the professionalism that comes with it, I yearned for something more challenging. I've always liked programming but never decided to apply to the CSE or Informatics major at UW since my heart was set med school. After taking CSE 142, I really enjoyed the mental challenge; coming up with different algorithms to solve the numerous problems on practiceit!, the joy of running a program that doesn't have a syntax error, or the relief of plugging in one simple line of code to make my entire program work. So I started to research more about coding schools.

I've had numerous friends who've done coding bootcamps, with two having graduated from CDojo (Ted as mentioned above). I've also had friends who moved down to SF to do Hack Reactor, and a friend who did CodeFellows in Seattle. Based on all I've heard and seen from friends and websites, all bootcamps seem to have similar mentalities; change your life in x weeks, revamp your career, jumpstart your career, 60+ hr of work/week etc. 

My first choice was CodeFellows since they had a guarantee of job placement and had a small class size for individual student attention. However I was not able to test into their development accelerator course and their 301 class (the course before the DA) started in December. I didn't believe waiting that long was worth it and my youthful angst definitely pushed against it so I gave CDojo another good look. To my surprise, CDojo changed a lot about their curriculum, adding 2 new stacks (Python, iOS) to their 3 original stack (MEAN, LAMP, RUBY). 

What led me to enroll in CDojo is three parts (in no particular order): 
  1. Proximity. CDojo states they are in Seattle but their campus is actually in Bellevue, 10 minute drive from my house.
  2. New stacks. The new curriculum of having two extra stacks as well as a more fleshed out course and learning outcome attracted me as well.
  3. Time. The next start date was mid-October and from listening to friends and my own gut, I decided that having a structured curriculum, regardless of what school will serve me better than to wait 3 months. 
To follow up my last reason; there are people who wants the perfect environment to learn in and when you're paying $10k + of your own money, you should have the right environment to maximize your potential. But I also believe that the world will never give you the perfect environment so it is advantageous to adapt. CDojo's main objective is to produce self-sufficient programmers/engineers and a great by-product of that is getting a job. Its motto of learning through struggling is something that sounds daunting but when you make it over the learning hump, the rewards seems even sweeter.

I am one and a half week from the start of the bootcamp and for the past couple of months I've done a fair bit of prep. I've finished CodeAcademy's JavaScript and HTML/CSS Track, reviewed and finished all the practiceit problems for CSE 142 at UW. On Treehouse, I'm halfway through the Front-End Web Development track. I am planning to finish that track and also the new Python/PHP track on CodeAcademy in conjunction with all the pre-camp work that CDojo has given me.


Anyways I think I've babbled enough about myself. Time to start prepping!