Thursday, December 23, 2010

A Sample Web Application - 2 (Junit & Emma)

This is in continuation with my previous post


Now i have added following
  • Junit
Junit is a unit testing framework for Java. To use Junit with maven all i had to include it as a dependency in pom.xml

Then i wrote a test class (MatchingUsernamePasswordValidatorTest) for testing the isValidLogin(IUserContext) method of class (MatchingUsernamePasswordValidator)

As you can notice the test classes name just appends Test to the class name being tested.

This test class contains 2 tests. One for the happy scenario in which user name and password matches and another for negative scenario in which username and password don't match.

Now run
$mvn test

At the end of the output you can expect to see something like this

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running mayank.anup.ecom.login.MatchingUsernamePasswordValidatorTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.125 sec

Results :

Tests run: 2, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
  • Emma
Emma is a code coverage tool. I have been recently introduced to it. With this you can know that how much of your code was executed during the time of your test execution. Again you have to include it in your pom.xml as a dependency.

So your pom.xml dependency list may have something like this














Now you can run emma reporting using following

$mvn emma:emma
You
can expect to see an output like following

[INFO] [emma:instrument {execu
tion: default-instrument}]
[INFO] Instrumenting classes with EMMA
processing instrumentation path ...
instrumentation path processed in 266 ms
[3 class(es) instrumented, 7 resource(s) copied]
metadata merged into [E:\myWorkspace\amj-ecom\target\coverage.em] {in 31 ms}
[INFO] [resources:testResources {e
xecutio
n: default-testResources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platfo
rm dependent!
[INFO] skip non existing resourceDirectory E:\myWorkspace\amj-ecom\src\test\resources
[INFO] [compiler:testCompile {exe
cution: default-testCompile}]
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dep
endent!
[INFO] Compiling 1 source file to E:\myWorkspace\amj-ecom\target\test-classes
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory: E:\myWorkspace\amj-ecom\target\surefire-reports

-------------------------------------------------------
T E S T S
---------------------------------------
----------------
Running mayank.anup.ecom.login.MatchingUsernamePasswordValidatorTest
EMMA: collecting runtime coverage data ...
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.172 sec

Results :

Tests run: 2, Failures: 0, Errors:
0, Skipped: 0

EMMA: runtime coverage dat
a merged into [E:\myWorkspace\amj-ecom\coverage.ec] {in 31 ms}
[WARNING] While downloading hibernate:hibernate:3.0.5
This artifact has been relocat
ed to or
g.hibernate:hibernate:3.0.5.


[INFO] [emma:emma {execution: default-cli}]
processing input files ...
2 file(s) read and merged in 47 ms
writing [xml] report to [E:\myWorkspace\amj-ecom\target\site\emma\coverage.xml] ...
writing [html] report to [E:\myWorkspace\amj-ecom\target\site\emma\index.html] ...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24 seconds

The key thing to note is that first emma does some byte code level instrumentation with your generated main classes, then it
runs the Junit Test and finally prints the result output in html format.


Monday, December 20, 2010

Reading: Wise & Otherwise (Sudha Murty)

Here are some of the good lines from this book.

Conversation
I have a theory about conversation. You can call it an empirical formula. Quantitatively speaking, 'conversation' is inversely proportional to economic standing. If you are travelling by bus, your fellow passengers will get into conversation with you very quickly and without any reservation. If you are travelling by first class on a train, people will be more reserved. If you are travelling by air, then the likelihood of entering into conversation is quite small. If you are on first class in an international flight, then you may travel twenty four hours without exchanging a single word with the person sitting next to you.

Friday, December 10, 2010

Reading: Unaccustomed Earth (Jhumpa Lahiri)

Recently we bought 2 books from the makeshift street side bookstore in Parihaar Chowk. One is "Unaccustomed Earth" by Jhumpa Lahiri and other is "Intelligent Investor" by Benjamin Graham.
Before this i have not got a chance to read any other work of Jhumpa Lahiri. She has written famous books ("The Interpreter of Maladies" and "The Namesake").

This books is a collection of short stories, divided in 2 parts. Part one contains 4 unrelated stories, whereas part two contains 3 stories which are linked to one another.
All of the stories revolve around the Indians (first or second generation) living in US. It is quite a fascinating read. Author has captured the psyche of characters very vividly. The relationships between father and daughter, between mother and daughter, between brother and sister and so on is explored in the stories in their given context. I was able to relate to many of the points of story because of my stay in US.
Although all stories are brilliant, my favorite ones are "Unaccustomed Earth", "Hell-Heaven", "Only Goodness" and "Once in a Lifetime". I have read fiction after 8-9 months and it was very refreshing to do so. Looking forward to read other above mentioned books in near future.

Saturday, November 27, 2010

Aga Khan Palace


Yesterday, we got a chance to go to Aga Khan Palace. This was our first trip to see something after coming back to India. It is a place of great historical importance as Mahatma Gandhi and Kasturba Gandhi were kept in Jail here during freedom struggle days.
We had taken the directions from Google, but soon realized that in India human network of finding directions is more useful than having a printout of directions. You should have a general knowledge of which way you want to go, rest you can ask.
We found the place very calm when we went inside. The campus contains very beautiful garden and green grass lawns. There is a nominal entry fee of Rs 5 per person. There are 4-5 open halls on the first floor where famous prisoners like Smt Sarojini Naidu were kept. These rooms have very rare photographs of Gandhiji, Vinoba Bhave, Abdul Gaffar Khan etc. It is very emotional to watch these selfless great people. Wonder from where did they get that kind of courage and high morals. Very rare quality in current times. So i said a silent thank you to those who didn't care for their lives so that i can have a good life today.
Then went to the Samadhi Sthal of Kasturba Gandhi and Mahadeoji Bhai. We said our prayers. There was a small khadi store near by. We purchased few items along with very delicious Ghee cookies.

Wednesday, November 24, 2010

A Sample Web Application - 1

I am trying to learn technologies using a practical approach. Right now my focus is to create a sample e-commerce web application using Java Technologies.

The technologies of focus are

1) Spring : For dependency injection
2) Struts2 : For MVC framework
3) Hibernate : For persistence
4) Maven: For build management
5) Tomcat 6 : Servlet Container
6) SVN: Source code managemnt

Since building a full scale e-com app is not in scope for small scale learning approach, i am going to take baby steps.
My first step is

Create a login funcitonality
Allow user to enter username and password. Right now the system will just say a successful validation if both username and password are same. It doesn't involve DB interaction and still able to use Spring and Struts 2 integration.

Build Instructions

Use this command to anonymously check out the latest project source code:

# Non-members may check out a read-only working copy anonymously over HTTP.

svn checkout http://amj-ecom.googlecode.com/svn/trunk/ amj-ecom-read-only

You will need a svn client for this. I am using Tortoise SVN.

To build it you just need to run ($mvn package from your command prompt). It will create a war file ecom.war in target directory. I have created a small script cleandeploy.bat for easy deployment of app to a tomcat container. You will need to edit this file to point to the correct path of tomcat dir as per your system.

Any suggestion and feedback is welcome.

I intend to add more posts as and when i add more functionality in this project.

Tuesday, October 26, 2010

Red Box

He opened the box. The red box. He has been pondering for quite long. Unsure of the contents inside. Unsure if it was a practical joke played by one of his friends.
Past few days have been really tough on him. He was trying his best to do the right things. But it doesn't matter. Whatever he tried, boomranged on him. To others he was living a perfect happy life. He had a nice paying job in one of the best firms in town. He had a beautiful wife and a very darling daughter. What else one needs in life. But there was discomfort and discontentment. And especially for past few days it was getting worse. His boss was throwing all kind of unwanted work at him and was expecting faster results. As if he had a magical wand to do it. He was supposed to go to onsite project, but that seemed far from happening. Long hours at work were affecting his health and family life too.
Yesterday he was going through all the humdrums of his daily routine. It was approaching lunch time and although he was feeling hungry, he didn't want to go to the crowded cafeteria. He didn't want to sit with the large crowd, where everyone was constantly taking to other and making all kind of noises. By GOD, today he can't tolerate them. On the other hand eating on his desk was even more disgusting. Invariably one or the other colleague will pop up in his cube and will say "Wow eating alone !!!". Who gave them the right to enter in his solitude. So he decided to wait. He couldn't concentrate on his work, so he decided to take a stroll in the nearby park. This park was a haven for him. Whenever he felt stressed, he came here and spent some quiet time. The fresh air, the rustling sound of leaves and occasionally a bird flying nearby energized him. So he came to the park and was taking his usual walk around the small lake. He was still thinking of his problems and how to solve them. Suddenly a thing caught his eye. It was a bright red box. It was lying under a tree. He looked around to see if someone has left it there by mistake. But there was no one there. Curiosity took hold of him. He decided to have a look at it.
The box looked like a lunch box. It was almost brand new, as if someone has just opened the cover. But there was no cover box near by. The lid seemed to be firmly put on it. He cried out loud "Who has left this box?". But there was no one there to answer him. He was hesitant to touch it. Who knows who has left it there? But he picked it any ways. It was little heavy. Then he noticed a small colorful card on the ground. As soon as he picked up the card, he was scared. It was written "To Ankush, It will solve all your problems." He almost dropped the box and card. It was for him. How in world someone will leave this for him. Who is there playing tricks? Soon he was angry. He shouted and hurled some abuses towards that person. But there was no one there. He thought "To hell with them". He left the box and card as it is and started leaving the place. He didn't go very far then the idea struck him lets find out who is doing this trick. So he hid behind another tree and started waiting. He was also keeping an eye on the tree where the box was. But no body came there. He was hiding there for almost couple of hours but nothing happened. Then he realized that he has been away from office for quite some time and his stupid boss must be looking out for him and thus decided to return to office thinking that whoever is playing this trick will get tired of it.
On returning to office he was caught up in work and forgot all about it. He even forgot that he hadn't taken his lunch. As usual it got very late and it was near 9 PM. Almost every one was gone. He too decided to leave and then he again recalled the incident of afternoon. He almost laughed that he had given a suitable reply to whoever was playing game with him. However just to check, he drove near the park and decided to have one more look at that tree. See if the box is still there or gone. It was dark and no human soul was in the park. With a hurried pace, he went near the tree and to his horror he saw the box as he had left in the afternoon. He picked up the box and card and returned to his car. He decided to inspect it at home. But soon decided that it was better that he do it alone. His wife will ask so many questions and he didn't had that kind of energy and patience. He thought he will check it later in the night.
His morning alarm at 5:30 woke him up. He couldn't sleep well last night and was dreaming all sorts of thing. Both his wife and daughter were fast asleep. Quietly he got down and went to the garage to get the box. He brought it in his living room and put it on the center table. He was still not sure if it is a wise idea to open the box. Who knows what is in it. Maybe some drugs. He kept on staring at it. Clock was approaching 7. Very soon his wife and kid will wake up. So he decided to open it. With trembling hands he opened the lid. A very nice smell came out of it. He looked inside. He was relieved and couldn't stop smiling. Soon tears started flowing and he felt sleepy and had simply dozed off on the sofa. Later doctors pronounced him dead at around 7.

Copyright Notice

© 2010 Anup Mayank

No part of this website may be reproduced or transmitted in any form by any means, electronic, mechanical, photocopying or otherwise, without the prior written permission of Author.

Saturday, October 23, 2010

Quotes From Book: The little book that beats the market



  • Saving : It takes a great amount of discipline to save any money. After all, no matter how much money you earn or recieve from others, it's simply much easier and more immediately rewarding to find something to spend it on.

  • On Academic theories behind irrational behavior of stock market: In fact it is such a good question that professors have developed whole fields of economic, mathematical, and social study to try to explain it. Even more incredible, most of this academic work has involved coming up with theories as to why something that cleary makes no sense, actually makes sense. You have to be really smart to do that.

  • Individual stock picking: Choosing individual stocks without any idea of what you are looking for is like running through a dynamite factory with a burning match. You may live, but you're still an idiot.

Tuesday, October 19, 2010

Book Summary: The Dhandho Investor

This is a book on investments by Mohnish Pabrai, the founder of "Pabrai Investment Funds". I have read this book over a weekend and found it to be quite interesting, knowledgeful and entertaining at the same time. This is a 200 page book with examples from various successful enterpreneurs and quotations from investors like Warren Buffet and Charlie Munger. In nutshell the book talks about how you can get good return on your investment(bet) without taking unnecessary risk. The recurring theme is "Heads I win, Tails I don't loose much".
Initial few chapters talk about the investment strategy taken by successful people. It is a very interesting read about how Patels in US own more than 50% of the motel business. How Richard Branson and Laxmi Mittal have made their fortune.
Then he goes on to describe the "Dhandho Framework" (Investment Strategy). I am jotting down the 9 investment principles outlined in the book.
  1. Focus on buying an existing business
  2. Buy simple business in Industry with ultra low rate of change
  3. Buy distressed businesses in distressed industries
  4. Buy businesses with a durable competitive advantage
  5. Bet heavily when odds are overwhelmingly in your favor
  6. Focus on arbitrage
  7. Buy businesses at big discounts to their underlying intrinsic value
  8. Look for low risk high uncertainty business
  9. It is better to be a copycat than to be an innovator
All these points are explained with examples and doing mathematical modeling DCF (Discount Cash Flow, Kelly Analysis etc.). I will admit that i haven't done the mathematical part on my own. That is an exercise for later.

In summary, the author urges you to find out simple businesses which you can understand. Do your due reading, find out what are the factors in that business. If you don't understand, don't invest. Then within that industry find out businesses which are fundamentally strong but for some reason their stocks are trading significantly below the intrinsic value. Of course it means more study and analysis. You should do a rough odds estimate of what are the chances of getting good return and what are the chances of break even , and what are the chances of being complete failure. If the odds are heavily in your favor, then put good amount of money on such bets. You should be patient for a duration of around 3 years. As businesses take time to solve their issues and uncertainties to disappear. This is the strategy taken by author and his 2 idols Warren Buffet and Charlie Munger. Hope it works for you too.

Saturday, October 16, 2010

Cool Advertising

While browsing on a website, i stumbled upon this. First time for me and i was wowed. The interesting fact is that the clothes worn by the actor (Salman Khan) was pre decided. What do you say??

Tuesday, October 5, 2010

Drawing with SDEdit

Today I had been assigned the task of creating sequence diagram for one of the project I am working on. As with most of the things this was first time for me.

A sequence diagram helps you in understanding flow of control from one component to another component of your software when a particular action (ex. User presses a button, or your web service receives a request, or a scheduler wakes up and starts some action) is triggered. It is the intermediate step between writing problem on a document to converting solution in a programming language (Java, C/C++ etc)

Anyways since I was new to doing this, my first thought was lets do it in Microsoft word or Powerpoint. But very soon I realized the futility of this approach. I will have spent whole day on drawing lines and blocks. Then someone suggested to use Microsoft Visio. I installed it too, but only to realize that it doesn't have capability to draw sequence diagrams.

Then I searched for tools. There are many tools available on internet but most of them are commercial. Finally I stumbled upon SDEdit. This is a java based tool and available as open source. Perfect for my needs. However understanding the working of this tool required reading the help text for 30 minutes or so. It uses commands to draw and is not as intuitive as MS Word or powerpoint. Reminds me of latex. But the end result was very beautiful. With just 10-12 commands I had drawn the sequence diagrams and created pdf out of it. It even allowed me to create pdf in landscape mode (better for viewing). Overall a very useful tool. Please share your experience and let me know if you have used other similar good open source tools for UML etc.

Monday, October 4, 2010

Auto ride and wait

These days auto rickshaw is my main mode of commute. So far it has been going smoothly for my daily commute from home to work and back. But today was different.

After leaving from home, I prefer to walk little bit. First reason is to settle the heavy breakfast I had. Another is to avoid the rickshaw-wallahs near my home. They typically charge more. For a Rs 30 fare, they will ask around 50-60. So I walk till the McDonald’s nearby. McDonald’s being the hot spot; it is easy to get a ride from here.

However today as it turned out, either all the autos were full or those who weren’t didn’t want to go to Bhau Patil Road (my office location). I had talked to almost 15 drivers but with no luck. One was going in the same direction but had another female passenger. So the auto-wallah asked the girl if I could share the auto. Maybe out of apprehension or maybe she thought she had the exclusive rights, she didn’t budge. “Main doosra auto le loongi. Mujhe nahin jana”. To end this discussion I had to tell the auto-wallah to let go. I waited for another 5 minutes and then suddenly an auto stopped in front of me.

The driver was an old fellow. All the white hairs and must be above 70. He agreed to take me and turned on the meter. No haggling. And thus ended my almost 20 minute wait. This ride was very joyous and I didn’t mind leaving some tip for the gentleman.

Sunday, August 15, 2010

Coming Back to India

We made a decision to come back to India. There are many reasons behind this. People ask all the time what happened? Why are you leaving after so many years? And these questions come from even a cab driver. The simple answer is that i just wanted to come.
In this post i will write how things have progressed since we made the decision about 4-5 months back.

1) Job Search
After we decided that it is time to move back, i started searching for jobs in India. In India right now Bangalore, Hyderabad, NCR (National Captial Region including Delhi, Gurgaon and Noida) are the prominent places for IT jobs. However i had been reading in the news that Hyderabad is very hot place. After living in a very good californian climate who will like to live in too hot climate. Recently Pune has come up as a very good spot for IT business. Many reputed companies have setup their development centers. Pune is very near to metropolitan city Mumbai and it seems to have a nice weather. Further my wife has stayed here for her B.E days and she liked it. So it became the top location choice. Second preference was Bangalore and then Delhi region. Then it started by sending resume to friends and contacts in linkedin. I also registered on job sites like monster india and naukari.com. From the job sites i keep on getting the requirement emails. However 99% of the time it didn't result in any actual conversation. Looks like companies in India are hesitant in hiring guys from US. From some companies i got the advice that i should come to India for a face to face interview then only they will consider it. Finally after 2-3 months one company from Pune started the telephonic interview process. The whole process took about 1 months. Finally they offered me the job. It came just 2 day before we were about to leave for our east coast trip. They asked me to join in 1 month. My current job required to give a notice of 4 weeks. This was a very tight deadline. However i negotiated with them for 2 weeks extra time. Then i talked to then current employer about my decision. There was no objection from them and things went pretty smoothly there. Then we left for our 10 days vacation trip to East Cost.

2) East Coast Trip
This trip was planned for quite some time. I never got a chance to visit east coast during last so many years. So thought we must make a trip before finally going back. Who knows when we will get another chance. So on 1st July early morning we left our house to catch the flight. Thanks to Uma Aunty for dropping us at the Fremont BART. If you are living in East Bay area then BART is the best way to go to San Francisco. Very pleasant. Much better than driving or by cab.
Reached SFO on time and got the boarding pass of Virgin America. It had one stop at LAX where we waited at airport for about couple of hours. Then the next flight was for almost 5 hours. Since this was the first time for Kundan to travel, he got very uncomfortable during the last one hour. The seats of a plane (in economy class) are not comfortable at all. It is a torture for adults then just imagine the situation of a 2 year old. We reached JFK at around midnight. That night we stayed in a nearby hotel JFK Inn. They had courtesy shuttle service, which picked us soon. The room was small and it had a very big TV. So looked like sitting in the first row of cinema hall.

Next day we flew to Niagra Falls. We reached buffalo airport at around 2 o clock. There is a bus service from buffalo airport to niagra falls. But its frequency is very less. So we made sure that we reach the bus stop in time. The due time 3 PM came but there was no sign of bus. Using bus it will cost you only 3 bucks per person, otherwise the cab will charge you around $100. There were other people waiting for the same bus. Slowly they took the cab. But we stayed there waiting. Finally the bus showed and we went happily to our hotel (Quality Inn). The credit goes to Anshu for being persistent that we should wait for some more time. After changing we took the trolley and went to see Niagra. It was just amazing..

3) Selling our household items

4) Long flight from SFO to Kolkata

5) Stay in Kolkata

6) Stay in Darbhanga

7) Starting in Pune

PS: Since it is getting late for me i have not filled in the details. Intend to do it later.

Sunday, July 11, 2010

FARQ SIRF ITNA SA THA

Teri doli uthi,
Meri mayyat uthi,
Phool tujh par bhi barse,
Phool mujh par bhi barse,

FARQ SIRF ITNA SA THA
Tu saj gayi,
Mujhe sajaya gaya .

Tu bhi ghar ko chali,
Main bi ghar ko chala,

FARQ SIRF ITNA SA THA
Tu uth ke gayi,
Mujhe uthaya gaya .

Mehfil wahan bhi thi,
Log yahan bhi the,

FARQ SIRF ITNA SA THA
Unka hasna wahan,
Inka rona yahan.

Qazi udhar bhi tha, Molvi idhar bhi tha,
Do bol tere pade, Do bol mere pade,
Tera NIKKAH pada, Mera JANAAZA pada,

FARQ SIRF ITNA SA THA
Tujhe Apnaya gaya ,
Mujhe Dafnaya gaya !

PS: It is not my creation. I have shamelessly copied and pasted from some mailing list.

Thursday, June 17, 2010

Shoddy customer service of Reliance iCall

Please see below the email communication i am having with the customer service at Reliance. Do you think i am not justified at being upset with them. It has been 4 days and i am not able to use their service. Instead of taking it seriously they are playing email game with me.


==============================================

Dear Sir/Madam,
I am not going to waste my time in answering these questions. If you want me to continue the service and pay for it, please call in between 7:30 PM - 9:30 PM. Otherwise i will happily take my business else where and inform others too.

With regards
Anup
- Hide quoted text -


On Thu, Jun 17, 2010 at 12:14 AM, wrote:


Dear Customer,

We understand that you have faced an issue while using our services.

Kindly confirm the exact error message you get while using the services. Also provide the IP address for further investigation.


In case you require any information regarding our services, visit the Help or FAQs section of our website, for further details give your comments in our feedback section at www.relianceicall.com or mail us at customercare@relianceicall.com.


Keep Talking
Reliance iCall Team







To
customercare@relianceicall.com
cc
Subject
Re: In response to you Reliance iCall feedback





> 1. Suitable timing for test call : 7:30 - 8:30 AM PST, 7:30 - 10:00 PM PST
> 2. Phone number to contact you for on-line testing. : +1-XXX-XXX-XXXX
> 3. Country name from which you are calling: US
> 4. Destination country.: India
> 5. Time and date of unsuccessful calls: All attempts made since last 3 days.
> 6. IP address:

On Tue, Jun 15, 2010 at 5:05 AM, wrote:
>
> Dear Customer,
>
> We are analyzing the issue, if required we would like to do on-line testing.
> Please provide following info:
>
> 1. Suitable timing for test call
> 2. Phone number to contact you for on-line testing.
> 3. Country name from which you are calling
> 4. Destination country.
> 5. Time and date of unsuccessful calls
> 6. IP address:
> 7. Brief of issue faced:
>
> In case you require any information regarding our services, visit the Help
> or FAQs section of our website,for further details give your comments in our
> feedback section at www.relianceicall.com or mail us at
> customercare@relianceicall.com.
>
> Keep talking
> Reliance iCall Team

Wednesday, June 16, 2010

Hibernate Tutorial With Java



A good tutorial on how to get started with hibernate. I am going to try it with H2 DB instead of MySQL.

Saturday, April 24, 2010

On importance of doing

This is a quote from a speech that President Theodre Roosevelt delivered at the Sorbonne in April 1910 entitled "Citizenship in a Republic". This was also lately quoted in book "Too Big to Fail"

It is not the critic who counts: not the man who points out how the strong man stumbles or where the doer of deeds could have done better. The credit belongs to the man who is actually in the arena, whose face is marred by the dust and sweat and blood, who strives valiantly, who errs and comes up short again and again, because there is no effort without error or shortcoming, but who knows the great enthusiasms, the great devotions, who spends himself for a worthy cause; who at the best, knows in the end, the triumph of high achievement, and who, at the worst, if he fails, at least he fails with daring greatly, so that his place shall never be with those cold and timid souls who knew neither victory nor defeat.

Friday, April 16, 2010

Thursday, April 8, 2010

Importance of Individuality (An excerpt from "Crime and Punishment" by Fyodor Dostovesky)

I like them to take nonsense. That man's one privilege over all creation. Through error you come to the truth. I am a man because i err. You never reach any truth without making 14 mistakes and very likely 114, and a fine thing too in its own way. But we can't even make mistakes on our own account. Talk nonsense, but talk your own nonsense and i will kiss you for it. To go wrong in ones own way is better than to go right in someone else's. In first case you are a man and in a second case you are no better than a bird.

Monday, March 1, 2010

My workplace Restroom Messages


I always laugh when i see "Every Drop Counts" message on the Urinal. Wonder which drop they are referring to??

Monday, February 1, 2010

Gross misrepresentation of facts by BBC

Generally BBC does a good job at providing reliable news. However here in this news titled "Alarm at Mumbai's teenage suicide trend" they have done something terribly wrong.

In this piece of news they have discussed that a recent movie "3 idiots" is in a way encouraging kids to take their own life.

The content is as follows.

One theory behind the recent rise is the influence of a recently released Bollywood blockbuster, Three Idiots, which has a scene where an engineering student is shown committing suicide after a mediocre exam result.

The film's impact has been debated and scrutinised in prime time television shows, with many directly blaming it for adding to the problem.


As i recently saw this movie, the engineering student didn't commit suicide because of mediocre exam result, it was because he failed to complete the required practical assignment and proff didn't give extra time to finish it.

BBC should check their facts before publishing such error.

PS: I completely agree that these days competition is very tough and is takings toll on young kids. For this we need a change in our educational system and more than anything parents and teachers should be engaged in a eye opening discussion such as there are other things more important than a grade/percentage in class.

However life is always tough and that's the way it is. That doesn't mean someone will always commit suicide. A final year boy in engineering college should be more sensible to do such stupid thing. And should we stop showing truth. Further parents should take time to interact with kids and explain them the difference between movie and real world. If mom and dad don't have time to talk to kids, then it is their fault above anyone else.

Tuesday, January 19, 2010

An interesting topic from "The Tipping Point" by Malcom Gladwell

This is from the chapter "The power of context". Enjoy!!

The mistake we make in thinking of character as something unified and all-encompassing is very similar to a kind of blind spot in the way we process information. Psychologists call this tendency the Fundamental Attribution Error (FAE), which is a fancy way of saying that when it comes to interpreting other people's behavior, human beings invariably make the mistake of overestimating the importance of fundamental character traits and underestimating the importance of situation and context. In one experiment, for instance, a group of people are told to watch two sets of similarly talented basketball players, the first of whom are shooting baskets in a well-lighted gym and the second of whom are shooting baskets in a badly lighted gym (and obviously missing a lot of shots). Then they are asked to judge how good the players were. The players in the well lighted gym were considered superior.

Sunday, January 3, 2010

New Year 2010

2009 is over. It has brought all kind of feelings this year. Lost a job, found another. Parents came and stayed with us. Kundan (my son) had his first birthday. Anshu finished her MBA (congrats to her :-)). Looks like an eventful year. But the good thing is that it was a fun year.
So we decided to celebrate this year end in a more fun way. We have been living in bay area for more than 3 years now. Many a times we have been to San Francisco, for either seeing Golden Gate Bridge, or Fisherman's wharf. But so far we have been mostly driving through the city and always promising ourselves that we will someday come to see the beautiful buildings and other attractions of the SFO downtown. So this time we decided to just do that.
In advance we have booked a room in Holiday Inn for 31st night. This hotel is on the main street of SFO (Van Ness Ave). If you are planning to stay here, get a room with view. It is definitely worth the money.

We started about 11 from our house, took the bus and reached Fremont BART. It takes about an hour from Fremont to reach SFO. We got out at Powell BART. Last night i had done extensive research on what bus to take and what to do etc. But my god. It is so confusing over there. There are 4 different kinds of buses. We were supposed to take Powell Hyde cable car. But after running here and there for more than 20 minutes we couldn't figure out where we will get it. Finally patience ran out and hired a taxi. We reached on top of crooked street.

(More of the events soon as i am running late for bed.)