Monday, October 29, 2012

Android

Finally, I moved to Android abandoning iOS behind. There is nothing wrong with iOS it was just kind of boring after 2 years. Android is so much different and its interesting. It does not have the iOS feeling 'just works' so it is little more engaging. Well, my primary idea is to make some apps for myself, I think it is time for some android development. If you use google products you would definitely find Android platform your home. On the top of that, I saw on news that HTC is loosing money so I decided to contribute a little to HTC and bought their phone :D

Friday, October 26, 2012

Happy birthday Shiblee!

I think I am going to start my 30th year in this little planet and still I have no clue what I am doing? Still I need to learn how live a life? even worse what is life? Am I looking for something? I have a friend who believes human brain is a complicated equilibrium and we are suppose to feed it constantly, maybe someday something will come up out of all these! Could be! Maybe I am just feeding my brain!? or maybe I am preparing myself to for my selfish gene? Someday it will leave me and my purpose in this world well served!? Or maybe life is an example of anthropic principle, it is what we can perceive in our conscious and beyond that there is just a big unknown. Maybe every different things have their own conscious and they alive in their own way! who knows! Sometimes I feel like this world is an amazing place, there is so much unknown in this world that we can't say anything for sure! 

The most interesting part of life is when I am very sure about something that I know it, the next moment I realize I know nothing about it. I think in this queer world anybody can pursue even the tiniest thing possible and never knows the whole. These days I have a feeling, I would continue wondering in this world forever without knowing ant bit of it. Sometimes I feel like there is nothing called life. Is there any glory being alive? Or life is life, just like other things in this world. Richard Feynman once said the purposeless-ness of human life does not scare him at all. I often think 'purpose' is the wrong question to ask, what is the right question then? Well I don't know, I even know less that I do before. Happy birthday Shiblee! Life is fun! So much fun!

One of my friend said this is the best day of my life. I often think why? Maybe because in this day my conscious matched with the conscious of thousands others in this queer world! 

Thursday, October 25, 2012

25 rules of wisdom

  1. Even the boss must get his fingernails dirty.
  2. A handful of luck is better than a mountain of wisdom.
  3. For every one word you say, let your enemies say 10.
  4. Cash is cash, even if it comes from an elephant's stomach.
  5. Never reveal 100% of anything to anyone.
  6. Never make a decision when you're angry.
  7. A man is nothing without his word.
  8. Keep your mouth shut. If you have to lie, keep it short and simple.
  9. The best way to dodge an enemy's bullet is by never being in a position where he can hit you.
  10. When you can't win a war by playing fair, bend the rules. Better yet, break them.
  11. Never forgive betrayal.
  12. Whenever you're in doubt about whether an enemy should respect or fear you, always choose fear.
  13. A woman's anger can always be subdued with a diamond ring (and a man's with sex).
  14. Behind every great man is a great woman.
  15. Nothing lasts forever.
  16. Never give a tip to someone who isn't looking.
  17. If you go to war, always strike first. Strike hard, and hope it's the only strike you need.
  18. Peace is only a prelude to war.
  19. Have a priest on call if you choose to be a careless man.
  20. When in doubt, follow your gut.
  21. Man appoints, God disappoints.
  22. Keep your friends close, your enemies closer.
  23. Overestimate the time something takes, and underestimate its rewards.
  24. To make money, you have to spend money.
  25. Lucky is the man who suffers humiliation in front of others, for his revenge will be sweeter.
Bonus. Watch your backs and keep your noses clean.
I have stumbled upon this 25 rules of wisdom this morning. They are interesting. It does not matter whether I believe them all or not. Definitely I have some kind of supportive bias toward them otherwise I would not share them. My personal favorite is Rule#16. Never preach an advice unless you are sure listener is crying for it. I think all of them are interpretation dependent and I have my own and I hope you can get one for yourself as well.

Saturday, October 20, 2012

Hiking

Finally I managed some time to fix the last hiking photos. I took some photos last time and I am not happy with most of them. I have been using 35/f 1.8 for last couple of months. I don't think I became a fan of this lens but this is lens is very sharp and useful for some situation. However, people like me who think their feet weight ton, this lens is not quite comfortable.

Friday, October 12, 2012

Acer Aspire

I got my second Acer Aspire Laptop last week. It is a Acer Aspire TimelineX. It is a true budget laptop around 400$. I used my last Acer Aspire for about four years. Well, I guess laptops are not meant to be used more than that. I used two hp laptops before and each of them survived about a year. When my second hp laptop broke I broke as well and I choose budget laptop from Acer which I used about four years. It is indeed still running but having hard time catching up softwares. My hp laptops were dead and in both cases mother board was gone. I think I am happy with Acer; well, they are not the best brand in the market but they serve my purpose very well.

In fact I am so happy with Acer that I decided to advertise for them for free :) In case you are curious how much I used my laptops? I used it everyday and I rarely tuned it off. I used my laptop for my experimental purpose and each of my experiments runs for week and use 100% CPU. I have a case where my CPU was 100% used for 10 days in a row. Of course the credit goes to Intel but Acer put it well. The hard drive still runs good and I never any trouble. The only maintenance I did was I opened it up several times and cleaned dusts. One last thing to mention, the left hinge was broken for quite some time but it did not make difference for regular use. I think Acer is worth trying.

Thursday, October 11, 2012

Java Generics II

There are so many things broken for java generics. I don't know why java generics is so half baked.
Here is what I wanted to do
Class X<Type>{

public <T extends SomeOtherType> X<T> copy(T param) {
   // do something
   return copy of X
}

Class Y<Type> extends X {
@Override
public <T extends SomeOtherType> X<T> copy(T param) {
   // do something
   return a copy of Y
}
Well, technically my requirement is simple and I see no harm in that. I was just trying to implement a copy method for a class which takes generic parameter. Then I create a subclass of that and trying to override the copy function; guess what? If I use Override annotation, it says no such method exists in base class, if I don't use Override annotation it says name conflict!

Update:
Well, I found the problem; the second class should be written as follows
Class Y<Type> extends X<Type> {
@Override
public <T extends SomeOtherType> X<T> copy(T param) {
   // do something
   return a copy of Y
}

huh! I don't know who is the culprit me, or java generics!

Wednesday, September 26, 2012

Java Generics

Sometimes JAVA is really bothersome. JAVA has generics for quite some times; okay generics is nice to have. You don't have to cast objects and you can efficiently work with typed objects. I just learned that JAVA does not support the array of generic objects! ooops! Thant's mean you cannot create an array of ArrayList<Double>. What you can do is create an array of  ArrayList<?> or  ArrayList  and later cast to   ArrayList<Double> whenever you try to access. What's the purpose of generics if I have to cast! Even worse if you do that without checking the type, JAVA is going to give you a warning! And apparently you can ignore the warning or you can check the type before casting, which means one more if statement (extra complexity)! This is not cheap when you are considering large number of items!

Interestingly, whatever I have just said is partially true. Actually you can create an array of ArrayList<Double>, but you have to initialize it with untyped ArrayList! Wow! and when you do that JAVA gonna give you an warning because of untyped ArrayList! So guess what, there is just no way to create an array of generics without warning. I don't know whats wrong with the generics array! Sometimes generics in JAVA seems half baked to me.

Tuesday, September 25, 2012

Knight Rider

I have been thinking about it lately: a android driven car! I think Google is about to deploy driver-less car on the road. Would it not be nice if Android is running on my car? If my car can run by itself and if takes command by my Android phone I don't think Knight Rider day is far away. I don't have to walk to the parking lot, my car will pick me up from Sarkeys! I don't think lot of people will buy parking permit then, they would just let their car go back home, specially in a small town like Norman.

Driver-less cars

I went to a hike the day before yesterday. It was about two hours drive from home, I wake up early morning and reach there by 8:00 AM. It was obviously pretty boring (by the way, I love driving most of the time and I really enjoy driving). But I what amazes me most is during my entire driving time I didn't have take any critical decision. All I have to do is follow the yellow and white line, signals and other cars' light. Well isn't it interesting? All those pretty mundane task. Then I realized if you follow the traffic rule there is nothing to be excited about driving a car. If you don't follow the rule, you know the consequence! 

Interestingly the number of tasks one has to follow in course of driving a car is pretty small and I am amazed we still don't have driver-less car. I wonder why? I don't see any problem from logical perspective, it could be because of hardware. There is a big buzz going on now about driver-less car and plenty of people think it is madness. Most of them are driving fan. I am yet to see a driving fan as well traffic rules fan! One just cannot be both simultaneously.

And finally, when I was coming back, exhausted after eight miles of walking and rock hopping I was dying for a driver-less car. Who loves to drive after a long hike? I think human should get out of the road. We as a human have done enough, it could be a sport but for daily use I don't think it is our job to drive the car anymore. Please leave the street, human being behind the wheel are most dangerous species on earth.

My only concern is driver-less car would definitely increase the traffic on the road and more traffic means more energy! 

Saturday, September 22, 2012

Death toll

I just wanted to share one of my albums which I realized one of my favorite subject. Somehow, I can feel the strength of them. Everything is gone still standing tight. Sometimes they make me thinking we know nothing about life. Life as we know it is just an illusion.