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

 
JokeRe: array size Pin
Yusuf2-Jun-08 7:43
Yusuf2-Jun-08 7:43 
GeneralRe: array size Pin
vobject2-Jun-08 20:44
vobject2-Jun-08 20:44 
GeneralRe: array size Pin
Andrew Rissing3-Jun-08 6:56
Andrew Rissing3-Jun-08 6:56 
GeneralRe: array size Pin
CDP18024-Jun-08 0:23
CDP18024-Jun-08 0:23 
GeneralRe: array size Pin
VentsyV6-Jun-08 10:09
VentsyV6-Jun-08 10:09 
Generaluserid=="administrator" Pin
Tadas Budvytis29-May-08 6:33
Tadas Budvytis29-May-08 6:33 
GeneralRe: userid=="administrator" Pin
Phil J Pearson29-May-08 7:14
Phil J Pearson29-May-08 7:14 
GeneralRe: userid=="administrator" Pin
Mladen Janković29-May-08 7:19
Mladen Janković29-May-08 7:19 
Tadas Budvytis wrote:
well first of all if it's UserID i expect it to be number,


Why? Don't you remember 'ALFKI' from the Northwind?

Tadas Budvytis wrote:
Another thing is if userID == 'administrator' it cant be in any case at the same time null.


Session["UserID"] != null criteria is required because if you code that if like this if (Session["UserID"].ToString() == "administrator") ..., it will throw an exception if the user is not logged in.

There's no real horror here.

Mostly, when you see programmers, they aren't doing anything. One of the attractive things about programmers is that you cannot tell whether or not they are working simply by looking at them. Very often they're sitting there seemingly drinking coffee and gossiping, or just staring into space. What the programmer is trying to do is get a handle on all the individual and unrelated ideas that are scampering around in his head. (Charles M Strauss)

GeneralRe: userid=="administrator" Pin
Tadas Budvytis29-May-08 8:10
Tadas Budvytis29-May-08 8:10 
GeneralRe: userid=="administrator" Pin
Robert Royall29-May-08 9:28
Robert Royall29-May-08 9:28 
GeneralRe: userid=="administrator" Pin
Mladen Janković29-May-08 10:01
Mladen Janković29-May-08 10:01 
GeneralRe: userid=="administrator" Pin
Robert Royall29-May-08 11:46
Robert Royall29-May-08 11:46 
GeneralRe: userid=="administrator" Pin
Brady Kelly31-May-08 5:09
Brady Kelly31-May-08 5:09 
GeneralRe: userid=="administrator" Pin
MarkB77730-May-08 23:30
MarkB77730-May-08 23:30 
GeneralRe: userid=="administrator" Pin
PIEBALDconsult31-May-08 12:37
mvePIEBALDconsult31-May-08 12:37 
GeneralRe: userid=="administrator" Pin
CDP18022-Jun-08 0:09
CDP18022-Jun-08 0:09 
GeneralRe: userid=="administrator" Pin
Brady Kelly31-May-08 5:08
Brady Kelly31-May-08 5:08 
GeneralRe: userid=="administrator" [modified] Pin
Oshtri Deka1-Jun-08 22:24
professionalOshtri Deka1-Jun-08 22:24 
GeneralTrimming off a little too much? Pin
bigbrownbeaver29-May-08 0:02
bigbrownbeaver29-May-08 0:02 
GeneralRe: Trimming off a little too much? Pin
ChandraRam29-May-08 0:40
ChandraRam29-May-08 0:40 
GeneralRe: Trimming off a little too much? Pin
PIEBALDconsult31-May-08 17:35
mvePIEBALDconsult31-May-08 17:35 
GeneralRe: Trimming off a little too much? Pin
CDP18022-Jun-08 0:14
CDP18022-Jun-08 0:14 
JokeRe: Trimming off a little too much? Pin
PIEBALDconsult2-Jun-08 12:51
mvePIEBALDconsult2-Jun-08 12:51 
JokeRe: Trimming off a little too much? Pin
chmod222223-Jun-08 1:54
chmod222223-Jun-08 1:54 
GeneralFormwhat? Pin
Brady Kelly28-May-08 8:33
Brady Kelly28-May-08 8:33 

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.