Click here to Skip to main content
15,906,816 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.

 
JokeRe: A little tiny horror Pin
RichardM114-Jan-08 10:15
RichardM114-Jan-08 10:15 
GeneralRe: A little tiny horror PinPopular
Pete O'Hanlon14-Jan-08 9:31
mvePete O'Hanlon14-Jan-08 9:31 
GeneralRe: A little tiny horror Pin
Gary Wheeler15-Jan-08 0:29
Gary Wheeler15-Jan-08 0:29 
GeneralRe: A little tiny horror Pin
Pete O'Hanlon15-Jan-08 1:25
mvePete O'Hanlon15-Jan-08 1:25 
GeneralRe: A little tiny horror Pin
Gary Wheeler15-Jan-08 1:37
Gary Wheeler15-Jan-08 1:37 
GeneralYou need a flag? Why not create a file for that! PinPopular
peterchen25-Dec-07 8:44
peterchen25-Dec-07 8:44 
GeneralRe: You need a flag? Why not create a file for that! Pin
Paul Conrad26-Dec-07 9:39
professionalPaul Conrad26-Dec-07 9:39 
GeneralRe: You need a flag? Why not create a file for that! Pin
Alaric_3-Jan-08 3:47
professionalAlaric_3-Jan-08 3:47 
I agree whole-heartedly with their solution.

peterchen wrote:
If complex per-process initialization is required, use a "private" global flag


...You mention "complex" and then "private global flag" in the same sentence??

To me..."complex" would imply...well.....complex.
And "private global flag" would imply....well....an improper implementation for a "complex" solution

A "private global flag" (regardless of the fact that declaration of anything with global scope is incorrect) would create an incredibly fragile, convoluted solution. Creating an access list (along with the other MSDN suggestions) would be extensible and compartmentalized.

"I need build Skynet. Plz send code"

modified on Thursday, January 03, 2008 10:04:15 AM

GeneralRe: You need a flag? Why not create a file for that! Pin
Alaric_3-Jan-08 4:04
professionalAlaric_3-Jan-08 4:04 
GeneralRe: You need a flag? Why not create a file for that! Pin
peterchen3-Jan-08 8:01
peterchen3-Jan-08 8:01 
GeneralVBA GoTo Hell PinPopular
GuyThiebaut24-Dec-07 3:32
professionalGuyThiebaut24-Dec-07 3:32 
GeneralWhat If (Re: VBA GoTo Hell) Pin
Xiangyang Liu 刘向阳24-Dec-07 5:12
Xiangyang Liu 刘向阳24-Dec-07 5:12 
GeneralRe: What If (Re: VBA GoTo Hell) Pin
GuyThiebaut24-Dec-07 5:52
professionalGuyThiebaut24-Dec-07 5:52 
GeneralRe: What If (Re: VBA GoTo Hell) Pin
Vasudevan Deepak Kumar3-Jan-08 22:01
Vasudevan Deepak Kumar3-Jan-08 22:01 
GeneralRe: What If (Re: VBA GoTo Hell) Pin
CPallini24-Dec-07 6:22
mveCPallini24-Dec-07 6:22 
GeneralRe: What If (Re: VBA GoTo Hell) Pin
PIEBALDconsult24-Dec-07 6:42
mvePIEBALDconsult24-Dec-07 6:42 
GeneralRe: What If (Re: VBA GoTo Hell) Pin
GuyThiebaut24-Dec-07 13:09
professionalGuyThiebaut24-Dec-07 13:09 
GeneralRe: What If (Re: VBA GoTo Hell) Pin
anony28-Dec-07 6:01
anony28-Dec-07 6:01 
GeneralRe: What If (Re: VBA GoTo Hell) Pin
GuyThiebaut31-Dec-07 9:09
professionalGuyThiebaut31-Dec-07 9:09 
GeneralRe: What If (Re: VBA GoTo Hell) Pin
peterchen25-Dec-07 8:57
peterchen25-Dec-07 8:57 
GeneralRe: What If (Re: VBA GoTo Hell) Pin
Scott Barbour27-Dec-07 13:16
Scott Barbour27-Dec-07 13:16 
GeneralRe: What If (Re: VBA GoTo Hell) Pin
Matt Sollars1-Jan-08 5:46
Matt Sollars1-Jan-08 5:46 
GeneralRe: What If (Re: VBA GoTo Hell) Pin
GuyThiebaut3-Jan-08 3:29
professionalGuyThiebaut3-Jan-08 3:29 
GeneralRe: What If (Re: VBA GoTo Hell) Pin
Matt Sollars3-Jan-08 6:28
Matt Sollars3-Jan-08 6:28 
GeneralRe: VBA GoTo Hell Pin
Paul Conrad31-Dec-07 7:41
professionalPaul Conrad31-Dec-07 7: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.