|
Some people just should not be allowed near a computer.
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);
}
}
}
|
|
|
|
|
This is what I love about the system I work on.
Some values changed to protect the guilty
if( this.idtoservice != null )
{
sOwner = this.idtoservice.Common.Security.Owner;
}
else if( this.idtoservice != null )
{
sOwner = this.idtoservice.Common.Security.Owner;
}
else if( this.idtoservice != null )
{
sOwner = this.idtoservice.Common.Security.Owner;
}
- Arthur Souza
|
|
|
|
|
Was somebody being paid by the lines of code? Wow!
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
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
|
|
|
|