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

 
Generalhe he Pin
Sylvester george5-Jun-07 1:46
Sylvester george5-Jun-07 1:46 
GeneralRe: he he Pin
Optimus Chaos5-Jun-07 2:04
Optimus Chaos5-Jun-07 2:04 
GeneralRe: he he Pin
DavidNohejl5-Jun-07 2:11
DavidNohejl5-Jun-07 2:11 
GeneralRe: he he Pin
Emil - Gabriel11-Jun-07 4:09
Emil - Gabriel11-Jun-07 4:09 
GeneralRe: he he Pin
benjymous12-Jun-07 0:21
benjymous12-Jun-07 0:21 
GeneralRe: he he Pin
Sylvester george12-Jun-07 1:14
Sylvester george12-Jun-07 1:14 
GeneralRe: he he Pin
Emil - Gabriel12-Jun-07 1:54
Emil - Gabriel12-Jun-07 1:54 
GeneralRe: he he Pin
DarrollWalsh19-Jun-07 5:20
DarrollWalsh19-Jun-07 5:20 
It should read like so
return new StringBuilder("Current date and time is " + DateTime.Now.ToString());


Lots of useless code to return a string as a StringBuilder. Or, shouldn't have used StringBuilder at all. The object of the StringBuilder class is to save memory when appending strings together. The original code misses that concept and uses more memory than if he would have just added the strings together.


Darroll

Not one person lives in the present.

GeneralRe: he he [modified] Pin
TwoFaced20-Jun-07 8:58
TwoFaced20-Jun-07 8:58 
GeneralRe: he he Pin
Emil - Gabriel20-Jun-07 20:26
Emil - Gabriel20-Jun-07 20:26 
GeneralRe: he he Pin
Emil - Gabriel20-Jun-07 20:27
Emil - Gabriel20-Jun-07 20:27 
GeneralRe: he he Pin
Sylvester george21-Jun-07 20:43
Sylvester george21-Jun-07 20:43 
GeneralRe: he he Pin
Sathesh Sakthivel9-Jul-07 20:05
Sathesh Sakthivel9-Jul-07 20:05 
JokeHa ha Pin
ScottM13-Jun-07 23:08
ScottM13-Jun-07 23:08 
GeneralRe: Ha ha Pin
Giorgi Dalakishvili3-Jun-07 23:34
mentorGiorgi Dalakishvili3-Jun-07 23:34 
GeneralRe: Ha ha Pin
ScottM13-Jun-07 23:41
ScottM13-Jun-07 23:41 
GeneralRe: Ha ha Pin
Daniel Grunwald5-Jun-07 3:32
Daniel Grunwald5-Jun-07 3:32 
GeneralRe: Ha ha Pin
Dan Neely5-Jun-07 3:46
Dan Neely5-Jun-07 3:46 
GeneralRe: Ha ha Pin
Daniel Grunwald5-Jun-07 4:04
Daniel Grunwald5-Jun-07 4:04 
GeneralRe: Ha ha Pin
KarstenK4-Jun-07 1:46
mveKarstenK4-Jun-07 1:46 
GeneralRe: Ha ha Pin
dighn4-Jun-07 10:47
dighn4-Jun-07 10:47 
GeneralRe: Ha ha [modified] Pin
Sameer Alibhai4-Jun-07 13:16
Sameer Alibhai4-Jun-07 13:16 
GeneralRe: Ha ha Pin
Rage5-Jun-07 21:11
professionalRage5-Jun-07 21:11 
GeneralRe: Ha ha Pin
Sameer Alibhai6-Jun-07 2:09
Sameer Alibhai6-Jun-07 2:09 
GeneralRe: Ha ha Pin
jhwurmbach5-Jun-07 23:08
jhwurmbach5-Jun-07 23:08 

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.