Click here to Skip to main content
16,011,374 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: Well, Pin
Christian Graus8-Sep-08 5:43
protectorChristian Graus8-Sep-08 5:43 
GeneralRe: Well, Pin
vinay_K8-Sep-08 1:55
vinay_K8-Sep-08 1:55 
GeneralRe: Well, PinPopular
Baconbutty8-Sep-08 2:18
Baconbutty8-Sep-08 2:18 
GeneralRe: Well, Pin
vinay_K8-Sep-08 2:24
vinay_K8-Sep-08 2:24 
GeneralRe: Well, Pin
BillW338-Sep-08 8:21
professionalBillW338-Sep-08 8:21 
GeneralRe: Hi. Pin
Paul Conrad8-Sep-08 18:35
professionalPaul Conrad8-Sep-08 18:35 
JokeMagic C++ Program Pin
Amir_Saniyan7-Sep-08 22:48
Amir_Saniyan7-Sep-08 22:48 
GeneralRe: Magic C++ Program Pin
BadKarma7-Sep-08 23:21
BadKarma7-Sep-08 23:21 
Nice, but the following is worse, way, way , way worse. Its valid c/c++ code Laugh | :laugh:
??=define _i_ int
??=define _i (??/
_i_
??=include<stdio.h>
_i_ main ??/
_i ??/
__i, char* ??/
i_??/
??(??/
??))
??=define _endl_ ; 
??<char _s??/
??(9??/
??), _i__??/
??(4??/
??) _endl_
??=define _s_ _endl_ _s
??<_s_ ??/
??(0??/
??) = '??/
??=' _s_ ??/
??(1??/
??) = '??/
??(' _s_ ??/
??(2??/
??) = '??/
??/??/' _endl_
??=define _m_(m_) ? m_ :
??>_s_ ??/
??(3??/
??) = '??/
??)' _s_ ??/
??(4??/
??) = '??/
??'' _s_ ??/
??(5??/
??) = '??<' _endl_
??=define _START(s) for _i __i__ = s _endl_
??<_i_ e = (__i == 2) ? (((*i_??/
??(1??/
??)-0x30) < 0) ??/
??!??/
??! ((*i_??/
??(1??/
??)-0x30) > 9)) _m_(9) (*i_??/
??(1??/
??)-0x30): 9 _endl_
??=define _VALIDATE(v) __i__ < e _endl_ __i__++)
??<_s_ ??/
??(6??/
??) = '??/
??!' _s_ ??/
??(7??/
??) = '??/
??>' _s_ ??/
??(8??/
??) = '??-' _endl_ 
??>
??=define move_to(n) case n:
??<_START(0) _VALIDATE(0)
??=define skip ) _endl_ break _endl_
??<switch (__i__) 
??< move_to(0)
??=define to_mem sprintf (_i__,
??<to_mem "??/
???/?=" skip 
??> move_to(1) 
??=define _do_i_ "%d. "
??< to_mem "??/
???/?(" skip 
??>move_to(2) 
??< to_mem "??/
???/?/" skip
??> move_to(3)
??< to_mem "??/
???/?)" skip
??=define move_screen printf (
??=define show_single(i) , _s ??/
??(i??/
??)
??=define _char_ " %c"
??>move_to(4) 
??< to_mem "??/
???/?'" skip 
??> move_to(5) 
??< to_mem "??/
???/?<" skip
??=define _endl_null_ return 0 _endl_
??>move_to(6) 
??< to_mem "??/
???/?!" skip 
??> move_to(7) 
??< to_mem "??/
???/?>" skip 
??=define _text_ " %s means "
??>move_to(8) 
??< to_mem "??/
???/?-" skip ??> 
??>move_screen _do_i_ "_text_"_text_"_char_"_char_"??/
??/n", __i__, _i__ show_single (__i__)) _endl_ 
??> 
??> 
??> _endl_null_ 
??>


Learn from the mistakes of others, you may not live long enough to make them all yourself.

GeneralRe: Magic C++ Program Pin
leppie8-Sep-08 0:47
leppie8-Sep-08 0:47 
GeneralRe: Magic C++ Program Pin
BadKarma8-Sep-08 1:23
BadKarma8-Sep-08 1:23 
GeneralRe: Magic C++ Program Pin
leppie8-Sep-08 1:25
leppie8-Sep-08 1:25 
GeneralRe: Magic C++ Program Pin
BillW338-Sep-08 8:57
professionalBillW338-Sep-08 8:57 
GeneralRe: Magic C++ Program Pin
Megidolaon23-Feb-09 0:52
Megidolaon23-Feb-09 0:52 
GeneralRe: Magic C++ Program Pin
asadullah ansari8-Sep-08 3:50
asadullah ansari8-Sep-08 3:50 
GeneralRe: Magic C++ Program Pin
Pete O'Hanlon8-Sep-08 4:52
mvePete O'Hanlon8-Sep-08 4:52 
GeneralRe: Magic C++ Program Pin
BillW338-Sep-08 8:57
professionalBillW338-Sep-08 8:57 
GeneralRe: Magic C++ Program Pin
The Cake of Deceit8-Sep-08 11:03
The Cake of Deceit8-Sep-08 11:03 
GeneralRe: Magic C++ Program Pin
peterchen8-Sep-08 11:27
peterchen8-Sep-08 11:27 
GeneralRe: Magic C++ Program Pin
Emil - Gabriel15-Sep-08 3:25
Emil - Gabriel15-Sep-08 3:25 
Generalhow many seconds? Pin
tommyligo7-Sep-08 6:43
tommyligo7-Sep-08 6:43 
GeneralRe: how many seconds? Pin
Megidolaon7-Sep-08 20:41
Megidolaon7-Sep-08 20:41 
GeneralRe: how many seconds? PinPopular
CPallini8-Sep-08 0:06
mveCPallini8-Sep-08 0:06 
GeneralRe: how many seconds? Pin
Robert.C.Cartaino8-Sep-08 5:12
Robert.C.Cartaino8-Sep-08 5:12 
GeneralRe: how many seconds? Pin
CPallini8-Sep-08 8:15
mveCPallini8-Sep-08 8:15 
GeneralRe: how many seconds? Pin
BillW338-Sep-08 6:27
professionalBillW338-Sep-08 6:27 

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.