Click here to Skip to main content
15,895,370 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: Opinions Pin
dybs28-Jul-10 16:29
dybs28-Jul-10 16:29 
GeneralRe: Opinions Pin
SirTimothy28-Jul-10 16:58
SirTimothy28-Jul-10 16:58 
JokeRe: Opinions Pin
johannesnestler2-Aug-10 3:00
johannesnestler2-Aug-10 3:00 
GeneralRe: Opinions Pin
SirTimothy3-Aug-10 15:54
SirTimothy3-Aug-10 15:54 
GeneralRe: Opinions Pin
Lutosław30-Jul-10 2:15
Lutosław30-Jul-10 2:15 
JokeRe: Opinions Pin
SirTimothy30-Jul-10 8:33
SirTimothy30-Jul-10 8:33 
GeneralRe: Opinions Pin
Lutosław31-Jul-10 2:07
Lutosław31-Jul-10 2:07 
GeneralRe: Opinions Pin
SirTimothy31-Jul-10 4:50
SirTimothy31-Jul-10 4:50 
It is kinda amazing, isn't it? The y[iarray] thing, I've seen in a few different websites, basically the compiler just expands it to *(y + iarray) which is the same as iarray[y] and it carries on its merry way. The O(n^2) complexity is hidden in the single loop, I reset the values of x and y in the conditional (the y=x&=~x bit) when y gets past the array length and x is non-zero. Pretty near impossible to prove n^2 runtime, or to prove correctness, or even to prove that it terminates, but it's fun and it works. I thought about writing some more sorts like this, but haven't gotten to it...
GeneralRe: Opinions Pin
Lutosław1-Aug-10 21:05
Lutosław1-Aug-10 21:05 
GeneralRe: Opinions Pin
Euhemerus8-Aug-10 1:45
Euhemerus8-Aug-10 1:45 
GeneralAre you sure that it's not null? PinPopular
JeremyBob22-Jul-10 21:39
JeremyBob22-Jul-10 21:39 
GeneralRe: Are you sure that it's not null? Pin
Yusuf23-Jul-10 13:37
Yusuf23-Jul-10 13:37 
GeneralRe: Are you sure that it's not null? Pin
ThatsAlok25-Jul-10 20:42
ThatsAlok25-Jul-10 20:42 
GeneralRe: Are you sure that it's not null? Pin
J4amieC26-Jul-10 6:09
J4amieC26-Jul-10 6:09 
GeneralRe: Are you sure that it's not null? Pin
JeremyBob25-Jul-10 22:38
JeremyBob25-Jul-10 22:38 
GeneralRe: Are you sure that it's not null? Pin
Single Step Debugger27-Jul-10 5:58
Single Step Debugger27-Jul-10 5:58 
GeneralRe: Are you sure that it's not null? Pin
Lutosław30-Jul-10 2:20
Lutosław30-Jul-10 2:20 
GeneralYAVH - Yet another VBA horror Pin
Rob Grainger22-Jul-10 1:13
Rob Grainger22-Jul-10 1:13 
GeneralRe: YAVH - Yet another VBA horror Pin
Oakman22-Jul-10 3:09
Oakman22-Jul-10 3:09 
GeneralRe: YAVH - Yet another VBA horror Pin
Dan Pratt22-Jul-10 3:25
Dan Pratt22-Jul-10 3:25 
GeneralRe: YAVH - Yet another VBA horror Pin
Jeremy Hutchinson22-Jul-10 3:36
professionalJeremy Hutchinson22-Jul-10 3:36 
GeneralRe: YAVH - Yet another VBA horror Pin
supercat922-Jul-10 4:55
supercat922-Jul-10 4:55 
GeneralRe: YAVH - Yet another VBA horror Pin
Rob Grainger26-Jul-10 5:59
Rob Grainger26-Jul-10 5:59 
GeneralRe: YAVH - Yet another VBA horror Pin
Hired Mind22-Jul-10 7:12
Hired Mind22-Jul-10 7:12 
GeneralRe: YAVH - Yet another VBA horror Pin
oggenok6423-Jul-10 8:54
oggenok6423-Jul-10 8:54 

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.