Tuesday, February 17, 2009

to throw and catch exceptions


Exceptions should be thrown as early as possible. As soon as you detect the error condition, the exception needs to be generated. If you wait for too long, it becomes more difficult to analyze the problem. Similarly, exceptions should be caught in those contexts where some corrective action can be taken. Otherwise, pass them up the hierarchy until you have enough information so that you can effectively deal with them.

Thus, we can say "throw exceptions early" and "catch exceptions late".



Friday, February 13, 2009

the secret to being a superstar


"Managers like to hire people who have two traits.
They’re smart, and they get things done.”



For how a German military Strategist, Erwin Rommel deployed his troops...

For Rommel, the deployment of the dumb and the lazy was easy to figure out: They’re the infantry; they take spears well.

The smart and energetic are designated as infiltrators. They are the spies who get behind the enemy lines and make sure supplies reach them there. They push the envelope and bring you to the point where you can win the battle, but they don’t put victory over the top.

The two most critical groups, Rommel believed, were the lazy and the smart, and the dumb and energetic. The dumb and energetic are the most dangerous of all groups, because they look a great deal like the smart and energetic, but if you trust yourself to them – if you trust them to infiltrate and destroy from the rear – you are doomed.

The smart and lazy win battles and wars because, in their aversion to doing rote work for rote works sake, they are constantly trying to figure out a better way. They are the creators, warfare’s equivalent of the digerati.

Sunday, February 08, 2009

If I Were a Boy


by Beyoncé


If I were a boy
Even just for a day
I'd roll out of bed in the morning
And throw on what I wanted and go

Drink beer with the guys
And chase after girls
I'd kick it with who I wanted
And I'd never get confonted for it
Cause they'd stick up for me

If I were a boy
I think I could understand
How it feels to love a girl
I swear I'd be a better man

I'd listen to her
Cause I know how it hurts
When you lose the one you wanted
Cause he's taken you for granted
And everything you had got destroyed

If I were a boy
I would just turn off my phone
Tell everyone it's broken
So they think that I was sleeping alone

I'd put myself first
And make the rules as I go
Cause I know that she'd be faithful
Waitin' for me to come home (come home)

If I were a boy
I think I could understand
How it feels to love a girl
I swear I'd be a better man

I'd listen to her
Cause I know how it hurts
When you lose the one you wanted
Cause he's taken you for granted
And everything you had got destroyed

It's a little too late for you to come back
Say it's just a mistake
Think I'd forgive you like that
If you thought I would wait for you
You thought wrong

But you're just a boy
You dont understand (Yeah you dont understand)
How it feels to love a girl
Someday you'd wish you were a better man

You don't listen to her
You don't care how it hurts
Until you lose the one you wanted
Cause you've taken her for granted
And everything you had got destroyed

But you're just a boy