Monday, December 26, 2005

a story...

 As I was passing the elephants, I suddenly stopped, confused by the fact that these huge creatures were being held by only a small rope tied to their front leg. No chains, no cages. It was obvious that the elephants could, at anytime, break away from their bonds but for some reason, they did not.
I saw a trainer near by and asked why these beautiful, magnificent animals just stood there and made no attempt to get away. "Well," he said, "when they are very young and much smaller we use the same size rope to tie them and, at that age, it's enough to hold them. As they grow up, they are conditioned to believe they cannot break away.
They believe the rope can still hold them, so they never try to break free." I was amazed. These animals could at any time break free from their bonds but because they believed they couldn't, they were stuck right where they were.
Like the elephants, how many of us go through life hanging onto a belief that we cannot do something, simply because we failed at it once before?


True ...Right??? 

Sunday, December 18, 2005

Spring 2.0 vs. the Anemic Domain Model

Spring 2.0 vs. the Anemic Domain Model

One of the most interesting aspects (no pun intended) of Spring 2.0 that was discussed this past week at The Spring Experience was the idea of letting Spring configure beans post-instantiation and regardless of how the bean became instantiated. This Spring 2.0 feature helps avoid the Anemic Domain Model" anti-pattern as described by Martin Fowler.

It's very common in Spring to build applications where service objects are injected with DAO objects and use those DAO objects to handle persistence of domain objects. The domain objects themselves, however, are little more than dumb data holders. The problem with this approach is that the interaction between the service object and the DAO object is very procedural. The service object makes one or more calls to the DAO, passing the domain object around like cargo.

Ideally, the domain object would contain behavior to handle its own persistence. If domain objects offered such behavior, then the service object could deal directly with the domain object in a very object-oriented way. Instead of telling a DAO to persist a customer, the service would tell the customer to persist itself. There will still be a DAO, but the domain object will do its own dealing with the DAO, unbeknownst to the service object. In effect, the domain object and the DAO swap positions with relation to the service object.

If the domain object is responsible for dealing with the DAO, then the domain object must have access to the DAO. In Spring, we'd like to do this through dependency injection. But domain objects are typically instantiated outside of Spring (e.g. in Hibernate, iBATIS, or some other persistence mechanism). How can Spring inject a DAO into a domain object when Spring isn't the one instantiating that domain object?

Full article..
http://jroller.com/page/habuma?entry=spring_2_0_vs_the

Friday, December 16, 2005

Always look for simple solutions.

One of the most memorable case studies on Japanese management was the case of the empty soapbox, which happened in one of Japan's biggest cosmetics companies. The company received a complaint that a consumer had bought
a soapbox that was empty. Immediately the authorities isolated the problem to the assembly!  line, which transported all the packaged boxes of soap to the delivery department. For some reason, one soapbox went through the assembly line empty. Management asked its engineers to solve the problem. Post-haste, the engineers worked hard to devise an X-ray machine with high-resolution monitors manned by two people to watch all the soapboxes that passed through the line to make sure they were not empty. No doubt, they worked hard and they worked fast but they spent a whoopee amount to do so.

But when a rank-and-file employee in a small company was posed with the same problem, he did not get into complications of X-rays, etc., but instead came out with another solution. He bought a strong industrial electric fan and pointed it at the assembly line. He switched the fan on, and as each soapbox passed the fan, it simply blew the empty boxes out of the line.

 
Moral : Always look for simple solutions.

Devise the simplest possible solution that solves the problems


Wednesday, December 14, 2005

Missing Rib...


A girl asked her boyfriend...

 Girl: Tell me... who do you love most in this world..?

 By: You, of course!

 Girl: In your heart, what am I to you?

 Boy: The boy thought for a moment and looked intently in her eyes and  said, "You are my rib. In the Bible, it was said that God saw that  Adam was lonely, during his sleep; God took one of Adam's rib and created Eve. Every man has been searching for his missing rib, only when you find  the woman of your life; you'll no longer feel the lingering ache in  your heart . . ."

 After their wedding, the couple had a sweet and happy life for a while.  However, the youthful couple began to drift apart due to the busy

 schedule of life and the never-ending worries of daily  problems...their life became mundane.

 All the challenges posed by the harsh realities of life began to gnaw  away their dreams and love for each other..  The couple began to  have  more quarrels and each quarrel became more heated.  

 One day, after the quarrel, the girl ran out of the house.... At the  opposite side of the road, she shouted, " You don't love me...!"

 The boy hated her childishness and out of impulse, retorted, "Maybe,  it was a mistake for us to be together..! You were never my missing rib...!"

 Suddenly, she turned quiet and stood there for a long while.... He  regretted what he said but words spoken are like thrown away water,

 you can never take it back. With tears, she went home to pack her  things and was determined in breaking-up.

   Before she left the house, "If I'm really not your missing rib,  please let me go..... She continued, "It is less painful this way...

 let us go on our separate ways and search for our own partners..."

 Five years went by....

 He never remarried but he had tried to find out about her life  indirectly...... She had left the country and back.... She had married

 a foreigner and divorced..... He felt anguished that she never waited  for him. In the dark and lonely night, he lit his cigarette and felt

 the lingering ache in his heart. He couldn't bring himself to admit  that he was missing her..

   One day, they finally met.... At the airport, a place where there  were many reunions and good-byes.... He was going away on a business  trip. She was standing there alone, with just the security door separating them. She smiled at him gently.

 (b): How are you?

 (g): I'm fine. How about you... Have you found your missing rib...?

 (b): No.

 (g): I'll be flying to New York in the next flight.

 (b): I'll be back in 2 weeks time. Give me a call when you are back...You know my number... Nothing has changed.

 With a smile, she turned around and waved good-bye..

 "Good-bye . . ."

 

   One week later, he heard of her death. She had perished in New York. In the event that shocked the world. Midnight..... Once again, he lit his cigarette..... And like before, he felt the lingering ache in his heart.... He finally knew, she was the missing rib that he had carelessly broken . . . 

  "Sometimes, people say things out of moments of fury..... Most often than not, the outcome could be disastrous and detrimental.... We vent  our frustrations 99% at our loved ones.... And even though we know that we ought to "think twice and act wisely", it's often easier said than done. Things happen each day, many of which are beyond our control. Let us treasure every moment and everyone in our lives.

 Tomorrow may never come; give and accept what you have today . . . "

---

Once all the scientists die and go to heaven.....

Once all the scientists die and go to
heaven............They decide to play hide-n-seek.........
Unfortunately Einstein is the one who has the
den...........He is supposed to count upto 100...and then start
searching.....Everyone starts hiding except
Newton.........

Newton just draws a square of 1 meter and stands in
itright in front of Einstein...........
Einstein's counting......97,98,99.....100........
He opens his eyes and finds Newton standing in
front........
Einstein says "newton's out..newton's....out....."
Newton denies and says i am not out........
He claims that he is not Newton......
All the scientists come out to see how he proves
that he is not

Newton..........



can u guess it?????
come on apply wht u studied in ur schools and college.
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
Newton says "I am standing in a square of area 1m
squared.....
That makes me Newton per meter squared......
since one Newton per meter squared is one Pascal,
I'm Pascal, Therefore Pascal is OUT !!!!!!!!"


Sunday, December 11, 2005

give ur best..

 Posted by Picasa

you..

 Posted by Picasa

Be honest...

 Posted by Picasa

Wednesday, December 07, 2005

Who we are....

A well-known speaker started off his seminar

by holding up a $20.00 bill. In the room of 200, he asked,

"Who would like this $20 bill?"

Hands started going up.

He said, "I am going to give this $20 to one of you

but first, let me do this.

He proceeded to crumple up the $20 dollar bill.

He then asked, "Who still wants it?"

Still the hands were up in the air.

Well, he replied, "What if I do this?"

And he dropped it on the ground

and started to grind it into the floor with his shoe.

He picked it up, now crumpled and dirty.

"Now, who still wants it?"

Still the hands went into the air.

My friends, we have all learned a very valuable lesson.

No matter what I did to the money, you still wanted it

because it did not decrease in value.

It was still worth $20.

Many times in our lives,

we are dropped, crumpled, and ground into the dirt

by the decisions we make and

the circumstances that come our way.

We feel as though we are worthless.

But no matter what has happened or

what will happen, you will never lose your value.

Dirty or clean, crumpled or finely creased,

you are still priceless to those who DO LOVE you.

The worth of our lives comes not in what we do or who we

know,

but by WHO WE ARE.

You are special- Don't EVER forget it."