C++ Programmers unite!
-
I mis-wrote my original post - you learned machine architecture I believe (did they use RISC processors as examples? :)), but you should also learn CPU micro-architecture. Not just all the parts of a CPU, but how they work together. How out-of-order execution works, the Decode-Execute-Dipatch cycle, how to cause and prevent pipeline and cache stalls, etc. All those things help greatly when writing multithreaded/multicore code so you can prevent each one of your threads from effectively stepping on each other. Unless you do know all that already, then nevermind! :) Peace!
-=- James
Please rate this message - let me know if I helped or not! * * *
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFilesI certainly don't know all of that in detail. Maybe I'll added a CPU construction book to my bedtime reading list. :)
Simon
-
Chris Maunder wrote:
So C++ devs: Tell us why C++ is just plain old better.
I'm not sure that "better" applies to all situations, but, at least in many of the systems I've developed, C++ kicks .NET's butt. Mostly, I'm talking about performance, memory management and scalability. char* pBuffer = malloc(WHATEVER), while unpopular, mistreated and oft abused is quite a powerful construct. If I had to pick one feature that .NET needs, that would be simple: destructors. Who decided that deterministic finalization was a bad thing????? Oh yea, *pBuffer, pBuffer++ and all pointer related arithmetic, access, etc, is just plain fast & elegant, when used right. Personally, I like .NET just fine and plan to use it for just about any web applications I build. However, I also have written several Windows services and some mission-critical number crunching applications (and even one CGI application). I even tried to develop one of these in .NET, but the performance was abysmal. (BTW, don't tell me that I wrote the .NET app wrong, I asked around, sought advice from "experts", etc and ultimately, the architecture of .NET and the .NET framework were just in the way.) I would love to see a system come along that is evolutionary/revolutionary that actually produces faster code, not slower code, with each progressive release. This whole "layer cake" approach is getting quite heavy. And the current mantra of throwing hardware at performance problems is getting very very old. (Re-reading my post, I'm starting to feel old now.) :-D
>>I would love to see a system come along that is evolutionary/revolutionary that actually produces faster code, not slower code Yes that would absolutely be nice and all. but that is not what the marked demands. The market wants tools that enable them to build and maintain apps with with as little effort as possible. Ofcourse c++ is better if you want to build 3D studio max. But for some web developer with 6 months of coding experience, that slow chunk of .NET framework will get his job done. And the result will even work fairly well. The layer cake approach exists just because there are more people building web/desktop data entry apps than there are people making compilers or 3d studio like tools. >>And the current mantra of throwing hardware at performance problems is getting very very old. It might be old, but its still cheaper to have bad/inexperienced developers developing in an easy environment and throw hardware at the apps when they are too slow than it is to have hardcore c++ hackers developing the same stuff.
Blog: http://www.rogeralsing.com Projects: http://www.puzzleframework.com
-
By analogy: C++: Arnold Schwarzenegger C#/VB/Ruby: Wally Cox C++: This Old House C#/VB/Ruby: Queer Eye for the Straight Guy C++: Bugs Bunny C#/VB/Ruby: Teletubbies C++: Iron Maiden C#/VB/Ruby: Menudo C++: Porsche 911 Turbo Cabriolet C#/VB/Ruby: Yugo
Software Zen:
delete this;
Gary Wheeler wrote:
C++: Porsche 911 Turbo Cabriolet C#/VB/Ruby: Yugo
Now, you are insulting Yugo :mad:
-
Chris Maunder wrote:
So C++ devs: Tell us why C++ is just plain old better.
'Cause only your friends can handle your private parts.
Cheers, Vikram.
Zeppelin's law: In any Soapbox discussion involving Stan Shannon, the probability of the term "leftist" or "Marxist" appearing approaches 1 monotonically. Harris' addendum: I think you meant "monotonously". Martin's second addendum: Jeffersonian... I think that should at least get a mention.
Vikram A Punathambekar wrote:
'Cause only your friends can handle your private parts.
In C# .NET, friends assembled in a group (friend assemblies) gets to *handle* my private parts. :omg: Now, I know why a lot of pervs choose .NET :suss:
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
>>I would love to see a system come along that is evolutionary/revolutionary that actually produces faster code, not slower code Yes that would absolutely be nice and all. but that is not what the marked demands. The market wants tools that enable them to build and maintain apps with with as little effort as possible. Ofcourse c++ is better if you want to build 3D studio max. But for some web developer with 6 months of coding experience, that slow chunk of .NET framework will get his job done. And the result will even work fairly well. The layer cake approach exists just because there are more people building web/desktop data entry apps than there are people making compilers or 3d studio like tools. >>And the current mantra of throwing hardware at performance problems is getting very very old. It might be old, but its still cheaper to have bad/inexperienced developers developing in an easy environment and throw hardware at the apps when they are too slow than it is to have hardcore c++ hackers developing the same stuff.
Blog: http://www.rogeralsing.com Projects: http://www.puzzleframework.com
I agree with your comment concerning market demands. That is what drives the development. However, the layer cake approach seems, at least to me, to be fundamentally flawed. There's got to be a better way to build software than this. I don't claim to have all the answers, so I'm not saying we should stop using what we know and understand, just that we should be screaming louder and louder for something better. I personally believe that the whole PC/OS/software architecture is fundamentally flawed. Deleting data??? Why should that even be possible? When I try to think about how computers should work, if we lived 400 years from now, I tend to think in terms of evolutionary data, not evolutionary software. Data grows in a layer-cake like system (e.g. new data on-top of old data, but old data not gone/deleted.), while software and systems are more universal and flat. It just feels like our current system is up-side down. How much of our security and privacy problems are caused by a fundamental problem in the way we look at and manage data? I need to stop, or I'll get myself into a fury.
-
So there's all this talk of why C# is better than VB and why Ruby on Rails is just the peachiest thing ever, except that PERL is way hard core and blah blah blah. I found an old C++ T-shirt that I love: "My compiler compiled your compiler" And to me that says it all. C++ is still like driving a manual (sitckshift) car versus an automatic. C++ still kicks any .NET language's bum in terms of speed. C++ still allows you far more annoying and impressive errors than most other modern languages. So C++ devs: Tell us why C++ is just plain old better.
cheers, Chris Maunder
CodeProject.com : C++ MVP
Chris Maunder wrote:
So C++ devs: Tell us why C++ is just plain old better.
Because it is like a Sting's song: It takes a man to suffer ignorance and smile Be yourself no matter what they say
-
CPallini wrote:
If you really enjoy C#, be stuck with it.
C# is nice, but I'm too curious, I want to know more
CPallini wrote:
'classic' (managed C++ is a crap
Classic it is then. Might take the chance to learn some DirectX at the same time, I've been meaning to do that for ages.
Simon
Simon Stevens wrote:
Might take the chance to learn some DirectX at the same time
When you do, don't ignore the quaternions! they are worth the time to master, 2/3rds the math, 1/10th on a SLERP animation. It may not help you make a web app, but it is an amazing jump when your CPU line goes from 100% to 20% and you go: :doh: now I understand what all this hootodo is about performance!
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-
Except for the fact that Linus Torvalds is a complete doofus and I actually respect Chris. Also Chris was being facetious, where as Linus's "complaints" were actually meant seriously, underscoring how big of an idiot he actually is.
¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog
I don't believe it. Someone else who thinks Linus is as much of a jerk as Grady Booch.
Software Zen:
delete this;
-
So there's all this talk of why C# is better than VB and why Ruby on Rails is just the peachiest thing ever, except that PERL is way hard core and blah blah blah. I found an old C++ T-shirt that I love: "My compiler compiled your compiler" And to me that says it all. C++ is still like driving a manual (sitckshift) car versus an automatic. C++ still kicks any .NET language's bum in terms of speed. C++ still allows you far more annoying and impressive errors than most other modern languages. So C++ devs: Tell us why C++ is just plain old better.
cheers, Chris Maunder
CodeProject.com : C++ MVP
Pah! I learned to program via ATARI Basic: poking the memory to change the OS to make it do what I want - REAL basic programming ;) I learned professionally in C on UNIX. Just an emacs editor over a telnet session. No nice IDE, no Windows and definitely none of this objects marlarkey that C++ developers get such an ego over. Admittedly I now use C#.
I'm largely language agnostic
After a while they all bug me :doh:
-
I certainly don't know all of that in detail. Maybe I'll added a CPU construction book to my bedtime reading list. :)
Simon
Simon Stevens wrote:
I certainly don't know all of that in detail. Maybe I'll added a CPU construction book to my bedtime reading list.
I don't know if I would go THAT far... what he is referring to is CPU instruction pipeline. You'll find a lot of whitepapers at Intel and AMD bragging why theirs is better than the other. Understanding that pipeline is worth your books weight in gold. In the end you understand why some operations in .Net are faster than others, how to find bottlenecks, and design your routines for instruction cache sizes. No matter your language of choice, knowing how the underside of the instruction pipeline in out and through the CPU is worth the time.
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-
ghle wrote:
Design a CPU
:laugh: Real programmers just build a custom CPU to perform the actions required for their app. I remember some stuff from school about a simple circuit for 1 bit of memory. something to do with looping the output from a NAND gate back to one of the inputs. It was a long time ago though.
Simon
Simon Stevens wrote:
a simple circuit for 1 bit of memory
Cool, but a little more complex :-\ . It was a Masters computer engineering course. :) The coolest part was to "see" a bit in the instruction word open a gate to load a register. The common perception is you can't touch or feel a "bit." Well, we came awful dang close!
Simon Stevens wrote:
Real programmers just build a custom CPU
Hey, not only a custom CPU, but a custom set of instructions/Op Codes to drive it! :cool: DIY software. Had to hand-code (binary) both the microcode and the applications. Makes one truly appreciate assemblers & compilers, and execution speed.
Gary
-
Rajesh R Subramanian wrote:
You have to draw a line somewhere and the line is drawn at C++
I thought lines were drawn with Logo. :rolleyes:
Dad always thought laughter was the best medicine, which I guess is why several of us died of tuberculosis. I can picture in my mind a world without war, a world without hate. And I can picture us attacking that world, because they'd never expect it.
Now that's one I have not thought of for a Long Time May your sprites fly :-D
-
Chris Maunder wrote:
So C++ devs: Tell us why C++ is just plain old better.
Because it is like a Sting's song: It takes a man to suffer ignorance and smile Be yourself no matter what they say
Great song, great lyrics! :cool:
Cheers, Vikram.
Zeppelin's law: In any Soapbox discussion involving Stan Shannon, the probability of the term "leftist" or "Marxist" appearing approaches 1 monotonically. Harris' addendum: I think you meant "monotonously". Martin's second addendum: Jeffersonian... I think that should at least get a mention.
-
I mis-wrote my original post - you learned machine architecture I believe (did they use RISC processors as examples? :)), but you should also learn CPU micro-architecture. Not just all the parts of a CPU, but how they work together. How out-of-order execution works, the Decode-Execute-Dipatch cycle, how to cause and prevent pipeline and cache stalls, etc. All those things help greatly when writing multithreaded/multicore code so you can prevent each one of your threads from effectively stepping on each other. Unless you do know all that already, then nevermind! :) Peace!
-=- James
Please rate this message - let me know if I helped or not! * * *
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFilesJames R. Twine wrote:
but you should also learn CPU micro-architecture. Unless you do know all that already, then nevermind!
If you truly want to understand, don't just learn it, build the friggin' CPU and microcode decoder from parts from scratch. Make a bit do some work! :cool:
Gary
-
Simon Stevens wrote:
Might take the chance to learn some DirectX at the same time
When you do, don't ignore the quaternions! they are worth the time to master, 2/3rds the math, 1/10th on a SLERP animation. It may not help you make a web app, but it is an amazing jump when your CPU line goes from 100% to 20% and you go: :doh: now I understand what all this hootodo is about performance!
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
El Corazon wrote:
quaternions
Yeah, I remember coming across them several years ago during a uni project. I'm getting all distracted now. I've got to concentrate on this scheduling app ( :zzz: ) I'm writing and stop thinking about 3d maths. :(
Simon
-
Pah! I learned to program via ATARI Basic: poking the memory to change the OS to make it do what I want - REAL basic programming ;) I learned professionally in C on UNIX. Just an emacs editor over a telnet session. No nice IDE, no Windows and definitely none of this objects marlarkey that C++ developers get such an ego over. Admittedly I now use C#.
I'm largely language agnostic
After a while they all bug me :doh:
MidwestLimey wrote:
Pah! I learned to program via ATARI Basic: poking the memory to change the OS to make it do what I want - REAL basic programming
Puke. You took the easy way out w/BASIC. Write in ASM and machine code, including self-modifying code for speed and compactness. Then you'll know what REAL programming is all about. C on UNIX. Yep, did that. Those were great times. You could actually get work done instead of searching a manual every time you wanted to do something new. You'll remember the TI Silent 700? Let you work from home, connecting over the phone line, of all things at 300 or high-speed 1200 baud. :((
Gary
-
El Corazon wrote:
quaternions
Yeah, I remember coming across them several years ago during a uni project. I'm getting all distracted now. I've got to concentrate on this scheduling app ( :zzz: ) I'm writing and stop thinking about 3d maths. :(
Simon
Simon Stevens wrote:
I'm writing and stop thinking about 3d maths.
good because quaternions are 4D math! ;P :laugh:
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-
MidwestLimey wrote:
Pah! I learned to program via ATARI Basic: poking the memory to change the OS to make it do what I want - REAL basic programming
Puke. You took the easy way out w/BASIC. Write in ASM and machine code, including self-modifying code for speed and compactness. Then you'll know what REAL programming is all about. C on UNIX. Yep, did that. Those were great times. You could actually get work done instead of searching a manual every time you wanted to do something new. You'll remember the TI Silent 700? Let you work from home, connecting over the phone line, of all things at 300 or high-speed 1200 baud. :((
Gary
ghle wrote:
Write in ASM and machine code, including self-modifying code for speed and compactness. Then you'll know what REAL programming is all about.
Pah! keep your self modifying code and create your ASM punch cards by staring at them hard enough and scaring the holes out of them!!
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-
No, it is reflective of
some
programmers, not all programmers let massive memory leaks and sub-standard implementations get off their their desks. And the programmers like that... well, they F***
it up for the rest. There is also the problem where business-side people forget that nine women cannot make a baby in one month - some things just take time to get done right. High-quality code is one of them, and it is worth waiting for. Peace!-=- James
Please rate this message - let me know if I helped or not! * * *
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles:-D
'With hurricanes, tornados, fires out of control,mud slides, flooding, severe thunderstorms tearing up the country! from one end to another, and with the threat of bird flu and terrorist attacks, are we sure this is a good time to take God out of the Pledge of Allegiance?' - Jay Leno
-
ghle wrote:
Write in ASM and machine code, including self-modifying code for speed and compactness. Then you'll know what REAL programming is all about.
Pah! keep your self modifying code and create your ASM punch cards by staring at them hard enough and scaring the holes out of them!!
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
Pah! I was so poor I used to have to use my hand as a punch card!
I'm largely language agnostic
After a while they all bug me :doh: