Click here to Skip to main content
15,911,785 members

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, embarrassing 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.

 
JokeRan across this sql the other day. PinPopular
Austin Harris15-Aug-08 8:44
Austin Harris15-Aug-08 8:44 
GeneralRe: Ran across this sql the other day. Pin
Pete O'Hanlon15-Aug-08 8:54
mvePete O'Hanlon15-Aug-08 8:54 
GeneralRe: Ran across this sql the other day. Pin
PIEBALDconsult15-Aug-08 12:06
mvePIEBALDconsult15-Aug-08 12:06 
GeneralRe: Ran across this sql the other day. Pin
Brent Lamborn15-Aug-08 9:32
Brent Lamborn15-Aug-08 9:32 
GeneralRe: Ran across this sql the other day. Pin
Paul Conrad16-Aug-08 5:52
professionalPaul Conrad16-Aug-08 5:52 
GeneralRe: Ran across this sql the other day. Pin
Yusuf16-Aug-08 17:27
Yusuf16-Aug-08 17:27 
GeneralRe: Ran across this sql the other day. Pin
Mike Dimmick17-Aug-08 10:17
Mike Dimmick17-Aug-08 10:17 
GeneralPractice safe programming ! Pin
User 4041112-Aug-08 23:13
User 4041112-Aug-08 23:13 
Here is an example from our current development effort:

CYesNoDlgBar *yesNoBar = new CYesNoDlgBar(this, prompt);
yesNoBar->SetCadPtr(this);
ShowCadBarModal(yesNoBar);
ret = yesNoBar->GetResult() ? 1 : 0;
if (yesNoBar)
  {
  delete yesNoBar;
  yesNoBar = NULL;
  }


Unfortunately I can't track down which developer put in this piece of code as we changed source control and lost that history otherwise he would have got a piece of my mind, as would the one who was supposed to do the code review.

Cheers,
Brett
GeneralRe: Practice safe programming ! Pin
Anand Desai12-Aug-08 23:28
Anand Desai12-Aug-08 23:28 
GeneralRe: Practice safe programming ! Pin
Nemanja Trifunovic13-Aug-08 7:18
Nemanja Trifunovic13-Aug-08 7:18 
GeneralRe: Practice safe programming ! Pin
Kevin McFarlane13-Aug-08 9:49
Kevin McFarlane13-Aug-08 9:49 
GeneralRe: Practice safe programming ! Pin
Nemanja Trifunovic13-Aug-08 10:59
Nemanja Trifunovic13-Aug-08 10:59 
GeneralRe: Practice safe programming ! Pin
Yusuf13-Aug-08 15:24
Yusuf13-Aug-08 15:24 
GeneralRe: Practice safe programming ! Pin
Jörgen Sigvardsson22-Aug-08 10:23
Jörgen Sigvardsson22-Aug-08 10:23 
GeneralRe: Practice safe programming ! Pin
geoffs14-Aug-08 9:23
geoffs14-Aug-08 9:23 
GeneralRe: Practice safe programming ! Pin
Johann Gerell21-Aug-08 1:11
Johann Gerell21-Aug-08 1:11 
GeneralRe: Practice safe programming ! Pin
Paul Conrad13-Aug-08 9:27
professionalPaul Conrad13-Aug-08 9:27 
GeneralRe: Practice safe programming ! Pin
KarstenK14-Aug-08 3:48
mveKarstenK14-Aug-08 3:48 
GeneralRe: Practice safe programming ! Pin
Paul Conrad14-Aug-08 6:21
professionalPaul Conrad14-Aug-08 6:21 
GeneralCalling a subroutine Pin
Timothy Baldwin12-Aug-08 11:34
Timothy Baldwin12-Aug-08 11:34 
GeneralRe: Calling a subroutine Pin
Chris Maunder12-Aug-08 16:42
cofounderChris Maunder12-Aug-08 16:42 
GeneralRe: Calling a subroutine Pin
Mike Dimmick17-Aug-08 10:39
Mike Dimmick17-Aug-08 10:39 
GeneralRe: Calling a subroutine Pin
Timothy Baldwin21-Aug-08 5:14
Timothy Baldwin21-Aug-08 5:14 
GeneralRe: Calling a subroutine Pin
supercat917-Aug-08 11:59
supercat917-Aug-08 11:59 
GeneralCode which caused my PC hang [modified] Pin
Anand Desai6-Aug-08 22:41
Anand Desai6-Aug-08 22:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.