Click here to Skip to main content
15,881,172 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: C++ expression(s) Pin
megaadam13-Oct-15 0:46
professionalmegaadam13-Oct-15 0:46 
GeneralRe: C++ expression(s) Pin
den2k8813-Oct-15 2:54
professionalden2k8813-Oct-15 2:54 
GeneralRe: C++ expression(s) PinPopular
Indivara13-Oct-15 3:52
professionalIndivara13-Oct-15 3:52 
GeneralRe: C++ expression(s) Pin
den2k8813-Oct-15 4:01
professionalden2k8813-Oct-15 4:01 
GeneralRe: C++ expression(s) Pin
Agent__00715-Oct-15 0:10
professionalAgent__00715-Oct-15 0:10 
GeneralRe: C++ expression(s) Pin
Power Puff Boy15-Oct-15 0:22
Power Puff Boy15-Oct-15 0:22 
GeneralRe: C++ expression(s) Pin
C3D129-Oct-15 21:21
professionalC3D129-Oct-15 21:21 
GeneralRe: C++ expression(s) Pin
CDP180213-Oct-15 4:21
CDP180213-Oct-15 4:21 
C3D1 wrote:
k = j + 1;

That is a mistake. k obviously is a pointer and ++k will not increment this pointer by just 1 byte. It will increment it by the size of the type of k. Try it out and examine the memory address k points to in the debugger in both versions.
The language is JavaScript. that of Mordor, which I will not utter here

This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.

"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."

If software development were a circus, we would all be the clowns.

GeneralRe: C++ expression(s) Pin
k505413-Oct-15 6:47
mvek505413-Oct-15 6:47 
GeneralRe: C++ expression(s) Pin
PIEBALDconsult16-Oct-15 7:58
mvePIEBALDconsult16-Oct-15 7:58 
GeneralRe: C++ expression(s) Pin
Dan Neely16-Oct-15 8:55
Dan Neely16-Oct-15 8:55 
GeneralRe: C++ expression(s) Pin
C3D129-Oct-15 21:26
professionalC3D129-Oct-15 21:26 
JokeAmazon's rules, Amazon's fail Pin
Tibor Blazko8-Oct-15 8:11
Tibor Blazko8-Oct-15 8:11 
GeneralMan-in-the-middle SSL-Streams Pin
Dr Gadgit30-Sep-15 8:53
Dr Gadgit30-Sep-15 8:53 
GeneralIt's alive.....! Pin
Duncan Edwards Jones18-Sep-15 4:42
professionalDuncan Edwards Jones18-Sep-15 4:42 
GeneralRe: It's alive.....! Pin
Richard Deeming18-Sep-15 4:52
mveRichard Deeming18-Sep-15 4:52 
GeneralRe: It's alive.....! Pin
Palash Mondal_18-Sep-15 5:12
professionalPalash Mondal_18-Sep-15 5:12 
GeneralRe: It's alive.....! Pin
phil.o13-Oct-15 1:57
professionalphil.o13-Oct-15 1:57 
GeneralRe: It's alive.....! Pin
Duncan Edwards Jones13-Oct-15 2:18
professionalDuncan Edwards Jones13-Oct-15 2:18 
GeneralRe: It's alive.....! Pin
phil.o15-Oct-15 0:01
professionalphil.o15-Oct-15 0:01 
GeneralWTF Pin
Brisingr Aerowing15-Aug-15 11:46
professionalBrisingr Aerowing15-Aug-15 11:46 
GeneralRe: WTF Pin
Sander Rossel15-Aug-15 13:29
professionalSander Rossel15-Aug-15 13:29 
GeneralRe: WTF Pin
kmoorevs15-Aug-15 14:22
kmoorevs15-Aug-15 14:22 
GeneralRe: WTF Pin
Amarnath S15-Aug-15 18:13
professionalAmarnath S15-Aug-15 18:13 
GeneralRe: WTF Pin
Weylyn Cadwell17-Aug-15 11:31
Weylyn Cadwell17-Aug-15 11:31 

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.