Click here to Skip to main content
15,890,185 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: Tricking Microsoft and being shamless Pin
thoiness1-Sep-11 7:37
thoiness1-Sep-11 7:37 
GeneralRe: Tricking Microsoft and being shamless Pin
xavier morera1-Sep-11 7:41
xavier morera1-Sep-11 7:41 
GeneralThe Perfect Loop Pin
Richard X Menezes5-Aug-11 11:04
Richard X Menezes5-Aug-11 11:04 
GeneralRe: The Perfect Loop Pin
Jeroen De Dauw5-Aug-11 13:20
Jeroen De Dauw5-Aug-11 13:20 
GeneralRe: The Perfect Loop Pin
BillW336-Aug-11 1:07
professionalBillW336-Aug-11 1:07 
GeneralRe: The Perfect Loop Pin
Richard X Menezes8-Aug-11 5:08
Richard X Menezes8-Aug-11 5:08 
GeneralRe: The Perfect Loop Pin
Tom Chantler9-Aug-11 2:46
professionalTom Chantler9-Aug-11 2:46 
GeneralInfinite Loop Pin
Colin Mullikin5-Aug-11 5:12
professionalColin Mullikin5-Aug-11 5:12 
While trying to find a possible infinite loop, I added the second line below:
Delphi
while true do begin
  Reset(CurrFile);
  ReadLn(CurrFile,Pierce);

The break statement to exit the while loop depends on making it to a specific line in the file. Since I already read some lines before this, I thought just in case the line I was waiting for was above them, I would reset the file. After debugging this a few times, I realized that I was an idiot, and I moved the reset to just before the while... Sigh | :sigh:
The United States invariably does the right thing, after having exhausted every other alternative. -Winston Churchill

America is the only country that went from barbarism to decadence without civilization in between. -Oscar Wilde

Wow, even the French showed a little more spine than that before they got their sh*t pushed in.[^] -Colin Mullikin


GeneralRe: Infinite Loop Pin
Gary R. Wheeler7-Aug-11 0:55
Gary R. Wheeler7-Aug-11 0:55 
GeneralHopeless cases [modified] Pin
Lutosław4-Aug-11 22:44
Lutosław4-Aug-11 22:44 
GeneralRe: Hopeless cases Pin
V.4-Aug-11 23:47
professionalV.4-Aug-11 23:47 
JokeRe: Hopeless cases Pin
Freak305-Aug-11 2:43
Freak305-Aug-11 2:43 
GeneralRe: Hopeless cases PinPopular
Ian Shlasko5-Aug-11 3:24
Ian Shlasko5-Aug-11 3:24 
GeneralRe: Hopeless cases Pin
fjdiewornncalwe5-Aug-11 3:33
professionalfjdiewornncalwe5-Aug-11 3:33 
GeneralRe: Hopeless cases PinPopular
Ian Shlasko5-Aug-11 4:07
Ian Shlasko5-Aug-11 4:07 
GeneralRe: Hopeless cases Pin
Lutosław5-Aug-11 3:50
Lutosław5-Aug-11 3:50 
GeneralRe: Hopeless cases Pin
Ian Shlasko5-Aug-11 4:08
Ian Shlasko5-Aug-11 4:08 
GeneralRe: Hopeless cases [modified] Pin
John Y.17-Nov-11 7:06
John Y.17-Nov-11 7:06 
GeneralSQL between Pin
wizardzz28-Jul-11 11:42
wizardzz28-Jul-11 11:42 
GeneralRe: SQL between Pin
GuyThiebaut30-Jul-11 11:47
professionalGuyThiebaut30-Jul-11 11:47 
GeneralRe: SQL between Pin
OriginalGriff30-Jul-11 22:49
mveOriginalGriff30-Jul-11 22:49 
GeneralRe: SQL between Pin
GuyThiebaut30-Jul-11 23:32
professionalGuyThiebaut30-Jul-11 23:32 
GeneralRe: SQL between Pin
OriginalGriff30-Jul-11 23:41
mveOriginalGriff30-Jul-11 23:41 
GeneralRe: SQL between Pin
Robert Rohde31-Jul-11 18:07
Robert Rohde31-Jul-11 18:07 
GeneralRe: SQL between Pin
Lutosław1-Aug-11 23:22
Lutosław1-Aug-11 23:22 

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.