Click here to Skip to main content
15,902,865 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: Thats why i hate c++ Pin
CDP180227-Apr-12 10:23
CDP180227-Apr-12 10:23 
GeneralRe: Thats why i hate c++ Pin
Stephen Dycus27-Apr-12 10:56
professionalStephen Dycus27-Apr-12 10:56 
GeneralRe: Thats why i hate c++ Pin
Rob Grainger26-Apr-12 23:20
Rob Grainger26-Apr-12 23:20 
GeneralRe: Thats why i hate c++ Pin
krsmichael27-Apr-12 4:00
krsmichael27-Apr-12 4:00 
GeneralRe: Thats why i hate c++ Pin
Vasily Tserekh27-Apr-12 5:14
Vasily Tserekh27-Apr-12 5:14 
GeneralRe: Thats why i hate c++ Pin
krsmichael27-Apr-12 3:53
krsmichael27-Apr-12 3:53 
GeneralRe: Thats why i hate c++ Pin
Vasily Tserekh27-Apr-12 5:30
Vasily Tserekh27-Apr-12 5:30 
GeneralRe: Thats why i hate c++ Pin
krsmichael27-Apr-12 6:46
krsmichael27-Apr-12 6:46 
Vasily, by definition, C# is a sandbox. That is what managed code means. You run in a sandbox and don't have access to the process space. Sandbox. Got it?

So, you want one thing? Write me a device driver in C#.
Another? Write me an HTTP server that can handle 100,000+ simultaneous connections. I can do that in C++ using overlapped IO and completion ports. I hear the same arguments from the Java guys. My Grails on Groovy on Java framework can handle 200 simultaneous connections and it doesn't matter because I can throw more hardware at it. Do you have any idea how many machines you will need to replace the 1 C++ machine?

You talk about making system DLL calls. What do you think those DLLs are written in? And, BTW, if you don't have the C/C++ run-times installed, those DLLs will not load either. I gave you the solution to your problem.

I use QT. QT's streams are a wonder as well. And you know what, they are a lot faster too. QT and C# with WPF gives you declarative programming. Guess what, C++ and QT are much faster again. Both are equivalently trivial.

You allude to an idea that I don't have a clue. Go back and read what I wrote about insulting people when you make a bold statement and then try to argue the point. My guess is you are about 15 years old. You are learning to program and you still have holes in your knowledge. Me, I'm 50 years old. I've been doing this since the Apple II days. I've done mainframe. I can do assembly, PASCAL, PL1, C, C++, C#, Perl, Python, JavaScript, Java, HTML, device drivers, DLLs, servers, clients, OpenSSL, mobile devices, and much more. I can do all this stuff on Windows, Windows CE, MacOSx and Linux.

Oh, and BTW, you can't do inline ASM.

M
GeneralRe: Thats why i hate c++ Pin
krsmichael27-Apr-12 6:50
krsmichael27-Apr-12 6:50 
GeneralRe: Thats why i hate c++ Pin
Vasily Tserekh27-Apr-12 7:33
Vasily Tserekh27-Apr-12 7:33 
GeneralRe: Thats why i hate c++ Pin
CDP180227-Apr-12 8:19
CDP180227-Apr-12 8:19 
GeneralRe: Thats why i hate c++ Pin
krsmichael27-Apr-12 10:07
krsmichael27-Apr-12 10:07 
GeneralRe: Thats why i hate c++ Pin
Gerry Schmitz27-Apr-12 12:02
mveGerry Schmitz27-Apr-12 12:02 
GeneralRe: Thats why i hate c++ Pin
krsmichael27-Apr-12 14:34
krsmichael27-Apr-12 14:34 
GeneralRe: Thats why i hate c++ Pin
CDP180227-Apr-12 7:32
CDP180227-Apr-12 7:32 
GeneralRe: Thats why i hate c++ Pin
Vasily Tserekh27-Apr-12 7:51
Vasily Tserekh27-Apr-12 7:51 
GeneralRe: Thats why i hate c++ Pin
CDP180227-Apr-12 8:36
CDP180227-Apr-12 8:36 
GeneralRe: Thats why i hate c++ Pin
Al_Brown29-Apr-12 20:59
Al_Brown29-Apr-12 20:59 
GeneralRe: Thats why i hate c++ Pin
patbob27-Apr-12 12:28
patbob27-Apr-12 12:28 
GeneralRe: Thats why i hate c++ Pin
KP Lee27-Apr-12 13:26
KP Lee27-Apr-12 13:26 
GeneralRe: Thats why i hate c++ Pin
Member 869706828-Apr-12 9:01
professionalMember 869706828-Apr-12 9:01 
GeneralRe: Thats why i hate c++ Pin
mandyedi28-Apr-12 9:03
mandyedi28-Apr-12 9:03 
GeneralRe: Thats why i hate c++ Pin
Charles Oppermann27-Apr-12 2:34
Charles Oppermann27-Apr-12 2:34 
GeneralRe: Thats why i hate c++ Pin
KP Lee27-Apr-12 13:46
KP Lee27-Apr-12 13:46 
GeneralRe: Thats why i hate c++ PinPopular
OriginalGriff24-Apr-12 9:20
mveOriginalGriff24-Apr-12 9:20 

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.