Page 7 of 8

Posted: Wed Jan 31, 2007 2:14 pm
by Darksun
KingAl wrote:In my personal, and highly irrationally biased, opinion, if you are capable of learning Java straight off the bat, then you might as well just learn C++ - which is ruled by similar concepts, allows more low level tweaking and most important of all is an industry standard - you don't see any major titles coded in java.


Well, I think Java is easier to learn since you can grasp the fundamentals of OO programming without getting bogged down in the low level stuff. And while C/C++ is the industry standard for PC programming, Java is important in other markets, such as mobile phones and embedded systems

Posted: Wed Jan 31, 2007 3:36 pm
by R.Reagan
what did IV use to create defcon?

Posted: Wed Jan 31, 2007 3:49 pm
by Montyphy
R.Reagan wrote:what did IV use to create defcon?


They used Chris, who wrote Defcon in 42 lines of brainstab (41 of which were comments).

BTW, you really shouldn't base what language you learn or use solely upon what someone else used/uses. You should weigh up the pros and cons of a language based on your circumstances and needs.

Posted: Wed Jan 31, 2007 4:05 pm
by xander
Montyphy wrote:
R.Reagan wrote:what did IV use to create defcon?


They used Chris, who wrote Defcon in 42 lines of brainstab (41 of which were comments).

Speaking of which, does anyone here speak or read Swahili? I am trying to read the comments...

xander

Posted: Wed Jan 31, 2007 4:37 pm
by BrianBlessed
Just watch the Lion King, that's all the Swahili you need to know.

Posted: Wed Jan 31, 2007 8:00 pm
by Stewsburntmonkey
Montyphy wrote:
R.Reagan wrote:what did IV use to create defcon?


They used Chris, who wrote Defcon in 42 lines of brainstab (41 of which were comments).

BTW, you really shouldn't base what language you learn or use solely upon what someone else used/uses. You should weigh up the pros and cons of a language based on your circumstances and needs.


Although it is generally advisable to go with a language many other people in the same area use as it will have a large selection of libraries specific to the given task than a less used language will. For example Perl has a lot more web development libraries than C++ does because more web developers use Perl than C++. On the other hand there are more graphics libraries for C++ than for Perl because more games and other graphics applications are written in C++ than in Perl.

Posted: Wed Jan 31, 2007 9:26 pm
by R.Reagan
ok thanks, i think i give c++ a try

Posted: Wed Jan 31, 2007 10:04 pm
by prophile
If you're learning a programming language for the first time, start off with something very high level. My first language was AppleScript. It'll teach you how programming all works; your second step is something a little more complicated but still easy to use, something like PHP. Once you're fluent in something middle-level like that you can learn C++, C, and assembler, in that order.

Posted: Wed Jan 31, 2007 10:19 pm
by Stewsburntmonkey
prophile wrote:If you're learning a programming language for the first time, start off with something very high level. My first language was AppleScript. It'll teach you how programming all works; your second step is something a little more complicated but still easy to use, something like PHP. Once you're fluent in something middle-level like that you can learn C++, C, and assembler, in that order.


I don't think all that is necessary. AppleScript isn't really sufficiently like anything else to make it work learning unless you need it. If you want to start high level something like Python or Java would be better as they are similar to a lot of other languages (like C++). Also C would be easier to learn than C++. C is a much simpler language, and while low level, is pretty easy to learn. The definitive book on C, Kernighan and Richie's "The C Programming Language" is all of 200 pages, which most C++ books are several times that. There is very little point learning assembly at this point for most people.

Posted: Wed Jan 31, 2007 10:24 pm
by prophile
I have to disagree over the C/C++ point. I find that the abstractions provided by libstdc++ make life one hell of a lot easier for someone new. Look at string handling specifically: when I tried to learn C the first time, strcpy() and co just went straight over my head. Using std::string is much simpler, and once you start understanding how it all works then you can move on to C.

Posted: Wed Jan 31, 2007 11:03 pm
by Testrie
prophile wrote:I have to disagree over the C/C++ point. I find that the abstractions provided by libstdc++ make life one hell of a lot easier for someone new. Look at string handling specifically: when I tried to learn C the first time, strcpy() and co just went straight over my head. Using std::string is much simpler, and once you start understanding how it all works then you can move on to C.


sp wjat does strcpy() do again?

elyea

Posted: Wed Jan 31, 2007 11:07 pm
by Stewsburntmonkey
prophile wrote:I have to disagree over the C/C++ point. I find that the abstractions provided by libstdc++ make life one hell of a lot easier for someone new. Look at string handling specifically: when I tried to learn C the first time, strcpy() and co just went straight over my head. Using std::string is much simpler, and once you start understanding how it all works then you can move on to C.


Oh, there are certainly some things that are easier in C++ (objects can be very nice). However, there is a whole lot that is far more difficult, especially if you get into other libraries. Even with strings you have all sorts of different string libraries, each with their own features and functions. I also wonder how strcpy() is confusing while C++ isn't. I'm mean all you are doing is copying a string using pointers. Understanding pointers is key to both C and C++.

My main reason for suggesting learning C before C++ is that the vast majority of most people's needs in C++ are covered in C. If you have a good grasp of C (which is pretty easy to get) you can pickup those features of C++ you need without much problem. In fact almost all books I have seen on C++ start off with a relatively in depth C tutorial before even touching C++. For example the first 250 pages of C++, The Complete Reference are all about C.

Posted: Thu Feb 01, 2007 8:25 am
by KingAl
In my arrogant opinion, if you learn C before C++, it should be to learn how to program, rather than as a step up to learn the language. Otherwise, there are some common programming techniques in C that are really dodgy in the context of C++ - overuse of macros and casts, for example. I'd suggest learning the concepts behind general program design etc. in another language entirely and then going straight to C++, bypassing C. It's true that there are many C++ tutorials which essentially teach C first, but this approach has been criticized by many prominent figures in the C++ community (admittedly, an appeal to authority, but they should know what they are talking about).

Posted: Thu Feb 01, 2007 3:38 pm
by Stewsburntmonkey
KingAl wrote:In my arrogant opinion, if you learn C before C++, it should be to learn how to program, rather than as a step up to learn the language. Otherwise, there are some common programming techniques in C that are really dodgy in the context of C++ - overuse of macros and casts, for example. I'd suggest learning the concepts behind general program design etc. in another language entirely and then going straight to C++, bypassing C. It's true that there are many C++ tutorials which essentially teach C first, but this approach has been criticized by many prominent figures in the C++ community (admittedly, an appeal to authority, but they should know what they are talking about).


I don't think it is at all hard to stop using casts and macros so often when you switch to C++. I actually think learning these sorts of things gives you a better idea why some features of C++ were implemented. The real bottom line however is that C is largely a subset of C++ so you are going to learn it either way. The only difference is whether you know you are learning it or not. I think it makes more sense to explicitly learn what is C and what is just C++. This way you can program in C if you need to and can look at C code without issue.

Posted: Thu Feb 01, 2007 7:30 pm
by R.Reagan
cool, many thanks! next days i will buy me such a book and practice :D
i will try c first, downloaded dev-c++ after i realised that i have to have something to write in, very confusing all
do you have a good learning-book for c in mind? what did you use?