Comment On Today's Late Post plus a Post that's late

Don Benson sends in some T-SQL code he came across while hunting a bug: [expand full text]
« PrevPage 1Next »

RE: Today's Late Post plus a Post that's late

2004-08-31 17:57 • by Ryan Farley
Haha. That was a good one. Haha. That was a good one.

re: Today's Late Post plus a Post that's late

2004-08-31 18:14 • by Jeff
You can say that again.

re: Today's Late Post plus a Post that's late

2004-08-31 18:24 • by Frijoles
Wonder if it was originally different code and they changed it without looking at the old code (either because they feared it or were in a hurry).

re: Today's Late Post plus a Post that's late

2004-08-31 19:05 • by Algol Fan
Looks like classic cut'n'paste development.

re: Today's Late Post plus a Post that's late

2004-08-31 21:22 • by Marten Veldthuis
Y'know, if they'd use a loop, they would be able to easily enhance the certainty of that by running the code *at least* 3 times.

re: Today's Late Post plus a Post that's late

2004-09-01 05:05 • by Simon
Your supposed to change the pasted bit !!! ha ha ha

re: Today's Late Post plus a Post that's late

2004-09-01 08:15 • by flash
I wonder how many other times they do this... I bet this is lightning fast!!

re: Today's Late Post plus a Post that's late

2004-09-01 08:55 • by MrGenericComment
Spec: "Ensure all values are set by setting all values. Twice."

re: Today's Late Post plus a Post that's late

2004-09-01 09:22 • by TheF0o1
If this were cut-and-paste code, then why is the order of assignments swapped? Maybe because this block was written in two different places and copied twice here.

This reminds me a lot of DNA as we understand it. There are lots of places with similar or identical sequences, i.e., a whole lot of redundancy with occaisional variations. And, with DNA there are a lot of cut-and-paste operations too, and they seem to work very well. That's the premise behind evolutionary algorithms. Is this code snippet just the result of genetic programming?

re: Today's Late Post plus a Post that's late

2004-09-01 11:06 • by Alex Papadimoulis
TheF0o1, these statements were side-by-side.

re: Today's Late Post plus a Post that's late

2004-09-01 11:16 • by David
N-Tier variable assignment

re: Today's Late Post plus a Post that's late

2004-09-01 11:47 • by Matthew W. Jackson
Personally, when setting a value, I'd use the following (in C-style code for simplicity):

do { value = newValue; } while(value != newValue);

This will ensure that the loop runs as many times as needed to set the actual value.

re: Today's Late Post plus a Post that's late

2004-09-01 11:51 • by Wes
I don't get it...

re: Today's Late Post plus a Post that's late

2004-09-01 12:19 • by Grant
That shit's like Nas, yo.

re: Today's Late Post plus a Post that's late

2004-09-01 19:24 • by Miles Archer
Notice that this isn't VB code.

To Marten Veldthuis

2004-09-02 04:58 • by icelava
If there were more than just @NonPropLev and @BOMLevel to check, then yes it may have a third and fourth block.

re: Today's Late Post plus a Post that's late

2004-09-02 06:26 • by Hannes
Copy paste with a twist :-)

re: Today's Late Post plus a Post that's late

2004-09-02 10:07 • by Bernhard
Look how many lines of code there are in our solution. It must be complicated and very good.

re: Today's Late Post plus a Post that's late

2004-09-03 09:54 • by Peter
Greetings from the Department of Redundancy Department. And "hello to you" as well.
« PrevPage 1Next »

Add Comment