Click here to Skip to main content
15,881,882 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: Needed a series of random numbers [modified] Pin
CDP180214-Sep-11 3:01
CDP180214-Sep-11 3:01 
GeneralRe: Needed a series of random numbers Pin
Bert Mitton14-Sep-11 3:07
professionalBert Mitton14-Sep-11 3:07 
GeneralRe: Needed a series of random numbers Pin
CDP180214-Sep-11 3:49
CDP180214-Sep-11 3:49 
GeneralRe: Needed a series of random numbers Pin
Bert Mitton14-Sep-11 4:04
professionalBert Mitton14-Sep-11 4:04 
GeneralMessage Removed Pin
21-Sep-11 7:04
professionalN_tro_P21-Sep-11 7:04 
GeneralRe: Needed a series of random numbers Pin
Bert Mitton22-Sep-11 3:08
professionalBert Mitton22-Sep-11 3:08 
GeneralRe: Needed a series of random numbers Pin
Luis D. Aguilar7-Oct-11 7:49
Luis D. Aguilar7-Oct-11 7:49 
GeneralCommenting code... Pin
Sander Rossel4-Sep-11 20:47
professionalSander Rossel4-Sep-11 20:47 
Last week I wrote a small library that would either startup a Form or focus an already open one, based on the Form you wanted to start. My boss wanted me to make a prototype that he could approve (approval can be reached by not using to much interfaces... He doesn't like them because it will make code harder to read and debug). So I was done writing it and showed him what I had made. First thing he said was that I didn't have comments in my code (well duh, he told me to finish it asap and he wanted to approve it first). So I had to put a comment above the Function FormCanBeShown that returns a Boolean. Yeah, what possibly could it do?
Even better, I had the code
VB
frm.Select

Boss: "What does this do?"
Me: "It selects the Form... Basic Microsoft functionality..." *Hoovers over it to get MS IntelliSense prove of what I just said*
Boss: "Well, I wouldn't know that, put some commentary there."
And then the code looked like this:
VB
' Activates the Control.
frm.Select

Really, was that necessary[^]?
It's an OO world.

GeneralRe: Commenting code... Pin
Firo Atrum Ventus4-Sep-11 22:02
Firo Atrum Ventus4-Sep-11 22:02 
GeneralRe: Commenting code... Pin
Allan Thomas5-Sep-11 14:53
Allan Thomas5-Sep-11 14:53 
GeneralRe: Commenting code... Pin
Sander Rossel5-Sep-11 19:56
professionalSander Rossel5-Sep-11 19:56 
GeneralRe: Commenting code... Pin
BobJanova5-Sep-11 23:04
BobJanova5-Sep-11 23:04 
GeneralRe: Commenting code... Pin
tobep9-Sep-11 7:13
tobep9-Sep-11 7:13 
GeneralRe: Commenting code... Pin
Sander Rossel9-Sep-11 7:22
professionalSander Rossel9-Sep-11 7:22 
GeneralRe: Commenting code... PinPopular
RCoate5-Sep-11 18:37
RCoate5-Sep-11 18:37 
GeneralRe: Commenting code... Pin
Sander Rossel5-Sep-11 19:58
professionalSander Rossel5-Sep-11 19:58 
GeneralRe: Commenting code... PinPopular
Rob Grainger6-Sep-11 0:32
Rob Grainger6-Sep-11 0:32 
GeneralRe: Commenting code... Pin
Firo Atrum Ventus6-Sep-11 14:35
Firo Atrum Ventus6-Sep-11 14:35 
GeneralRe: Commenting code... Pin
Stefan_Lang30-Sep-11 2:59
Stefan_Lang30-Sep-11 2:59 
GeneralRe: Commenting code... Pin
MicroVirus6-Sep-11 2:57
MicroVirus6-Sep-11 2:57 
GeneralRe: Commenting code... Pin
RCoate6-Sep-11 15:07
RCoate6-Sep-11 15:07 
GeneralRe: Commenting code... Pin
Nagy Vilmos5-Sep-11 22:43
professionalNagy Vilmos5-Sep-11 22:43 
GeneralRe: Commenting code... PinPopular
Al_Brown6-Sep-11 0:01
Al_Brown6-Sep-11 0:01 
GeneralRe: Commenting code... Pin
Sander Rossel6-Sep-11 6:46
professionalSander Rossel6-Sep-11 6:46 
GeneralRe: Commenting code... Pin
Al_Brown6-Sep-11 23:34
Al_Brown6-Sep-11 23:34 

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.