Click here to Skip to main content
15,884,298 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: Code should be 5 or anything above 7 long... Pin
MarvinMartian28-Jan-12 13:41
MarvinMartian28-Jan-12 13:41 
GeneralRe: Code should be 5 or anything above 7 long... Pin
Sander Rossel28-Jan-12 23:56
professionalSander Rossel28-Jan-12 23:56 
GeneralRe: Code should be 5 or anything above 7 long... Pin
dawmail33330-Jan-12 0:44
dawmail33330-Jan-12 0:44 
GeneralRe: Code should be 5 or anything above 7 long... Pin
Jyothikarthik_N31-Jan-12 0:23
Jyothikarthik_N31-Jan-12 0:23 
GeneralLinq2Horror PinPopular
Robert Rohde24-Jan-12 21:01
Robert Rohde24-Jan-12 21:01 
GeneralRe: Linq2Horror PinPopular
Nagy Vilmos24-Jan-12 21:33
professionalNagy Vilmos24-Jan-12 21:33 
GeneralRe: Linq2Horror Pin
V.24-Jan-12 22:59
professionalV.24-Jan-12 22:59 
GeneralRe: Linq2Horror Pin
Robert Rohde25-Jan-12 1:31
Robert Rohde25-Jan-12 1:31 
I should probably clarify why and how this code was created:

We have a relatively large codebase. Some code files are old (C# 1.0 times) and contain tabs instead of white spaces (this was the default setting in VS2003 if I remember correctly). Now everytime we edit one of those files Visual Studio (now 2010) starts replacing the tabs automatically. This is simply annoying when using diffs and can be a complete pain when doing merges in our SVN. So we just had the idea to replace all left tabs with one big update.
While discussing on how to do it was just an amusing idea to make it with Linq. The code was executed exactly one time (ignoring test runs) and will never be touched again. Its nothing that will get checked in in production code or anything like that.

Robert
GeneralRe: Linq2Horror Pin
BobJanova25-Jan-12 8:16
BobJanova25-Jan-12 8:16 
GeneralRe: Linq2Horror Pin
riced25-Jan-12 10:54
riced25-Jan-12 10:54 
GeneralRe: Linq2Horror Pin
PIEBALDconsult26-Jan-12 2:36
mvePIEBALDconsult26-Jan-12 2:36 
GeneralRe: Linq2Horror Pin
BobJanova27-Jan-12 13:02
BobJanova27-Jan-12 13:02 
GeneralRe: Linq2Horror Pin
PIEBALDconsult27-Jan-12 16:03
mvePIEBALDconsult27-Jan-12 16:03 
GeneralRe: Linq2Horror Pin
riced28-Jan-12 6:27
riced28-Jan-12 6:27 
GeneralRe: Linq2Horror Pin
icestatue23-Feb-12 3:14
icestatue23-Feb-12 3:14 
GeneralRe: Linq2Horror Pin
gavindon1-Feb-12 10:51
gavindon1-Feb-12 10:51 
GeneralRe: Linq2Horror Pin
killabyte25-Jan-12 14:29
killabyte25-Jan-12 14:29 
GeneralRe: Linq2Horror Pin
Robert Rohde25-Jan-12 17:52
Robert Rohde25-Jan-12 17:52 
GeneralRe: Linq2Horror Pin
killabyte27-Jan-12 9:46
killabyte27-Jan-12 9:46 
GeneralRe: Linq2Horror Pin
Sander Rossel19-Mar-12 21:50
professionalSander Rossel19-Mar-12 21:50 
GeneralRe: Linq2Horror Pin
Robert Rohde22-Mar-12 2:07
Robert Rohde22-Mar-12 2:07 
GeneralGoodbye version control Pin
RobCroll20-Mar-12 12:07
RobCroll20-Mar-12 12:07 
GeneralRe: Goodbye version control Pin
Robert Rohde22-Mar-12 2:11
Robert Rohde22-Mar-12 2:11 
GeneralRe: Goodbye version control Pin
RobCroll22-Mar-12 12:36
RobCroll22-Mar-12 12:36 
GeneralLogical AND with false... PinPopular
Albert Holguin23-Jan-12 14:09
professionalAlbert Holguin23-Jan-12 14:09 

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.