Thursday, August 27, 2015

Day 29: Ajax API With JQuery

I overslept and arrived late this morning. It turns out that about half the class was late today and the instructor had to delay algorithms until a majority showed up. I guess I wasn't the only one who was beaten up from the Red Belt exam. The instructor was pissed and reminded us that lessons start at 9AM. He'll be fine with students showing up as late as 9:02AM but not a minute later. 

Algorithms came and went and then we had a presentation from a professional engineer who was brought in to share with us his experiences. He talked about the differences between working at a big company to a small startup. Big companies are safer in terms of job security and pay rate while startups are risker but with the possibility of reaping great rewards if it is successful. During recruitment companies look for projects the candidate has participated in and when they bring them in for an interview they expect that they know their algorithms. I really need to get a book for that. 

With the Red Belt test completed for the majority of us we began a new subject: AJAX. AJAX (Asynchronous Javascript And XML) is a series of web techniques designed to work with data without users having to leave their webpage. Lets take Facebook for instance: when a user makes a post the site changes without leaving it (even for a microsecond) for the processor where the changes happen. The changes happen on the current site and becomes present without reloading the page. We're still on the LAMP stack but knowing this will be crucial for the next stack. 

And with AJAX comes an introduction to API's. An API (Application Programming Interface) is a component that could be added to an app to enhance performance and provide commonly used features like Google Maps or credit card transactions. Some of the more popular API's are provided by companies like Google and Uber that give users the ability to create an account using their google account or to call a taxi. API's are built by these companies and AJAX allows developers like us to harness their potential. 

By noon we were all free to begin the day's workload. By now we're pretty much done with the LAMP stack and most of us don't have to continue with the remaining PHP and CodeIgniter assignments. It's all the same by now and from what some of us heard we'll be forgetting much of it later on as we move towards web frameworks that are more automated and easier to use, like Rails apparently. The day's work is to begin basic AJAX.  However most of us were still tired from yesterday and we headed out as a group to get lunch in hopes of waking up. 

After lunch most of us were in a better position to begin coding. We had to go back to Javascript for this topic and I needed to brush up on that language. It felt a little odd going back to hard-coding everything after experiencing a framework and their pre-built functions. The next stack will be mainly in Javascript so this will be a good preparation for next week. 

For our assignments we had to create a site that displays all the information on Pokemon. So apparently there exists an API that lets developers get all the information on Pokemon characters without having to hardcode any of their information on our page. It took me the entire afternoon to understand it but by the time I completed the second assignment I was able to use the following, tiny pages of code:


To generate this page:


I did not code a single Pokemon character into my code. Using the rules set on the Pokemon API site the only codes that are in my pages if for how I wanted the characters and selected info displayed. 

I accomplished everything laid out for me today and I am going to go home and catch up on more needed sleep. This weekend is the North Korean hackathon at the Dojo and the weekend workload looks very light. The only real work I might end up doing would be the Red Belt retake on Sunday and if I have to take it the best thing I could do is get as much sleep as possible so I'll be in the right state of mind for Sunday. 

So good night people. 

No comments:

Post a Comment