Interview Questions – ES6 Questions

  1. What is traceur?
    • ES6 -> ES5
    • Traceur is a compiler that allows you to use features from the future today. Traceur supports ES6 as well as some experimental features.Traceur’s goal is to inform the design of new JavaScript features which are only valuable if they allow you to write better code. Traceur allows you to try out new and proposed language features today, helping you say what you mean in your code while informing the standards process.JavaScript’s evolution needs your input. Try out the new language features. Tell us how they work for you and what’s still causing you to use more boilerplate and “design patterns” than you prefer


  2. What are the required node_modules to makes traceur working properly
    • $ npm install traceur
      $ npm install traceur-runtime
  3. Why do you need traceur-runtime?
  4. What is the node command to compile ES6 to ES5?

Self Invoking Function (Tutorial – JS)

Self invoking functions are used to stop global scope pollution and ensure the code doesn’t conflict with other code in the page.

(function (a, b) { //Temporary name space for all
// the variables within the function

//code goes here

}() //Invoke the function

); //Without this enclosing parenthesis JS
//will identify this as a function declartion statement only


Working example – JSFiddle

var p = 8;
var q = 7;

(function (a, b) {
var x = a * a ;
var y = b * b;
var z = Math.sqrt(x + y);
var r = p + q; // Effects of global scope pollution

}(3, 4));

console.log(p); // declaration of variables outside polluted the global scope
console.log(z); // “ReferenceError: z is not defined” = Global scope is not polluted

Semantic Snips – Update

I am having some spare time. So I am taking the liberty to compile Semantic Snippets.

I’m using few handpicked resources to ensure everything is consistent. So all the code will be mash up of

At this stage I do not intend provide comprehensive guide to how html5 should be used as above resources are more than enough. Just compilation of snippets inline with best practice for different use cases with references to additional reading materials.

Some of this issues may be subjected to debate. I certainly welcome that

You can view the progress here:

CATH Introduction – BioInformatics


What is CATH?

Cath is a database of manually curated protein domain structures. It’s a hierarchical domain classification of protein structures in the Protein Data Bank. Protein structures are classified using a combination of automated and manual procedures. There are four major levels in this hierarchy:

  • Class – structures are classified according to their secondary structure composition (mostly alpha, mostly beta, mixed alpha/beta or few secondary structures).
  • Architecture – structures are classified according to their overall shape as determined by the orientations of the secondary structures in 3D space but ignores the connectivity between them.
  • Topology (fold family) – structures are grouped into fold groups at this level depending on both the overall shape and connectivity of the secondary structures.
  • Homologous superfamily – this level groups together protein domains which are thought to share a common ancestor and can therefore be described as homologous.

Cath Domain

structure Domains are regions of contiguous polypeptide chain that have been described as compact, local, and semi-independent units. Within a protein, domains can be anything from independant globular units joined only by a flexible length of polypeptide chain, to units which have a very extensive interface. There are a number of algorithms that have been developed to detect domains automatically, some of which have been incorporated into the CATH update protocol. Many domains, however, still …