. .

Async in sync

For a concurrent language like JS, developers have to deal with a lot of asynchronous workflow. One of the hardest things to accomplish with asynchronous code is to make it run in serial order (serial, as in, the opposite of parallel).

The default way to go is using callbacks, even if it sometimes leads to the callback hell.

  foo(function(fooResp) {
    console.log(fooResp);

    bar(fooResp, function(barResp) {
      console.log(barResp);

      buzz(someVar, function(buzzResp, err) {
        // handle response and error
      });
    },

    function(err) {
      // handle error
    });
  });

As the language evolves, we get newer syntax and techniques to deal with this problem.

Read more

Ye Olde Generators

Generators are one of the features that were added to the language’s core in recent times. And people really like generators (though not more than the spread operator).

But just like the new class, generators aren’t something that didn’t exist before. Sure, the syntax didn’t, but even in the ye olde days of ES3, writing generators was possible.

Read more

2017 Thus Far

New Year, New Me and a bunch of whole new irritations.

Read more

Browser history functioning and loopback gotcha

According to MDN,

The History interface allows to manipulate the browser session history, that is the pages visited in the tab or frame that the current page is loaded in.

But how exactly does the browser keep track of the visited pages?

Read more

Animating Dots & Dashes

Using dashed-dotted-lines to create sweet and simple animations.

Read more