Click here to Skip to main content
14,267,277 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.

 
GeneralRe: Why Microsoft Disgusts Me Today Pin
#realJSOP19-Mar-19 9:34
mve#realJSOP19-Mar-19 9:34 
GeneralRe: Why Microsoft Disgusts Me Today Pin
Rick York19-Mar-19 13:11
mveRick York19-Mar-19 13:11 
GeneralRe: Why Microsoft Disgusts Me Today Pin
Dave Kreskowiak22-Mar-19 4:07
mveDave Kreskowiak22-Mar-19 4:07 
GeneralRe: Why Microsoft Disgusts Me Today Pin
MacSpudster26-Mar-19 10:50
professionalMacSpudster26-Mar-19 10:50 
GeneralRe: Why Microsoft Disgusts Me Today Pin
abmv8-Apr-19 21:38
professionalabmv8-Apr-19 21:38 
GeneralRe: Why Microsoft Disgusts Me Today Pin
Rick York9-Apr-19 5:20
mveRick York9-Apr-19 5:20 
General#define Macros and the Preprocessor Used by the Resource Compiler Pin
David A. Gray10-Mar-19 10:38
groupDavid A. Gray10-Mar-19 10:38 
GeneralRe: #define Macros and the Preprocessor Used by the Resource Compiler Pin
Rick York12-Mar-19 10:56
mveRick York12-Mar-19 10:56 
It was interesting to read Raymond's blog on this. Someone asked me the other day about my style of include guards and my reply was I've been doing it this way for so long I don't remember exactly why. That blog posted reminded me - I didn't have a compiler that supported pragmas back then it was quite a while until "pragma once" existed.

FWIW, this is what I do :
#ifndef HEADER_H
#define HEADER_H
#else
#error repeated include of this file
#endif

/***
#ifndef HEADER_H
#include "Header.h"
#endif
 ***/
and I ALWAYS have the little commented section so I can copy and paste it and I am always safe. I did this back in the days when a global file change resulted in a compile and build process that took about forty minutes for our system. I cut that down by two thirds by putting this into the headers and I still do it today. I actually got the idea from Microsoft's headers and added the error statement to let me know of offenders. Microsoft still does this today, minus the error. Have a look at afxwin.h for an example.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"

GeneralRe: #define Macros and the Preprocessor Used by the Resource Compiler Pin
Dr.Walt Fair, PE13-Mar-19 6:27
professionalDr.Walt Fair, PE13-Mar-19 6:27 
GeneralExtending Generics with nested types Pin
raddevus4-Mar-19 10:30
mvaraddevus4-Mar-19 10:30 
GeneralRe: Extending Generics with nested types Pin
Nathan Minier5-Mar-19 2:17
professionalNathan Minier5-Mar-19 2:17 
GeneralRe: Extending Generics with nested types Pin
raddevus5-Mar-19 2:33
mvaraddevus5-Mar-19 2:33 
GeneralRe: Extending Generics with nested types Pin
Dr.Walt Fair, PE13-Mar-19 6:28
professionalDr.Walt Fair, PE13-Mar-19 6:28 
GeneralRe: Extending Generics with nested types Pin
raddevus13-Mar-19 7:30
mvaraddevus13-Mar-19 7:30 
GeneralRe: Extending Generics with nested types Pin
Dr.Walt Fair, PE7-May-19 5:50
professionalDr.Walt Fair, PE7-May-19 5:50 
GeneralDocumentation boggle of the day Pin
Gary Wheeler6-Feb-19 8:22
memberGary Wheeler6-Feb-19 8:22 
GeneralRe: Documentation boggle of the day Pin
MarkTJohnson6-Feb-19 8:37
professionalMarkTJohnson6-Feb-19 8:37 
GeneralRe: Documentation boggle of the day Pin
Ron Anders6-Feb-19 10:20
memberRon Anders6-Feb-19 10:20 
GeneralRe: Documentation boggle of the day Pin
pwasser6-Feb-19 12:53
memberpwasser6-Feb-19 12:53 
GeneralRe: Documentation boggle of the day Pin
Jörgen Andersson6-Feb-19 18:08
protectorJörgen Andersson6-Feb-19 18:08 
GeneralRe: Documentation boggle of the day Pin
pwasser6-Feb-19 18:24
memberpwasser6-Feb-19 18:24 
GeneralRe: Documentation boggle of the day Pin
Jörgen Andersson6-Feb-19 19:52
protectorJörgen Andersson6-Feb-19 19:52 
GeneralRe: Documentation boggle of the day Pin
Kirk 103898217-Feb-19 2:56
memberKirk 103898217-Feb-19 2:56 
GeneralRe: Documentation boggle of the day Pin
David O'Neil6-Feb-19 17:20
professionalDavid O'Neil6-Feb-19 17:20 
GeneralRe: Documentation boggle of the day Pin
Nelek6-Feb-19 21:05
protectorNelek6-Feb-19 21:05 

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.