The Weird and The Wonderful
The Weird and The Wonderful forum is a place to post Coding Horrors,
Worst Practices, and the occasional flash of brilliance.
We all come across code that simply boggles the mind. Lazy kludges, embarrasing mistakes, horrid
workarounds and developers just not quite getting it. And then somedays we come across - or write -
the truly sublime.
Post your Best, your worst, and your most interesting. But please - no
programming questions . This forum is purely for amusement and discussions on code snippets. All
actual programming questions will be removed.
|
|
 |
|

|
It doesn't compile because it's printed on sheets of paper.
Then again, you can always try to hold the paper in front of a webcam and press CTR-SHFT-B.
.
|
|
|
|

|
99% of the time, customer.DataExtRetList != null . This was supposed to fix the edge cases when customer.DataExtRetList == null .
if (customer.DataExtRetList != null) {
this.QBInfo.DateCatSent = "";
this.Source = "";
} else {
for (int i = 0; i < customer.DataExtRetList.Count; i++) {
IDataExtRet ext = customer.DataExtRetList.GetAt(i);
if (ext.DataExtName.GetValueOrEmpty() == "Date Cat. Sent")
this.QBInfo.DateCatSent = ext.DataExtValue.GetValueOrEmpty();
else if (ext.DataExtName.GetValueOrEmpty() == "Source")
this.Source = ext.DataExtValue.GetValueOrEmpty();
}
}
modified 9 Nov '12 - 22:35.
|
|
|
|

|
Daer frnds,
need help urgenz. Most time my code simply not work. Sometime it give errro refernce not setting object. Plz help its urgentz.
|
|
|
|

|
Why do you think I posted it in this forum? Did you miss the mistake?
|
|
|
|

|
And do you see that I marked it as a joke? Oh dear, I know the meaning of this forum, and I saw the problems the code snippet causes. And I posted like someone would do who uses to write such code. That seems to be beyond the joking capacity of an average CP member though, as can be deduced from the votes...
|
|
|
|

|
Ouch.
I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image.
Stephen Hawking
|
|
|
|

|
That is a level of fail which leaves me speechless.
|
|
|
|
|

|
In few of the reports I came across this while doing some maintenance work... beautiful isn't it ???
select ......
where
and F2TRDT >= " & Year(Parameters!DateFrom.Value)*10000+Month(Parameters!DateFrom.Value)*100+day(Parameters!DateFrom.Value) & "
and F2TRDT <= " & Year(Parameters!DateTo.Value)*10000+Month(Parameters!DateTo.Value)*100+day(Parameters!DateTo.Value) & "
Zen and the art of software maintenance : rm -rf *
Math is like love : a simple idea but it can get complicated.
|
|
|
|
 |
|
|
General
News
Suggestion
Question
Bug
Answer
Joke
Rant
Admin