Blog

India to soon introduce next-gen ePassport for citizens with a microchip

Sanjay Bhattacharya from Ministry of External Affairs, took to Twitter to inform them that India would soon get e-passports with secure biometric data.

  • The passport would contain secure biometric data.
  • It would ensure smooth passage through immigration posts globally.
  • The e-passport would be ICAO compliant.
  • And would be produced at India Security Press, Nashik

What is an e-passport?

  • e-passport will be a replacement for the traditional passport. It will have an electronic chip that carries the same information as the printed passport like name, date of birth etc.
  • The e-passport could be scanned, which will speed up the verification process at the immigration counter.
  • It will also help curb the fake passport business. Any tampering with microchip will result in failure of passport authentication.

UltraRAM – The Next Big Thing in Storage

What is UltraRAM ?

UltraRAM combines RAM and Storage into one ultrafast memory solution.

The Research

We know that pretty much everyone is exploring how to combine both memory and data. Guess what, researchers at Lancaster University have found a way to make this happen.

Their paper highlights a breakthrough in the mass production of UltraRAM.

UltraRAM is a type of memory that offers RAM and SSD storage combined to provide you with the fastest storage solution possible. It doesn’t release data when turned off and can combine RAM chips with hard drives for a seamless effect.

It’s a non-volatile memory that does not require power to store data and it has the same speeds as DRAM when in use.

So it can lead to a 1-stop solution for RAM and storage by combing them together in a single device. Which means in future when you buy a 1TB UltraRAM device, it will be able to function as both storage and RAM.

Understand the what, why and how of Promises in Javascript

What are Promises? Why to use them?

Say you are a celebrity blogger and people are waiting for your next blog. You promise to notify them once the blog is ready. You take their emails and once your blog is done notify them via email.

A promise in Javascript works similarly. If you have an asynchronous operation you can use a promise to let the consumer know about its outcome.

It’s a placeholder for an asynchronous operation outcome. It’s an object which has a state and a value.

let promise = new Promise(function (resolve, reject) {
  // DB call
  if(call was success) {
    resolve(value)
  }
  reject(error)
})

Promise has an executor function with two parameters – resolve and reject. These parameters are predefined by the javascript engine.

Promise object has a state and a result. State can be pending, fulfilled or rejected. Value can be undefined, value or error.

Problem with Promises – a chain of promises makes the code complex.

Gentle introduction to Callbacks in Javascript

What are callbacks and what is a callback hell. In this short video I provide a simple explanation to callbacks.

A Callback is a function that is passed to another function.

Callbacks in Javascript
/*
Three ways to work with asynchronous operations in Javascript
1. Callbacks
2. Promises
3. async / await
*/

/*
Callback is a function that is passed to another function
*/

setTimeout(function () {
  console.log('Done')
}, 3000)

function myFunction(param1, callback) {
  // some operations
  console.log(param1)
  callback()
}

function myCallbackFunction() {
  console.log('Ankur')
}

myFunction(123, myCallbackFunction)

Gentle Introduction to Prototypes and Prototypal Inheritance in Javascript

In this short video tutorial I will explain in simple terms what are prototypes in Javascript and how Inheritance works.

Key points to keep in mind

  • In Javascript if an object wants to inherit from another object then it can do so using prototypal inheritance.
  • The parent object is referred to as Prototype.
  • __proto__ is deprecated, we can use Object.create()
let fourWheelerObj = {tyres: 4} // Prototype

let carObjectOne = {engine: 'v6', __proto__: fourWheelerObj}

console.log(carObjectOne.tyres) // 4


let carObjectTwo = Object.create(fourWheelerObj)
console.log(carObjectTwo.tyres) // 4

Use NPTEL Portal as one stop place to prepare for GATE Exam

Students preparing for GATE have challenge finding quality resources and lectures. And many of them opt for coaching. Now a much more economical online option is available. Thanks to NPTEL initiative.

As you may be knowing NPTEL has been offering quality courses and lectures for a long time. Based on the feedbacks from the Students it has now launched a portal where GATE Aspirants can find video lectures to build their concepts and practice tests. Along with that there will be video solutions to previous years GATE questions.

You can access the portal using this link

For Computer Science lectures you can visit this link

We believe that this portal will help GATE aspirants to learn fundamentals and prepare for their upcoming GATE Exams.

The Portal will provide

A comprehensive one stop platform from concepts to tricks for cracking GATE exam.

Enables access to high quality lecture content covering the entire GATE syllabus.

Provides detailed video solutions of previous years GATE exams.

A platform for online assessment via a comprehensive question bank and provide feedback highlighting strengths and weaknesses.

What is ‘this’ in Javascript world?

In this short video tutorial I explain the basics of this keyword in Javascript. It’s a confusing concept for those starting out with Javascript.

-- QUICK INTRODUCTION TO this KEYWORD

-- If a function has a this reference in it, it points to an object. The object it points to depends on how the function was invoked.
-- It does not refer to the function itself.

function simpleFn() {
  console.log(this) // this points to an object
}

simpleFn() // -- window

let myObject = {
  myFunctionTwo: simpleFn,
  name: 'Ankur',
  age: 36
}

myObject.myFunctionTwo()

// strict KEYWORD
// .call(obj2)

What is Lexical Scoping in Javascript

In this short video tutorial I explain what is meant by Lexical Scoping.

Sample code snippet used for explaining.

// Lexical Scope
// Code in one scope can access variables in same scope or any scope outside // of it.

// Global variables
let x = 2

// function with an inner function
function outerFn() {
let y = 9
// can access x, y

function innerFn () {
let z = 44
// can access x,y,z
console.log(x, y, z)
}
}