Click here to Skip to main content
15,887,083 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: Happy debugging! Pin
Nitin S4-Dec-12 1:31
professionalNitin S4-Dec-12 1:31 
GeneralCut out for Greenpeace... PinPopular
Sander Rossel21-Sep-12 22:27
professionalSander Rossel21-Sep-12 22:27 
GeneralRe: Cut out for Greenpeace... Pin
AspDotNetDev24-Sep-12 6:09
protectorAspDotNetDev24-Sep-12 6:09 
GeneralRe: Cut out for Greenpeace... Pin
Sander Rossel24-Sep-12 8:06
professionalSander Rossel24-Sep-12 8:06 
GeneralRe: Cut out for Greenpeace... Pin
BillW3318-Oct-12 8:19
professionalBillW3318-Oct-12 8:19 
GeneralRefactor Pin
Clifford Nelson26-Sep-12 5:49
Clifford Nelson26-Sep-12 5:49 
GeneralRe: Cut out for Greenpeace... Pin
BillW3318-Oct-12 8:23
professionalBillW3318-Oct-12 8:23 
GeneralRe: Cut out for Greenpeace... Pin
Sander Rossel18-Oct-12 8:38
professionalSander Rossel18-Oct-12 8:38 
CIDev wrote:
there are likely other bad practices
I found the same piece of code something like five times (EXACTLY the same). And then other pieces of code five times too. I found slightly different code even more often (don't make a function with input parameters, copy paste the code and change a word or two).
I found functions that were called ChangeX(ByVal x As Integer) that also changes Y and Z, ChangeY(ByVal y As Integer) that also changes X and Z etc. Worst part is, this guy coded them and still called ChangeX, ChangeY and ChangeZ one after the other.
Worst has still to come... This guy is technical director and pretends to be quality insurer (he is, but doesn't really insure anything).
He has told me I should not code MessageBox.Show("Hello"), I should've done:
Dim prompt As String = "Hello"
MessageBox.Show(prompt)
because... I don't know... He really doesn't understand I guess! If he would've coded it he wouldn't even have typed 'As String' because that's only inconvenient.
I've even seen him use switch statements for booleans! Somehow this guy doesn't like If statements...
And this guy is 'by the book' (really, if he sees something he doesn't like he always has a book that defends his position, it's freaky!)...
It's an OO world.
C#
public class Naerling : Lazy<Person>{
    public void DoWork(){ throw new NotImplementedException(); }
}

GeneralRe: Cut out for Greenpeace... Pin
BillW3322-Oct-12 3:11
professionalBillW3322-Oct-12 3:11 
GeneralThey grow up so fast.. PinPopular
jim lahey19-Sep-12 23:03
jim lahey19-Sep-12 23:03 
GeneralRe: They grow up so fast.. Pin
fjdiewornncalwe20-Sep-12 4:55
professionalfjdiewornncalwe20-Sep-12 4:55 
GeneralRe: They grow up so fast.. PinPopular
BobJanova20-Sep-12 5:24
BobJanova20-Sep-12 5:24 
GeneralRe: They grow up so fast.. PinPopular
AspDotNetDev21-Sep-12 6:37
protectorAspDotNetDev21-Sep-12 6:37 
GeneralRe: They grow up so fast.. Pin
jim lahey21-Sep-12 7:10
jim lahey21-Sep-12 7:10 
GeneralRe: They grow up so fast.. Pin
Sander Rossel21-Sep-12 22:04
professionalSander Rossel21-Sep-12 22:04 
GeneralRe: They grow up so fast.. Pin
zenwalker19859-Oct-12 18:07
zenwalker19859-Oct-12 18:07 
GeneralRe: They grow up so fast.. Pin
jim lahey9-Oct-12 21:49
jim lahey9-Oct-12 21:49 
GeneralC# properties and type safety Pin
Julien Villers19-Sep-12 22:31
professionalJulien Villers19-Sep-12 22:31 
GeneralRe: C# properties and type safety Pin
Andrei Straut19-Sep-12 22:44
Andrei Straut19-Sep-12 22:44 
GeneralRe: C# properties and type safety Pin
Julien Villers20-Sep-12 3:29
professionalJulien Villers20-Sep-12 3:29 
GeneralRe: C# properties and type safety Pin
Eddy Vluggen20-Sep-12 5:45
professionalEddy Vluggen20-Sep-12 5:45 
GeneralRe: C# properties and type safety Pin
Julien Villers20-Sep-12 8:30
professionalJulien Villers20-Sep-12 8:30 
GeneralRe: C# properties and type safety Pin
BobJanova20-Sep-12 6:29
BobJanova20-Sep-12 6:29 
GeneralRe: C# properties and type safety Pin
BillW3320-Sep-12 3:57
professionalBillW3320-Sep-12 3:57 
GeneralRe: C# properties and type safety Pin
Brisingr Aerowing20-Sep-12 5:35
professionalBrisingr Aerowing20-Sep-12 5:35 

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.