Click here to Skip to main content

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, embarrasing 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.

 
GeneralReversing time, without a flux capacitor PinmemberGary R. Wheeler17-Jan-13 5:03 
GeneralRe: Reversing time, without a flux capacitor PinmemberLloyd Atkinson17-Jan-13 6:57 
GeneralRe: Reversing time, without a flux capacitor PinmemberGary R. Wheeler17-Jan-13 10:25 
GeneralRe: Reversing time, without a flux capacitor PinmemberLloyd Atkinson17-Jan-13 12:40 
GeneralRe: Reversing time, without a flux capacitor PinmemberBobJanova21-Jan-13 5:52 
GeneralRe: Reversing time, without a flux capacitor PinmemberBrisingr Aerowing17-Jan-13 15:25 
GeneralRe: Reversing time, without a flux capacitor PinmemberBobJanova21-Jan-13 5:56 
GeneralRe: Reversing time, without a flux capacitor Pinmemberenglebart23-Jan-13 4:35 
It seems that the sample code given should just put the result into a work queue so that the network IO can be overlapping the actual work without getting out of order...
 

Kind of reminds me of a mystery when teaching an Intro to C class.
Lab:
Open a file, write 5 lines into the file, close the file.
 
Result:
The lines were coming out backwards!
 
Cause:
The fopen() was being called inside the loop.
Line 1 was written (buffered).
open the file again
Line 2 was written (buffered)
etc.
 
On exit, the handles must have been closed in reverse order so Line 5 flushed first, followed by Line 4, ... Line1.
 
Buffered IO strikes again.
GeneralRe: Reversing time, without a flux capacitor PinmemberGary R. Wheeler23-Jan-13 12:45 
GeneralRe: Reversing time, without a flux capacitor PinmemberMember 793197823-Jan-13 6:44 
GeneralRe: Reversing time, without a flux capacitor PinmemberGary R. Wheeler23-Jan-13 12:58 
JokeRe: Reversing time, without a flux capacitor PinmemberRafagaX23-Jan-13 7:21 
GeneralRe: Reversing time, without a flux capacitor PinmemberPaulo Zemek23-Jan-13 8:37 
GeneralRe: Reversing time, without a flux capacitor PinmemberJonathan C Dickinson3-Feb-13 23:47 
GeneralThe best refactoring I have ever seen Pinmembermatt_taws17-Jan-13 2:29 
GeneralRe: The best refactoring I have ever seen PinmemberSuper Lloyd17-Jan-13 3:42 
GeneralRe: The best refactoring I have ever seen PinmemberJonathan C Dickinson17-Jan-13 4:22 
GeneralRe: The best refactoring I have ever seen PinmemberPIEBALDconsult17-Jan-13 4:48 
GeneralRe: The best refactoring I have ever seen PinmemberRob Grainger1-Feb-13 4:17 
GeneralWhat was I thinking Pinmemberdjj5516-Jan-13 2:15 
GeneralRe: What was I thinking PinmemberDavid Goebet16-Jan-13 2:40 
GeneralRe: What was I thinking PinmemberMatt U.16-Jan-13 2:56 
GeneralRe: What was I thinking Pinmemberpeterchen16-Jan-13 4:24 
GeneralRe: What was I thinking PinmemberG James16-Jan-13 10:57 
JokeRe: What was I thinking PinadminChris Maunder16-Jan-13 19:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.1411028.1 | Last Updated 28 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid