Node Baby, Yeahhh!
To think that about a week ago I was searching for ways to learn Node and how to get started! Learning Node went from a curiosity, kind of like yeah baby, JavaScript on the server is cool, to a necessity in front of the task of creating Lambda JavaScript micro services on AWS! Yikes! Too many unknowns in one paragraph drives me nuts! True, and on May 22nd I found that on May 23rd NodeSchool was holding an international workshop... on the entire planet Earth, to help anyone showing up the basis of NodeJS, and that there was only one seat left!!! ...and I got it!!!
What were the prerequisites for this event? None, not even knowledge of JavaScript. There were teaching JS to whom ever said that knew nothing. Crazy or what!
The event was terrific, and it was held at the ultra modern Zillow's Vancouver Yaletown office. They had tutors at hand; people helping people! We had pizza and sugary drinks but the most important thing was that enthusiasm was plentiful and we all knew that we were accompanied by hundreds, if not thousands of other nut heads, all over the world learning NodeJS. Awesome!
Did I learned NodeJS? Yes I did. Here is one of my solutions to an exercise. The problem was to asynchronously collect responses from three different URLs, which are passed to the Node script from the command line. The script was supposed to collect responses and print them to stdout in the same order requests were sent to these servers. The problem is that these servers will not respond in the same order.
There are different ways to implement a solution to this problem. In fact, this is my third solution where I decided to use promises because they just felt appropriate for the scenario.
Hey, drop me a line, do not be shy!What were the prerequisites for this event? None, not even knowledge of JavaScript. There were teaching JS to whom ever said that knew nothing. Crazy or what!
The event was terrific, and it was held at the ultra modern Zillow's Vancouver Yaletown office. They had tutors at hand; people helping people! We had pizza and sugary drinks but the most important thing was that enthusiasm was plentiful and we all knew that we were accompanied by hundreds, if not thousands of other nut heads, all over the world learning NodeJS. Awesome!
Did I learned NodeJS? Yes I did. Here is one of my solutions to an exercise. The problem was to asynchronously collect responses from three different URLs, which are passed to the Node script from the command line. The script was supposed to collect responses and print them to stdout in the same order requests were sent to these servers. The problem is that these servers will not respond in the same order.
There are different ways to implement a solution to this problem. In fact, this is my third solution where I decided to use promises because they just felt appropriate for the scenario.
References
- NodeSchool: http://nodeschool.io/
- Install NodeJS: https://nodejs.org/download
- A simple implementation of Promises for Node: https://www.npmjs.com/package/promise
- Install NodeSchool NodeJS Tutorial: https://github.com/workshopper/learnyounode
- Download Git Bash: https://git-scm.com/downloads
- Free AWS Account (12 Months): https://aws.amazon.com/free/
- AWS Lambda: This is not a Harry Potter spell, no. It is a compute service which runs your code in response to events. We only write the actual body of the event handler then we tell AWS Lambds: hey, this is my handler and I am interested on this kind of event which could be a database update, or messages arriving in AWS Kinesis (an AWS stream which is like a queue but not really), or custom events from your applications. The boy of this handler function could be written using NodeJS.