Archive for the 'Humor' Category

Funny Code

Thinking

Some funny code I found in the web

Check boolean condition


bool b;
b = false;
if (b == true){...}



...
if (b.toString().length() < 5){...}
...



bool b = (x > y) ? true : false;



...
if (var == true)
return true;
else if (var == false)
return false;
else
return (!false && !true);
...

Get tomorrow date


datetime GetTomorowDate(void){
sleep(86400);
return GetCurrentDate();
}

Check null values


String family = "";
HashMap map = ... ;
String fValue = (String)map.get(FAMILY_NAME);
family = (fValue != null) ? fValue : fValue;



if (file == null){
System.out.println("File " + file.getName() + " is null.");
}

Cuckoo-clock


CUCKOO=`/bin/date +%I`
while [ $CUCKOO -gt 0 ]; do
eject /dev/cdrom
cat /root/sound/cuckoo.au > /dev/dsp
eject -t /dev/cdrom
CUCKOO=$((CUCKOO-1))
done

No Comments »

Team Work

Monster

Team is a very powerful mechanism… Of course there are lot of individuals who may impress with the knowledge, speed, productivity, but team is a different, team mechanism operated by many rules, it is like locomotive always move forward, sometimes slow, sometimes fast, but goal unavoidable will be reached. Individuals like bikers, they are fast, flexible, can show amazing tricks but there are too much roads for them, and too few of this roads lead to success.

So most powerful individual can’t do anything against the Team. Nature has a lot of examples of this. Are you imaging crocodile, he is the real monster, he is powerful, merciless, he is a king of his territory, but recently I found a picture where only 3 dogs (this is already a team), each of them 10 times weaker then crocodile, have done the monster, and monster fall a prey. Blood is growing cold with terror from the view of this hell hounds. I haven’t attach this picture directly, but if you want you may look on it here.

No Comments »