10th July 2006, 1:07 PM
http://thedailywtf.com/
Behold unto some coder's lack of knowledge of existing features, and also just plain terrible code.
[code]
Function IsEven(N)
Dim LastDigit
LastDigit = int(N) mod 10
IsEven = (LastDigit = 0) or (LastDigit = 2) or _
(LastDigit = 4) or (LastDigit = 6) or (LastDigit = 8)
End Function
Function IsOdd(N)
Dim LastDigit
LastDigit = int(N) mod 10
IsOdd = (LastDigit = 1) or (LastDigit = 3) or _
(LastDigit = 5) or (LastDigit = 7) or (LastDigit = 9)
End Function
[/code]
[code]
enum Bool
{
True,
False,
FileNotFound
};
[/code]
I think this is one of my new favorite web sites.
Behold unto some coder's lack of knowledge of existing features, and also just plain terrible code.
[code]
Function IsEven(N)
Dim LastDigit
LastDigit = int(N) mod 10
IsEven = (LastDigit = 0) or (LastDigit = 2) or _
(LastDigit = 4) or (LastDigit = 6) or (LastDigit = 8)
End Function
Function IsOdd(N)
Dim LastDigit
LastDigit = int(N) mod 10
IsOdd = (LastDigit = 1) or (LastDigit = 3) or _
(LastDigit = 5) or (LastDigit = 7) or (LastDigit = 9)
End Function
[/code]
[code]
enum Bool
{
True,
False,
FileNotFound
};
[/code]
I think this is one of my new favorite web sites.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." ~ Charles Babbage (1791-1871)