Tuesday, December 17, 2013

Why the car won't move

A man tries to start his car and finds that it wouldn't move. Some bystanders, a politician, a software engineer, a student of gender studies, and a financial analyst, walk towards the car.

They each come up with their own theories.

Politician: Clearly the car has been overburdened by heavy taxes and regulations that have forced it not to start. I propose cutting taxes for the car so that it will be able to move again.

Software engineer: It's probably a hardware issue. Have you tried turning it off and on again?

Student of gender studies: Clearly this car is protesting against the misogynistic empire run by men. Cars need equal rights.

Financial analyst: Based on the available data, I have downgraded this car to "under perform." You should sell it. I'll give you 200 bucks.

Ignoring the bystanders, the owner of the car takes out his phone and searches for possible causes. He solves the problem and drives away.

Sunday, December 1, 2013

Methods for bad situation

Flame method:
1. Stop (freaking out)
2. Drop (what you are doing)
3. Roll (with it)

Ice cream method:
1. Get ice cream
2. Eat ice cream
3. GOTO 1

Recursive method:
Handle Situation:
1. Handle Situation()

Static method:
1. print "I only have class"

Singleton method:
1. return badInstance