Codes from my life

Some useful tips for life

I had taken a break from studies to prepare for Engineering entrance examinations in Delhi. I was at one of the best coaching centers at Delhi (I am not taking their name as this post is not about them). I met some of the best teachers in my life there. Other than regular stuff they taught me I learned some skills which I will use for my entire life.

There was a Physics teacher who was also an M.Tech from a premier institute. He taught me what to aim for in life and how to motivate yourself to reach there. I still use it to keep myself focused when I am feeling low or struggling with something.

Motivation tip: Whenever you are doing things think about the reasons for doing it. Doing it for yourself or money you may not motivate you. Think about how proud people around you (like your family or other loved ones) will feel when you complete it or how it will benefit their lives.

For the same reason you can’t keep on working just for the sake of earning money.

And there was an amazing mathematics teacher who taught me time management skills. This was really useful then and even after several years if I follow this I can get my work done. This tip also helps you measure your capacity.

Time management tip: Plan before, plan small. When you lie down on bed for sleeping at night think about what you are going to finish tomorrow. Most important thing is to plan small so that you can get it done no matter what. Never give yourself excuses for not getting it done.

He also taught me a concentration tip. I can not concentrate for more than 10 minutes. Even now while attending meetings I lose concentration and am usually clueless about the results of the meetings when I come out of meeting room :P.  My mind starts roaming around the entire world after 10 minutes.

Concentration tip: Close your eyes and try to roll your eyes upwards (till you are comfortable) for 5-10 seconds. The idea is to roll your eyes up, relax and not to think about anything. After 10 seconds magically your brain is blank and you have cleared all the random thoughts and you can start doing your work again.

The chemistry teacher was equally good and he also used to give useful tips from time to time though I do not remember them now.

That drop year was a real life opener for me, and I am glad that I took that break. I realized a lot of things about myself. One of the many reasons could be that for entire one year I was away from my home. I was also a pampered kid at home as I was good at studies, and usually escaped scoldings at home.

I hope some of these tips benefit you.


Jab Tak Hai Jaan – Poem

This is the poem from the movie “Jab Tak Hai Jaan”. I have been listening to this song on loop for a few days. Lyrics and the music both are just perfect.

Teri aankhon ki namkeen mastiyan
Teri hansi ki beparwaah gustakhiyaan
Teri zulfon ki leharaati angdaiyaan
Nahi bhoolunga main
Jab tak hai jaan, jab tak hai jaan

Tera haath se haath chhodna
Tera saayon se rukh modna
Tera palat ke phir na dekhna
Nahin maaf karunga main
Jab tak hai jaan, jab tak hai jaan

Baarishon mein bedhadak tere naachne se
Baat baat pe bewajah tere roothne se
Chhoti chhoti teri bachkani badmashiyon se
Mohabbat karunga main
Jab tak hai jaan, jab tak hai jaan..

Tere jhoothe kasme vaadon se
Tere jalte sulagte khwabon se
Teri be-raham duaaon se
Nafrat karunga main
Jab tak hai jaan, jab tak hai jaan


Adding a youtube video. Enjoy 🙂

Personalizing GNOME and Unity

I have used GNOME 3 for quite some time now. Of late the shell started to crash a lot, so I switched to Unity. I usually hate dark themes, I like bright desktop and larger fonts so that my eyes don’t get strained. It is great that people have so many useful gui tools for these things. These are my personal favorites:

  • gnome-tweak-tool – Good for changing themes and font, adding removing shell extensions. It can also be used to customize buttons(minimize, maximize, close) on title bar. I am still old school and I like all the buttons there.
  • gconf-editor – This is an advanced tool. Before you start be exactly sure about what you are doing. You can configure most of the gnome behaviour using this.
  • gnome-color-chooser – This lets you choose the various color schemes. This was particularly useful in my case as I hate white on black, and the default ubuntu has white on black for eclipse tooltips which is really annoying for me.
  • CompizConfig Settings Manager(ccsm) – You can use this to configure Unity hot-keys. I have changed the hot key for Unity launcher from super key (windows key) to super-z as I wanted to use super-c and super-v for copy paste on my terminal.
  • Gnome-Terminal – This comes with its own options for personalizing it. I use profile preferences to change the font and the color schemes. I use Monaco font. Also I have changed the copy and paste shortcut. Pressing 3 keys is cumbersome and that too when you have to do it so many times.

In the process if you screw up your system simply log out, and log in to the shell using Alt+Ctlr+F1 and delete .gnome. .gnome2. Sometimes you may have to delete .local and .config depending on what you have modified. After that press Alt+Clrl+F7 to log back in.

Moving on

I recently quit my job at Zynga and will be joining GazeMetrix in a couple of days. This will be my first start-up experience and I am super excited.

Hope things work out 🙂

Conway’s Game of Life

I came across this a few days back when my colleague showed me this. I was really fascinated with the patterns it was generating.

So after coming from office I sat down to write it finally. Read this(’s_Game_of_Life) so that you can understand it properly. Then see the demo here:

Keep clicking the random button, you may get to see some wonderful patterns 🙂

Find the code here:

Interesting bits

I have added a page to my blog where I will post interesting problems that I come across on my blog.

Check it out:

The man from earth – 2007

On recommendation of a colleague,  I watched this movie ‘The man from earth‘ yesterday.

The movie is based on a conversation between some people. The protagonist, John Oldman(who is a professor), was packing stuff to move on to a new place, when suddenly some of his colleagues from the university dropped by to say good bye. They were curious about where and why John was leaving all of a sudden. Then finally John opened up and said that he was a caveman and he had lived for 14000 years. And he moves to a new place every 10 years as people around him see that he does not age.

Curious? Go and watch the movie. Its really a brilliant piece. It has been rated 8.0 on IMDB. I was so amazed by the movie that I watched it twice back to back. The Story is written by Jerome Bixby who has also written few episodes of Star Trek.

The conversation is so captivating that you wont move at all. If you enjoy science fiction you will love it. I would rate it a perfect 10/10.