Click here to Skip to main content
15,886,518 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: This is pretty special. Pin
Bernhard Hiller3-Nov-11 22:20
Bernhard Hiller3-Nov-11 22:20 
GeneralRe: This is pretty special. Pin
Abinash Bishoyi3-Nov-11 23:26
Abinash Bishoyi3-Nov-11 23:26 
GeneralRe: This is pretty special. Pin
BobJanova3-Nov-11 23:55
BobJanova3-Nov-11 23:55 
GeneralRe: This is pretty special. Pin
Firo Atrum Ventus6-Nov-11 14:22
Firo Atrum Ventus6-Nov-11 14:22 
GeneralRe: This is pretty special. Pin
Reiss6-Nov-11 23:56
professionalReiss6-Nov-11 23:56 
GeneralRe: This is pretty special. Pin
JackDingler16-Nov-11 9:43
JackDingler16-Nov-11 9:43 
GeneralHow to waste time calling the database multiple times PinPopular
Nathan D Cook25-Oct-11 5:47
Nathan D Cook25-Oct-11 5:47 
GeneralRe: How to waste time calling the database multiple times PinPopular
Bernhard Hiller25-Oct-11 20:35
Bernhard Hiller25-Oct-11 20:35 
That example is not complete, is it? All of the functions you show are private/protected, none is public, and only one gets called by a user interaction. The real fun must be somewhere else. Didn't you see a function like:
C#
private void Button1_Click(object sender, EventArgs e)
{
    //remove the previous selection
    FillCase("");
    Search();
    Case_SelectionChanged(new object(), new EventArgs());
    FillGrid();
    //get fresh data and show them
    FillCase("some value");
    Search();
    Case_SelectionChanged(new object(), new EventArgs());
    FillGrid();
    //make sure that it is really the data of the selected case which are shown
    ... and some more lines of code
}

GeneralRe: How to waste time calling the database multiple times Pin
CDP180228-Oct-11 1:51
CDP180228-Oct-11 1:51 
GeneralRe: How to waste time calling the database multiple times Pin
Sander Rossel29-Oct-11 5:34
professionalSander Rossel29-Oct-11 5:34 
GeneralRe: How to waste time calling the database multiple times Pin
prasun.r7-Dec-11 1:39
prasun.r7-Dec-11 1:39 
RantShocking. Pin
Mel Padden25-Oct-11 4:22
Mel Padden25-Oct-11 4:22 
GeneralRe: Shocking. Pin
phil.o27-Oct-11 5:25
professionalphil.o27-Oct-11 5:25 
GeneralRe: Shocking. Pin
richiej27-Oct-11 22:27
richiej27-Oct-11 22:27 
GeneralRe: Shocking. Pin
phil.o27-Oct-11 22:37
professionalphil.o27-Oct-11 22:37 
JokeRe: Shocking. Pin
StM0n6-Nov-11 2:32
StM0n6-Nov-11 2:32 
GeneralRe: Shocking. Pin
Bert Mitton28-Oct-11 3:16
professionalBert Mitton28-Oct-11 3:16 
GeneralRe: Shocking. Pin
hairy_hats1-Nov-11 6:01
hairy_hats1-Nov-11 6:01 
GeneralExport to Excel Pin
leppie25-Oct-11 0:18
leppie25-Oct-11 0:18 
GeneralRe: Export to Excel Pin
GibbleCH25-Oct-11 5:36
GibbleCH25-Oct-11 5:36 
GeneralRe: Export to Excel Pin
leppie25-Oct-11 6:52
leppie25-Oct-11 6:52 
GeneralRe: Export to Excel Pin
GibbleCH25-Oct-11 7:01
GibbleCH25-Oct-11 7:01 
GeneralRe: Export to Excel Pin
leppie25-Oct-11 19:33
leppie25-Oct-11 19:33 
GeneralRe: Export to Excel Pin
Sundance Kid25-Oct-11 20:55
Sundance Kid25-Oct-11 20:55 
GeneralRe: Export to Excel Pin
GibbleCH26-Oct-11 4:13
GibbleCH26-Oct-11 4:13 

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.