|
I'd say that was the definition of a 0 type of person
|
|
|
|
|
is all I can say.
I think the coder forgot to call the TurnBrainOn() function before he started.
public class Coder: Employee{
public override bool Initialize(IInitializeContext init){
}
public string WriteCode(ICodeInfo info, ICodeContext ctxt){
}
}
public class SysAdmin : Employee
{
public override void DoWork(IWorkItem workItem)
{
if (workItem.User.Type == UserType.NoLearn){
throw new NoIWillNotFixYourComputerException(new Luser(workItem.User));
}else{
base.DoWork(workItem);
}
}
}
modified 26-Jun-12 16:16pm.
|
|
|
|
|
You need to also have the following after init.TurnBrainOn(this) :
if ( !CaffineLoaded() ) throw new NoCaffineException(this)
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
classic copy&paste thingy combined with "I'll express it later".
|
|
|
|
|
No no no! You do not understand that!
It is a very sophisticated, overly complicated multi-tasking application, with many threads running in parallel, and lots of things running in the cloud (and you never know what's happening there in the cloud).
So if this.idtoservice was still null at the first call, try it again, things might have changed meanwhile!
And do not try it more often than three times, three is the number...
|
|
|
|
|
Oops! It is complicated
|
|
|
|
|
It's easier as do{ }while() loop.
|
|
|
|
|
|
Third time's the charm.
Three lefts make a right.
Three's company.
Threesomes.
The power of three (Charmed).
Three chances.
On the count of three.
One, two, three, go.
|
|
|
|
|
Some additional ones:
Three is a magic number. (Schoolhouse Rock)
What I tell you three times is true. (The Hunting of the Snark; Lewis Carroll)
|
|
|
|
|
Are you sure? Are you sure? Are you absolutely sure?
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
I suspect this was written by Walt.
|
|
|
|
|
This coder has been around a long time, you may remember the redundancy design, tell me 3 times, he has just incorporated it at a lower level!
BTW this could use a renaming for greater accuracy.
if( this.idiotservice != null )
{
sOwner = this.idiotservice .Common.Security.Owner;
}
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Of course it could be that Mycroft's renaming is extremely accurate and the disservice is changing some global variable such that it could return different values each time its called.
|
|
|
|
|
To be completely boring: looks like someone had a race condition. Although you still need to be insane to attempt threading without knowing anything about it.
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Chineese Proverb]
Jonathan C Dickinson (C# Software Engineer)
|
|
|
|
|
Well... if idiotservice were a getter that as part of its implementation attempts to connect to an external service, this could actually make a little bit of sense.
|
|
|
|
|
On asking 'how to select value from a combobox based on another combobox selected value', following was replied as one way:
private void m_CmbBox1_SelectedIndexChanged(Object Sender EventArgs e)
{
switch(m_CmbBox1.SelectedIndex)
{
case 0:
m_CmbBox2.SelectedIndex = 0;
break;
case 1:
m_CmbBox2.SelectedIndex = 1;
break;
case 2:
m_CmbBox2.SelectedIndex = 2;
break;
default:
m_CmbBox2.SelectedIndex = m_CmbBox2.Items.Count - 1;
}
}
Got to read a comment on this, to which I fully agree: A bright example of anti-programming!
modified 26-Jun-12 14:56pm.
|
|
|
|
|
I saw that one too, but was too distracted to notice the stupidity in it at the time. +5...
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Okie! I just thought of sharing it here. Who knows someone might be implementing something like this somewhere.
|
|
|
|
|
If you didn't laugh, you'd cry...
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
What did you do?
|
|
|
|
|
A bit of both!
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Sandeep Mewara wrote: default:
m_CmbBox2.SelectedIndex = m_CmbBox2.Items.Count - 1;
The items are not in common! But still the other cases can be avoided when the index falls with in the count.
Am i making sense?!
...
|
|
|
|
|
Don't ask. I have no idea how this default condition was thought of!
|
|
|
|
|
I'm cleaning up other people's mess again and came across this code to validate a date. The comments are from me, as our friend does not believe in comments or any other kind of documentation.
protected void cvaliDatum_ServerValidate(object source, ServerValidateEventArgs args)
{
if (tbDatum.Text.Trim() != "")
{
DateTime datok;
if (DateTime.TryParse(tbDatum.Text.Trim(), out datok))
{
if (datok > DateTime.Now)
{
TimeSpan span = DateTime.Now - datok;
if (span.Days > 14)
{
if ((Konstanten.Status == -1) || (Konstanten.Status == 1))
{
args.IsValid = false;
}
else
{
args.IsValid = true;
}
}
else
{
args.IsValid = false;
}
}
else
{
args.IsValid = true;
}
else
{
args.IsValid = false;
}
}
else
{
args.IsValid = false;
}
}
As a bonus, the same thing has been copied and pasted to do the validation for another date on the same page. The whole thing just would not be as much fun without some redundancy. Being constantly exposed to this kind of code, I certainly hope that whatever turned the poor author into a moron does not prove itself to be contagious.
At least artificial intelligence already is superior to natural stupidity
|
|
|
|