|
That doesn't forgive you the responsibility of becoming familiar with the rules before you start posting.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson Because programming is an art, not a science. Marc Clifton I gave up when I couldn't spell "egg". Justine Allen
|
|
|
|
|
Found this little gem in one of our apps at work ...
<br />
private bool IsBefore932()<br />
{<br />
if (Clock.Now.Hour < 9)<br />
{<br />
return true;<br />
}<br />
else if (Clock.Now.Hour == 9)<br />
{<br />
if (Clock.Now.Minute < 32)<br />
{<br />
return true;<br />
}<br />
else<br />
{<br />
return false;<br />
}<br />
}<br />
else<br />
{<br />
return false;<br />
}<br />
}<br />
|
|
|
|
|
So what did you do?
private static readonly O932 = new System.DateTime ( 9 , 32 , 00 ) ;
...
private bool IsBefore932()
{
return ( System.DateTime.Now.TimeOfDay <= O932 ) ;
}
(Or something like that, only better.)
|
|
|
|
|
Compiler error!
Wait… is that a zero or the letter O?
So the creationist says: Everything must have a designer. God designed everything.
I say: Why is God the only exception? Why not make the "designs" (like man) exceptions and make God a creation of man?
|
|
|
|
|
The letter O, of course.
|
|
|
|
|
It wasn't and you know it
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
O0O0O0
O0O0O0... huh, I thought it was. I know I meant it to be, but the pre they look the same.
What kind of second-rate joint is this? I'm going to the suggestion forum next.
|
|
|
|
|
Actually I think it is an Oh. BUt like you said, they look the same. It's terrible, it's a disgrace, it's, it's... I don't really care anymore.
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
You could have a lot of fun coming up with variations on the same theme!
It's still there in production - I suspect we left it because it is too funny to lose.
|
|
|
|
|
Gems like this is the reason I don't buy commercial ready-to-use components or libraries unless I can see the source code myself.
So the creationist says: Everything must have a designer. God designed everything.
I say: Why is God the only exception? Why not make the "designs" (like man) exceptions and make God a creation of man?
|
|
|
|
|
At least... does its job!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
I would love to see the specs for that particular case.
cheers,
Chris Maunder
CodeProject.com : C++ MVP
|
|
|
|
|
It's part of a real-time application with tasks that are interdependent with tasks performed by many other apps running over several networks. 9:32 was the start time for a group of tasks it needed to do. It's actually an upgrade from the now deprecated function IsBefore928()
We know the maximum time each task takes to complete, so we can use cutoff times as a simple way to coordinate tasks between different machines on different networks without them having to know anything about each other. A settings file for the task start/stop times would be better.
But to be fair, as a couple of guys have pointed out here, it does what it is supposed to!
|
|
|
|
|
If it's stupid but it works, it isn't stupid.
Then again...
Peter the small turnip
(1) It Has To Work. --RFC 1925[^]
|
|
|
|
|
I think they call that method every morning.
I'd been called 'ugly', 'pug ugly', 'fugly', 'pug fugly' but never 'ugly ugly'. - Moe Szyslak
|
|
|
|
|
Yea, alot of unneccesary code there.
|
|
|
|
|
I hope you have unit tests with 100% code coverage for each one of those methods.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
Previously in the code both flag and fval were malloc'd
flag = NULL;
free(flag);
fval = NULL;
free(fval);
this thing looks like it was written by an epileptic ferret
Dave Kreskowiak
|
|
|
|
|
What is NULL #define d as?
|
|
|
|
|
What's the problem?
1. Remove all references
2. Invoke the GC
|
|
|
|
|
Aaaah, yeah... NULL could be a collection of references to be freed.
|
|
|
|
|
But wouldn't that free NULL twice?
|
|
|
|
|
In an effort to gain more memory by showing negative used space!
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|