Click here to Skip to main content
15,907,183 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: What does it do? Pin
CPallini15-Nov-07 23:43
mveCPallini15-Nov-07 23:43 
GeneralRe: What does it do? Pin
Vasudevan Deepak Kumar16-Nov-07 0:00
Vasudevan Deepak Kumar16-Nov-07 0:00 
GeneralRe: What does it do? Pin
Pete O'Hanlon16-Nov-07 2:43
mvePete O'Hanlon16-Nov-07 2:43 
GeneralRe: What does it do? Pin
Cristian Amarie16-Nov-07 4:20
Cristian Amarie16-Nov-07 4:20 
GeneralRe: What does it do? Pin
CPallini16-Nov-07 5:37
mveCPallini16-Nov-07 5:37 
GeneralRe: What does it do? Pin
Xpnctoc26-Dec-07 9:14
Xpnctoc26-Dec-07 9:14 
GeneralRe: What does it do? Pin
Cristian Amarie27-Dec-07 2:00
Cristian Amarie27-Dec-07 2:00 
GeneralNull != NULL in some cases in asp ;) Pin
MrMarco15-Nov-07 21:37
MrMarco15-Nov-07 21:37 
A few days ago, i have to update our prelife server with the new code.

The code itself was written in asp (not asp.net) and developed month ago.

After updating and running some manual tests, we decided that this code works fine.

But we missed something very important...

Take a look in this code and think about what happend, after strSQL gets the value Null (database NULL)...

Function SafeSQLString2(byval strSql)<br />
<br />
    if len(strSQL) > 0 then<br />
        strSql = Replace(strSql, "'", "")<br />
    end if<br />
    <br />
    SafeSQLString2 = strSql<br />
end function


The workmate who wrote this code isn't available anymore.

At the moment i'm rewriting the complete code and removing all of this trash.
GeneralRe: Null != NULL in some cases in asp ;) Pin
Mike Dimmick16-Nov-07 0:00
Mike Dimmick16-Nov-07 0:00 
GeneralRe: Null != NULL in some cases in asp ;) Pin
MrMarco16-Nov-07 1:30
MrMarco16-Nov-07 1:30 
GeneralFlags constants and new version Pin
Rama Krishna Vavilala15-Nov-07 14:34
Rama Krishna Vavilala15-Nov-07 14:34 
GeneralRe: Flags constants and new version Pin
CPallini15-Nov-07 23:38
mveCPallini15-Nov-07 23:38 
GeneralHow many things are wrong with this code? [modified] Pin
Leisuresuit Larry15-Nov-07 9:35
Leisuresuit Larry15-Nov-07 9:35 
GeneralRe: How many things are wrong with this code? Pin
Pete O'Hanlon15-Nov-07 10:07
mvePete O'Hanlon15-Nov-07 10:07 
GeneralRe: How many things are wrong with this code? Pin
Vasudevan Deepak Kumar15-Nov-07 21:34
Vasudevan Deepak Kumar15-Nov-07 21:34 
GeneralRe: How many things are wrong with this code? Pin
Cristian Amarie16-Nov-07 21:50
Cristian Amarie16-Nov-07 21:50 
GeneralMicrosofts crippled Java Pin
jhwurmbach19-Nov-07 1:55
jhwurmbach19-Nov-07 1:55 
GeneralRe: How many things are wrong with this code? Pin
DavidNohejl15-Nov-07 12:22
DavidNohejl15-Nov-07 12:22 
GeneralRe: How many things are wrong with this code? Pin
Luc Pattyn15-Nov-07 13:01
sitebuilderLuc Pattyn15-Nov-07 13:01 
Generalcan somebody explain the logic of this? [modified] Pin
Dogan Akhan12-Nov-07 22:19
Dogan Akhan12-Nov-07 22:19 
AnswerRe: can somebody explain the logic of this? Pin
Baconbutty12-Nov-07 22:29
Baconbutty12-Nov-07 22:29 
GeneralRe: can somebody explain the logic of this? Pin
NormDroid13-Nov-07 9:09
professionalNormDroid13-Nov-07 9:09 
AnswerRe: can somebody explain the logic of this? Pin
leppie12-Nov-07 22:57
leppie12-Nov-07 22:57 
AnswerRe: can somebody explain the logic of this? Pin
Shpendh12-Nov-07 23:19
Shpendh12-Nov-07 23:19 
GeneralRe: can somebody explain the logic of this? Pin
Paddy Boyd13-Nov-07 1:15
Paddy Boyd13-Nov-07 1:15 

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.