Monday, December 17

The Confession by John Grisham

I have heard a lot about John Grisham and got to know about “The Confession” so I decided my next read would be this legal thriller novel.

This novel is about an innocent man who has been on a death row for over 9 years for a crime he has not committed. The real killer is out in open, Travis boyette who is a serial rapist and has been in prison half his life. Travis is suffering from a brain tumor and when he learns that an innocent man Donte will be executed for a crime that he is responsible for, he wants to confess now and try to save Donte.
Nicole yerbar, a teenage girl and a high school student was abducted by Travis in 1998. He raped her and buried her in Joplin, Missouri. But then in this case, a young black man Donte Drumm who is a football player and studies in same high school as Nicole “Nikki” gets convicted. Police gets a tip from an unknown caller that Donte is the murderer. Joey Gamble who was jealous of Donte and wanted the death of Nicole who he fancied to be blamed on Donte gives a false testimony against Donte. Later it is revealed that Joey was the unknown caller.

Despite the body was not found during the trial, detective Drew Kerber through false accusations and mental pressure convinces Donte that he is the real murderer. Donte gives in momentarily so to avoid further mental torture and confesses for a crime he has not committed.  The confession and a false testimony from Joey, results in conviction of Donte for an execution.

Meanwhile lawyer Robert “Robbie” Flak and his crew are trying hard and leave no stone unturned to save Donte. They have been trying ever since and know that Donte is innocent. But without any proof, no one from texas law listens to them.

Boyette had fled to Kansas and had lived there ever since. He had been suffering with brain tumor for the past nine years and his health had deteriorated. In 2007, with Drumm's execution only a week away, reflecting on his miserable life, he decides to do what is right; confess.

He meets a priest Reverend Keith Schroeder and confesses to him and providing the details. At first after several efforts, Robbie thinks that Keith is lying and that Travis wants some public attention, but then looking up all the details of Travis’s whereabouts during Nicole’s missing, confirms that Travis is not lying. 

With just few hours remaining for the execution, Joey decides to rectify his false testimony, Travis goes public with his confession, and Robbie is still trying to get Donte another chance and stop the execution, but the corrupt officials and governor of sloan deny all the plea and the Donte gets executed.

What I was expecting

I was hoping a thriller but to tell the fact, it was kind of a drama. Something that could happen in real life. Grisham has taken many real life incidents and executions and put into this novel.  My initial guess was Travis would try hard and be a hero in saving the innocent. Though he tried but at a very last moment, he could actually take some initiative and come a little earlier. Showing up in the last minute definitely did not help.
No doubt the character of Keith is very prominent and stands out of all and at some point he goes out of way from his duties and law to accompany Travis and then Robbie to the state of Sloan to stop the execution of Donte.  
Robbie is aggressive and a true lawyer trying to help innocent. His character is strong in this novel.

The story was kind of realistic. Even when Donte was declared dead, I was hoping in the later chapters  there would be some miracle and it would be revealed that his execution was stopped. But that does not happen.

John’s way of writing is very impressive but the story could have been shortened by a few pages  and it would not matter much. However I would love to read other novels by John Grisham.



Saturday, November 24

Stay Hungry Stay Foolish - By Rashmi Bansal.

Yet another book on entrepreneurship. I have read "I have a dream" by rashmi bansal, it was about social entrepreneurs. But this book is different. I should have read this first. The book has some inspiring stories, as the book title reads

The inspiring story of 25 IIM Ahemdabad graduates who chose to tread a path of their own making.

The book has stories about entrepreneurs, their up's and down's and some take away's. Out of the 25 there were only few who were really inspiring. But lets talk about what this book gives and what i was expecting.


The good parts

1) Inspiring Stories : It is really inspiring to read about people who are self motivated and forward thinkers. For instance "Sunal Handa". The author calls him The Alchemist. This person has played various roles from a hard nosed businessman to an education entrepreneur. I think this guy is a genius an IIT'an and then studies in IIM. He is the force behind the LEM (Laboratory in Entrepreneurial Motivation). Another true inspiring story was of Vikram Talwar. Vikram Talwar had a long and distinguished career with Bank of America, almost more that 25 years. Started his entrepreneur careen in later 40's he has set up a company which is India's largest BPOs. Another one was of  Vardan Kabra of Fountainhead school, an IIT'an. He left a lucrative job to pursue his dream of starting FountainHead school.

2) Qualities : What qualities do they have to be so successful? It is passion, Risk, Courage and Forward thinking. I think every person has to have these i.e Risk taking ability and passion to do something to be successful. It is a common trait in mentioned in any/all books about successful people. 

3) To get Funded or No? This book and the stories makes me think about all the funding thing. The VC's, angel funding etc. To start your dream project, whether you need funding or no depends entirely on the type of project. And every decision about funding and money should be made when they need to be made. It cannot be planned before had. Some of the entrepreneurs choose to get funded and some like to stay away from it. So it is not really a factor or concern for all the individuals. But as i read, i realize that people who opted out of funding did spend from their pocket and some choose not to take home anything during the initial phase.

4) Big dreams and big returns : Yes all the figures are in Crores some going upto 1k Crore. The turnover of almost all the companies. All the entrepreneurs had big ideas which in turn resulted in big returns. It was very surprising to learn about these companies that started as early as in 70's - 80's and were profitable during that era. Just to be clear, i had never thought that the entrepreneurship bug had bitten this early in India. This book was an eye opener.

5) Co-founders : Most of them had a co-founder, a like minded and Risk taker. They were just luck(?) or may be smart to be together and work towards their vision. Some of their co-founders had left at an early stage, but the spark within them and the vision led them to go ahead and fulfill their dreams. To be more precise having a co-founder is important and adds a value to the overall growth of the company. What i learned from this was that you cannot be a all rounder, master of all jack kind of person to be a successful entrepreneur. No doubt there are single successful people, but if we have to go by the statistics, then a venture with a co-founder is more successful.


What i was expecting from this book.

1) Relation of these people with IIM : The book talks about 25 entrepreneur's from IIM. I was hoping at least one page be dedicated to what they learned from IIM. How each person credits their success to his/her alma mater. Did IIM have anything to do with their entrepreneurship or for that matter did MBA play any role in their career. The people in this book are IIM passed out from as early as late 60's. I think the book lost my interest as i was hoping to read about their IIM journeys as well.

2) Details on the start of the business: I was hoping if more insights be given on what exactly happend in the initial phase of the business in each entrepreneurs career. More information such as their thoughts, how did they go about setting a team, what was their thought about putting their own money. Minutely small details about the initial phase was kind of missing. The book talked about the success and turnover in crores, but what was the initial starting turnover and how they continued? I was hoping less of figures and more of the details.

Overall the book is a good read and i myself learnt a lot out of it. Especially the fact that anything can be achieved even in India if you wish to follow your dream.

Sunday, November 18

Getting Started with Django - Installing on Windows.

Initially I had started learning python with python 3.x. And the next step was to work on a web application. Django being the most popular, I jumped into installing it.

Note : Django does not work with python 3.x. It only supports python 2.x
You can read about it in their FAQ's here (https://docs.djangoproject.com/en/dev/faq/install/#can-i-use-django-with-python-3)

I tried running Django 1.4 on python 3 but since it does not support python 3, will not discuss the issues i faced. I then uninstalled python3 and then installed pyhon2.7.3

After installing python2.7.3, I updated my Environment Variables.
I then got the Django folder extracted and stored it in C: drive. Through the command prompt, I followed below steps to install Django.

C:/>cd Django-1.4.2
C:/Django-1.4.2>python setup.py install

The above command installed Django on my python directory in Lib/Site-Packages folder. Also it created a django-admin.py in the python scripts folder.

After installing I checked if django was installed correctly? For that get into the python interpreter in command prompt, i.e type python in your command prompt and then type import django. If no error, then django is installed correctly.

I then created a path variable for python scripts folder, so that the django-admin.py script could be run from anywhere. Also created a path for django/bin folder in the environment variable. When i tried to create a django project it showed a help menu. Any django-admin.py command would return a help menu of django, which is not an expected output.

See below screenshot.


After a lot of googling and stackoverflow, the django path to create a project did not work and hence, i had to settle with using the absolute path to my django script as below.

F:/> cd projects/python
F:/projects/python>F:/python27/Scripts/django-admin.py setupproject mysite

The above script executes and it creates the required mysite project in the directory.

However, i was looking for a possible solution so that i don't have to use the absolute path to the django folder to create my django projects. It appears that in windows, the issue could be with the way registry is stored. A little bit of stackoverflow got me to this helpful link.
http://stackoverflow.com/questions/9107196/django-admin-py-prints-help-only

I then immediately checked my registry entries using the windows regedit.exe command. Checked both python.exe unders applications folder and .py entry for the correct path. python.exe had the correct entry which is

"F:\Python27\python.exe" "%1" %*

However the .py folder in regedit did not show correct value. It showed

"F:\Python27\python.exe" "%1" //Wrong!

Which is wrong. I updated the .py entry using the FileTypesManager software and then tried again to see if the django-admin command worked.

F:\Projects\Python>django-admin.py --version
1.4.2

Friday, November 16

Python program about a Risk Board game.


In the Risk board game, there is the situation where the attacker rolls 3 dice while the defender rolls 2 dice. To determine the outcome, the highest die of each player is compared, followed by the next highest die. For each case, the attacker's die has to be higher than that of the defender to win. The loser will lose 1 army in each case.
Examples
The closest solution i could write was as below. There might be other better pythonic way of doing it.


def RiskGame(attacker, defender):
    deff = 0
    atta = 0
    attacker.sort(reverse = True)
    defender.sort(reverse = True)
    for i,j in zip(attacker,defender):
        if(i > j and i != j):
            deff = deff + 1
        else:
            atta = atta + 1
        if(atta != 0 and deff != 0):
           print ("Attacker loses %d army and defender loses %d army." %( atta, deff))
        elif(deff == 0 and atta != 0):
           print ("Attacker loses %d armies." % atta)
        elif(atta == 0 and deff != 0):
           print ("Defender loses %d armies."  % deff)



The last if else condition seems to be wrong grammatically, as what would happen if more that 1 army is lost?

RiskGame([1,2,7], [1, 5])
#'Defender loses 2 armies.'
RiskGame([6,2,6], [6, 6])
#'Attacker loses 2 armies.'
RiskGame([1,4,1], [1, 2])
#'Attacker loses 1 army and defender loses 1 army.'

Monday, November 12

Digital Fortress by Dan Brown.

A techno-thriller. Digital fortress is a very good read.  It is simple yet amazing and considering the fact that it was published in 1998, it is way above standard. I got the chance to read it recently. Dan Brown is one of the best fiction writer and all his novels are highly appreciated. Reading this book he has got himself a new fan.

Just the time when it was an Internet boom, the author came out with a novel relevant to that era. I am quite sure, the author must have done a tremendous amount of research, as he was able to convince the audience about the topic, about cryptography, about super computers.
The topics covered by the author, are highly convincing, very well defined for people to understand and the story is streamlined from even though the events occur in different places among different characters.

NSA (National Security Agency) has a code breaking super computer program called TRANSLTR which breaks decrypts code and helps secure any terrorist activities. It is claimed to take maximum of 10 minutes to break any code. It is so powerful. However, it cannot break a complex code - DIGITAL FORTRESS - and hence Commander Trevor Strathmore calls in Susan Fletcher, the head cryptographer, to crack it. Digital Fortress algorithm is written by one Ensei Tankado, a former NSA employee who became displeased with the NSA's intrusion into people's private lives. Strathamore tries to be clandestine about the whole situation. Tankado is about to auction the algorithm on his website, but eventually dies in what appears to be a heart attack. Strathamore learns that the key to unlock the algorithm is hidden in ring which tankado gives it away to a person on his last breath.

Strathmore asks David Becker (Susan's fiancé) to travel to Seville and recover a ring that Tankado was wearing when he died. David obliges to strathamores request, but later realises how deep this is. The ring exchanges a lot of hands and David tries anything and everything to recover it.

Dan brown has a very unique style, and the story uncovers very slow, with a lot of shocker of course. Later in the story there are lot of twists and turns. It turns out Ensei Tankado had something different in store and so did Strathamore.

Thursday, November 8

Python program to Check if a Year is a leap Year.

A leap year is divisible by 4, but not by 100, unless it is also divisible by 400.

def LeapYear(yr):
if(yr % 4 == 0 and yr % 100 != 0 or yr % 400 == 0):
return True
else:
return False

>>> LeapYear(2012)
True>>> LeapYear(2010)
False 


Wednesday, November 7

Python program to print 12hr to 24hr format time.

def time24hr(tstr): 
new_time = tstr.split(":")
ampm = new_time[1]
ampm1 = ampm[2:]
hours = int(new_time[0])
if((ampm1 == "am") and (hours == 12)):
time1 = "00"+ampm[0:2]+"hr"
elif((ampm1 == "am") and (hours < 12)):
time1 = str("%02d" %hours)+ampm[0:2]+"hr"
elif((ampm1 == "pm") and (hours < 12)):
time1 = str(hours+12)+ampm[0:2]+"hr"
elif((ampm1 == "pm") and (hours == 12)):
time1 = str(hours)+ampm[0:2]+"hr"
print time1

Expected output

time24hr('12:34am')
>>> 0034hr
time24hr('7:34am')
>>> 0734hr
time24hr('7:34pm')
>>> 1934hr
time24hr('12:34pm')
>>> 1234hr



Friday, October 26

Social entrepreneurship, Risk and "I have a dream"

"I have a Dream - Rashmi Bansal" , this book makes you think. It is about social entrepreneurship, passion of 20 odd Indian human beings.

I have a Dream is the story of 20 idealists who think and act like entrepreneurs. They are committed to different causes, but they have one thing in common: a belief that principles of management can and must be used to achieve a greater common good. These stories say one thing loud and clear change starts with one person, and that person could be someone next door. Someone like you 

Entrepreneurship, passion, bring a change in society etc are keywords which will always resonate in the society, over the internet, in news papers and in books. With this book Rashmi Bansal, talks about a different class of people she calls social entrepreneurs.

Wikipedia defines Social Entrepreneurship 

Social entrepreneurship is the recognition of a social problem and the uses of entrepreneurial principles to organise, create and manage a social venture to achieve a desired social change. While a business entrepreneur typically measures performance in profit and return, a social entrepreneur also measures positive returns to society. Thus, the main aim of social entrepreneurship is to further broaden social, cultural, and environmental goals. Social entrepreneurs are commonly associated with the voluntary and not-for-profit sectors, but this need not preclude making a profit

It feels nice to know that there exists people who are willing to take risks. But there are just 20? Or 100? or more, but in a country where the population is in millions, isn't that number negligible?

Be it social entrepreneurs or Business entrepreneurs, there are certain traits which are common in both.

The Risk factor. It all boils down to how much Risk are you willing to take. Are you bold enough to take that step? In country like India, where there is a lot of dependency on family, especially the middle class people have to think a lot before getting into those shoes (I don't have any statistics). You have a great idea but if you are not willing to take risk, you will not be able to execute it. 

The phase from initial startup to success : Many idealist had to loose a lot during their initial stage. But later on they met success and got it all. It was worth it according to them. And yes, a immense success and joy will overcome the initial failure. The point here is, we have to consider this factor. You want to take risk, you definitely will have to loose something (well most of the times at least).

Courage - Yes, courage, strong will power and strength to fight all odds in your way. You cannot get up one day and say you want to leave your 10k+ job so that you can do something to bring change in society and expect your family or friends or neighbors to applaud on your decision. When you have an idea and you want to execute it, you need to focus, but with such distractions, you need to work harder. All this requires a lot of planning, a lot of courage.

This book is really beautiful and inspires you to take the entrepreneurship path by touching your heart and brain and soul with stories, success stories of various people. I had read this book some time back, and do not even remember most of people's name, but to summaries, it talks about people who took risk, had courage and were willing to bring change. They succeeded. Well we do not have book on failures, do we? 

I have a dream.

Sunday, October 21

Python - Using Sublime text 2 to run python code.

These days i have been learning python from "Head First Python" book. They suggest to use idle as the python IDE, but with the availability of sublime text 2, i have been trying to use that extensively for all my projects.

It is very easy to run your python code in sublime text 2.

1) Create a new file and save it in directories where python is accessible and it can run your code.
Eg Create file hello.py and save it in F://python32/textcode folder.

2) In sublime text 2, go to Tools -> Build System and select python.



3) Type your python code and then save it. Press Ctrl + B to build your code a simple console appears to show output of your code. 



Friday, September 14

Photoshop - Experiment with neon text effect.

Tried to work on the neon text effect tutorial provided in psdtuts. This is what i could do.
 





Monday, July 30

Interesting to know - Stock Market

Got this in an email. I had to post it. Really awesome read.
  
Interesting way to understand Profit & Loss in stock market -

Once upon a time in a village, a man appeared and announced to the villagers that he would buy monkeys for $10 each.  The villagers, seeing that there were many monkeys around, went out to the forest and started catching them. The man bought thousands at $10 and as supply started to diminish, the villagers stopped their effort.  He further announced that he would now buy at $20. This renewed the efforts of the villagers and they started catching monkeys again. Soon the supply diminished even further and people started going back to their farms.  The offer increased to $25 each and the supply of monkeys became so little that it was an effort to even see a monkey, let alone catch it! 

The man now announced that he would buy monkeys at $50! However, since he had to go to the city on some business, his assistant would now buy on behalf of him.  In the absence of the man, the assistant told the villagers; "Look at all these monkeys in the big cage that the man has collected. I will sell them to you at $35 and when the man returns from the city, you can sell them to him for $50 each."  The villagers rounded up with all their savings and bought all the monkeys. Then they never saw the man nor his assistant, only monkeys everywhere!

Now you have a better understanding of how the stock market works.

Monday, June 18

My thoughts on B.Y.O.D to work.

Some time back I read an article on Bring Your Own Device or B.Y.O.D to work, and how companies are favoring it. The article said it would increase the productivity of employees, they would have flexibility to work on machines they are comfortable with etc. However the most important concern being, the security. These are most obvious pros and cons. However I think the entire concept of B.Y.O.D depends on the organization size.


Organization size: The larger the organization, the more the concern of data security. If every employee is allowed to get their own devices, chances are that data theft could be possible. Also, having your own device means, you have freedom to install your own software, games, music etc. And organization cannot keep a check on what software's are being installed on personal computers, whether they are legit or pirated.
However B.Y.O.D would definitely work on startups. With small size teams, all are like minded and working towards a goal. Flexibility of use of software's, music, and gaming is a culture of startup. Everyone knows what needs to be done, everyone knows what their peers are doing. Apart from that, small sized companies have benefits on hardware costs.

Working on remote machines: In large organizations, employees are required to work on remote machines or Virtual machines. These are set up, so that the hardware cost is reduced. Working on remote machine is slow and it depends on two factors

  • The internet speed
  • The Hardware

With broadband speed as slow as a snail, time spent to complete a particular task is much more compared to working on a local machine. Also if given a high end machine, processing would be a little better but again it depends on the internet speed as well.

Transport: Carrying your own laptop to work is tiresome, considering the fact that most IT companies are situated outskirts and each day every employee has to travel at least an hour on average. Why would one want to carry their precious gadgets every day back and forth in a public transport? Would it not be feasible to use work machines instead.

To conclude, B.Y.O.D to work would best suit small size teams and startups then large organizations.

Monday, June 11

How to give a different color to line-strike and a different color to text in html css.


Encountered this problem when I had to give text color red and the strike through line color black.

The html markup should have strike tag outside with your style and then your text inside a span with its style. This way we can achieve a strikethrough with different color than its containing text. Following is the html code. For simplicity sake I'll be using inline styles.

<strike style="color:#000000;">
                <span style="#FF0000">MY Text</span>
</strike>


Yup, this is already solved here on stackoverflow. You can find alternative answer as well.



Tomato Soup with Egg droppings.


My first experiment in cooking. I saw this recipe on TV the other day, and had to try it myself.

Following ingredients were used.

  • 1 medium sized onion – Chopped into small cubes.
  • 4-5 Medium size tomato – Chopped into small cubes.
  • 2 Spoon Vegetable oil.
  • Fine chopped ginger and garlic. (for taste)
  • 2-3 Spoons - Tomato sauce.
  • 1 Egg.
  • ½ bowl mixture of cornflower and water.

Recipe

Take a mid size utensil, put 2 Spoon Oil. Put ginger and garlic in it and let it cook for some time. Then put bowl of chopped onions and let it cook till they turn brown. Then mix chopped tomatoes into the mixture and stirs it well. After some time, till all ingredients are mixed well, put the tomato sauce. Mix well. Let it cook for some time.

While your mixture is being cooked, take a bowl, put water and mix cornflower in it. Mix well. Once you start getting the flavor of your mixture which is being cooked, mix bowl of cornflower and stir well so that it gets mixed nicely.  Close the lid, and let it cook for some time.

Now break egg in a small cup, stir the yolk with egg white well.

The mixture must have cooked well by now. Take your cup of egg and from a height, start to drop the egg mixture and simultaneously stir, so that egg gets mixed in nicely. Cook for few minutes. Garnish it with coriander and serve hot.

Thursday, June 7

Awesome Idea and an Awesome motivation

First thing in morning is to check hacker news. Two of the blog posts that caught my attention and made me think on them.


On{X} : The coolest thing to happen to android.


I was awestruck when I read this post on techcrunch. No not about Microsoft and android. That is of least interest. The idea and implementation behind the on{X} really was amazing. Depending on the location of a user and his settings, which will be very very easy to configure for a user, your phone will notify you. For example, when you reach home, get notified that you want to buy milk. Or notify is you are not in gym for more than 3 days etc. Wow, this is really an amazing idea.


Imagine you could program your Android to text your wife when you left work. Now imagine your Android reminding you in the morning to grab your umbrella if it's going to rain later in the day.

All users need to do is download the Android app and then configure rules on the on{X} site. Rules are called 'recipes' and there are 11 templates ready to go. These include ones such as 'Launch the music app when I am walking' and 'Remind me to visit the gym if I haven't been there in 3 days'. Check out the video at the bottom of the post for a demo.

Each recipe can be easily edited by novices before being pushed to the user's device. The rules and all the data they hold are private, and are available only to the user.

Another post that made me think was from pocket developer.

Pocket's Tips for Aspiring Android Developers: It's Not Really Terrifying, and In Fact Quite Enjoyable


Max Weiner, Pocket's lead developer for Android, explains how easy it is to develop an android application. He explains how their quest as an android app developer was started and what all they did to reach success. Very well written and highly motivational for aspiring android developers like me.

Saturday, June 2

Being awesome

It was a busy day today, as planned i had no time looking into that pdf, which i had left open yesterday. Now that, i got some time for myself, first thing i did was to check hacker news and then google reader. A post from coddinghorror really makes a software developers day. And exactly that happened. Jeff Atwood, explains in his post how to stop sucking at things and be awesome.


I strongly agree to the mantra put down by him, though they are obvious, and deep down somewhere i know them, but still coming across it and reading it makes me realize them.

So without wasting time, here i am writing about it. I want it to be forever with me.

As jeff says,

Here's what I've seen work:

    1. Embrace the Suck
    2. Do It in Public
    3. Pick Stuff That Matters

The "Do it in Public" is something which is been missing in me.
Normally what happens is, if you have something awesome that needs to be done, you try to keep it a secret, with the fear, of it being stolen, or the fear of you never be able to complete it and then later regret and feel embarrassed about it. So technically the fear wins before you even starting to work on that awesome idea of your's and then you never complete it.

Lets go to point 1, Embrace the suck, that is, why care about what others would think if you succeed or fail. As jeff mentions, every one has to die one day, so why not do something and die, instead fear what others will say and never get to be that awesome. Quoting jeff's point on fear here.

Mostly, I think it's the fear that gets us, in all its forms. Fear of not achieving. Fear of not keeping up. Fear of looking dumb. Fear of being inadequate. Fear of being exposed. Fear of failure. The only thing preventing us from being awesome is our own fear of sucking.


To be a successful software developer, i have read a lot of articles, read the pragmattic programmer book, learned about productivity tools, bug trackers, following hacker news religiously, but the above mantra, well, does not just apply to a specific profession, but if applied correctly, will also improve our lives.

"It's better to be safe then Sorry", is such a crap. You know what's better then being safe. Being AWESOME. - Codinghorror

Tuesday, May 29

The Pursuit of Happyness.

A must watch movie based on a real story. It is about Chris gardener and his struggle to achieve happiness.  Chris invests his family's savings into a bone scanner which proves to be a white elephant leaving him and his family with financial issues. Chris's wife leaves him to settle in new York, but he has his son with him. Chris then earns an internship as a stock broker where he has to juggle between his work, find a home to live and also take care of his kid.
The entire movie shows Chris's willingness to accept his situation and determination to achieve his dreams. At one point, when he barely has money and is homeless, Chris does not reveal his situation to his co-workers and tries to figure out how to solve his problems. This was I think the best part of the movie, it was very inspirational.
Also trying to fix one of the broken bone scanner machine, and studying his way to his internship exam, which selects only one out of twenty, shows how if one is determined, firm and focused, can achieve whatever one dreams.
A conversation between Chris and his son Christopher, where Chris explains how important it is to follow your own dream, is motivational. This is what Chris says to his son.
Hey. Don't ever let somebody tell you,
you can't do something.

Not even me.
All right?

You got a dream? You gotta protect it.
People can't do something themselves, they want to tell you you can't do it.
You want something?
Go get it!
Period!

Monday, May 21

Table row hide and show using jquery issue.

The other day, I encountered a problem in dynamically showing and hiding table rows using jquery. In IE it worked fine, but in chrome and firefox, the UI would break. When I would display = "block", the first th would wrap and contain the entire tr.
Searching on google, I stumbled upon this post  which helped solve the issue.
The solution is simple but way to difficult to guess.
We could just say display = "" and chrome or firefox will reset it to table-row. This does not affect IE though.

Friday, May 18

Iphone's camera app when phone is locked, yet another simple but awesome feature.

The other day, my friend got an Iphone4. He had kept a password deliberately, since he knew I would want to check out his personal stuff. (Yes – Upfront warning, never let me use your phone :P). So while I was trying to guess his password and the phone getting locked for one minute, I saw a very good feature which iphone has introduced.
We can use the camera app, even if the phone is locked. That made me wonder why iphone had to do this. What I could think of is this,
  1. Camera app is an important part of a smartphone just as music app is. Instead of unlocking and then searching for your camera app, why not just provide it on one simple click.
  2.  Worst case scenario, if you had to take pics of record a video of something bad happening around, you would not want to waste time in entering your password and then looking for your camera app. In such situation every second every microsecond counts.
This may be just another feature, but it actually shows how the apple as a company thinks about its users. Simplicity, usability and customer satisfaction, makes this product so awesome.


Monday, May 14

Book Review - A thing beyound forever by Novoneel Chakraborty

This book is about love. period. At first i thought i would not read it, but as and when each chapters passed by, i was curious to finish it. It has lot of philosophy. The characters in the book come lively with each words.
The story is about Raen Verma and Radhika Sharma, starts when both are teenagers. Raen falls in love with a girl called savera, However radhika is in love with Raen. Raen tries to propose Savera, but fails both the times and then radhika comes in his life.
Raen starts liking radkhika, but he cannot forget savera. Raen mentions most of his activites in his personal diary.
Raen falls sick and dies, leaving Radkhika alone. Radkhika only has his diary left with her. Even after 13 years for Raen's death, Radkhika still mourns over Raen, and is not ready to face the truth and move on with life. Radhika who is a Doctor, meets with a kid and soon finds out that the kid is different and connects her with Raen, the kid has same interest / hobbies as Raen and starts beliveing in Reincarnation. Only to find out later, whom the kid belongs to, Radhika's belief gets stronger.
The story is simple and somewhat predictable.
The good parts
1) It makes us believe in love, re-incarnation.
2) Very nicely written and simple to understand and follow. The is the only reason i completed it.
The Bad parts
1) In search of love, the protogonist dies, though i am still in doubt as to who is the main character, Raen verma or Radhika Sharma.
2) Sad endings, and it will always keep me confused as to why did Radhika Sharma commit suicide. Just because she did not get her first love does not mean she has to die.
3) The book gives emphasis on first love. (Not a con but i hated that :P)
Overall Rating : 3.5 out of 5

Tuesday, May 8

How to connect Archos 5 internet tablet on windows 7 as USB mass storage device.

I have been using archos 5 internet table over a year now. Since this tablet is an android tablet, its format is ext3. Initially i somehow managed to install ext2fsd software and ran the tablet on my windows 7 machine. However recently i could not get ext2fsd software to run my tablet.

While i was browsing my tablet, i realized, archos settings provides options to be able to view tablet in two formats i.e ext3 and FAT32.

ext3 being the default, i was using it. However if you change the mass storage format to FAT32 for windows compatible, it erases your entire data which was earlier stored in ext3 format.

To change the mass storage option go to
settings -> About Device -> Repair and formatting tools -> Mass storage file system format and then select FAT32 which is in windows compatibility mode.

Once you select this, it asks to flush your device. Once the device restarts, you need to ensure that your device is in mass storage mode to be able to recognize by windows, if not, windows gives a driver missing error.

To do that, go to
settings -> Device storage and USB connection -> USB connection mode and select Mass Storage drive (MSC).

Once done connect your device via USB cable and it will appear as a Storage drive for windows.


Tuesday, March 20

Find out if animation is complete in webkit animation CSS3

I had to find out if animation is complete so as to perform some other event.
You can do this in jquery

    $("#animationdiv").bind("webkitAnimationEnd", function(){
        $("#afteranimation").show();
    });
      
animationdiv is the div which has some webkit animation being performed on.

afteranimation is the div id which needs to be displayed once the animation is complete.

This javascript will work only for webkit based browsers.


Friday, March 2

Give it a thought

The awesome article by guys from 37signals

Give it five minutes

This article makes me think. quoting some lines from there

There are two things in this world that take no skill: 1. Spending other people's money and 2. Dismissing an idea.

Dismissing an idea is so easy because it doesn't involve any work. You can scoff at it. You can ignore it. You can puff some smoke at it. That's easy. The hard thing to do is protect it, think about it, let it marinate, explore it, riff on it, and try it. The right idea could start out life as the wrong idea.


source : http://37signals.com/svn/posts/3124-give-it-five-minutes

Monday, February 20

EXCEL KEYBOARD SHORTCUT TO FILL SERIES

Keeping track of stuff on excel becomes easier.

I was trying to enter Sr. No in a column, and drag and drop helps. However we need to use the mouse for that.
To get the same thing done via keyboard we can use the following

ALT + H + FI + S + enter.

This is a longer process then using mouse, but it works for keyboard lovers.


Thursday, February 9

Iapd page blowup when changing orientation from portrait mode to landscape mode.

When viewing a page in portrait mode and then changing the orientation to landscape mode, the page blows up (Zooms out).
To avoid this use the following meta tag.

<meta name="viewport" content="width=device-width, maximum-scale=1.0, user-scalable = no" />

The parameter maximaum-scale=1.0 does the trick.



Monday, January 30

Hope


I am music lover and of all the millions songs out there, i only like
linkin park. They are my favorite. There is this slow track of linkin park
song titled in the end, which by far is the most awesome song ever. However
out of the odd 200 songs in my phone, i don't know what is it saved as in
my playlist. Every day whenever i listen to music, i always *hope* that
today be my lucky day and i get to hear it. Yes hope it is. I know this is
stupid, but i love this game.

If i am lucky, i get to listen to it, makes my day, but if i don't get it,
there is this supernatural power - hope - which tells me there are good
chances i will get to listen to it next time.

Also, if i listen to that song, i refrain my self from checking the mobile.
I want to play this game forever.

Everyone lives by hope and even the most to the core atheist would also
believe in it.

Sunday, January 8

Localhost on android emulator

You can access your localhost from android emulator by following the URL
http://10.0.2.2/