Talking to vishnu

“Lighting in a bottle”

      Before I start my blog post I want to thank a bunch of people/elements of my life  from the bottom of my heart ,thank you millions and millions of my body cells , my physical body , all the organs that function day in and day out selflessly , universe(s) , milky way galaxy, solar system , my planet , my parents ,brother, pappy ka, kathamma, prasad, geetha, alagiri, moni , karate master ,my fellow switch participants (kripa,arun,madhu,hari,poongodi)  (this blog is about switch read next paragraph to know what switch is all about) friends and family and all other beings who are generous enough to give appropriate amount of attention I need for my existence, for the support and the love.

      Switch a year long program which has changed my life or I should say  given me tools to change my life from a sate of unknown, sadness, depression, anxiety to a sate of bliss or an appropriate emotion driven life and also  helped me to see the enormous potential I carry along to handle my life which in turn was there all along but was hidden in plain sight behind unprocessed anger or jealousy or grief or insecurity or a cocktail of all or few combinations of the above said emotions.

      Ok now switch is not some new dope in the market which you can take and it makes you instantly feel blissful , king of the world or any fantasies one might not admit while they are living rather running their life or its not a rehab program.switch in a nutshell is a year long program which makes you realise your own beautiful responsibility of having the gift of life, gives you a strong perspective of freedom to make a choice from a variety options for a given situation rather than responding like a trained machine.Its a learning  rather I should say evolving experience where facilitators (geetha and prasad) help you to learn about yourself by providing appropriate amount of support, care and a judgement less environment.Once again thanks to geetha and prasad for such a great experience.

       This December 24th and 25th (2016) I will be completing my year long switch program its part of the course to document my experience  as an assignment but then this is not a regular assignment and switch is a one of a kind of a program, so what better way to plant what I have learned and experienced by talking to myself ,After all we all talk to ourselves almost all the time , plus mastering intra communication with myself , reassuring  and revisiting  a great experience will go a long way to help me transition into a blissful human and also this is a pat on the back for me for the effort and religious traveling every month I did to attend switch from hyderabad to coimbatore. Great Job “vishnu”  :).

     But capturing one year in a blog is a herculean task plus I am a words person I need a jargon/punch to go with a concept so that it gets planted deep inside of me. So the pattern of communication in this blog will not be like story telling/communicating/conversational  but it will be a combination of all.

“Hey Vishnu”

“Culmination of 26 odd years of experience, used to being confined to a small conscious mind with its own stories , own problems etc…”

“I have realised I am bigger than the experiences, I represent a lineage, lineage I represent started with amoeba ,I believe I am a persistent individual works hard to not to solve mundane problems of life but to integrate myself with the universe no matter the length the breath I need to cross for this purpose  while I work on the integration I will continue to live the life that is given to me gracefully and compassionately “

“There are few core principals that switch  has thought me which I am already working to make them as my values, belief system, support system and I want or I know given appropriate time and continuous process it will grow beyond me and it will proliferate into a blissful home , society , world and beyond”

“Core principals you say lets list it down”

1.Ubiquitous awareness

             Awareness is like one tool to rule them all ,awareness about what is happening now  ,awareness about what is happening in front of me or who is talking  , how I am reacting to it physically  and awareness on how my mind is manipulating this info and connecting with an emotion.

          “ok” now why it has to be ubiquitous ,  if I am able to differentiate what my mind is saying  for a given situation and what actually the situation is while understanding how my body represents that situation gives me a choice , choice to choose , choice to act, choice to be real and authentic to what that situation demands instead of being driven by fantasies that run in my head.This concept is called witnessing . Witnessing helps me to act to a situation not react out of anxiety or curiosity or fear or anger.

      we also worked on how the belief systems work , being aware can help me to curb all the non conducive beliefs which I used to carry for no apparent reason

 2.Persisting Goodness and a stroking mechanism

           “isn’t  all this for persisting goodness ?”, “yes , of course” but it is not just one of the things it is the thing.When I say goodness I mean state of blissful thinking meanwhile being aware of whats happening.

       Stroking is a powerful tool to keep reminding you the goodness you posses on any given situation, patting yourself on the back or ask other explicitly an appreciation for what you have done or doing or did.

       Failing to do it sometimes leads to a state of non-recognition which leads to undesired sates and a non-living feeling.Once you feel like it eventually your mind will start playing games , games with people around you to get that recognition which will again lead to another game and becomes a loop.Instead lets be authentic about the need for appreciation from others meanwhile work on being self sufficient with our own appreciation.

    “Now being aware and fuelling  the motivation via stroking we are unstoppable”

3. Unconditional love for oneself, acceptance and gratitude 

          “consider until now we discussed about pizza, this this is the dough.Once dough is right and well prepared you can add any toppings you want”

     “Unconditional love for me/oneself and acceptance from who?”

     “Unconditional love and acceptance of oneself, duh?,its like vishnu loves him so much that he has no problem spreading love, once we agree and accept our action we will become givers than seekers of love”

   “this idea of loving oneself first is one of the main purposes of switch”

      “Did I pull osho there !”, “Yes the unconditional part of loving and acceptance is a projection of reading osho and relating to it in switch”.

    ” In switch we learned about personalities we carry all day  in our head along with experiences associated with respective personality , characters in books we read , people we talk to , parents , friends etc..”

    “personally I used to wake up with a person in my head who used to bother me, then after attending switch learning to be aware of minds play, knowing what is the appreciation I am seeking from that personality and accepting yes that person in my head (person need not even exist,it might be a fantasy) I made peace with that person by saying hey thanks a lot for visiting me and the attention you give me day in and day out then magic happened , tada person vanished from my head now every day I get up to a plan of making myself better and blissful”

4.Fulfilling goals, friction less connection and communication

     Having  Fulfilling goals is very simple , I use the tool of contracting to establish a realistic goal I want to achieve with an activity I do, setting up boundaries and sticking with it. Now any activity if I am able to complete by sticking with contract is fulfilling for me , I am ok to re-contract but with awareness that I am re-contracting not procrastinating.

“Now think about it I am clear on what I am doing and I have my own measure for success won’t it be fulfilling trust me sometimes its intoxicating when you are true to a contract”

      Friction less connection and communication being aware will help/helping  you/me to do it but sometimes its ok address situation than the person whom you are communicating during that situation , remember you have at least 50% responsibility for that situation you put yourself in so its ok to accept it for what it is and communicate it , have a re-contract about it and move on.Avoiding friction comes from acceptance of oneself which will extend outward as well and will help making healthy connections with the outer world .

5. Value of being vulnerable

      its ok to say “I am not ok , I feel angry , I feel sad” , It was difficult for me to connect and trust anyone including me , but the fright of accepting I am vulnerable to certain things in life is the reason I ran from people sometimes , I ran from myself.In switch we learned about being nurturing and vulnerable it was like wowsa moment in my life.Now I have no problem in trusting someone as well as accepting I am not ok with certain things while I communicate the same with the person I am trying to connect/bond.

To explain how much switch has helped in a blog is like capturing “Lighting in a bottle” . I can lose 10kgs when I want , put on weight when I want , I can sing, dance, cry when I feel . I can summon the kid, adult and the parent in me when I want.I am trustworthy to myself and for the society, I deserve all the goodness I get in my life.

Once again I am not sure how to stop talking about this experience , consider this blog an experience part number 1.I will be back with more about switch and my life experiences  using the tools given my switch.

6. There is me in everyone , there is everyone in me 

Introjection is a powerful tool which understood right can make you feel, emulate and produce powerful results in life.

what is introjection “remember ? people say you look like your mom , you talk like your father , when you play basketball you emulate lebron etc…”. Think about it right I have to perform in a spotlight if I could summon the inner lebron in me.I become lebron , I am at my best when the spotlight is on me.

“since I am awareness is ubiquitous  , I can summon lebron,kamal hassan,bruce lee etc.. based on the situation , based on how I feel , based on kind of results I want to produce”

Introjection gives me power to even give out an impression to a kid or my friends or people around or the society which can empower them  “people can emulate vishnu at certain points in their life “.

“Thats the power of introjection.You can be anyone, anyone can be you”.

7. Flow like a river , trust the process

“remember all the bouts of karate fights , last thing I was doing was thinking”

“Doubts are the last thing while performing kata”

“Body, mind and breath and me become one”

It is possible in karate because I have invested enough time to go through the process, trusting the process  to flow like a song, like a wind when I perform.

Idea of flow is for me to flow like a wind in my life, be it work, be it the process of life itself.All I need  is to understand the process  for any activity in life, practise it, implement it , see the results , improve on it and  repeat .Always trust the process

Flow eliminates doubts, flow eliminates fear , life is flow.

 

 

PS: If you are in coimbatore or near by coimbatore try attending switch rather I strongly recommend switch for any one who wants to be liberated from fear, anger and jealousy.Switch can facilitate you to an untapped side of yours like it did for me.

Spread goodness.Live life not survive it.

astala vista for now !

EMBER JS – Starting with Ember JS

Every framework has its pros and cons , this post deals with ember and goodness of ember ..

I have been working with ember for almost 4 years now (other frameworks too including angular, react etc.) , its one of the if not the best front end frameworks available right now , If you are a front end developer in 2016 when you try to find a framework for developing a web application, you might end up catching with a virus called JS fatigue , Java Script is more powerful than every before with ES2015 and with other new tools its getting bigger and better, so you need a framework which

1. Evolves along JS    2. Supports TDD   3. Address all the problems that comes with setting up , developing , testing  and  deploying a project 4. Code that is easily understandable as well as reusable 5. Backward compatible And Many More ….

Why Ember  in 2016?

  1. Ember Routing is awesome :)(dynamic routing , life cycle hooks etc..)
  2. Ember-CLI ( working on any other framework after that ,will look like a tedious task because Ember-CLI lets you eliminate all the problems that comes with setting up,writing code and deploying code etc.., as well as ember cli keeps evolving as a community not an individual written generator  )
  3. Convention over Configuration(this is one of the best feature of ember once you are aware of how ember works , you can look into any project written in ember and understand how it is working(at least the flow ),Its strict for a good reason ).
  4. Ember Data (one awesome way to handle data flow in your front end app)
  5. Ember Components
  6. Ember embraced ES2015 for development long back ( instead of writing a non backward compatible new version of the framework  .. achum.. Angular 2 )
  7. One of a small advantages it uses jQuery by default which makes it compatible with any jQuery library you want to include in your project
  8. Best fit for ambitious single page web applications
  9. Ember Guide is very comprehensive (all in one documentation for your dev needs)

 

First Project with Ember Js

Prerequisites


install node js from    node download  

npm install -g ember-cli (installing ember-cli)
npm install -g bower
brew install watchman 

visit Ember Cli Site to know more on other dependencies 

Starting  A Project 

//once all the dependencies are installed  
//go to your command line tool and then 
cd /path where you want to place your project/ 
then type : ember new <project-name> 
            eg. ember new my-first-ember-project


Now ember CLI will take some time on your behalf to set up the project and all required dependencies

//Once ember-cli does its job

cd my-first-ember-project 
then type: ember serve 
           go to http://localhost:4200/ in your favourite browser

You will see a welcome page to remove sample 
welcome page go to package.json file 
inside your project folder and remove an add-on 
called ember-welcome-page 

Do an ember serve again you will see a blank page 

You will see multiple folders for development we will use only the app/ folder (most of the time) , which has

. components/

. controllers/

.  helpers/

. models/

.routes/

.templates/

.app.js

.index.html

.router.js

.resolver.js

visit this ember cli documentation  to understand everything
you have to on the folder structure 
(recommended to have an understanding of this)

Routes and Templates

 Simple Explanation for routes and templates  

Routes

State of your application (url)

eg. http://localhost:4200 is one route

eg. http://localhost:4200/about is one route

Templates

The html data user will see when goes to a route state or url (route)

“I will have multiple routes for my application how will I know which template render when I go to that state ”

Yes I agree , but since its ember it takes care of that for us for eg. I am creating a route called about , which you have to create in router.js   inside app/* folder (router.js should  have all your routes / states of your application defined) .So when your application goes to /about ember by default will look into template/ folder for about.hbs. So when I go to http://localhost:4200/about , ember will renders contents from template/about.hbs.

“Remember convention over configuration,yay !!”

How to I do create those files ?

Method 1: 

Step 1: Go to router.js 
      
     Router.map(function() {
         this.route('about');// route I want to create
      });

Step 2: Go to  template folder create a file called about.hbs

Step 3(optional):Go to router folder and create about.js

           import Ember from 'ember';
           export default Ember.Route.extend({});

Method 2 (recommended): 

Remember Ember-Cli ? ember cli gives a generate or g option to create all this files for you including test script for the route you are creating in one step.

Step 1 the only step :ember g route about 

It will create all the files for us from Method 1 
plus a test file inside 
/my-first-ember-project/tests/units/routes/about-test.js

If you ember serve to http://localhost:4200/about  
you will still see a empty page , 
soon we will learn how to put content into this page

Now if you go to templates/about.hbs  in your editor you’ll see {{outlet}} 

Its important to understand {{outlet}} before we proceed

{{outlet}} is where your sub routes templates render (eg. http://localhost:4200/about/me)

Now any content for /me.hbs will render inside . All the content for about.hbs .

“But wait a minute ,  I am going to http://localhost:4200 and then going to http://localhost:4200/about to render about.hbs , does this mean about.hbs is rendering into / (starting route of your app’s)  {{outlet}}”

Bingo , you got it , the default route in ember is application route , which at this point is not explicitly created but ember is doing that for us , now lets create application route

>ember g route application

templates/application.hbs file will have a {{outlet}}

This is the application route , which will part of all sub routes

<br/> {{outlet}}

after pasting this in your application.hbs file  and when you navigate to /about you will still see

This is the application route , which will part of all sub routes

Which means now all the sub routes will render via application route , I can use this route to build my application level menu , footer etc.. hmm.. now we are talking single page application development

Connecting Route And  Its Template

Now we know for each route we create in ember there is a corresponding template file which will render into {{outlet}}

“All the files  inside template folder are in .hbs format be but they just render html”

{{}} (anything you write within this mustache notation is considered  a handlebar helper)

You are right , .hbs files are nothing but handlebar files , Ember uses the Handlebars templating library to power your  user interface, build in template helpers helps us in navigating , showing data from ember etc.. few of them are listed below..

  1. add {{#link-to "about"}}
                 About Link
          {{/link-to}} 
    in application.hbs
    to navigate to about link from application route instead 
    of changing url manually, now if you click About link it'll 
    take you to /about
    
    now your application.hbs will look like

 

Screen Shot 2016-08-12 at 2.34.19 PM
Applica.hbs file

Before  we go thorough other helpers lets check how to use a model (data you want to show in your handle) from route inside ember template

Insider routes/about.js file add a model() function like this

import Ember from 'ember';

export default Ember.Route.extend({
 model() {
  
 return {"myName":"Your Name","myInterests":["JS","HTML","Other Cool Stuff"]}
 // this data can come from a server api call also, 
//we will see later how to get data from server 
 }
});

 

Since we know any route has a template with same name, now about.js can access data returned by model() function of its route (in this case about.js)

1. simple {{}} helper to print data

 

Screen Shot 2016-08-12 at 2.41.11 PM
About.hbs to print model data in template

Now /about will print Name:Your Name

2. #each helper 

Model function in about.js is returning a property called myInterests which is an array. {{#each}} helper helps us to iterate array data inside template and print them.So after using {{#each}} helper my template will look like

Screen Shot 2016-08-12 at 2.36.42 PM.png

now when you navigate to /about route you can see list of your interests

Screen Shot 2016-08-12 at 2.37.32 PM
Your http://localhost:4200/about will look like above

 

 

 

 

 

 

3. conditional helpers 

1. This is simple if condition  I want to display my interests only when my model has my interests you just need to wrap after Name inside {{#if model.myInterests}}  after ul element close tag add a closing if tag {{/if}} , very important  to close a helper tag else ember will throw error

2. Inside {{#if}} helper you can use {{else}} to print what should happen when I do not have any interests , {{#if}}  <your true condition> {{else}}  <your else condition>{{/if}}

3.{{#unless model.myInterests}} Do Add A Request{{/unless}} this helper helps you to show a value unless it is done

Screen Shot 2016-08-12 at 3.17.01 PM.png

Check out ember documentation for more cool helpers

Two Way Binding

 

Last section we saw how ember binds routes data to template now lets check how to bind changes that happen to data in template to routes model()

Lets use another input helper to explain this

{{input type=”text”  value=model.myName}}

once you add this to your about.hbs file you can see Name : value also changes that means dom value of model.myName , so I I want to save it back to server I can just pass model.myName with updated name

Your about.hbs will look like this

Screen Shot 2016-08-12 at 3.09.35 PM

 

We saw how to start a project with Ember JS and few cool stuff we can do with ember , this is just scratching the surface of ember, there is more . Will post more on other features soon