Click here to Skip to main content
15,887,027 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: Yet another Subversion rant Pin
Stefan_Lang24-Apr-13 4:28
Stefan_Lang24-Apr-13 4:28 
GeneralRe: Yet another Subversion rant Pin
Vasudevan Deepak Kumar23-Apr-13 9:58
Vasudevan Deepak Kumar23-Apr-13 9:58 
GeneralRe: Yet another Subversion rant Pin
Clifford Nelson24-Apr-13 10:17
Clifford Nelson24-Apr-13 10:17 
GeneralDirect me to USB Pin
C-P-User-315-Apr-13 7:57
C-P-User-315-Apr-13 7:57 
GeneralRe: Direct me to USB Pin
ENOTTY15-Apr-13 8:46
ENOTTY15-Apr-13 8:46 
GeneralRe: Direct me to USB Pin
LloydA11115-Apr-13 9:19
LloydA11115-Apr-13 9:19 
GeneralRe: Direct me to USB Pin
Pete O'Hanlon16-Apr-13 1:54
mvePete O'Hanlon16-Apr-13 1:54 
GeneralBest Practices turned into Coding Horrors. PinPopular
Paulo Zemek15-Apr-13 7:25
mvaPaulo Zemek15-Apr-13 7:25 
It is a well known good practice to use StringBuilders instead of doing many string concatenations. Yet, I got really impressed when I saw a document telling to replace things like this:

C#
private const string SQL =
  "SELECT " +
  "  ID, " +
  "  NAME, " +
  "  BIRTHDAY " +
  "FROM " +
  "  TABLE " +
  "WHERE " +
  "  NAME LIKE @PARAM";


By creating the StringBuilder everytime in the method where the SQL was being used. Maybe I am wrong D'Oh! | :doh: , but I really believe consts aren't doing bad string concatenations all the time.
GeneralRe: Best Practices turned into Coding Horrors. PinPopular
Brisingr Aerowing15-Apr-13 7:37
professionalBrisingr Aerowing15-Apr-13 7:37 
JokeRe: Best Practices turned into Coding Horrors. Pin
Thomas Daniels19-Apr-13 7:28
mentorThomas Daniels19-Apr-13 7:28 
GeneralRe: Best Practices turned into Coding Horrors. Pin
Gary R. Wheeler20-Apr-13 0:01
Gary R. Wheeler20-Apr-13 0:01 
GeneralRe: Best Practices turned into Coding Horrors. Pin
R. Giskard Reventlov15-Apr-13 7:59
R. Giskard Reventlov15-Apr-13 7:59 
GeneralRe: Best Practices turned into Coding Horrors. Pin
Paulo Zemek15-Apr-13 10:34
mvaPaulo Zemek15-Apr-13 10:34 
GeneralRe: Best Practices turned into Coding Horrors. Pin
Brady Kelly15-Apr-13 19:46
Brady Kelly15-Apr-13 19:46 
GeneralRe: Best Practices turned into Coding Horrors. Pin
R. Giskard Reventlov16-Apr-13 7:37
R. Giskard Reventlov16-Apr-13 7:37 
JokeRe: Best Practices turned into Coding Horrors. Pin
Brady Kelly16-Apr-13 19:13
Brady Kelly16-Apr-13 19:13 
GeneralRe: Best Practices turned into Coding Horrors. Pin
jschell16-Apr-13 9:51
jschell16-Apr-13 9:51 
GeneralRe: Best Practices turned into Coding Horrors. Pin
BobJanova16-Apr-13 22:58
BobJanova16-Apr-13 22:58 
GeneralRe: Best Practices turned into Coding Horrors. Pin
R. Giskard Reventlov17-Apr-13 4:56
R. Giskard Reventlov17-Apr-13 4:56 
GeneralRe: Best Practices turned into Coding Horrors. Pin
James Lonero18-Apr-13 12:35
James Lonero18-Apr-13 12:35 
GeneralRe: Best Practices turned into Coding Horrors. Pin
ENOTTY18-Apr-13 5:56
ENOTTY18-Apr-13 5:56 
GeneralRe: Best Practices turned into Coding Horrors. Pin
MacSpudster15-Apr-13 11:30
professionalMacSpudster15-Apr-13 11:30 
GeneralRe: Best Practices turned into Coding Horrors. Pin
Paulo Zemek15-Apr-13 13:16
mvaPaulo Zemek15-Apr-13 13:16 
GeneralRe: Best Practices turned into Coding Horrors. Pin
MacSpudster15-Apr-13 13:24
professionalMacSpudster15-Apr-13 13:24 
GeneralRe: Best Practices turned into Coding Horrors. Pin
PIEBALDconsult15-Apr-13 17:26
mvePIEBALDconsult15-Apr-13 17:26 

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.