Tuesday, January 24, 2017

Overview of System js


       

  •    Universal dynamic module loader
  •    We do not have to reference our module using script reference.
  •    Less memory footprint

Monday, January 23, 2017

Anatomy of web request in angular 2


  1. When a user access our web application the first file that is downloaded is index.html
  2. Index.html has the link and our script tag that our module loader hosts our application. This would be the entry point of our application
   

Map files in angular 2

These are source maps that are generated by the compiler that helps to debug typescript code.
Many debuggers (e.g. Visual Studio or Chrome's dev tools) consume these files so you can debug the TypeScript file instead of the JavaScript file.


Modules in Angular 2

In java script we have problem with namespaces and also with code organization.
Modules provide a solution for this problem.They enable us to decouple our code easier.


Sunday, December 25, 2016

What is Node.js?




  • Event-driven, non-blocking I/O model that makes it lightweight and efficient
  • Uses google's  Chrome's V8 JavaScript engine 
  • JavaScript which runs on your computer
  • Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world

Declarative vs imperative programming




Declarative :
  • Write code what you want but not  necessarily how to get it (Declare the desired results but not the step-by-step)
  • A style of building the structure and elements of computer programs—that expresses the logic of a computation without describing its control flow.
  • Minimize or eliminate the side effects by describing what program should accomplish 
  • How is left to the problem implementation
  • Only thing a function can do is calculate something and return it as a result.

   Declarative languages include, SQL, React, Functional programming like haskell

Functional Prgramming

  •  In purely functional programming you don't tell the computer what to do as such but rather you tell it what stuff is
  • if a function is called twice with the same parameters, it's guaranteed to return the same result. That's called referential transparency and not only does it allow the compiler to reason about the program's behavior, but it also allows you to easily deduce (and even prove) that a function is correct and then build more complex functions by gluing simple functions together


var results = collection.Where( num => num % 2 != 0);
Imperative :

  • Tell the compiler what you want to happen step by step
  • Java, C, C#  is imperative
  • Main method of computation is assignment variable
  • Implements algorithms in explicit steps.

Wednesday, November 2, 2016

Machine learning

-Is a science of getting computers to learn, without being explicitly programmed
-Grew out of work in AI
-New capability of the computers