Why are developers so afraid of C++?
-
I have read a couple C++ books they make pointers and gotos etc as dangerous and it scares people away. Personally as I have used basic C++ more and more I have started using more and more of the advanced stuff. -:suss:Matt Newman:suss: -Sonork ID: 100.11179:BestSnowman Frankly AOL should stick to what it does best: Fooling millions of americans into believing that it, AOL, is the web. -Paul Watson
Matt Newman wrote: I have read a couple C++ books they make pointers and gotos etc as dangerous and it scares people away Those are the crappy books that follow the Java karma: "You're stupid, you can't understand pointers... You'll never learn... You're stupid, you can't understand pointers... You'll never learn". So lets get rid of pointers! Absurd. :confused:
Eddie Velasquez: A Squeezed Devil (Don't you just love that anagram craze?)
Checkout GUIDGen.NET -
Tim Smith wrote: Take a simple concept as a for loop and produce 20-30 classes and functions all in the name of simplification and bug free code. I have yet to see any proof of these claims. Using functors to replace a "simple" for loop is overkill, but when you're writing generic code that can be used with any container of any type (with certain restrictions) for_each, functors and their kind are absolutly necessary. The thing is that sometimes you don't need to write generic code and that when inexperienced screw things up. Tim Smith wrote: Speed of execution usually ranks low down on the list of important things to look at when solving a problem I wasn't using the term "optimal" exclusively in the execution speed sense. Optimal solutions usually give a nice and acceptable balance of speed, ease of maintenance, self explanatory code, etc. Tim Smith wrote: So, my counter question is why do some people always have to use the new and cool features of languages even when they don't apply? Because they're unexperienced.
Eddie Velasquez: A Squeezed Devil (Don't you just love that anagram craze?)
Checkout GUIDGen.NETUsing functors to replace a "simple" for loop is overkill, but when you're writing generic code that can be used with any container of any type (with certain restrictions) for_each, functors and their kind are absolutly necessary. The thing is that sometimes you don't need to write generic code and that when inexperienced screw things up. I would love to see the study of how many of these "generic functors" actually get reused. I once did a once over of my for loops and it was rare I could find instances where a functor would have been reusable. If I have the need for reusable code, it becomes a routine. Also, looking at a lot of the hoops I have seen people jump through to get functors to do what they want, I reject the notion that it is more bug free. ...optimal... This is a case where we agree totally. I am all for the right tool for the right application. Any time you totally reject the old OR the new, you are making a HUGE mistake. (and I don't mean "you" and in you) Tim Smith I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
-
Matt Newman wrote: I have read a couple C++ books they make pointers and gotos etc as dangerous and it scares people away Those are the crappy books that follow the Java karma: "You're stupid, you can't understand pointers... You'll never learn... You're stupid, you can't understand pointers... You'll never learn". So lets get rid of pointers! Absurd. :confused:
Eddie Velasquez: A Squeezed Devil (Don't you just love that anagram craze?)
Checkout GUIDGen.NETDamn straight. :) A new country song, "Don't take my goto away". Tim Smith I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
-
Matt Newman wrote: I have read a couple C++ books they make pointers and gotos etc as dangerous and it scares people away Those are the crappy books that follow the Java karma: "You're stupid, you can't understand pointers... You'll never learn... You're stupid, you can't understand pointers... You'll never learn". So lets get rid of pointers! Absurd. :confused:
Eddie Velasquez: A Squeezed Devil (Don't you just love that anagram craze?)
Checkout GUIDGen.NETEddie Velasquez wrote: "You're stupid, you can't understand pointers... You'll never learn... You're stupid, you can't understand pointers... You'll never learn". That explains why I never finished the book. -:suss:Matt Newman:suss: -Sonork ID: 100.11179:BestSnowman Frankly AOL should stick to what it does best: Fooling millions of americans into believing that it, AOL, is the web. -Paul Watson
-
I wonder why some C++ developers are so afraid to use certain less-known features of C++ like templates, pointers to members, operator overloading, etc. Some argue that some features are so confusing and obscure that they won't use them even if it provides the optimal solution for the problem at hand. Some also argue that the maintenance cost is too big considering that mostly junior developers do maintenance. I can see the point, but a junior developer should always have a senior at hand that can teach him. Sometimes I believe that developers get scared of the C++ myth or are too lazy to try to fully understand the language. What's your opinion?
Eddie Velasquez: A Squeezed Devil (Don't you just love that anagram craze?)
Checkout GUIDGen.NETMultiple reasons: 1. C++ is a complex language. Some say it takes 5 years to master. Obviously not every C++ developer is going to know all the features of the language. 2. Sometimes developers are to busy to learn (or lazy) 3. In my experience I often spend more time maintaining code than developing new code. As such it makes more sense to write code that's easy to understand for everyone. Using advanced features can make maintenance more difficult. 4. In order to really learn the more advanced features of a language it helps to have a project where you can apply them on a daily basis. Not every gets to work on such projects. That tends to hinder one's ability to learn the features well.**
Todd Smith
CPUA 0x007 ... shaken not stirred
**
-
I wonder why some C++ developers are so afraid to use certain less-known features of C++ like templates, pointers to members, operator overloading, etc. Some argue that some features are so confusing and obscure that they won't use them even if it provides the optimal solution for the problem at hand. Some also argue that the maintenance cost is too big considering that mostly junior developers do maintenance. I can see the point, but a junior developer should always have a senior at hand that can teach him. Sometimes I believe that developers get scared of the C++ myth or are too lazy to try to fully understand the language. What's your opinion?
Eddie Velasquez: A Squeezed Devil (Don't you just love that anagram craze?)
Checkout GUIDGen.NETEddie Velasquez wrote: I wonder why some C++ developers are so afraid to use certain less-known features of C++ like templates, pointers to members, operator overloading, etc. I don't think it is always a matter of fear, for the most part a C++ programmer should be very cautious about the use of more advanced features. Too many programmers often use advanced features for no good engineering principle but only because they want to use them. All of those features you mention can turn your code into spegetti very quickly. I can understand the mentality of those who promote VB, C#, Java etc as better languages for this very reason. C++ code often becomes far more complex than it needs to be because C++ programmers seem to be incapable of exercising common sense when engineering their code. If you cannot do that then you *should* be programming in VB regardless of how well you think you know C++. "There's a slew of slip 'twixt cup and lip"
-
Some people are just too stupid to use C++, and too comfortable with the subset they know to go on to learn more. I don't get it myself, but there it is. I guess at least these people are not in what would be their ideal environment, adding to the number of VB users. Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
Hmmm, now that you COMing hard you will be VBing soon! Best regards, Paul. Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
-
I wonder why some C++ developers are so afraid to use certain less-known features of C++ like templates, pointers to members, operator overloading, etc. Some argue that some features are so confusing and obscure that they won't use them even if it provides the optimal solution for the problem at hand. Some also argue that the maintenance cost is too big considering that mostly junior developers do maintenance. I can see the point, but a junior developer should always have a senior at hand that can teach him. Sometimes I believe that developers get scared of the C++ myth or are too lazy to try to fully understand the language. What's your opinion?
Eddie Velasquez: A Squeezed Devil (Don't you just love that anagram craze?)
Checkout GUIDGen.NETWell, having 25 years of programming, with the last 12 of those in C++, I've had to maintain a lot of code. Some of it mine, some of it not. I've seen C++ evolve from C-with-classes to a language that pretty much defines what software development is. I've also taught courses in it for new hires, and trained people on how to work with MFC. I interview people and test them on their coding knowledge and style. So I think that I'm pretty much qualified as knowing C++. I've also had to deal with programmers who insist that macros are the one true path, and point to the MFC message map structure as to why they are godlike. The fact that you cannot debug them properly when something goes horribly wrong (and it does) never bothers them. This is why templates were created. Passing everything as a pointer, and typcasting the living hell out of it is also fine. I know it's a CView that got passed to that CObject fifty functions ago, so I can blindly typecast it back. Sure, always works. No problem. For these people Microsoft has IsKindOf. For the rest of us poor bastards who have to deal with this code we have dynamic_cast, which is portable. Globals are cool. Static globals are even cooler. Putting static global things in with pragmas to force the intializtion order rocks. Never mind it's not portable. Never mind that a new version of the compiler breaks it. Whee! While(1) loops that cover 15 printed pages. In 6 point font. Those are fine. It compiles and runs, right? Ship it! A function that is 9,783 lines long. Even better, I'm a god, who needs a debugger. Every language has "features" that allows you to pull off "wow, cool!" operations. Never mind that nobody other than yourself understands that feature, without looking at it for a while, which means that your geek peerage level rises way up in your current job. Breaking common sense program design is never good. There are books on the subject of coding style. There are linting tools that check for these coding styles. Sadly, nobody seems to read these books or use these tools. They consider using a "feature" of the language a much more "cool" thing than actually writing code that can be mantained without their name being cursed. Software houses spend roughly 30% of their time mantaining old code (this is from my jobs over the years). If code was commented, and strange constructs not used, this could be cut in half. Or more. Instead, we wind up refactoring things like address offsets to class functions that are applied to a reference of a dervied clas
-
Hmmm, now that you COMing hard you will be VBing soon! Best regards, Paul. Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
Paul Selormey wrote: now that you COMing hard you will be VBing soon! Huh? Why? Nish [Signature temporarily down]
-
Paul Selormey wrote: now that you COMing hard you will be VBing soon! Huh? Why? Nish [Signature temporarily down]
Well, the COM consumer world is ruled by VB and Delphi, so you simply cannot afford shipping a product without extensively testing it in VB. I got into VB through the same process :(( But now I like it even though I hate the VB IDE, which makes you feel like you do not know what you are about! You still want to hear more? Best regards, Paul. Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
-
Well, the COM consumer world is ruled by VB and Delphi, so you simply cannot afford shipping a product without extensively testing it in VB. I got into VB through the same process :(( But now I like it even though I hate the VB IDE, which makes you feel like you do not know what you are about! You still want to hear more? Best regards, Paul. Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
Paul Selormey wrote: You still want to hear more? Your comments were interesting to me Paul S. Yesterday I think someone was makin a comment in one of the forums saying that he did not see any performance difference between a COM component developed using ATL and one developed using VB. I'd like to know how true this actually is! Nish [Signature temporarily down]
-
I wonder why some C++ developers are so afraid to use certain less-known features of C++ like templates, pointers to members, operator overloading, etc. Some argue that some features are so confusing and obscure that they won't use them even if it provides the optimal solution for the problem at hand. Some also argue that the maintenance cost is too big considering that mostly junior developers do maintenance. I can see the point, but a junior developer should always have a senior at hand that can teach him. Sometimes I believe that developers get scared of the C++ myth or are too lazy to try to fully understand the language. What's your opinion?
Eddie Velasquez: A Squeezed Devil (Don't you just love that anagram craze?)
Checkout GUIDGen.NETC++ is an incredible throwback. For thirty years we have tried to make languages more readable, logical, and trouble-free. The cost of maintaining code far exceeds the cost of developing it, and one rarely has access to the original developer of a product 5 years after its release. Pascal was the epitome of readable, yet powerful code. C++ takes us back to assembly, but without the clarity and logical structure. Where Pascal screwed up, IMNSHO, was in its failure to adopt the OOP paradigm, and its attempt to ignore the Windows platform. I lay the blame for that on Borland, a company that dropped the ball if ever there was one. Turbo Pascal was one of the best products ever released, but their feeble attempt at OOP was lame, and poorly understood. And its archaic handling of GUI interfaces was inexcusable. For all of its warts, with the introduction of Windows95 - the first usable Windows product - it should have been clear that this was the way of the immediate future. But Borland chose to ignore the obvious winds of change and dropped the ball. As languages go, and I've programmed in a couple of dozen of them, C++ is probably the worst; yet it currently is the most flexible and powerful. I will master it one day, only because beating my head against a wall isn't fun, but I won't enjoy doing so...
-
Matt Newman wrote: I have read a couple C++ books they make pointers and gotos etc as dangerous and it scares people away Those are the crappy books that follow the Java karma: "You're stupid, you can't understand pointers... You'll never learn... You're stupid, you can't understand pointers... You'll never learn". So lets get rid of pointers! Absurd. :confused:
Eddie Velasquez: A Squeezed Devil (Don't you just love that anagram craze?)
Checkout GUIDGen.NETEddie Velasquez wrote: Those are the crappy books that follow the Java karma: "You're stupid, you can't understand pointers... You'll never learn... You're stupid, you can't understand pointers... You'll never learn". So lets get rid of pointers! Absurd. You can say that again! And what about garbage collection? I understand that if you're not careful that you can get memory leaks, but is this REALLY the huge problem that the creators of Java make it out to be?
-
Eddie Velasquez wrote: I wonder why some C++ developers are so afraid to use certain less-known features of C++ like templates, pointers to members, operator overloading, etc. I don't think it is always a matter of fear, for the most part a C++ programmer should be very cautious about the use of more advanced features. Too many programmers often use advanced features for no good engineering principle but only because they want to use them. All of those features you mention can turn your code into spegetti very quickly. I can understand the mentality of those who promote VB, C#, Java etc as better languages for this very reason. C++ code often becomes far more complex than it needs to be because C++ programmers seem to be incapable of exercising common sense when engineering their code. If you cannot do that then you *should* be programming in VB regardless of how well you think you know C++. "There's a slew of slip 'twixt cup and lip"
Stan Shannon wrote: I don't think it is always a matter of fear, for the most part a C++ programmer should be very cautious about the use of more advanced features. Too many programmers often use advanced features for no good engineering principle but only because they want to use them. Yeppers! The use of a $50 feature where a $3 one would have done just as well is counterproductive, in my opinion. I can attest to this because I'm not a very experienced C++ programer, but I'm a veteran developer in other languages. I've been able to write conceptually advanced code in C++ without using any of the more sophisticated;) features of C++, such as STL or pointers to members. And the code I have written has been blazingly fast compared to the other languages I'm experienced in: the many various forms of BASIC. Sure I could probably make the code more generic by pushing the OOP paradigm, or faster by getting more experienced with pointers. This doesn't mean that I'm not interested in learning STL or the other advanced features of the language. It just means that it's not necessary to know 100% of the syntax real estate to solve problems.
-
Eddie Velasquez wrote: Those are the crappy books that follow the Java karma: "You're stupid, you can't understand pointers... You'll never learn... You're stupid, you can't understand pointers... You'll never learn". So lets get rid of pointers! Absurd. You can say that again! And what about garbage collection? I understand that if you're not careful that you can get memory leaks, but is this REALLY the huge problem that the creators of Java make it out to be?
Jnaut wrote: And what about garbage collection? I understand that if you're not careful that you can get memory leaks Oh yes, and because you somewhat don't expect them, they tend to pop in your face at the most embarassing times e.g. during launch of your product... (this would also prove that you didn't do a proper test :-O ). Jan "It could have been worse, it could have been ME!"
-
Paul Selormey wrote: You still want to hear more? Your comments were interesting to me Paul S. Yesterday I think someone was makin a comment in one of the forums saying that he did not see any performance difference between a COM component developed using ATL and one developed using VB. I'd like to know how true this actually is! Nish [Signature temporarily down]
Nish [BusterBoy] wrote: Yesterday I think someone was makin a comment in one of the forums saying that he did not see any performance difference between a COM component developed using ATL and one developed using VB. I'd like to know how true this actually is! It depends on what the COM component does. If you have a component that just reads/writes data to a database -- to protect db access in an ASP environment -- then you won't see any speed difference, you're going to be waiting on the database more than on the actual component. Unless the call into COM is going to do any significant work you'll never notice the difference between VB and ATL except for memory footprint. This is the main reason why I hate the VB vs. language X wars, the language used means nothing unless you are doing (semi-) serious computations. 90% of my work is database related thus language has never been an issue for me; the #1 way to speed my applications up has always been switching from Access to SQL Server or finding ways to cut down on the amount of data retreived. James Sonork ID: 100.11138 - Hasaki "Smile your little smile, take some tea with me awhile. And every day we'll turn another page. Behind our glass we'll sit and look at our ever-open book, One brown mouse sitting in a cage." "One Brown Mouse" from Heavy Horses, Jethro Tull 1978
-
Nish [BusterBoy] wrote: Yesterday I think someone was makin a comment in one of the forums saying that he did not see any performance difference between a COM component developed using ATL and one developed using VB. I'd like to know how true this actually is! It depends on what the COM component does. If you have a component that just reads/writes data to a database -- to protect db access in an ASP environment -- then you won't see any speed difference, you're going to be waiting on the database more than on the actual component. Unless the call into COM is going to do any significant work you'll never notice the difference between VB and ATL except for memory footprint. This is the main reason why I hate the VB vs. language X wars, the language used means nothing unless you are doing (semi-) serious computations. 90% of my work is database related thus language has never been an issue for me; the #1 way to speed my applications up has always been switching from Access to SQL Server or finding ways to cut down on the amount of data retreived. James Sonork ID: 100.11138 - Hasaki "Smile your little smile, take some tea with me awhile. And every day we'll turn another page. Behind our glass we'll sit and look at our ever-open book, One brown mouse sitting in a cage." "One Brown Mouse" from Heavy Horses, Jethro Tull 1978
James T. Johnson wrote: Unless the call into COM is going to do any significant work you'll never notice the difference between VB and ATL except for memory footprint. Yeah, this is true I guess. Thanks James. I appreciate comments from people when they actually talk out of real life experience. :-) Nish [Signature temporarily down]
-
Hmmm, now that you COMing hard you will be VBing soon! Best regards, Paul. Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan.
Lucky for me they hired two people at once, me and a guy who knows VB very well. They have people for the VB side, I won't be squandered on testing in VB. I will be doing ASP.NET shortly though, so I'll be doing a lot of C#, methinks. Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
-
Some people are just too stupid to use C++, and too comfortable with the subset they know to go on to learn more. I don't get it myself, but there it is. I guess at least these people are not in what would be their ideal environment, adding to the number of VB users. Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
Christian Graus wrote: Some people are just too stupid to use C++... Christian Graus wrote: ...adding to the number of VB users. Damn, and here I was thinking we had got past this whole VB is for idiots, C++ is for clever people debate. :| regards, Paul Watson Bluegrass Cape Town, South Africa "The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge Sonork ID: 100.9903 Stormfront
-
Christian Graus wrote: Some people are just too stupid to use C++... Christian Graus wrote: ...adding to the number of VB users. Damn, and here I was thinking we had got past this whole VB is for idiots, C++ is for clever people debate. :| regards, Paul Watson Bluegrass Cape Town, South Africa "The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge Sonork ID: 100.9903 Stormfront
Paul Watson wrote: Damn, and here I was thinking we had got past this whole VB is for idiots, C++ is for clever people debate. Sometimes it's just too easy.... If VB is all someone needs, then there is no reason for people not to use it. BUT there is no denying that it is less complex, less flexible and less powerful than C++, precisely because of the sort of language features mentioned in the original post. I think VB is in the same boat as AOL - never able to shake off the fact that it's simplicity attracts the morons of this world as well as people who will use the tool properly and despite it's limitations achieve what they want to with it. Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002