Click here to Skip to main content
15,886,055 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: String.Format??? Pin
_Maxxx_17-Jul-10 0:29
professional_Maxxx_17-Jul-10 0:29 
GeneralRe: String.Format??? Pin
PIEBALDconsult17-Jul-10 2:54
mvePIEBALDconsult17-Jul-10 2:54 
GeneralRe: String.Format??? Pin
_Maxxx_18-Jul-10 1:09
professional_Maxxx_18-Jul-10 1:09 
GeneralRe: String.Format??? Pin
PIEBALDconsult18-Jul-10 4:01
mvePIEBALDconsult18-Jul-10 4:01 
GeneralRe: String.Format??? Pin
oggenok6417-Jul-10 5:07
oggenok6417-Jul-10 5:07 
GeneralRe: String.Format??? Pin
PIEBALDconsult9-Jul-10 5:02
mvePIEBALDconsult9-Jul-10 5:02 
GeneralRe: String.Format??? Pin
Jason Christian22-Jul-10 9:00
Jason Christian22-Jul-10 9:00 
GeneralRe: String.Format??? Pin
CDP18029-Jul-10 0:44
CDP18029-Jul-10 0:44 
In many cases a stored procedure would offer some benefits.

The real horror here is that the parameters were added with string formatting. Command parameters would have been a far better choice. This way, depending on where the parameters come from, the door is open for SQL injection attacks.
A while ago he asked me what he should have printed on my business cards. I said 'Wizard'.

I read books which nobody else understand. Then I do something which nobody understands. After that the computer does something which nobody understands. When asked, I say things about the results which nobody understand. But everybody expects miracles from me on a regular basis. Looks to me like the classical definition of a wizard.

GeneralRe: String.Format??? Pin
sergiogarcianinja9-Jul-10 4:47
sergiogarcianinja9-Jul-10 4:47 
GeneralRe: String.Format??? Pin
Jörgen Andersson9-Jul-10 4:59
professionalJörgen Andersson9-Jul-10 4:59 
GeneralRe: String.Format??? Pin
PIEBALDconsult9-Jul-10 5:06
mvePIEBALDconsult9-Jul-10 5:06 
GeneralRe: String.Format??? Pin
David Skelly9-Jul-10 5:54
David Skelly9-Jul-10 5:54 
GeneralRe: String.Format??? [modified] Pin
PIEBALDconsult9-Jul-10 7:31
mvePIEBALDconsult9-Jul-10 7:31 
GeneralRe: String.Format??? Pin
Jörgen Andersson9-Jul-10 10:23
professionalJörgen Andersson9-Jul-10 10:23 
GeneralRe: String.Format??? Pin
PIEBALDconsult9-Jul-10 10:33
mvePIEBALDconsult9-Jul-10 10:33 
GeneralRe: String.Format??? Pin
oggenok649-Jul-10 8:14
oggenok649-Jul-10 8:14 
GeneralRe: String.Format??? Pin
PIEBALDconsult9-Jul-10 8:59
mvePIEBALDconsult9-Jul-10 8:59 
GeneralRe: String.Format??? Pin
Jörgen Andersson9-Jul-10 10:48
professionalJörgen Andersson9-Jul-10 10:48 
GeneralRe: String.Format??? [modified] Pin
PIEBALDconsult9-Jul-10 10:51
mvePIEBALDconsult9-Jul-10 10:51 
GeneralRe: String.Format??? Pin
Jörgen Andersson9-Jul-10 11:06
professionalJörgen Andersson9-Jul-10 11:06 
GeneralRe: String.Format??? Pin
PIEBALDconsult9-Jul-10 12:29
mvePIEBALDconsult9-Jul-10 12:29 
GeneralRe: String.Format??? Pin
Jörgen Andersson9-Jul-10 13:00
professionalJörgen Andersson9-Jul-10 13:00 
GeneralRe: String.Format??? Pin
PIEBALDconsult9-Jul-10 13:05
mvePIEBALDconsult9-Jul-10 13:05 
GeneralRe: String.Format??? Pin
PIEBALDconsult9-Jul-10 15:05
mvePIEBALDconsult9-Jul-10 15:05 
GeneralRe: String.Format??? Pin
Jörgen Andersson9-Jul-10 10:32
professionalJörgen Andersson9-Jul-10 10:32 

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.