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.

 
GeneralRe: DateTime.Now vs. GetSystemTime PinpremiumBobJanova2-Jun-14 0:51 
GeneralRe: DateTime.Now vs. GetSystemTime PinpremiumRob Philpott10-Jun-14 5:20 
GeneralRe: DateTime.Now vs. GetSystemTime PinprofessionalEddy Vluggen6-Jun-14 5:11 
GeneralSuccessfully writing to a string literal PinpremiumIndivara18-May-14 23:44 
GeneralRe: Successfully writing to a string literal PinmemberFreak3019-May-14 1:45 
GeneralRe: Successfully writing to a string literal [modified] PinpremiumIndivara19-May-14 5:17 
GeneralRe: Successfully writing to a string literal Pinpremiumnewton.saber19-May-14 1:45 
GeneralRe: Successfully writing to a string literal PinpremiumIndivara19-May-14 5:15 
I meant using const char * arg1 would be a better choice in this case, not a generalization.
 
The compiler was removing the last assignment arg1[i] = '\0' because it had no effect. The thing was thrown together in a hurry and the assignment was 'insurance' against the caller forgetting to add it. Had the reverse effect ironically.
GeneralRe: Successfully writing to a string literal Pinpremiumnewton.saber19-May-14 5:34 
GeneralThe Exception to the C# Rules PinmemberBrady Kelly15-May-14 18:55 
GeneralRe: The Exception to the C# Rules PinprofessionalBernhard Hiller15-May-14 21:54 
GeneralRe: The Exception to the C# Rules PinprofessionalShameel16-May-14 0:53 
GeneralRe: The Exception to the C# Rules PinpremiumKeith Barrow19-May-14 6:28 
GeneralRe: The Exception to the C# Rules PinprofessionalBernhard Hiller19-May-14 22:46 
GeneralRe: The Exception to the C# Rules Pinmembercpkilekofp19-Jun-14 9:50 
GeneralVB6 code that emits VB6 code PinmemberMrChug7-May-14 16:12 
GeneralI can't set title for this post!!! PinmemberMeysam Tolouee2-May-14 18:45 
GeneralRe: I can't set title for this post!!! <- then what's that? You trying to confuse me? PinprofessionalEddy Vluggen3-May-14 8:25 
GeneralRe: I can't set title for this post!!! PinpremiumPIEBALDconsult3-May-14 12:14 
GeneralRe: I can't set title for this post!!! Pinmembercpkilekofp19-Jun-14 11:05 
GeneralSome useful extension methods PinprofessionalBrisingr Aerowing2-May-14 13:41 
GeneralRe: Some useful extension methods PinpremiumPIEBALDconsult2-May-14 14:50 
GeneralRe: Some useful extension methods Pinmemberrobocodeboy13-May-14 21:52 
QuestionRe: Some useful extension methods PinprofessionalMatt T Heffron5-May-14 14:45 
AnswerRe: Some useful extension methods PinprofessionalBrisingr Aerowing5-May-14 15:30 

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

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


Advertise | Privacy | Mobile
Web03 | 2.8.140905.1 | Last Updated 15 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid