[Quick Scan]Promises – JavaScript

Promises provide a simpler alternative for executing, composing, and managing asynchronous operations when compared to traditional callback-based approaches. They also allow you to handle asynchronous errors using approaches that are similar to synchronous try/catch
Promise represents the result of a asynchronous transactions.  A Promise represents an operation that hasn’t completed yet, but is expected in the future. It allows you to associate handlers to an asynchronous action’s eventual success value or failure reason. This lets asynchronous methods return values like synchronous methods: instead of the final value, the asynchronous method returns a promise of having a value at some point in the future.

A promise is in one of three different states:

  • pending – The initial state of a promise.
  • fulfilled – The state of a promise representing a successful operation.
  • rejected – The state of a promise representing a failed operation.
Once a promise is fulfilled or rejected, it is immutable (i.e. it can never change again).
In short- Helps you write/manage asynchronous calls easily

Brotli – Small Bread for Chrome is coming !

Google Chrome may be one of the fastest browsers around, but that doesn’t mean there isn’t room for improvement. Starting in the very near future, Chrome’s getting Brotli (“small bread” in Swiss German), a new page compression algorithm that decreases load times.

Brotli, which was revealed in September as a replacement for Chrome’s outgoing Zopfli algorithm, uses a more efficient data format to improve the compression of scripts by up to 26 percent. That should mean faster website rendering and better space utilization in most case, but the potential applications extend beyond mere page content. Compression engineer Zoltan Szabadka sees Brotli being used in image optimization and website pre-fetching on unreliable connections, and perhaps even font compression in scenarios where high-resolution typography isn’t a necessity (e.g., smartphones and other small-screen devices). Subsequently, Google expects all users (but especially those on mobile) to see “lower data transfer fees and reduced battery use.”

Apache Thrift: Networking Stack

Thrift’s networking stack can be represented as follows,



It provides a simple abstraction for reading/writing from/to the network. This enables Thrift to decouple the underlying transport from the rest of the system (like serialization/deserialization).


This specifies how datatypes use the underlying Transport to encode/decode themselves. Thus the protocol implementation governs the encoding scheme and is responsible for (de)serialization. Some examples of protocols in this sense include JSON, XML, plain text, compact binary etc.


Service-specific processor implementations are generated by the compiler. The input and output streams are represented by Protocol objects. The Processor essentially reads data from the wire (using the input protocol), delegates processing to the handler (implemented by the user) and writes the response over the wire (using the output protocol).


A Server pulls together all of the various features described above.

* Create a transport
* Create input/output protocols for the transport
* Create a processor based on the input/output protocols
* Wait for incoming connections and hand them off to the processor

Apache Thrift: Introduction

Thrift is an interface definition language and binary communication protocol that is used to define and create services for numerous languages. It is used as a remote procedure call(RPC) framework and was developed at Facebook for “scalable cross-language services development”.  The Apache Thrift software framework combines a software stack with a code generation engine to build services that work efficiently and seamlessly between almost any language.


There’s a lot of repeated work you have to do when you’re writing a server – primarily designing a protocol and writing code to serialize and deserialize messages on the protocol, but also dealing with sockets and managing concurrency, and writing clients in many languages. Thrift automatically does all of this, given a description of the functions you want to expose from your server to clients. It’s also useful for serializing data on disk or into shared memory (where many of the same problems come up).

Windows Tricks: Increase the number of items in Jump Lists

Jump lists are the recent or the pinned items shows when you right click on a particular application in the taskbar.
If you are the person who lean on Jump Items, there may be a time that you have reached the default 10-item in Jump List.
You can increase the number of items in Jump List,
  • Right Click on the taskbar and select properties.
  • Go to Jump List tab
  • Increase the default number of items.

Windows Tricks: Add Locations to Send To menu

  • Create Shortcuts to the folders that you would like to add in “Send To” menu.
  • Type in “shell:sendto” in windows explorer location bar at the top and press enter.
  • You will be taken to a folder. Copy the shortcuts of the folder that you want to add in “Send To” menu.

That’s it ! Right click and check out the new folders added to the menu.