Monday, December 16, 2013

How to play guitar: Day 10

Follow for complete tutorial

How to read the tab: 
Read from left to right and numbers indicate fret number.

Guitar tab for DDLJ:
e ----------7-5-7-3-5-8-7
B 5-5—5
Tujhe dekha toh yeh jana sanam

e —------7-5-7-3-5
B 5-5—5------------8-7
Pyar hota hai dewana sanam

Ab yaha se kahan jaye hum

B 5-7-3-5-7-3--------5
Tere baho mein mar jaye hum


Sunday, December 8, 2013

How to learn guitar: Day 9

Follow for complete tutorial

Notes on fifth and sixth string:

Fifth string: A, B, C

Sixth string: E, F, G

Play all the strings:


How to learn guitar: Day 7 - 8

Complete rest of basic theory:

Rest duration:
Dots and ties:
Steps and accidents:

Notes on fourth string: D, E, F

Play Kal ho na ho:

How to learn guitar: Day 6

Notes on third string: G, A

Play happy birth day:

How to learn guitar: Day 4 - 5

Follow for complete tutorial

Play your first song using following notes:

Jingle Bells:

How to learn guitar: Day 2 - 3

Start with the theory:

The staff, Cleff and Ledger lines:
Note duration:
Measures and time signatures:

Learn basic notes on strings:


Start with basic caterpillar:
1. Press first four frets in E string and play guitar
2. Continue the same with other strings

Make a practice to start with caterpillar everyday. Once you are master in this caterpillar choose different one.

By this time you should be aware of notes, staff, clefs, note duration and playing basic caterpillar.

Following figure can help you remember notes on staff:

Notes on first string (E string): E, F, G

Notes on second string (B string): B, C, D

Play notes on first and second string by looking following notes:

How to learn guitar: Day 1

Follow for complete tutorial

Day 1 - learn parts of guitar and how to hold the guitar: 

We need to first learn how to hold guitar as it's very important.

We want to see the frets all the time so guitar should be slightly angled.
After holding guitar just go through parts of guitar.

You want to also learn how to hold pick.

Try pressing any fret and play guitar.
I know your guitar is not sounding great but, it will.

Saturday, December 7, 2013

AngularJS: Basics

Single Page Application (SPA): SPA application is like Silverlight application, where all the pages are loaded at the beginning and later allow the users to navigate between the pages without calling the server.
SPA application loads all the pages on the client's browser at the beginning and use JavaScript in order to switch between the pages making parts of HTML visible and invisible depending on which page is chosen. It reduces the server round trip and makes application faster.
e.g. - It's a single page application created using AngularJS - It is also a single page application created using AngularJS

Challenges with SPAs:
  • DOM Manipulation
  • History
  • Module loading
  • Routing
  • Caching
  • Object modelling
  • Data Binding
  • Ajax/ Promises
  • View loading
Angular is full-featured SPA framework. It provides following features:
  • Data binding
  • MVC
  • Routing
  • Testing
  • jqLite - similar to JQuery
  • Templates
  • History
  • Factories

Core features:
Dependency Injection

Directives: Directives in AngularJS are used to make custom HTML elements and simplify DOM manipulation. let you structure your views. They can modify the behaviour of new and existing DOM elements, by adding custom functionality, like a datepicker or an autocomplete widget.
In short, Directives provides HTML tricks. All built in directives start with ng-. However, we can start with data-ng- as it's easier for validation.

ng-app: Use this directive to auto-bootstrap an AngularJS application (add this in html or body).
ng-model: The ngModel directive binds an input,select, textarea (or custom form control) to a property on the scope.
ng-init: Initialize the data.
ng-repeat: iterate for each element as per collection collection.
There are different filter, which apply different filtering operation.

Example:  filter, orderBy, lowercase and uppercase, json - converts javascript object to JSON, date, currency

MVC in AngularJS:
View does not contain logic. Logic are contained in Controllers and manages the data. The glue between View and Controllers is scope ($scope).
We can create SimpleController function and glue with view with help of scope. the we can access object and properties of Controller in view.
Modules, Route and factories:
Module -> Config -> Routes -> View  <--> Controllers
Controllers -> Factory
View -> Directives
Modules are containers, where we can create Config -> Routes, Filter, Directive, Factory -> Service -> Provider -> value, Controller.
It is defined using ng-app = "moduleName". angular object gives access to module function where you can refer other module.
var  demoApp = angular.module('demoApp', ['helperModule']);
We can create controllers in module using demoApp.
demoApp.controllers('ControllersName', function($scope) {} );

Routes: We need to load different views in SPAs. View could be embedded as script in actual shell page and we can load view using template id.
Second way is to backup on the server you might actually have all these views and I like to call them partials because they are part of page. We can create config and give a route ($routeProvider). We can define which Controller to load for which view. We need not to add code for Controllers in each page.
We can also add place holders using ng-view in page. Angular automatically manages history.

Factory: Once we define factory, we can inject as a parameter in Controller function and use the object returned in Factory. We can have different factory in application. It can return something using AJAX call and we can use it in controllers.
We can inject $http object in Factory to access REST API's.
Factory, Service and Provider have different way to return the data.