Click here to Skip to main content
16,021,580 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: Strong Typing Pin
PIEBALDconsult6-May-07 5:11
mvePIEBALDconsult6-May-07 5:11 
GeneralRe: Strong Typing Pin
Paul Conrad6-May-07 5:29
professionalPaul Conrad6-May-07 5:29 
GeneralRe: Strong Typing Pin
jhwurmbach7-May-07 3:56
jhwurmbach7-May-07 3:56 
GeneralRe: Strong Typing Pin
dighn7-May-07 12:04
dighn7-May-07 12:04 
GeneralRe: Strong Typing Pin
jhwurmbach7-May-07 21:02
jhwurmbach7-May-07 21:02 
GeneralRe: Strong Typing Pin
Ret Orrick9-May-07 4:04
Ret Orrick9-May-07 4:04 
GeneralRe: Strong Typing Pin
Russell Jones11-May-07 2:51
Russell Jones11-May-07 2:51 
GeneralRe: Strong Typing Pin
John R. Shaw6-May-07 6:01
John R. Shaw6-May-07 6:01 
I agree requiring such is not varying friendly, and is a real pain int the <blank>.

Here are some thoughts to consider when writing you code.:

1) In C you can wrap a variable declaration in a scope and if that scope is not entered then no space is allocated on the stack for it (saves cycles and memory). This applies to languages other than C, including C#.

2) In C++ you can wrap a class (variable) declaration in a scope and if that scope is not entered then the constructor and destructor are not called.


INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

GeneralRe: Strong Typing Pin
Shog96-May-07 8:24
sitebuilderShog96-May-07 8:24 
GeneralRe: Strong Typing Pin
PIEBALDconsult6-May-07 10:59
mvePIEBALDconsult6-May-07 10:59 
GeneralRe: Strong Typing Pin
eggsovereasy6-May-07 19:10
eggsovereasy6-May-07 19:10 
GeneralRe: Strong Typing Pin
Chris Maunder8-May-07 7:45
cofounderChris Maunder8-May-07 7:45 
GeneralRe: Strong Typing Pin
XTAL25611-May-07 2:33
XTAL25611-May-07 2:33 
GeneralRe: Strong Typing Pin
Tristan Rhodes8-May-07 2:45
Tristan Rhodes8-May-07 2:45 
GeneralRe: Strong Typing Pin
Marcus J. Smith8-May-07 2:48
professionalMarcus J. Smith8-May-07 2:48 
GeneralRe: Strong Typing Pin
Tristan Rhodes8-May-07 6:46
Tristan Rhodes8-May-07 6:46 
GeneralRe: Strong Typing Pin
PIEBALDconsult8-May-07 7:34
mvePIEBALDconsult8-May-07 7:34 
GeneralRe: Strong Typing Pin
Tristan Rhodes8-May-07 8:19
Tristan Rhodes8-May-07 8:19 
GeneralRe: Strong Typing Pin
PIEBALDconsult8-May-07 9:37
mvePIEBALDconsult8-May-07 9:37 
GeneralRe: Strong Typing Pin
Tristan Rhodes8-May-07 9:43
Tristan Rhodes8-May-07 9:43 
GeneralRe: Strong Typing Pin
PIEBALDconsult8-May-07 11:38
mvePIEBALDconsult8-May-07 11:38 
GeneralRe: Strong Typing Pin
Tristan Rhodes8-May-07 22:31
Tristan Rhodes8-May-07 22:31 
GeneralRe: Strong Typing Pin
PIEBALDconsult9-May-07 17:13
mvePIEBALDconsult9-May-07 17:13 
GeneralRe: Strong Typing Pin
Marcus J. Smith8-May-07 8:11
professionalMarcus J. Smith8-May-07 8:11 
GeneralRe: Strong Typing Pin
urbane.tiger7-May-07 20:44
urbane.tiger7-May-07 20:44 

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.