Click here to Skip to main content
15,860,972 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: Tales from J.S. Crypt, Day 3 Pin
Wastedtalent13-Jan-17 4:23
professionalWastedtalent13-Jan-17 4:23 
GeneralRe: Tales from J.S. Crypt, Day 3 Pin
OriginalGriff13-Jan-17 4:40
mveOriginalGriff13-Jan-17 4:40 
GeneralRe: Tales from J.S. Crypt, Day 3 Pin
Marc Clifton14-Jan-17 10:40
mvaMarc Clifton14-Jan-17 10:40 
GeneralRe: Tales from J.S. Crypt, Day 3 Pin
Nagy Vilmos13-Jan-17 4:39
professionalNagy Vilmos13-Jan-17 4:39 
GeneralRe: Tales from J.S. Crypt, Day 3 Pin
Jon McKee14-Jan-17 11:02
professionalJon McKee14-Jan-17 11:02 
GeneralRe: Tales from J.S. Crypt, Day 3 Pin
Bernhard Hiller15-Jan-17 20:57
Bernhard Hiller15-Jan-17 20:57 
GeneralRe: Tales from J.S. Crypt, Day 3 Pin
Harrison Pratt16-Jan-17 2:40
professionalHarrison Pratt16-Jan-17 2:40 
GeneralRe: Tales from J.S. Crypt, Day 3 Pin
Greg Lovekamp17-Jan-17 4:19
professionalGreg Lovekamp17-Jan-17 4:19 
I trust there is sarcasm in there. I can read this and get that it is similar though wrong if based upon the original code snippet - nothing in the original maps with 2.

The original code snippet is certainly not the most elegant; however, it would be clear to anyone looking at it what is being done: my dog would be able to figure out that code (and quite possibly have written it). Prolog is much more of an "acquired" taste.

Personally, while I try to make code look a little better than the original author did, the important concept (over efficiency and elegance) is that the next poor schmuck who needs to maintain that code can determine what it is doing very quickly. Usually, the time code needs modified is when something has broken and the results were already needed but were prevented by such failure. At such times, while trying to determine what the various pieces of code do, elegance has NO value; efficiency has NO value. Only being able to determine what the code is trying to do is of ANY importance, so CLARITY is paramount.
GeneralRe: Tales from J.S. Crypt, Day 3 Pin
Harrison Pratt17-Jan-17 12:10
professionalHarrison Pratt17-Jan-17 12:10 
GeneralRe: Tales from J.S. Crypt, Day 3 Pin
Sander Rossel22-Jan-17 0:25
professionalSander Rossel22-Jan-17 0:25 
GeneralRe: Tales from J.S. Crypt, Day 3 Pin
Jörgen Andersson22-Jan-17 8:10
professionalJörgen Andersson22-Jan-17 8:10 
GeneralTales from the Crypt Pin
Marc Clifton12-Jan-17 3:38
mvaMarc Clifton12-Jan-17 3:38 
GeneralRe: Tales from the Crypt Pin
MarkTJohnson12-Jan-17 4:08
professionalMarkTJohnson12-Jan-17 4:08 
GeneralRe: Tales from the Crypt Pin
Richard Deeming12-Jan-17 7:17
mveRichard Deeming12-Jan-17 7:17 
GeneralRe: Tales from the Crypt Pin
Bernhard Hiller12-Jan-17 20:47
Bernhard Hiller12-Jan-17 20:47 
GeneralRe: Tales from the Crypt Pin
Jon McKee12-Jan-17 21:20
professionalJon McKee12-Jan-17 21:20 
GeneralRe: Tales from the Crypt Pin
Bernhard Hiller15-Jan-17 20:52
Bernhard Hiller15-Jan-17 20:52 
GeneralRe: Tales from the Crypt Pin
Jon McKee16-Jan-17 9:17
professionalJon McKee16-Jan-17 9:17 
GeneralRe: Tales from the Crypt Pin
Foothill12-Jan-17 11:35
professionalFoothill12-Jan-17 11:35 
GeneralRe: Tales from the Crypt Pin
Wastedtalent13-Jan-17 3:36
professionalWastedtalent13-Jan-17 3:36 
GeneralRe: Tales from the Crypt Pin
Gerry Schmitz16-Jan-17 8:29
mveGerry Schmitz16-Jan-17 8:29 
GeneralRe: Tales from the Crypt Pin
KarstenK26-Jan-17 0:57
mveKarstenK26-Jan-17 0:57 
GeneralRe: Tales from the Crypt Pin
cjb11012-Feb-17 21:09
cjb11012-Feb-17 21:09 
GeneralRe: Tales from the Crypt Pin
Marc Clifton13-Feb-17 5:24
mvaMarc Clifton13-Feb-17 5:24 
GeneralLet's call him J. S. Crypt Pin
Marc Clifton11-Jan-17 2:43
mvaMarc Clifton11-Jan-17 2:43 

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.