Thursday, August 24, 2006

This one just killed me
void get_tomorrow_date( struct timeval *date )
{
sleep( 86400 ); // 60 * 60 * 24
gettimeofday( date, 0 );
}
Another wonderfull example of human brain at work

If Left(sTmp, 4) = "www." or Left(sTmp, 4) = "WWW."
or Left(sTmp, 4) = "Www." or Left(sTmp, 4) = "wWw."
or Left(sTmp, 4) = "wwW." or Left(sTmp, 4) = "WWw."
or Left(sTmp, 4) = "wWW." or Left(sTmp, 4) = "WwW." Then
sTmp = Right(sTmp, Len(sTmp)-4)
end if

Wednesday, August 23, 2006

Writing new code isn't hard as workign with other people code. Humans write wonderfull code lines and sometimes don't bother to think before.

Small example :
public override SiteMapNode RootNode {
get {
SiteMapNode temp = null;
temp = BuildSiteMap();
return temp;
}
}

What was that for ? Whay not just write
get{
return BuildSiteMap();
}


more examples will follow