Saturday, May 31, 2014

Week 3 Weekend: Putting it all together: Database, forms, validations, etc. and preventing SQL injection

Today I met up with some classmates to get some extra work done on our assignments. We worked on one of the big checkmark assignments: The Wall.

In this assignment we were to create a "wall" which acts as a public bulliten board. Users can register for an account and post on the wall. All data is stored of the database with proper connections between tables.


Here is the registration/login page, made beautiful using Twitter Bootstrap (I'm glad I finally get to post "pretty things" after doing database stuff for a week). The form displays messages when errors are made on the form.


Here is the actual wall where users can post information on the "wall". Furthermore users can make comments on posts all made possible by associations created on MySQL.


One thing I really like about Coding Dojo is the reoccurring talk about security. Here we are taught how to prevent malicious attacks by hacker trying to ruin information in our database.


The more I learn about security, the less safe I feel about using web applications. How many of these apps are actually doing things like encrypting my password or preventing things like SQL injections? From what I'm gathering from the web and those in the industry, it is much less than I think.

With security there really is no 100% hacker-proof application. All a hacker needs is one open window. But the thing is... you don't to have the safest house on the block, you just have to be safer than your neighbors. Why would a hacker bother to go through all the loops you set up, when other web applications don't have those security issues?

Well 6 days of coding in a row has made my brain extremely exhausted, I think I'll take it easy tomorrow and rejuvenate my brain for next week when we start learning OOP and MVC frameworks.

Friday, May 30, 2014

Day 15: Connecting PHP to MySQL

Today's morning lecture was a demonstration on how to write these PHP programs efficiently. Michael really emphasizes writing up the HTML and making it look like the desired output before starting anything else. This may be opposite of what many developers do. I know when I was doing Rails tutorials, I was taught to think about models and how they connect to the database before I even write a line of HTML. There really are benefits either way but I really do see the benefit of the way Coding Dojo teaches it. There is a reason why we start with wireframes. Also clients and designers may change their minds about how things look and if we can agree on that, we're in a pretty good spot before we make hefty changes to the back-end.


Today we added on top of our original understanding of PHP and validations but now we were adding a database to work with.


Here is a snapshot of my MySQL workbench where I have data.


And once again the usual registration and login page.

Today was the first day I truly begun to feel "powerful". I have the ability to create a web page that users can submit forms store user input into databases and output data on a profile page. I even started daydreaming of being Mark Zuckerberg's character in The Social Network when he first started coding Facebook.

Speaking of Facebook, our next assignment is to create a facebook-like application where users have a profile where you can make posts and others can comment on the posts.

This is really really exciting. I'm only a 1/4 of the way done. I can't stop coding!



What I love about this bootcamp is the pace at which we learn. The gas pedal is always hitting the floor. There are some students that are falling behind and aren't picking up the concepts as quick as others but there are always TAs available if they need it.

Thursday, May 29, 2014

Day 14: More sophisticated form validations

Alrighty so no morning lecture today so we dived right into the material. Yesterday I showed you an example of a really simple email validation page that directed to another page when successful and displayed error messsages when something didn't look right with the email. Today we took it up a notch (again) and made form validations for numerous input fields each having their own quirks.


This page (apologies for the lack of style) has numerous features. First it ensures that each input field has some valid data, makes sure the name fields don't have numbers in them, password has to have at least 7 characters, the birthdate has to be a valid date, and there needs to be a file chosen for upload. When any of these requirements aren't fulfilled, error messages are outputted and the respective input fields are highlighted. This pretty much is about what you'll find on the majority of web applications.

I'm starting to get very very comfortable with PHP. I gotta say it's extremely easy to use because you can simply enter your PHP code right into the HTML section (or wherever its needed). Up next we are going to learn how to connect these types of forms and store them into the database and also retrieve them. Exhausting but very exciting!

Wednesday, May 28, 2014

Day 13: PHP Forms and Validations

Today at the Dojo we really kicked things up a notch learning how to use superglobals to validate form inputs and protect hackers from malicious attacks. I have previous experience with rails but I never really understood how it validated the data. All I really did was put validates: presence: true, etc. in the model and all the validation really takes care of itself. Through PHP, I'm having to create a file commonly called process.php that checks all the form inputs to see if they meet criteria.




Our first assignment was to create a simple site (top pic) that consists of a input field that validates the data. If the data was not valid, the page would redirect to the original page and display an error message above the form (middle pic). If the input values were valid, then it would redirect to a success page. Although it was a very simple app, it's just the first stepping stone to more sophisticated applications.

Here's an example of my PHP code that validates the data.


Tuesday, May 27, 2014

Day 12: Advanced sorting algorithms and CSV

This morning lecture was just a quick demonstration on how to write PHP more accurately and with minimal bugs. Ultimately you write out all your code to get a good idea of where the repetition occurs so you know where to put in loops. Another important thing that was noted was to make sure that you work on one feature at a time. A lot of times when we're coding we get really ambitious and work on a bunch of features and then all of a sudden our code doesn't work. If we were working on one feature at a time it would be much easier to figure out what we did wrong. I'm personally still working on it because a lot of times when I'm coding I'm almost certain that every thing will be fine. To be fair it usually works out great when I do that. However the times that it doesn't and I end up spending hours trying to figure out my code is not worth it.

As I made steady progress through the PHP, there were some optional assignments for me to work on. They were sorting algorithms which were more advanced than what we had. We had the usual selection sort, bubble sort, and insertion sort, but there was one in particular that took me at least 90 minutes to get working with all cases: the Radix Sort.


Although it took me an incredible amount of time to figure this out, this is all about "paying your dues". Every great programmer has taken their time to figure out these algorithms to train their brains to think like a machine. These algorithm-type challenges seem to be very common during interviews and I want to make sure that I am a beast when it comes to these.


The learning platform wanted us to post these solutions up on github. I know one day I'll become a great programmer and look back and laugh at how I used to solve these algorithms.


After figuring out the 4 algorithms above and writing them in PHP, Ruby, and Javascript, I was off to working on additional optional assignment. On the top-right, you'll see a CSV file. Although they aren't commonly used by developers, once in a blue moon you might run into them and Coding Dojo wants us to at least have an idea of where to look when dealing with these types of files. The code listed below shows how I pulled data, line-by-line, from the file and echoed the HTML with proper formatting.

What's interesting about this assignment as well as some of the others recently is that there wasn't much guidance and I think it's all intentional. When we leave Coding Dojo and enter the workplace, we aren't going to have a learning platform that has a list of the necessary functions. The places that we look are the documentation as well as google. It seems like great developers are extremely good at using search engines to solve bugs. 

There is a lot to be learned with PHP and I feel a lot of my classmates are getting exhausted. I heard Michael Choi say, "Wow you guys are all working on the optional assignments? I think that's a first!" We are all probably very exhausted because we are extremely determined. I get a sense that as a class, we have a culture of over-achievement and are perfectionists. When I'm not "plugged-in", I glance around the room to see classmates practicing algorithms over and over again on the white board. On the other side of the room, a pair would be having a discussions about cryptocurrency while another pair would be reviewing each other code.

Although my brain is fried at the end of each day and the amount of learning can be overwhelming, I'm glad to be a part of this experience. It's so easy to quit when you're learning all this material on your own, however being with all my classmates and having this culture of perfectionism really keeps me going every day.

Monday, May 26, 2014

Day 11: Beginning of PHP

Woke up this morning and opened up my email to be notified that I passed my yellow belt exam! When I arrived to class today I received one of these cool stickers to show my accomplishment.


 I just now need to get green, red, and the difficult-to-obtain black belt that only about 15% of students get within the 12-week timeframe.

So after focusing primarily on front-end development with HTML, CSS, and jQuery, it was time for us to learn our first back-end language, PHP. This language has honestly gotten a bad reputation (I don't know exactly why) but all I know is that a lot of people know how to use it and since there are more programmers that are proficient in PHP, the pay is much less than what you'd expect from a developer. Furthermore I heard there are some weird quirks about it but nevertheless it remains a very popular tool.


After watching a bunch of videos talking about PHP and how to use it we first started off with a series of algorithm challenges to make sure that we know what we're doing before moving onto the assignments. The most annoying thing about PHP really is syntax. It's so funky and unique from the others. I've had programming experience primarily in Java, Javascript, and Ruby. PHP is quite different. But I must say, the way you use PHP is mighty impressive.


Here I am embedding PHP directly into the HTML and generating content by extracting data from an array and "echo"ing HTML blocks. This method may look a little ugly but it seriously reduces your code significantly.


Not only can you use PHP to generate HTML, you can pretty much generate anything. On the picture above I'm using PHP inside a CSS stylesheet and allowing the color attribute of the h1 and p tags to be randomly chosen using the rand() function.

We've only started PHP today so there really isn't much to report. It was honestly a pretty exhausting day of learning an entire new language and syntax. A lot of my classmates were also having some brain overload of knowledge. But we all know that we just gotta keep pressing forward.

For the rest of the night I'll be working on the next assignments which are a bunch of sorting algorithms like Radix sort, Selection sort, etc. Coding Dojo wants us to write them in 3 languages: PHP, Ruby, and javascript. Fun stuff!

Sunday, May 25, 2014

Week 2 Weekend: jQuery Mobile

I was coding a little bit over the weekend just to get familiar with jQuery Mobile. Nothing too intensive as I took Michael Choi's word to get plenty of rest.

I started on my idea of doing and interval training timer.


It turns out figuring out how to get the actual clock to work on the device was a little more complicated than I expected. I didn't want to spend too much time trying to figure it all out, so I just worked on the layout, implemented cool page transitions, and made sure I understood how to deploy an app.

What you might notice about the code above is that it's all one page. Although my app may seem like its moving from page to page, it actually a one-page code. The transitions move the screen from one <div data-role="page"> to another.


And here is my first draft of the page. Pretty nifty. It works on tablets as well. I felt like it was good enough just to test it out and make sure that it works. First I push my files to github and I link it with build.phonegap.com. What they do on that website is they take whatever repository you choose and make it available for download.


I scanned the QR code you see on the right side of the picture and tested it out and it works pretty well! Kind of laggy though but it works!


So that's it for coding this weekend. Gonna take the rest of the night off and gear up for tomorrow!

Friday, May 23, 2014

Day 10: MongoBD, jQuery Mobile, and Yellow Belt Exam

Alrighty so in the morning before the lecture I continued my learning about noSQL databases. With the lack of structure that MongoDB has, often times you have to specify the relationship between the tables so that they'll connect. I went through an online tutorial on how to install and use MongoDB and for the most part they do a good job on teaching you the basics. Michael Choi just wanted us to explore what a NoSQL database is like so there wasn't really much structure to my learning.



Here is a screenshot of my making queries and adding data to the terminal (just the usual tutorial stuff). I can understand if this stuff is a little bland but databases aren't very flashy in general... unless you're the type of person that thinks data is sexy.


In the morning lecture Michael talked about Mobile design and the types of things that you have to consider when designing a web application for mobile. First and foremost, did you guys know that there is a 300ms delay before your phone even begins to make a request to the proper server? 300ms doesn't seem like a lot of time but we humans have become so accustomed to seeing this quicker so that delay can really make or break an application. There are two options for fixing this delay. One is the make a native application. Android is written in Java and iOS is written in Objective-C. The problem is if you want to make your application available in all platforms, you have to write it for each platform.

Another solution is to write a single-page application in HTML, CSS, and Javascript and do the proper things necessary to make it available as a mobile app.



jQuery Mobile a framework that makes it easier for an HTML/CSS/Javascript application to be deployed. I haven't really worked out all the details of it. But it's definitely something that I'll be working on tonight and throughout the weekend. My goal is to make a functional application by the end of this weekend. I'm thinking of doing something simple like a stopwatch app for interval training.


After some more self-paced learning, we had our yellow belt exam in which we were tested on our HTML and CSS skills. We don't get our results until Monday but I felt pretty confident about everything (of course we're only getting started). We were allotted about 4 hours and it took me about 3 hours to finish. The test kind of through me by surprise because it was more difficult than I expected. Nonetheless it's the weekend now and time to give my mind a break. Michael was telling each student to get plenty of rest this weekend because starting next week is when the real stuff starts. We're going to be learning procedural PHP and how to connect it to the database and the front end. We'll be building our first fully functional app in which we built every component. Exciting times to come!

Thursday, May 22, 2014

Day 9: More complex SQL queries and Intro to MongoDB and other NoSQL databases

Every time I sit down and write another blog post reflecting on what I've learned that day. I can't help but be amazed at the speed at which I'm picking up these topics. One of my classmates who's had a lot of experience with SQL was telling me, "You guys have no idea how much time Michael Choi has saved you because he's not teaching you useless junk that you'll never use." When self-learning, it's really easy to get lost in the mess. The quality of documentation varies highly with some being unnecessarily verbose and some being completely useless. Tutorials are extremely hard to come by. There is lots of value in fully immersing yourself into this.

Back to the topic of SQL queries. Take a look at the screenshot below. If you see on the upper left, you see how complex relationships can be. Often when you want to grab two pieces of matching information, you have to connect multiple tables together and filter the information as necessary. 



Repetition really is key when learning new things and coding is no different. Sure there's a way to learn the concept. But when you make your skills applicable, you have to do it over and over again to build that muscle memory. I'm proud to say that doing SQL queries over 8 hours today, I am very proficient and only refer to my notes on complex situations. Other than that I can write basic SQL queries effortlessly. This skill may not seem very useful, but it will be once you can have your application write to the database dynamically.


Here is just another screen shot where you can see that my queries are becoming much more complex depending on how specific we want the data to be returned. This topic was very dry when I first started but now I zoom through this pretty quickly.

In the grand scheme of things, there are two types of databases: SQL and NoSQL. SQL databases have pre-defined columns such as: name, age, birthdate, etc. and the data is inputted based upon those pre-defined column names. On the other hand, No SQL databases don't have pre-defined column names and can be created dynamically.

Which one is better? As with most questions that ask which technology is better, the answer is always "It depends".

SQL databases have more structure and No SQL databases have more flexibility. Whichever is more important for your application is the one you should be using.


At the end of the day, I begin to scratch the surface of NoSQL databases. This will definitely take the majority of the rest of my night and the next day.


Michael Choi is making some changes to the coding dojo curriculum in which we're to learn the MEAN stack (MongoDB, Express.js, Angular.js, and Node.js). He actually did a quick tutorial for some of the alumni and some of us who were ahead of the curriculum were invited to join. Now I already knew Michael Choi as an impressive teacher, but the speed and the accuracy at which he could code was out of this world. There wasn't a bug he couldn't fix within 30 seconds and had an extremely efficient style of coding. He built a functional app integrating express into node, attaching the MongoDB, and integrated a front-end framework, Angular, into an application in about 40 minutes. All while answering questions and explaining what he was doing. Most of this stuff was WAY over my head but these are all things that I'll be learning in the weeks to come. Even though I didn't understand things, I found it very beneficial to be in that environment and exposed as early as possible so that when I do see the topics again, it'll be much easier to absorb.


Well that just about sums up the day, tomorrow is my "Yellow belt exam". It's a 4-hour exam in which I'll be tested on my HTML and CSS abilities. I'm pretty confident in my skills in those areas so I don't imagine it'll be too much trouble.

Wednesday, May 21, 2014

Day 8: Database design and MySQL

Although I have one last optional assignment left in the jQuery section, I decided to get to it later and focus on what we're learning now: Databases.



Here is the morning lecture notes about how databases connect. I was actually quite relieved to see some familiarity because I saw this syntax when I was learning Rails. Rails uses SQLite by default which is a SQL server, yet I really had no idea how the database worked. I assumed it was all part of the "Rails Magic", which is quite dumb of me. If you are to become a programmer, you should understand what's going on behind the scenese so that you'll be able to make proper adjustments as necessary. If you don't understand databases, you really will have no idea how to scale your application properly.


One of our first assignments here was to take a wire-frame and figure out all the relationships between objects so you can make proper connections in the database. The application illustrated in the wireframe is for a blogging website (just like blogspot), where users can create posts, other users can make comments, etc. The program that we use here to make the tables is MySQL workbench. There were lots of videos on the coding dojo learning platform showing us how to do this. There really was a lot to learn. Some of these relationships can get quite complex like the one illustrated below. But of course, nothing compared to the complexities of an application like Facebook.



To be honest, I was a little shell-shocked when learning SQL(structured query language). Like I mentioned before, I had no exposure to database besides "Rails magic". Learning a new skill like this is just like exercising a new muscle. When I lift something heavy at the gym, I often pace around to take a break and recover. I found myself doing the same thing when learning SQL. After each learning segment, I went to the couches, rolled around for a little bit, then proceeded back to my computer for another set.

With each set, my brain grew stronger and after hours of looking at the code, I started seeing patterns and had my "ah-ha!" moment. It's amazing how it would've taken me at least a week to get to where I am after 12 hours of being at the Dojo. I give lots of credit to the curriculum and definitely a lot to the community. Knowing that we're all in this together really helps me to keep going.

Now I know how to import a database and make queries to retrieve the data that I need.


On the screenshot above, I'm making a request to the database to give me the country name, language, and percentage of speakers of all countries that have people that speak Slovene.

At the start of the day, I felt pretty defeated because in the prior week I was blazing through the front-end development topics(HTML, CSS, jQuery) and now my progress has significantly slowed. But as I slowly chipped away at the information and dissected the syntax, I was picking up lots of speed and am pretty satisfied at the progress I've made today. Tomorrow, I'll just be adding on top of my knowledge and hopefully be typing SQL without having to reference any lists!

Tuesday, May 20, 2014

Day 7: Debugging javascript, Dynamic content, Form submitting, jQuery UI, Parallax Scrolling, and other javascript libraries


I find it pretty funny how the titles of my posts are getting longer and longer. That's just cause we cover so many topics each day yet go quite in depth with each one. That's what happens when this is all you're really doing for 13+ hours a day.

This morning lecture was about debugging Javascript. Michael Choi really emphasized the usage of Developer Tools that's already in Google Chrome. It's awesome that you can see the all the files that are part of the page's rendering, not to mention how you can alter the DOM and set breakpoints to figure out where the bug is. Another thing that Coding Dojo really emphasizes to stop thinking like a human and to think like a computer. Humans have a tendency to find patterns and without seeing the details, which is very problematic in debugging. Afterwards, it was back to working on assignments.


The last assignment in the basic jQuery section was to create a page that has a form where the user can submit data. The data would be used to create a "card" that displayed the inputted name on the front. Upon clicking the page, the inputted description would show up on the card. The beauty of javascript is that it is event-driven. Other languages like Ruby, Python, and Java (which are procedural) stop running after the code has been read. Javascript on the other hand keeps running while waiting for events to occur, which make its an ideal language candidate for a system like node (which we'll be learning starting week 8).


Next segment was using jQuery UI. This is a really great method to add a bunch of segments and characteristics to your code by using some jQuery UI files. For example, they made it extremely easy to make an image draggable. Each of the pieces of the ninja puzzle above are draggable and can be put together like a puzzle. All was possible by simply copy-and-pasting some code. Really makes life easy for developers everywhere.


jQuery UI isn't the only javascript library. There are thousands of libraries out there. For one of our last assignments with jQuery, we were to pick and choose 3 libraries to implement in a project of your choice. I personally have an obsession with parallax scrolling. Even if you don't know what parallax scrolling means, you probably have ran into one and thought to yourself, "man this is really cool". Becoming great at parallax scrolling is one of my main objectives of this bootcamp and my final project will probably implement it. Definitely something that I have to revisit in the future weeks. As for now I have more jQuery to learn.

Monday, May 19, 2014

Day 6: basic jQuery, debugging javascript, and traversing the DOM

Boy did that weekend go by quickly. On Saturday I worked a little bit on responsive design just to keep my brain still going with the knowlege. But on Sunday I definitely made sure to get plenty of rest so that I can recharge.

The first week is now behind us and I feel like I have a great understanding of HTML and CSS and these upcoming weeks, I will continue to master it through repetition.

This morning's lecture was on the foundations of jQuery, the popular javascript library that makes it extremely easy for developers to make their web application interactive. I previously made a little game using a lot of jQuery and boy did it really help today.

Although the lecture was meant to cover foundations, Michael Choi also went into pretty advanced topics like callbacks. He wanted to expose us to these more advanced concepts early on so that we'll be able to have a good understanding.


Our first jQuery assignment was to create a webpage that illustrated 18 of the most used jQuery functions. This was honestly quite a tedious tasks. But honestly it really forced me to understand what each function was doing in order to finish the assignment. Coding Dojo wants us to learn these and not every single one in the jQuery documentation, because you'll be using these functions over 99% of the time. If there is ever a time when you need to use a function that's one of these, you can just look it up in the documentation. This is a reasonable list of functions to memorize by heart, which isn't too hard to do granted that they're pretty self-explanatory and we'll be using these functions repeatedly throughout the assignments in this section.


After doing some assignments using jQuery functions, I found an assignment in which we were to clone a repository from github and debug it. Javascript is pretty unforgiving in that if you have a minor typo in your code, all the functions in the code may not work or the page might not even show up at all.

I really had the pay really close attention to the syntax. There were 5 mistakes in the code and the page wasn't going to render properly until you fixed every single one of them. Usually with HTML or CSS, you slowly gain functionality with each bug fix, but with javascript that is just not the case, it's really all or nothing.


The last assignment I could get to today was an assignment where I had to traverse the DOM using jQuery selectors like .parent(), siblings(), and children() and apply the necessary functions on those elements.

I really feel strong about my knowledge and trust in the curriculum. The structure is made so that you get what you put in. I was able to help some of my classmates with some of their problems they were having. The funny thing is that 80% of the problems they were dealing with wasn't due to a lack of jQuery knowledge at all. It was usually problems linking CSS and JS as well as connecting bootstrap and jQuery. I feel like I've seen so many of these little issues that I've grown a keen eye for the little details and clues that point to what the origin of the problem is.

I got about a half a day of jQuery left to do, so I'm going to try and finish that as well as finish the optional responsive web design courses. We're going to be learning SQL and databases in general later this week. The topic that I have absolutely no knowledge of so gotta make sure I can allot lots of focus and energy in learning that topic.

Friday, May 16, 2014

Day 5: LESS, Boilerplate, and responsive design techniques

This whole week we've been working entirely on HTML and CSS without the use of any preprocessors. This morning's lecture was an overview of preprocessors for HTML, CSS, and Javascript. Although it is very elegant to write using those preprocessors, if you do not know how the code that the browser reads ultimately looks like, it can be very difficult to debug your code. This is one of the reasons why Coding Dojo has us write strictly in HTML and CSS. Once we understand how to write them using the correct syntax, learning the preprocessors is very easy.

The second part of our lecture discussed a way to scale your application by using caching. It's just simply a way to store data that is commonly retrieved so that the database or web server doesn't have to constantly search for the same data (e.g. "Top ten items purchased this week"). It can just be stored on some memory known as cache. It was just a high level overview and I'm sure we'll go more in depth next week when we learn databases.

The next assignment on my checklist was to learn LESS. Less is a preprocessor for CSS. We'll also be learning Sass but since Less can be run on the client-side (and we've only been working on client-side so far), we first learn Less. I've already had a bunch of Sass knowledge from Michael Hartl's Ruby on Rails tutorial and Less really isn't that much different. Our task was to refactor our CSS from a previous assignment.


My CSS is on the left and LESS is on the right. Although we indent in CSS for readability. The LESS syntax is so much cleaner. Not to mention the ability to use variable for complex things like HEX codes that can be prevalent throughout a stylesheet. Learning this stuff was a breeze but I definitely needed some sort of refresher with mixins and other more advanced tools.

About 3 students in our cohort including me finished the LESS assignment (which was the last optional assignment for the week), so Michael had us expand our learning by expanding on responsive design as this was really the future of website designs.

The tools that we were learning were HTML5 boilerplate, 1% CSS Grid system, and Picture Fill (which resizes your photos based upon the viewport size).


Our assignment was to create a fake blog using Lorem Ipsums. I found a hilarious Lorem Ipsum generator with lines from the show "The IT Crowd", so I decided to use that theme.

Using boilerplate and Grid systems were much harder that I expected. I really felt like these assignments were an "appreciation for bootstrap and other front-end frameworks". I feel like developers often take for granted these awesome frameworks that make it really easy for you. The second part of this assignment is to work with different front-end frameworks like bootstrap, foundation, and skeleton which I'll probably tackle this weekend. We're starting JQuery on Monday so I want to make sure that I get this assignment checked off before we continue.


To be honest, today really did feel like a Friday. After tackling HTML and CSS code relentlessly for the past 4 days and some difficulties getting sleep, I started to slow down. I'm going to take some time away from coding this weekend to recharge so I can be fully ready to take on more coding next week.

Although I am a little tired, I am nonetheless very happy and excited about my future. There is nowhere else I'd rather be right now!

Thursday, May 15, 2014

Day 4: Github collaboration, Twitter bootstrap, and more CSS.

I'm making great progress through the CSS portion of the class. After talking with some of the students from the previous cohort, what I'm feeling is about right. Things really start to pick up in the later weeks when we start learning Javascript and PHP. Not saying its a walk in the park right now. But if you've been committing around 12 hours a day at the Dojo like I have, you'd be in pretty good shape. I'm doing my best to keep up this good pace and not get burned out!

The morning lecture was about github collaboration. Michael went over how to create branches on the remote repository, how to merge when back on to the master branch, and how to deal with conflicts. Then it we were paired off and we practiced how to use github.


Our assignment was to work simultaneously on a project making changes to the repository and pushing them to github, all while making sure that we had the latest version of the accepted code. Furthermore, we had to intentionally create a code conflict and figure out how to edit the code so that the conflict was resolved. This activity was actually much more difficult than expected. It's not that the activity was particularly hard. But sometimes we would accidentally enter an incorrect command into the terminal and there was a lot of troubleshooting going on. Strength through struggle I guess!


I'm about 2 days ahead of schedule but Coding Dojo really has a lot of optional material that you can use to further your learning. I love this aspect about the Dojo because you can go at your own pace. The first optional assignment was learning Twitter Bootstrap. We'll definitely be going more in-depth with bootstrap, but right now we had the option of getting our feet wet. I wanted to create a personal website but I just decided to make a small website about Coding Dojo's curriculum.


Bootstrap's mobile-first responsive design is quite magnificent if I say so myself. It's no wonder its such a popular tool to use. It really makes me much more confident when tackling website design. Michael only wants us to be spending no more than 8 hours on bootstrap at this time as we are definitely going to be going more in depth when we make our projects.

After playing with bootstrap for about 7 hours, I decided to work on the second assignment to create a periodic table.


It seems really really easy however the catch is that you're not allowed to use tables at all. This assignment took me way longer than I expected it to. I ended up writing a lot more code than I wanted to. The output of my assignment is looking great but the underlying code looks pretty bad. Gotta definitely make it a habit of writing elegant code from the start. Of course that all comes with time and repetition.

Wednesday, May 14, 2014

Day 3: More CSS, Git version control, and first day of pair programming

Once again I could barely get any sleep last night as my mind was constantly thinking about code. A fellow classmate was telling me about how he shuts off his brain about an hour and a half before he intends to sleep. I need to start implementing that because I really need to get better sleep if I intend on continuing as this fast pace.

This morning once again started off with a lecture. The topic was a more in-depth knowledge about git version control and the major functionalities of it. We learned the difference between push, pull, clone, pull requests, etc. Once that was finished we had our first day of pair programming, where we'd be working on a CSS assignment similar to what we've been working on.


We were using an online website called collabedit.com, a site where you can upload code and it updates real time. It was pretty awesome. My partner and I took an approach in which we decided how we were going to break up the layout, decide who was going to take what part, then code from there.

I made the rookie mistake of us working on overlapping sections of the layout which caused conflict in code. Luckily we were able to salvage the mess but we became significantly behind.

Ultimately to be great at pair programming, the two workers shouldn't be messing with the same parts of the code and there needs to be absolutely clear communication. You can't be working on a certain part of the code without speaking up. You two could end up making less progress than one working alone because you are constantly being counterproductive.

We only had one hour of doing pair programming (which went by EXTREMELY fast), then we proceeded to present our code and be critiqued by Michael Choi.


Michael is making a great effort to write elegant and clean code from the start before we even develop bad habits. His points of emphasis are: proper indenting, no unnecessary tags (divs especially), and good naming of id's and classes.

Wednesday was sports day so we went to the park to play ultimate frisbee(my suggestion. Woot!) and everyone had a great time. The weather was really awesome too so we even had Potbelly delivered right to us at the park. It was really fun but of course we weren't attending Coding Dojo to play frisbee so a lot of us wanted to head back.

4 o'clock rolled around and once again we worked on algorithms to make sure that we are keeping our brains sharp and that we'll be ready for technical interviews.

All in a days work!

Tuesday, May 13, 2014

Day 2: More CSS

Day 2 started off with me started off with lecture from Michael Choi. He was walking us through how to scale a web app so that we have at least a high level of understanding. With web application there are 3 potential bottlenecks: the server, the database, or the interpreter. He went one to explain how people deal with each type of bottleneck so that users requesting data receive their information quickly. He made a brief remark about the beauty of node.js and how great it serves data. I am really really excited to learn and gain a really strong understanding of it. Furthermore he started talking to us a little about git version control and how to add changes and commit then to our local repository.

Then the day continued with another CSS project in which we have to look at a webpage and re-create it from scratch. Here's an example:


The webpage we are re-creating is on the right, while my code that's rendered on the browser is displayed on the right. The important thing here really is to minimize the about of HTML. Let HTML simply be the content and let CSS do its job by styling it.

I was having a conversation with some classmates about how hectic CSS can be. How you can take so much time to make such a small but crucial adjustment. Michael Choi was pointing out how that it's not so bad when you get to write the CSS from scratch. It's really bad when you're inheriting someone's code where it could span thousands of line. Sometimes you change one line of CSS and the whole layout is destroyed. That's why he emphasizes elegant code so much. You don't want to become one of those programmers that write terrible code that makes another programmer's job a nightmare.

I really feel the improvement that's coming with repetition. Before I really didn't understand what was going on when I saw the words: inline, inline-block, and block. But now I have a clear understanding. I understand alignment and really understand the process in which a browser processes a source code.

Once again most of the students left the Dojo at around 7pm. One thing to note is that the Dojo doesn't necessarily have high standards for accepting students and beginners are welcome into the programs. When the 4 o'clock algorithm class commenced, there were many students that understood or already knew how to write the algorithms and there were some that were looking at code for the first time.

I took it upon myself to help out a newbie coder who was also staying late with me so that he could understand what was going on in an array when we were looping through a for-loop. The function was storing values in the Fibonacci sequence. At first when he was looping through the function, he had difficulty understanding the difference between variables and indexes but after each subsequence one he was calculating and assigning quicker and quicker. It was really rewarding watching the lightbulb go off on his head when he was said, "This is just like the Fibonacci sequence!". To which I replied, "Yes! This is exactly the Fibonacci sequence!" Moments like that are really why I like to teach people. It's quite a rewarding experience for both parties. Because I know how to teach a concept, I feel like I've mastered it.


Now it's time to sleep and get some good rest before another 12+ hour day at the Dojo. I'm really pumped to make more progress as we continue this journey. There's a sense of comraderie that's for

Monday, May 12, 2014

Day 1: Starting with the fundamentals. HTML and CSS

Last night I organized a little get-together for some of the classmates. Only 4 out of the 12 students showed up but it was really interesting to get to know a lot of where other classmates backgrounds were. I just wanted to get to know some people before the whole journey begins. It really helps to know some people before you start something like this.

To summarize the first day: it was awesome.

The first morning started out with a bunch of introductions as well as setting expectations for the class and how it was going to be run. Coding Dojo has a curriculum in which you watch online videos that they specifically made for the bootcamp. A lot of it is self-paced, which I really liked because I feel like I have a solid concept of what we're learning and don't like being slowed down.

After introductions, Michael started off with a lecture on http requests and responses and the anatomy of the internet. Even though this was pretty fundamental stuff, I actually learned a lot and really appreciated the fact that we are learning from the ground up. For example, I didn't know that when you make a request there is a list of domain names that are correlated with a server called the DNS (domain name server). I just thought... well... I didn't really think of it at all. But I'm glad I know it now. I have a feeling I will be experiencing a lot of these moments. Where you'll be taught something that you never really thought about but are nevertheless very important concepts to know.

Once we finished the lecture, we began our online curriculum. First things first, we learned HTML and CSS. The course has really been refined over the course of 4 years and Michael (the founder) has done a great job of trimming out the fat to make sure that our learning is accelerated as fast as possible. There are a million things to learning HTML and CSS but we honestly don't need to learn everything. Most developers don't even use them at all. So we learned what we need to learn, master it, then move on.

I blazed through the HTML portion and am currently making great progress on the CSS. I'm amazed at the brilliance of the curriculum. I honestly feel like I have a great understanding of how all the sections are designed. For our HTML/CSS assignment, we had to take a website and recreate it without using any source code. By doing so, I already have quite a solid understanding of CSS.

I really like the teaching style of Coding Dojo in that they really make you do projects on your own. And you really have to think critically in order to complete all the projects. I've done plenty of Codecademy, Treehouse, and Code School, but a lot of those things are just tutorials and you often become just a great typist (as Michael Choi pointed out) rather than become a great programmer.

At 5 o'clock we had an algorithm lecture and Michael Choi went over really basic things like variable assignments, conditional statements, and printing. Although it was really basic, he really wanted us to think like a computer. Rather than trying to figure out all the code in your head, he told us to take it line by line and process the information like a computer. I really like how this class is going so far. A lot of the focus is on the philosophy of learning and coding and I know it'll pay great dividends in the future.

Most of the classmates left at around 6 and everyone except me left at 7. Luckily there were 2 TAs there that were part of the previous class. We drank a couple beers and chatted about our lives and did a lot of connecting. After a bit of socializing, I went back to my assignment because I hate leaving things unfinished. I'm really trying to stay ahead of the class, so that when we hit the harder topics, I'll have much more time to really digest the things that I don't understand, especially when I hit node.js.

Anyways I finished at around 9pm and headed home. I'm really excited to really more and continue to make great progress on the assignments and my personal learning. But I definitely need to get good sleep if I want to do so!

Oh and I did manage to ask what percentage of students get black-belt certified. Michael said about 10 to 15% of students get certified within the 12-weeks, however you can stay longer to get certified. You are able to take the exams as many times as you need. I am definitely gunning for the black belt. 

For those who don't know, Red-belt certification means you demonstrate expertise in 1 programming language. Black-belt means expertise in 2. I'm extremely motivated to learn and have committed myself to this. I hope I can keep the fire and the motivation strong!

Friday, May 9, 2014

3 days until it all begins

I am beyond excited for this day to come. I have a feeling I won't be able to get any sleep at all the night before. I feel like I've hit a wall with my self-education and can't wait to get that full immersion to propel my learning. I've been really focusing heavily on the fundamentals and getting a good amount of familiarity with the programming languages we'll be using.

I have foundations in: HTML, CSS, MAMP, Twitter Bootstrap, Parallax Scrolling, Node.js, Javascript, JQuery, PostgreSQL, Ruby on Rails, and wire-framing.

I did find something interesting on Coding Dojo's new website. They have a new statistic stating that 91% of Black-Belt certified graduates get a job within one month of graduating. That's pretty impressive but I know that they probably are including those that get internships and those that are hired by the school. Either way, I feel like I'm in pretty good hands with those stats. Oh and I'm pretty sure there are many students that don't get a black-belt when they graduate. Sounds like a good question to ask on the first day

FYI, Coding dojo uses the belt system in which the more knowledge you have, the higher belt you receive, with each belt having a test. I heard these tests can take hours to complete.

I really do like the idea of becoming an instructor for coding. I already teach some of my friends as well as one that's going to start bootcamp with me. It's a rewarding feeling when I hear the lightbulb go off in their head and they say "Ah-ha!".

Other than that, I can't wait to start. I've purchased headphones, Sennheiser 280 pro. Apparently it's the go-to headphones on a budget and its really true. They sound amazing and they were only like 60 bucks. Definitely recommend.

Until this day arrives I'm just going to be working on some algorithms that are in "Cracking the Coding Interview" by Gayle Laakman McDowell. Which is pretty much a book that preps you for coding interviews that are common amongst big companies like Google, Yahoo, and Amazon. I'm sure some smaller companies use them as well. The bad part is that they expect you to code in C++ or Java, which I am not comfortable with.

Well I better get started!

Thursday, May 1, 2014

A little over a week until it all starts!

Hey everyone,

Just thought I'd check in with the people that are following me. I'm exactly 11 days before the start of the bootcamp and I am extremely excited to get things on the road.

After doing a bunch of tutorials I decided to start building something of my own. I created a little game that's not yet ready for production but everything is fully functional. I just need to create more levels for the game. It's primarily done in javascript(jquery). I'm extremely surprised at all the things that jquery can do and what it cannot do unless you tell it to do so.

For example, I probably spent a good two hours trying to figure out how I can have the program wait until a certain animation is done. I then figured out that you can use a callback, which is simply a function that runs after the function that's nesting it is finished executing. I learned about callbacks in at least two tutorials, but I never really understood exactly how to implement it until now.

Another thing that I'm quickly learning is to take the time to write elegant code. For starters, I'm naturally an impatient person that likes to get things done as quickly as possible. I would simply write whatever code would make the code run, ignoring all organization and D.R.Y. (Don't repeat yourself) principles. This technique never really got me into trouble because I never wrote long pieces of code. But now that I'm using those bad habits into my code that spans over 200 lines, I'm finding my code extremely difficult to read. I'm thinking to myself, "Did I even write this stuff?" I can only imagine how crucial things like this will be when I'm working in a company where they have thousands of lines of code.


Last thing before I finish up the blog post. I reached out to a bunch of my future classmates and communication with about 3 of them on a regular basis. I'm very much a people person and love getting to know people. I decided to set up a dinner for all of us to gather and get to know each other. I got 4 out of the 8 confirmed students and a couple more will let me know if they'll be available that night (they're coming the night before the bootcamp starts! Talk about cutting it close!).

Overall, I'm really liking the vibes I'm getting from my future classmates. The more I talk with them, the more I'm starting to think that I actually have the most exposure to the actual languages that we're going to be using(front-end, node, and Ruby on Rails). There is one guy who's currently working as a visual designer at Zappo's and very comfortable using Photoshop and Illustrator (super jealous of those skills). You can never go wrong learning those technologies. I just hope that I'm one of the students that is a little ahead of the others so that I can help other students. I heard that Coding Dojo hires their own T.A.'s and instructors from these bootcamps and I wouldn't mind teaching people how to code every day. Teaching people skills that have a great R.O.I. would be so rewarding. Much better than being a college professor.

Time is flying by. I can't wait to start!