Paras Sharma - Blog

Summer of Javascript

2 July 2017 • Paras Sharma

With the leap of Monsoon, I thought of sharing a story of the exciting experiences I had this summer. Recently, I got an opportunity to attend 4 weeks Javascript Bootcamp organized by Statusbrew in the city of Amritsar, India.

To get an entry into the Bootcamp all the applicants had to clear a test. After the test and telephonic interview, few got selected and luckily, I was also among those few selected candidates.

The goal of the Bootcamp was to code 240 hours in javascript and get rigorously trained in developing quality web applications using javascript frameworks like Angular, SailsJS, which we obviously did.

The days at Bootcamp were fabulous. We were a team of 6 enthusiastic coders with only one goal in mind i.e to gain javascript knowledge as much as we can.

So let’s start with the things that I learned and exciting things we all did.

Exploring Javascript

Before getting into boot camp I was having very basic knowledge of javascript and mainly used it for frontend DOM manipulation. But after getting into boot camp I got to know about Javascript’s real power and figured out why it is most popular language.

I got to know about many amazing concepts of Javascript and different programming paradigm.

Stickers made our day

Aligning our brain cells to Asynchronous Javascript

Javascript often follows asynchronous behavior which was pretty confusing for those who were from the synchronous programming background. Asynchronous nature of javascript is handled via callbacks and event loops.

Let’s take an example:

Let’s make a promise

Promises are one of the most important things in Javascript. As javascript is asynchronous in nature, therefore to handle and manage callbacks, promises are the convenient way and promises also help us to avoid Pyramid of Doom or callback hell.

Below flowchart from MDN explains promises very well.

Example of js promises:

Welcome Redux

Redux was my favorite topic in boot camp. It is all new architecture of managing flow of data in an application. Redux is an application architecture inspired by Facebook Flux. In Redux data flow is unidirectional in order to simplify the application architecture. There is a single store in Redux, containing the state for the entire application. The store is organized in a tree of objects, and it is immutable. Every time the state needs to change, a new object tree is created, incorporating the data from the previous state plus what is changed. A change is triggered when an action is dispatched to the store. An action is a simple object containing the type of operation to be executed and some payload. The change is performed by reducers which are pure functions with no side effects, and take as arguments the previous state and an action. They return the new state resulting from applying the action.

We implemented the redux architecture in Angular using ngrx and had an amazing learning experience with it.

Creating Apps: The Angular way

To practice our js knowledge we developed apps using the Angular framework. Angular gives one a magical power to quickly create frontend and manage data flow in the app. With the help of Angular, I was able to quickly connect backend with it and was able to create a fully functional web app.

I developed these 2 apps with angular:

Team Work Pays

SBCON was organized by Statusbrew which included hackathon and lightning talks. Two days before SBCON we all were told to create an Application for the Hackathon. The aim of the app was to monitor the hashtags and calculate posts engagements of all the candidates of the hackathon.

In 2 days we developed the app and were successfully able to monitor the hashtags in real time from Instagram/Twitter and also created our first app in a Team.

All the team members had a different kind of experience while working on this app. We learnt many things like team work, time management, project management and also the feeling after finishing this Social-Leaderboard App was awesome.

A great workflow is must for a team

The final architecture of our Social Leaderboard App.

Initially while working on the app, the goal seemed faded but as we started managing things and our team in an organized way everything got crystal clear. Thus, in the I learned one great lesson that teamwork pays.

End notes

This boot camp taught me many new things. Whenever I recall all the great things I learned, I trace back to the day when I first went there. It was only due to the decision of taking the first step because of which I was able to learn so many new things. I just did not learn about javascript but many other things which include discipline, time management, teamwork and much more. So I will end this blog with following lines:

If you had One shot Or one opportunity To seize everything you ever wanted In one moment Would you capture Or just let it slip? -- EMINEM

Never miss an Opportunity.