Click here to Skip to main content

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.

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
GeneralTypemock Comic Series #1 - How to Keep Your Code SecurememberNCSM13 Nov '12 - 10:02 
We put cameras in your office and caught an impromptu meeting between one of your developers and his manager. Here are the pictures.
 
http://www.typemock.com/blog/2012/11/08/how-to-keep-your-code-secure-typemock-comic-series-1/[^]
GeneralRe: Typemock Comic Series #1 - How to Keep Your Code Securemember0bx14 Nov '12 - 6:11 
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.
.

GeneralLoading custom fields from Quickbooks [modified]memberJeremy D Lee9 Nov '12 - 16:01 
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.

JokeRe: Loading custom fields from QuickbooksmemberBernhard Hiller10 Nov '12 - 21:53 
Daer frnds,
need help urgenz. Most time my code simply not work. Sometime it give errro refernce not setting object. Plz help its urgentz.
GeneralRe: Loading custom fields from QuickbooksmemberJeremy D Lee11 Nov '12 - 2:14 
Why do you think I posted it in this forum? Did you miss the mistake? Smile | :)
GeneralRe: Loading custom fields from QuickbooksmemberBernhard Hiller11 Nov '12 - 21:33 
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...
GeneralRe: Loading custom fields from QuickbooksmemberZac Greve11 Nov '12 - 5:34 
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

GeneralRe: Loading custom fields from QuickbooksmemberBobJanova12 Nov '12 - 22:15 
That is a level of fail which leaves me speechless.
GeneralRe: Loading custom fields from QuickbooksmemberClodetta del Mar15 Nov '12 - 1:37 
I can do it even better ...
Yesterday I found that gem in my own code
Boolean deleted = false;
if(deleted){
...
}
what a great luck I wrote it only five minutes before I observed my supersophisticated State-of-the-art-Failure... Big Grin | :-D

Blush | :O
GeneralHow to conver Date to yyyyMMdd format in SSRSmembervirang_218 Nov '12 - 14:41 
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 General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 23 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid