16 Dec 2017

ಠ_ಠ!!! Prepare for all interviews ...


AWS:

Currently we spent $47.3 on AWS

Node.js:

OK, I think I learned a lesson from the official way to read line-by-line in Node.js:

  const readline = require('readline');
  const fs = require('fs');
  
  // Create a reading-line handler
  const rl = readline.createInterface({
    input: fs.createReadStream('someFile'),
  });
  
  rl.on('line', (line) => {
    console.log('the line is', line);
  });

We learned a little bit more on es6 today: set data structure

  // In es6: map, set and its ops 
  let someSet = new Set();
  someSet.add('so');
  someSet.add('qqr');
  if (someSet.has('so')) {
    console.log('I have a set containing', 'so', '; and the set size is', someSet.size);
  }

  for (let key of someSet.values()) { // enumeration in insertion order
    console.log(key);
  }