|
That's a multi threaded fail process alright
GSoC 2009 student for SMW!
---
My little forums: http://code.bn2vs.com
---
70 72 6F 67 72 61 6D 6D 69 6E 67 20 34 20 6C 69 66 65!
|
|
|
|
|
You'd be amazed how many people writing asp.net code actually do not understand how/where it runs.
|
|
|
|
|
If it is intended for use in production code it is a real horror. If it is just a diagnostic messagebox that will be removed for production code then it is not too bad; the programmer has to be sure to remove it though
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
In a phone conference today with both technical and subject matter people, it was asked:
"So, we are trying to use a stored procedure for something other than a stored procedure?"
Yes, he is not a database person if you wanted to ask.
|
|
|
|
|
They likely meant that what ever was implemented using a stored procedure, should probably have been implemented in a different manner. Regardless, it is a poorly worded question that is more confusing than understandable.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
|
|
|
|
|
I'm with Chris.
Stored procedures are overused nowadays and are often used when a simpler technique will suffice.
|
|
|
|
|
|
It's a pity that this scheme for line-numbering does not work
|
|
|
|
|
OMG!!!!!!!!!!!!!!!!!!! ripe my eyes out now!!!!!!
|
|
|
|
|
I think a part of me just died. I counted at least 8 things wrong with that snippet
|
|
|
|
|
Not bad there are 9 lines of actual code
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Ah, but only four of those are unique. That works out at 2 errors for each unique line of code
|
|
|
|
|
You missed a couple:
9) Undocumented
10) 100 numeric states. How do you keep track of which one does what...
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Other than the missing semi-colon on the first statement, that's how it should be.
|
|
|
|
|
Well I have very good idea what happened. The programmer tried to implement fall-through switch, which is not allowed in C#. When he discovered that, he decided to work around it with those goto calls.
He was either rusty on his goto or he could not figure how to "declare" a label or maybe the language he was using before did allow something similar... That's what happens when you switch languages. For a while you keep thinking in terms of the old language thus producing such jems.
|
|
|
|
|
He shoulda written it recursively 
|
|
|
|
|
He should have used the for- case pattern 
|
|
|
|
|
Could easily be c++ -> C# .
But still, this isn't nice in C++ as well.
You have the thought that modern physics just relay on assumptions, that somehow depends on a smile of a cat, which isn’t there.( Albert Einstein)
|
|
|
|
|
OriginalGriff wrote: Fortran programmer.
Hehe, he is still alive!
|
|
|
|
|
state=1<br />
for (int n = state; n<101;n++)<br />
{<br />
switch (n)<br />
{<br />
case 1:<br />
<br />
case 2:<br />
<br />
<br />
case 3: <br />
<br />
............<br />
<br />
<br />
case 100:<br />
<br />
<br />
}<br />
}
What could be easier than that 
|
|
|
|
|
If the syntax is correctet, the compiler doesn't complain...
thank you for teaching me that -
int state=1;
switch (state)
{
case 1:
goto case 2;
case 2:
goto case 3;
case 3:
goto case 4;
case 4:
break;
}
|
|
|
|
|
I'm still in favor of
which compiles just fine.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Whatever he was trying to do, It results in what Luc has written.
Ultimately, he ended up getting the same result with extra lines of code.
|
|
|
|
|
looooool - OMFG, took me a few minutes before I could type again after reading this - ROFL!!!
GSoC 2009 student for SMW!
---
My little forums: http://code.bn2vs.com
---
70 72 6F 67 72 61 6D 6D 69 6E 67 20 34 20 6C 69 66 65!
|
|
|
|
|
Shite!
Sometimes while reading the programming forums, I just feel like jabbing a fork into my eyes.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|