Freah Meat =)
-
GraemeP wrote:
For any moderately intelligent person, learning C first is not going to make them a terrible C++ programmer.
Perhaps - but the world is full of bad C++ programmers, because they use C instead of C++ where-ever possible.
GraemeP wrote:
It's also the language of the Win32 API and very widely used in general, so well worth learning or at least understanding the basics of.
I don't see any advantage in knowing which bits of C++ are C. I see great advantage in knowing C++. And for the record, I have written full applications in C. Christian Graus - Microsoft MVP - C++
The world is full of bad programmers full stop. But if you take your role as an engineer seriously, C is a good place to start. It WILL provide a very good grounding in other languages. It is also difficult, and therefore, makes other languages look easier.
Christian Graus wrote:
which bits of C++ are C
C, as it is today, is almost the same as C++. C++ has always been a superset of C, so you clearly show a great deal of ignorance by this comment. Nunc est bibendum
-
aqzman... Before you pick a language to begin learning, I suggest you first decide where your primary interest lies. Are you more interested in how a computer works? Or in solving business problems for users? In my 35+ years experience developing code, it has been my observation that programmers fall into one of two groups that are defined by those questions. If your interest is in how computer guts work, go with a language like C that exposes you to those inner workings. If, on the other hand, you are more interested in what the user sees on the monitor and how well that display makes life easier for the user, go with Visual Basic which shields the developer from most of the operating system. Both types of programmers are needed. Neither is better or worse than the other. However, if you choose to learn a language that doesn't match your interests, you may become frustrated and give up. I encourage you to first look at yourself and what excites you and then pick a language. If you choose a good match, your learning curve is liable to be shorter.
In my opinion George's advice is the best. Most of the other posts were "Language X is the one I use, so you should learn it too". You would be well advised to ignore those types of suggestions. The only suggestion I would add to George's post is that if you want to learn application programming it may be better to start with a non strongly typed language like old VB (not VB.NET) or php or something like that. That way you can learn more rudimentary programming concepts first, then you can move onto types when you feel comfortable.
-
The world is full of bad programmers full stop. But if you take your role as an engineer seriously, C is a good place to start. It WILL provide a very good grounding in other languages. It is also difficult, and therefore, makes other languages look easier.
Christian Graus wrote:
which bits of C++ are C
C, as it is today, is almost the same as C++. C++ has always been a superset of C, so you clearly show a great deal of ignorance by this comment. Nunc est bibendum
fat_boy wrote:
But if you take your role as an engineer seriously, C is a good place to start.
Perhaps, but only if you want to start with a steep learning curve, and you're willing to then UNLEARN most of C when you move to C++. How many C++ programs have all their variables defined at the top, use char * instead of std::string, FILE instead of iostream ?
fat_boy wrote:
C, as it is today, is almost the same as C++.
C99 does not count. It's not the C that people learn, typically.
fat_boy wrote:
C++ has always been a superset of C, so you clearly show a great deal of ignorance by this comment.
No, you're an idiot. C can do anything that C++ can, but not as nicely. And, when people learn C first, they tend not to move to the superior features of C++, but keep using stuff they learned in C. Like passing char * all over the place instead of using the string class, or using FILE handles instead of iostreams. Or just plain assuming that int is an implicit return value, which pre C99 was allowed, and VC6 allows, but was never standard C++. Christian Graus - Microsoft MVP - C++
-
fat_boy wrote:
But if you take your role as an engineer seriously, C is a good place to start.
Perhaps, but only if you want to start with a steep learning curve, and you're willing to then UNLEARN most of C when you move to C++. How many C++ programs have all their variables defined at the top, use char * instead of std::string, FILE instead of iostream ?
fat_boy wrote:
C, as it is today, is almost the same as C++.
C99 does not count. It's not the C that people learn, typically.
fat_boy wrote:
C++ has always been a superset of C, so you clearly show a great deal of ignorance by this comment.
No, you're an idiot. C can do anything that C++ can, but not as nicely. And, when people learn C first, they tend not to move to the superior features of C++, but keep using stuff they learned in C. Like passing char * all over the place instead of using the string class, or using FILE handles instead of iostreams. Or just plain assuming that int is an implicit return value, which pre C99 was allowed, and VC6 allows, but was never standard C++. Christian Graus - Microsoft MVP - C++
Christian Graus wrote:
steep learning curve
Yes, it is steep, but once learnt, gives a greater understanding of the nuts and bolts of other languages.
Christian Graus wrote:
C99 does not count
I am refering to ansi C. You must have heard of the classic question, what is the difference between a struct ans a class? A struct has public members by default. C++ is a superset of C,
Christian Graus wrote:
use char * instead of std::string, FILE instead of iostream
Ha ha! And WHAT is in the basic_string template class when used as a string? Yep, a char * _Ptr! Which prooves that C++ is a superset of C, and that, for all its features, like stl, it is still C underneath, which is usefulll to know and understand. If however the thought of pointers scares the pants off you then you had better learn VB instead.
Christian Graus wrote:
No, you're an idiot.
Not true actually,
Christian Graus wrote:
passing char * all over the place instead of using the string class
Which explaisn why C++ is heavy on the stack, and the need to introduce the reference operator, to hide the fact that a pointer is being passed from programmers who are scared of pointers and never learnt to use them, BECAUSE THEY DIDNT LEARN C. Learning C++ without learning the fundamentals of C++ (ie, C), is robbing the programmer of the ability to write code that suits the situation, because, sometimes, when you want really fast code, you have to do direct memory menipulation. And you are only going to write code like that safely if you are totaly happy with pointers, pointer arithmatic, casting, data types, endian issues and so on. Nunc est bibendum
-
fat_boy wrote:
But if you take your role as an engineer seriously, C is a good place to start.
Perhaps, but only if you want to start with a steep learning curve, and you're willing to then UNLEARN most of C when you move to C++. How many C++ programs have all their variables defined at the top, use char * instead of std::string, FILE instead of iostream ?
fat_boy wrote:
C, as it is today, is almost the same as C++.
C99 does not count. It's not the C that people learn, typically.
fat_boy wrote:
C++ has always been a superset of C, so you clearly show a great deal of ignorance by this comment.
No, you're an idiot. C can do anything that C++ can, but not as nicely. And, when people learn C first, they tend not to move to the superior features of C++, but keep using stuff they learned in C. Like passing char * all over the place instead of using the string class, or using FILE handles instead of iostreams. Or just plain assuming that int is an implicit return value, which pre C99 was allowed, and VC6 allows, but was never standard C++. Christian Graus - Microsoft MVP - C++
This thread is a great example of why the message boards at code project stink. Bad. A new programmer asks for some advice about getting started and 1) he gets useless information like C++ is a superset C and std::string is better than char*, then 2) he gets caught between two experienced programmers trying to prove they're smarter than the next guy. I'm pretty sure that when aqzman_ originally posted his question he wasn't interested in finding out that Christan Graus - Microsoft MVP - C++ thinks that fat_boy is an idiot. Let's do our best to bring some value to these boards, not defend our egos.
-
Christian Graus wrote:
steep learning curve
Yes, it is steep, but once learnt, gives a greater understanding of the nuts and bolts of other languages.
Christian Graus wrote:
C99 does not count
I am refering to ansi C. You must have heard of the classic question, what is the difference between a struct ans a class? A struct has public members by default. C++ is a superset of C,
Christian Graus wrote:
use char * instead of std::string, FILE instead of iostream
Ha ha! And WHAT is in the basic_string template class when used as a string? Yep, a char * _Ptr! Which prooves that C++ is a superset of C, and that, for all its features, like stl, it is still C underneath, which is usefulll to know and understand. If however the thought of pointers scares the pants off you then you had better learn VB instead.
Christian Graus wrote:
No, you're an idiot.
Not true actually,
Christian Graus wrote:
passing char * all over the place instead of using the string class
Which explaisn why C++ is heavy on the stack, and the need to introduce the reference operator, to hide the fact that a pointer is being passed from programmers who are scared of pointers and never learnt to use them, BECAUSE THEY DIDNT LEARN C. Learning C++ without learning the fundamentals of C++ (ie, C), is robbing the programmer of the ability to write code that suits the situation, because, sometimes, when you want really fast code, you have to do direct memory menipulation. And you are only going to write code like that safely if you are totaly happy with pointers, pointer arithmatic, casting, data types, endian issues and so on. Nunc est bibendum
fat_boy wrote:
Yes, it is steep, but once learnt, gives a greater understanding of the nuts and bolts of other languages.
The problem I have with this sort of arrogance is that the whole point of languages like C# is that they are easier to use. Why does someone have to know C to be able to use C# ? They don't. Sure, it will make them better programmers to understand a language that is closer to the machine, but that doesn't mean they need to. It certainly raises the barrier to entry more than is needed.
fat_boy wrote:
You must have heard of the classic question, what is the difference between a struct ans a class?
Or course, so what ?
fat_boy wrote:
Ha ha! And WHAT is in the basic_string template class when used as a string? Yep, a char * _Ptr!
bollocks. It's a wrapper around a char *.
fat_boy wrote:
Which prooves that C++ is a superset of C,
Yes. And you CAN use char * instead of string if you want to. The result is ugly code that is more bug prone. Which is my point - learning C causes people to use C when C++ does it better.
fat_boy wrote:
If however the thought of pointers scares the pants off you then you had better learn VB instead.
Well, perhaps that is my point. A C++ programmer needs pointers as much as a C programmer does. However, a C#/VB programmer does not. Which means that, for example, a hobbyist who wants to write a game, is far more likely to get it done in C# than if you require them to learn C first.
fat_boy wrote:
to hide the fact that a pointer is being passed from programmers who are scared of pointers and never learnt to use them, BECAUSE THEY DIDNT LEARN C.
I knew exactly how to use pointers in C++ long before I learned C. This argument is just plain dumb.
fat_boy wrote:
when you want really fast code, you have to do direct memory menipulation.
Which you can learn in C++.
fat_boy wrote:
And you are only going to write code like that safely if you are totaly happy with pointers, pointer arithmatic, casting, data types, endian issues and so on.
Sure - and again, I know all about
-
This thread is a great example of why the message boards at code project stink. Bad. A new programmer asks for some advice about getting started and 1) he gets useless information like C++ is a superset C and std::string is better than char*, then 2) he gets caught between two experienced programmers trying to prove they're smarter than the next guy. I'm pretty sure that when aqzman_ originally posted his question he wasn't interested in finding out that Christan Graus - Microsoft MVP - C++ thinks that fat_boy is an idiot. Let's do our best to bring some value to these boards, not defend our egos.
Jason Pease wrote:
he wasn't interested in finding out that Christan Graus - Microsoft MVP - C++ thinks that fat_boy is an idiot.
My apologies, fat_boy likes to go after me in all the forums, and I replied to this after reading an attack from him to me in the soapbox. Otherwise, I would never have called him an idiot. I would hope that I gave this person good advice to start with, if he wanted to know more, he was and is free to ask. In the meantime, all message boards have threads that wander off topic. This one has moved from answering a question to a person who did not respond again to discussing if it's necessary for people to learn C before C++. Christian Graus - Microsoft MVP - C++
-
fat_boy wrote:
Yes, it is steep, but once learnt, gives a greater understanding of the nuts and bolts of other languages.
The problem I have with this sort of arrogance is that the whole point of languages like C# is that they are easier to use. Why does someone have to know C to be able to use C# ? They don't. Sure, it will make them better programmers to understand a language that is closer to the machine, but that doesn't mean they need to. It certainly raises the barrier to entry more than is needed.
fat_boy wrote:
You must have heard of the classic question, what is the difference between a struct ans a class?
Or course, so what ?
fat_boy wrote:
Ha ha! And WHAT is in the basic_string template class when used as a string? Yep, a char * _Ptr!
bollocks. It's a wrapper around a char *.
fat_boy wrote:
Which prooves that C++ is a superset of C,
Yes. And you CAN use char * instead of string if you want to. The result is ugly code that is more bug prone. Which is my point - learning C causes people to use C when C++ does it better.
fat_boy wrote:
If however the thought of pointers scares the pants off you then you had better learn VB instead.
Well, perhaps that is my point. A C++ programmer needs pointers as much as a C programmer does. However, a C#/VB programmer does not. Which means that, for example, a hobbyist who wants to write a game, is far more likely to get it done in C# than if you require them to learn C first.
fat_boy wrote:
to hide the fact that a pointer is being passed from programmers who are scared of pointers and never learnt to use them, BECAUSE THEY DIDNT LEARN C.
I knew exactly how to use pointers in C++ long before I learned C. This argument is just plain dumb.
fat_boy wrote:
when you want really fast code, you have to do direct memory menipulation.
Which you can learn in C++.
fat_boy wrote:
And you are only going to write code like that safely if you are totaly happy with pointers, pointer arithmatic, casting, data types, endian issues and so on.
Sure - and again, I know all about
Christian Graus wrote:
the whole point of languages like C# is that they are easier to use
All frameworks, MFC, WDF, C# are great, for the general stuff. But, all have hairy bits, where the framework philosophy just doesnt fit the underlying machine/task. Why does C# have the unsafe code flag? Because there are some things that a programmer nereds to do that are out side of the framework. And for that, the programer needs to know the nuts and bolts in order to do that job safely.
Christian Graus wrote:
a hobbyist who wants to write a game, is far more likely to get it done in C# than if you require them to learn C first
??? it would be sooooo slow. Thats where C really comes into its own!
Christian Graus wrote:
Which you can learn in C++.
Because C++ is a superset of C, so there is no reason NOT to learn C if you are learning C++!
Christian Graus wrote:
I know all about this stuff
You might, but how about a beginner. And since this question was about what language a beginner should start with, not, what language should Christian Grauss start with, your knowledge of theese issues does not refute my statement that C is a good place to start. Nunc est bibendum
-
Christian Graus wrote:
the whole point of languages like C# is that they are easier to use
All frameworks, MFC, WDF, C# are great, for the general stuff. But, all have hairy bits, where the framework philosophy just doesnt fit the underlying machine/task. Why does C# have the unsafe code flag? Because there are some things that a programmer nereds to do that are out side of the framework. And for that, the programer needs to know the nuts and bolts in order to do that job safely.
Christian Graus wrote:
a hobbyist who wants to write a game, is far more likely to get it done in C# than if you require them to learn C first
??? it would be sooooo slow. Thats where C really comes into its own!
Christian Graus wrote:
Which you can learn in C++.
Because C++ is a superset of C, so there is no reason NOT to learn C if you are learning C++!
Christian Graus wrote:
I know all about this stuff
You might, but how about a beginner. And since this question was about what language a beginner should start with, not, what language should Christian Grauss start with, your knowledge of theese issues does not refute my statement that C is a good place to start. Nunc est bibendum
fat_boy wrote:
But, all have hairy bits, where the framework philosophy just doesnt fit the underlying machine/task.
Sure
fat_boy wrote:
??? it would be sooooo slow. Thats where C really comes into its own!
A common misconception. C# code is compiled to native code when it is first run, and DX is still not managed, only the wrapper is. A C# DX program runs at about 95% of the speed of a C++ DX program.
fat_boy wrote:
Because C++ is a superset of C, so there is no reason NOT to learn C if you are learning C++!
Yes, there are hundreds of reasons, all to do with how error prone C is compared to C++. See my constant references to char * vs string for example.
fat_boy wrote:
You might, but how about a beginner.
A beginner should not be forced to learn C. Simple as that. By the way, Bjarne Stroustrup agrees with me - learning C before C++ is not only not needed, it;s a bad idea.
fat_boy wrote:
And since this question was about what language a beginner should start with, not, what language should Christian Grauss start with
I started with AppleSoft BASIC, for what it's worth, but regardless, I was a beginner when I started.
fat_boy wrote:
your knowledge of theese issues does not refute my statement that C is a good place to start.
No, but I have refuted it already, for reasons that the person who designed C++ also considers valid. Christian Graus - Microsoft MVP - C++
-
Well, I'm sorry if this is in the wrong forum, I looked but couldn't find anything else, also did a search, with no luck. So I have to make a topic =P Well I want to start programming, but... I really don't know where to start. I don't know what language I should start with or anything like that. So, basically, I'm a clean slate. I really want to learn, so could someone please point me in the right direction. Right now, I have no idea what I'd do with my skills but I'm sure I'd find some project once I got started. =) Thanks, aqzman
In my oppinion it is all about idioms, resources, computer science and fun. Depending on your resources (time & money) choose a path that will result in as much fun learning computer science and the most translatable programming idioms. C++ Java C# and even at a stretch PHP(particularly 5) share so many idioms that starting in this set would seem most productive. For example, you might choose Java because it is open, excellent free development software, widespread and fun results are relatively easy to achieve. Choose some fun puzzles to solve like anagram solving and learn what really matters - the underlying computer science. Along the way pick up the dominating idioms and ease yourself into object-oriented programming (OOP). Become part of the culture of programming via (for example) codeproject, get hot under the collar about some things but keep your perspective. As your confidence grows dip into other languages, perhaps near relatives to begin with and try and rewrite a succesful piece of code in that language. Maybe have a look at some of the more unusual languages which play with the whole concept of programming such as snobol and headf**k they might even lead you to Alan Turing and computability itself! Learn the science, learn the concepts, languages are just tools. Programming truly does allow you to combine science and art and express yourself as well as enable you to make some money too :) And to pick up on a divergent thread... Regardless of how you perceive C++, even if it is as a preprocessor for C, as languages they are conceptually divergent and what few basic programming idioms they share does not compensate for this. It is a gross error to divine a progression from C to C++ beyond the for loop they are wholly different. Like all languages regard them, respect them and avoid winding up their proponents... you might need their help with a problem one day. (I know a retired COBOL programmer who loves to relate how grovelling C++/Java programmers came to him in the build up to the year 2000) :cool:
-
Well, I'm sorry if this is in the wrong forum, I looked but couldn't find anything else, also did a search, with no luck. So I have to make a topic =P Well I want to start programming, but... I really don't know where to start. I don't know what language I should start with or anything like that. So, basically, I'm a clean slate. I really want to learn, so could someone please point me in the right direction. Right now, I have no idea what I'd do with my skills but I'm sure I'd find some project once I got started. =) Thanks, aqzman
Hi, Its great that you want to become a fish in the pond of programming shawrks. Go and start with Language 'C'. Best wishes.
-
Well, I'm sorry if this is in the wrong forum, I looked but couldn't find anything else, also did a search, with no luck. So I have to make a topic =P Well I want to start programming, but... I really don't know where to start. I don't know what language I should start with or anything like that. So, basically, I'm a clean slate. I really want to learn, so could someone please point me in the right direction. Right now, I have no idea what I'd do with my skills but I'm sure I'd find some project once I got started. =) Thanks, aqzman
I have to agree with fat_boy. I started with C which provided a VERY good steping stone for C++. From C and C++ I was able to learn Java, VB, Objectiv_C, C#, and a few other languages. C will provide you with a good understanding of other languages before you even learn them. Objective_C is the native language for programing on mac, C++ would help you using QT for linux, VB is very limited when it comes down to it. You dont have full access to the things you can do i C, C++, C#, and Objective_C such as bit shifting for math routines in video games or for data storage in one byte variables. For instance a Boolean is one byte. That gives you 8 1's and 0's to play with...so in C you could use a Boolean to store 8 boolean for the price of one in memory. Not to mention that the speed of shifting bits instead of multiplying is much faster. This is stuff you would learn latter, but very valuable stuff. I learned the language as my first and it wasnt too bad. Within 6 months i was writing full applications with it and i had to teach myself. No school. If you sit down and get into it you wont regret it. It will come in very handy latter. Pablo
-
Jason Pease wrote:
he wasn't interested in finding out that Christan Graus - Microsoft MVP - C++ thinks that fat_boy is an idiot.
My apologies, fat_boy likes to go after me in all the forums, and I replied to this after reading an attack from him to me in the soapbox. Otherwise, I would never have called him an idiot. I would hope that I gave this person good advice to start with, if he wanted to know more, he was and is free to ask. In the meantime, all message boards have threads that wander off topic. This one has moved from answering a question to a person who did not respond again to discussing if it's necessary for people to learn C before C++. Christian Graus - Microsoft MVP - C++
Christian Graus wrote:
fat_boy likes to go after me in all the forums
Hmm, paranoid too. Oh come on, I dont stalk you. Anyway, why do I recomend C? Because it is difficult. And my attitude to learning something new is to go for the deep end. And that is what I was suggesting to the postee. Nunc est bibendum