 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Elijah Guest
|
Posted: Thu Jul 17, 2003 2:38 am Post subject: Should I learn C++ or Java now? |
|
|
I have read many of the topics on learning C++ or Java first.
It seems like everyone says something different.
I would like to know if I should learn C++ or Java.
First a little about myself.
I know PHP, BASIC, and of course HTML.
I'll be 15 years old in September.
I am interested in programming GUI applications.
I am also interested in programming games.
I know that I should learn C++ to program games, but would learning
Java make the process any easier? Or am I better of just diving right
into C++?
Are there any recommended books on Java or C++ (depending on which
language I should learn first) for the beginner who only know PHP and
BASIC?
Sorry if this post some how offends somebody.
A teenager in desperate need of advice,
Elijah
|
|
| Back to top |
|
 |
E. Robert Tisdale Guest
|
Posted: Thu Jul 17, 2003 2:47 am Post subject: Re: Should I learn C++ or Java now? |
|
|
Elijah wrote:
| Quote: | I have read many of the topics on learning C++ or Java first.
It seems like everyone says something different.
I would like to know if I should learn C++ or Java.
First a little about myself.
I know PHP, BASIC, and of course HTML.
I'll be 15 years old in September.
I am interested in programming GUI applications.
I am also interested in programming games.
I know that I should learn C++ to program games
but would learning Java make the process any easier?
Or am I better of just diving right into C++?
Are there any recommended books on Java or C++
(depending on which language I should learn first)
for the beginner who only know PHP and BASIC?
Sorry if this post some how offends somebody.
A teenager in desperate need of advice,
|
It would probably be more fun to learn Java first.
Programming games today is about high performance graphics.
Take as many math courses as you can get and *pay attention*!
|
|
| Back to top |
|
 |
Cy Edmunds Guest
|
Posted: Thu Jul 17, 2003 5:16 am Post subject: Re: Should I learn C++ or Java now? |
|
|
"Elijah" <elijahlofgren (AT) yahoo (DOT) com> wrote
| Quote: | I have read many of the topics on learning C++ or Java first.
It seems like everyone says something different.
I would like to know if I should learn C++ or Java.
First a little about myself.
I know PHP, BASIC, and of course HTML.
I'll be 15 years old in September.
I am interested in programming GUI applications.
I am also interested in programming games.
I know that I should learn C++ to program games, but would learning
Java make the process any easier? Or am I better of just diving right
into C++?
Are there any recommended books on Java or C++ (depending on which
language I should learn first) for the beginner who only know PHP and
BASIC?
Sorry if this post some how offends somebody.
A teenager in desperate need of advice,
Elijah
|
I wouldn't recommend learning Java as an expedient to learning C++. Learn
Java if you want to program in Java. If your ultimate goal is to learn C++
start right away. There are GUI programming tools in just about every
language today, so I don't see that as a language selection criterion.
You might also consider Python. It has a lot to offer.
--
Cy
http://home.rochester.rr.com/cyhome/
|
|
| Back to top |
|
 |
Peter van Merkerk Guest
|
Posted: Thu Jul 17, 2003 10:07 am Post subject: Re: Should I learn C++ or Java now? |
|
|
| Quote: | learning C++ is best done aftee u learn c thoroughly
|
If you really want to learn C++ I would not take the C detour first. I
you learn C first thoroughly (like I did), you will have to unlearn a
lot when you are start programming C++. The problem is that even though
almost all C constructs still work in C++, they are often not
appropriate in a C++ context because C++ offers usually much better
alternatives.
| Quote: | Because u wud be able to make a differece between language specific
syntactical info(in C) and object oriented concepts of C++
Once u learn language syntax in C thorughly , when u start learning
C++ u
wud be able to apprciate the OOPS concepts in C++,
|
C++ doesn't force you to use OOP concepts. Consequently I see still many
programmers with a C background essentially programming C with C++. The
learning the syntax of a new programming language is usually the easiest
part. Learning new concepts behind it is much harder. The transistion
from Pascal to C was very easy for me, I only had to get familiar with
another syntax. However the transition from C to C++ was much harder
because I had to learn whole new concepts and new ways to structure
code.
| Quote: | Java since its made a platform independent it will be too heavy on u
if u
are not sure of basic concepts of a high level language ,
|
Java can be a perfectly acceptable language to learn programming.
However if the goal is to learn C++ I wouldn't take that detour either.
I don't think that the language you use to learn programming is all that
important. I started programming with BASIC on a C64, hardly an ideal
start. Yet it learned me basic concepts like variables, loops,
sub-routines...etc, concepts you will find in just about any other
language. I do believe that quick and positive feedback is advantage
when learning to program. On the C64 I could enter a line of code, press
enter and see the results. With Python I can do the same thing, and with
Python you can learn many of the important concepts including OOP. Once
you have mastered the basic concepts, learning a new programming
language becomes a lot easier.
--
Peter van Merkerk
peter.van.merkerk(at)dse.nl
|
|
| Back to top |
|
 |
Agent Mulder Guest
|
Posted: Thu Jul 17, 2003 10:46 am Post subject: Re: Should I learn C++ or Java now? |
|
|
Eljah> Are there any recommended books on Java or C++ (depending on which
Eljah> language I should learn first) for the beginner who only know PHP and
Eljah> BASIC?
Eljah>
Eljah> Sorry if this post some how offends somebody.
Go to your local second hand bookstore and find the books
on Java and C++. You'll probably find lots of both of them.
Decide on the language by the documentation that you can get.
It is not easy to recognize a good book but some general
guidelines are:
-good books are heavy books
-good books have a good index
-good books have a good Table of Contents at the start (except
for Bjarne Stroustrup's C++ Programming Language, that has a
lousy Table of Content. There is also something with the backside
of it that I must always look twice to find it. But the weight will tell
me I'm right)
Some Java books have a CD-ROM in the back with a compiler and
tools that you need to start programming. If you plan to jump in quickly
with a high level object oriented language, I'd advice Java. With C++,
you'll have to go through a lot of grunch. But it pays of.
-X
|
|
| Back to top |
|
 |
Peter van Merkerk Guest
|
Posted: Thu Jul 17, 2003 11:04 am Post subject: Re: Should I learn C++ or Java now? |
|
|
"Elijah" <elijahlofgren (AT) yahoo (DOT) com> wrote
| Quote: | I have read many of the topics on learning C++ or Java first.
It seems like everyone says something different.
|
That is because the answer to your question depends very much on what
the objectives are. Even though many people believe differently, there
is no single perfect programming language for every possible
application. But whatever your choice will be, you can't really go
wrong. Worst thing that may happen is that you did not take the most
direct way to reach your goal, but even that experience may be valuable.
| Quote: | I would like to know if I should learn C++ or Java.
First a little about myself.
I know PHP, BASIC, and of course HTML.
I'll be 15 years old in September.
I am interested in programming GUI applications.
I am also interested in programming games.
I know that I should learn C++ to program games, but would learning
Java make the process any easier? Or am I better of just diving right
into C++?
|
If C++ is your goal go straight for C++, even though the learning curve
of C++ is steeper. At first sight Java and C++ may look deceptively
similar, but there are some major conceptual differences between the
two. These differences can make a transition from Java to C++ difficult.
| Quote: | Are there any recommended books on Java or C++
|
"Accelerated C++" (http://www.acceleratedcpp.com/ ) is usually
recommended as an excellent beginners C++ book for people with some
programming experience.
--
Peter van Merkerk
peter.van.merkerk(at)dse.nl
|
|
| Back to top |
|
 |
Gavin Deane Guest
|
Posted: Thu Jul 17, 2003 1:55 pm Post subject: Re: Should I learn C++ or Java now? |
|
|
"Agent Mulder" <mbmulder_remove_this_ (AT) home (DOT) nl> wrote
| Quote: | Eljah> Are there any recommended books on Java or C++ (depending on which
Eljah> language I should learn first) for the beginner who only know PHP and
Eljah> BASIC?
Eljah
Eljah> Sorry if this post some how offends somebody.
Go to your local second hand bookstore and find the books
on Java and C++. You'll probably find lots of both of them.
Decide on the language by the documentation that you can get.
It is not easy to recognize a good book but some general
guidelines are:
|
http://www.accu.org/bookreviews/public/index.htm
<snip>
|
|
| Back to top |
|
 |
mjm Guest
|
Posted: Thu Jul 17, 2003 2:12 pm Post subject: Re: Should I learn C++ or Java now? |
|
|
Find out if games are actually programmed in Java, ie. talk to game
programmers.
If the answer is yes do Java since it is more than just a language it
comes with an enormous number of tools that can be used very easily.
In C++ you have to acquire libraries and although this is possible you
have to find out how to install them and link against them which are
issues which you don't have with Java.
While you can draw something on the screen immediately in Java once
you understand the use of classes in Java it will take much more
effort in C++.
C++ as a language is probably 3 times as extensive and complicated as
Java.
Moreover the problem is not only the language but also the tools which
are needed to build (compile and link) a program and what sort of
error messages these tools produce. If you can't handle these tools
you won't ever get to the level where there is any difference between
C++ and Java and certainly not to the point of programming games. You
will not have code that executes.
This process is much simpler in Java with decent error messages that
tell you what goes wrong and where. In C++ you might see
"program was terminated since SIGNAL 11 (segmentation fault) was
received".
Where? Why? What? ----- you find it out and learn how to use the
debugger.
Linker errors in C++ are ultimate horror:
"In function <incomprehensible string, seemingly unrelated to your
program> undefined reference to <ghastly string, 1000 characters all
on one line, scroll right for minutes>".
Sometimes the function where supposedly the undefined reference
occured is one you have never heard of, the file resides in a
directory you did not even know existed and when you look it up there
surely is no reference to your function at all.
It will take a long time until you can even read these error messages.
It is very daunting.
I have dealt with programs consisting of about 100 classes without
ever using the debugger in Java. I have also written and compiled
classes that compiled right away and worked correctly. That has never
happened to me in C++.
I am about 3 times faster in Java than in C++.
On the other hand C++ is the pinnacle of programming languages and it
produces very fast code. It also forces extreme discipline on you
otherwise you won't make it. Plan on programming sessions lasting 20
hours and longer. If you can't stomach that C++ is not for you. You
will also need help fom other C++ programmers. It is very unlikely
that you will succeed in isolation.
|
|
| Back to top |
|
 |
Alexander Terekhov Guest
|
Posted: Thu Jul 17, 2003 2:38 pm Post subject: Re: Should I learn C++ or Java now? |
|
|
Gavin Deane wrote:
[...]
http://groups.google.com/groups?selm=3CBCECCF.B979973D%40web.de
(Subject: Re: Book reviewer)
My, in the meantime the counter jumped from 840 to 939. Geezes.
Francis is 'the-1K-computer-book-man'. Almost.
regards,
alexander.
|
|
| Back to top |
|
 |
Nick Keighley Guest
|
Posted: Thu Jul 17, 2003 3:47 pm Post subject: Re: Should I learn C++ or Java now? |
|
|
"Agent Mulder" <mbmulder_remove_this_ (AT) home (DOT) nl> wrote
| Quote: | Eljah> Are there any recommended books on Java or C++ (depending on which
Eljah> language I should learn first) for the beginner who only know PHP and
Eljah> BASIC?
|
<snip>
| Quote: | Go to your local second hand bookstore and find the books
on Java and C++. You'll probably find lots of both of them.
Decide on the language by the documentation that you can get.
It is not easy to recognize a good book but some general
guidelines are:
-good books are heavy books
|
No! Some big books are terrible.
books with titles like:-
"Learn <anything> In 21 Days For Morons"
| Quote: | -good books have a good index
-good books have a good Table of Contents at the start (except
for Bjarne Stroustrup's C++ Programming Language, that has a
lousy Table of Content. There is also something with the backside
of it that I must always look twice to find it. But the weight will tell
me I'm right)
|
Mr Stoustrup's book is excellent. Possibly a bit tough for a beginner.
You (Elijah) arn't a complete beginner.
<snip>
--
Nick Keighley
Computers are useless. They can only give you answers.
-- Pablo Picasso
|
|
| Back to top |
|
 |
Fao, Sean Guest
|
Posted: Thu Jul 17, 2003 4:26 pm Post subject: Re: Should I learn C++ or Java now? |
|
|
| Quote: | -good books are heavy books
|
I'm going to have to argue with you on this one. K&R 2nd eddition is
probably the best book on C I have ever read. It's also one of the
smallest/lightest books I have ever read.
| Quote: | -good books have a good index
-good books have a good Table of Contents at the start (except
for Bjarne Stroustrup's C++ Programming Language, that has a
lousy Table of Content. There is also something with the backside
of it that I must always look twice to find it. But the weight will tell
me I'm right)
|
Another thing I have noticed quite often is that the /flashy/ books seem to
have nothing good on the inside. In general, it's the ugliest books, which
I find to be the best.
Sean
|
|
| Back to top |
|
 |
Default User Guest
|
Posted: Thu Jul 17, 2003 4:49 pm Post subject: Re: Should I learn C++ or Java now? |
|
|
Peter van Merkerk wrote:
| Quote: |
learning C++ is best done aftee u learn c thoroughly
If you really want to learn C++ I would not take the C detour first. I
you learn C first thoroughly (like I did), you will have to unlearn a
lot when you are start programming C++. The problem is that even though
almost all C constructs still work in C++, they are often not
appropriate in a C++ context because C++ offers usually much better
alternatives.
|
This is one of those things I strongly disagree with. Learning C first
(to my mind) did not hamper me the least in learning C++. The OO
methodology was pretty easy to learn, and I was already familiar with
many constructs. There was little or nothing that I had to unlearn.
That being said, I also don't advocated learning C merely as a stepping
stone to C++. Learn C if you want to program in C, or to gain experience
in a popular procedural language. It is good for anyone serious about
programming to learn a number of languages of different types. I'd also
recommend becoming familiar with LISP.
Does learning C first help? A bit perhaps. Does it "poison the well"?
Nonsense.
Brian Rodenborn
|
|
| Back to top |
|
 |
AJ Guest
|
Posted: Thu Jul 17, 2003 5:27 pm Post subject: Re: Should I learn C++ or Java now? |
|
|
[email]elijahlofgren (AT) yahoo (DOT) com[/email] (Elijah) wrote in message news:<63ff2c1b.0307161838.7e46bca2 (AT) posting (DOT) google.com>...
| Quote: | I have read many of the topics on learning C++ or Java first.
It seems like everyone says something different.
I would like to know if I should learn C++ or Java.
First a little about myself.
I know PHP, BASIC, and of course HTML.
I'll be 15 years old in September.
I am interested in programming GUI applications.
I am also interested in programming games.
I know that I should learn C++ to program games, but would learning
Java make the process any easier? Or am I better of just diving right
into C++?
Are there any recommended books on Java or C++ (depending on which
language I should learn first) for the beginner who only know PHP and
BASIC?
Sorry if this post some how offends somebody.
A teenager in desperate need of advice,
Elijah
|
Not to sound condescending, but programming games and GUI's is not as
fun as you think, and I speak from experience. When I first got
started in programming, I thought, "wow, i want to make games and
guis". I am sure a lot of people thought this way as well. You state
that there is a rift between those who believe C++ should be the first
language learned, and those who believe Java should be learned. What
makes you think the responses here will be any different? To answer
your question, before picking up a book on game programming in java
nd/or C++, you would be better suited to evaluate your mathematical
abilities, you will need them to program games.
|
|
| Back to top |
|
 |
llewelly Guest
|
Posted: Thu Jul 17, 2003 8:43 pm Post subject: Re: Should I learn C++ or Java now? |
|
|
[email]spyqqqdia (AT) yahoo (DOT) com[/email] (mjm) writes:
| Quote: | Find out if games are actually programmed in Java, ie. talk to game
programmers.
|
No. Note that for certain popular game platforms - e.g., ps2, xbox,
gamecube, gba, there is no availible java implementation. So as
far as games are concerned, Java is 'write-once, and then re-write
from scratch in C++'. :-)
| Quote: | If the answer is yes do Java since it is more than just a language it
comes with an enormous number of tools that can be used very easily.
|
Do your java tools come with a profiler? A profiler is essential for
modern action games.
| Quote: | In C++ you have to acquire libraries and although this is possible you
have to find out how to install them and link against them which are
issues which you don't have with Java.
|
If you think you don't have to understand those issues Java, I wonder
how you would fare if you had to write a large Java
application. Probably you come to hide under the table in terror
everytime you had a class path problem.
| Quote: | While you can draw something on the screen immediately in Java once
you understand the use of classes in Java it will take much more
effort in C++.
|
I don't think you know what you are talking about. First, drawing on
the screen has nothing to do with classes. Second, it is
impossible to draw on the screen in C++; the C++ standard contains
no mention of any such thing. You must use OpenGL, driectX, or
other platform-specific library. (Possibly one implemented by you
in assembler and video-chip microcode :-)
| Quote: | C++ as a language is probably 3 times as extensive and complicated as
Java.
|
Why do you say 3? (I'd say 'an order magnitude' - a phrase which is
intended to convey both a great difference and an inability to
measure the difference precisely. :-)
| Quote: | Moreover the problem is not only the language but also the tools which
are needed to build (compile and link) a program and what sort of
error messages these tools produce. If you can't handle these tools
you won't ever get to the level where there is any difference between
C++ and Java and certainly not to the point of programming games. You
will not have code that executes.
This process is much simpler in Java with decent error messages that
tell you what goes wrong and where. In C++ you might see
"program was terminated since SIGNAL 11 (segmentation fault) was
received".
Where? Why? What? ----- you find it out and learn how to use the
debugger.
|
No. You learn to review code. If you do not review your C++ code it
will not work - there all kinds of errors one can make in C++ that
will sneak right past your debugger.
| Quote: |
Linker errors in C++ are ultimate horror:
"In function <incomprehensible string, seemingly unrelated to your
program> undefined reference to <ghastly string, 1000 characters all
on one line, scroll right for minutes>".
|
I'm glad it's been 3 years since I had to use a C++ environment whose
linker dumped mangled names at me. Today, it seems every C++
implementation I have has name-demangling linker.
| Quote: | Sometimes the function where supposedly the undefined reference
occured is one you have never heard of, the file resides in a
directory you did not even know existed and when you look it up there
surely is no reference to your function at all.
|
I have certinaly seen some bad error message, but none of this sort.
| Quote: |
It will take a long time until you can even read these error messages.
It is very daunting.
|
It is better to read the code. The answer is usually there. Only read
the error message when you are convinced you cannot find it in the
code.
| Quote: | I have dealt with programs consisting of about 100 classes without
ever using the debugger in Java. I have also written and compiled
classes that compiled right away and worked correctly. That has never
happened to me in C++.
I am about 3 times faster in Java than in C++.
|
If you know Java so much better, what are you doing here?
| Quote: | On the other hand C++ is the pinnacle of programming languages
|
No language is 'the pinnacle of programming languages'. Many have
erroneously claimed to be, but C++ never has - even Bjarne
Stroustrup has said such things as 'if you like smalltalk, go use
it', 'if you need garbage collection, other languages have it,
maybe you could use one of those' and 'C++ shouldn't try to be all
things to all people'.
| Quote: | and it
produces very fast code. It also forces extreme discipline on you
otherwise you won't make it. Plan on programming sessions lasting 20
hours and longer.
[snip] |
20 hours? Bad, bad, _*BAD*_ advice. No. To write working C++, you must
have a clear and alert mind. You must not overlook small
details. Very few people are clear and alert for 20 hours at a
time. In fact, I strongly advise no more than 2 (yes, 2!) hours
between breaks, and no more than 8 hours (yes 8!) a day of solely
programming. If you are working 16 or 20 hours a day, your excess
hours are usually better spent in design, documentation, study,
or code review.
|
|
| Back to top |
|
 |
Victor Bazarov Guest
|
Posted: Thu Jul 17, 2003 8:45 pm Post subject: Re: Should I learn C++ or Java now? |
|
|
"llewelly" <llewelly.at (AT) xmission (DOT) dot.com> wrote...
| Quote: | spyqqqdia (AT) yahoo (DOT) com (mjm) writes:
Find out if games are actually programmed in Java, ie. talk to game
programmers.
No. Note that for certain popular game platforms - e.g., ps2, xbox,
gamecube, gba, there is no availible java implementation. So [...]
|
Why are we discussing Java _here_? Shouldn't the entire thread
move to 'comp.games.development.programming.misc'?
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|