Skip to main content

The life The lessons

  • Brush your teeth before going to bed

brush your teeth everyday before going to bed. Almost each one of us realises that it’s important, but only few get out of the bed for this.
It’s difficult initially because you can not see the immediate benefits, and that is the reason some people quit after a week or two.

  • 10 minute workout

Similar to the above point, do a 10 minute workout everyday when you wake up. You can not imagine how much difference will it make to your day. Apart from the physical benefits, you would feel more confident and energetic towards your day. Try this for one week.

  • Quit your browser before going to sleep

Quit your browser before going to sleep. Next day when you open your laptop, you shouldn’t see the pending tabs in the browser from yesterday. 

  • Talk to the people who you care about

talk to the people who you care about. Most people think that they are too busy for this, but you can always find a small amount of time in your schedule for this. And this is totally worth it. You will get to know more about what’s happening in the lives of people you care most in this world.  

  • Travel a lot

Travel a lot. For once in a month, just totally quit your work and travel to some place. When you are doing the same work everyday, you are stuck in a web and you won’t be able to see outside the web if you continue doing the same work. No matter how much interesting your work is, there is so much more in this world.

  • Visit book stores

Visit book stores. Even if you don’t have a habit of reading books, just go there once in a month. Take a walk and have a look at books from different category. There would definitely be some books that would interest you. Pick one of them and start reading there itself.
If you intend to buy any of them, buy only one book at a time. Buying more than that decreases value of each one of them and you may end up reading none of them.

  • Do something for your parents

Do something for your parents once in a while. Don’t think that they don’t need anything from you. They think you are too busy with your work, that’s why most of the times they never ask. Don’t explicitly ask them. Just talk to them more often, and you will figure out small day to day things that they need. They would not ask you anything but just mention some things that would make their life easier. Note it and do it for them, and let them know that you care. 
My father doesn’t have much knowledge about cell phones and wanted to store some songs on his phone. He just mentioned once about it in a conversation. I first realised that it was a small thing But now I can see that how much that makes him happy. Everyday when he goes to bed, he listens to them.

  • Get drunk once in a while

Get drunk once in a while with your friends and dance.
You definitely need this.

Comments

Popular posts from this blog

Android : AbsSavedState cannot be cast to $SavedState

Android AbsSavedState cannot be cast to <View>$SavedState I came across a strange crash today. This is the stacktrace : Fatal Exception: java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.ScrollView$SavedState at android.widget.ScrollView.onRestoreInstanceState(ScrollView.java:1810) at android.view.View.dispatchRestoreInstanceState(View.java:14768) at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3123) at android.view.View.restoreHierarchyState(View.java:14746) at android.support.v4.app.Fragment.restoreViewState(SourceFile:470) at android.support.v4.app.FragmentManagerImpl.moveToState(SourceFile:1326) at android.support.v4.app.FragmentManagerImpl.moveFragmentsToInvisible(SourceFile:2323) at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(SourceFile:2136) at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(SourceFile:2092)

Android Tip : Handling back button in Fragments

Android Tip : Handling hardware back button in Fragment and DialogFragment This post explains how to handle hardware back button in a Fragment OR DialogFragment . In DialogFragment, it’s quiet straight forward to achieve this. You’ve to get the dialog instance and set onKeyListener on it : if (getDialog() != null ) { getDialog().setOnKeyListener( new DialogInterface.OnKeyListener() { @Override public boolean onKey (DialogInterface dialog, int keyCode, KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) { Timber.i( "hardware back button pressed" ); } } }); } This can be done in the onViewCreated callback. For fragments, this method doesn’t work and fragments doesn’t have a direct callback to catch this event. So in this case, the approach that we follow is : You

DialogFragment : NullPointerException (support library)

Another weird crash this time ! Here’s the stack trace : Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{<activity.fully.qualified.path>}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.Dialog.setContentView(android.view.View)' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2659) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2724) at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4524) at android.app.ActivityThread.-wrap19(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1479) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6123) at java.lang.reflect.Method.invoke(Method.java) at com.android