Should I learn C++ or Java now?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Elijah

    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
  • E. Robert Tisdale

    #2
    Re: Should I learn C++ or Java now?

    Elijah wrote:
    [color=blue]
    > 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,
    >[/color]

    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*!

    Comment

    • Cy Edmunds

      #3
      Re: Should I learn C++ or Java now?

      "Elijah" <elijahlofgren@ yahoo.com> wrote in message
      news:63ff2c1b.0 307161838.7e46b ca2@posting.goo gle.com...[color=blue]
      > 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[/color]

      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



      Comment

      • Peter van Merkerk

        #4
        Re: Should I learn C++ or Java now?

        > 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.
        [color=blue]
        > 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[/color]
        C++ u[color=blue]
        > wud be able to apprciate the OOPS concepts in C++,[/color]

        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.
        [color=blue]
        > Java since its made a platform independent it will be too heavy on u[/color]
        if u[color=blue]
        > are not sure of basic concepts of a high level language ,[/color]

        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.merke rk(at)dse.nl





        Comment

        • Agent Mulder

          #5
          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


          Comment

          • Peter van Merkerk

            #6
            Re: Should I learn C++ or Java now?

            "Elijah" <elijahlofgren@ yahoo.com> wrote in message
            news:63ff2c1b.0 307161838.7e46b ca2@posting.goo gle.com...[color=blue]
            > I have read many of the topics on learning C++ or Java first.
            > It seems like everyone says something different.[/color]

            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.
            [color=blue]
            > 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++?[/color]

            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.
            [color=blue]
            > Are there any recommended books on Java or C++[/color]

            "Accelerate d 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.merke rk(at)dse.nl




            Comment

            • Gavin Deane

              #7
              Re: Should I learn C++ or Java now?

              "Agent Mulder" <mbmulder_remov e_this_@home.nl > wrote in message news:<bf5uf2$pe 6$1@news4.tilbu 1.nb.home.nl>.. .[color=blue]
              > 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:[/color]



              <snip>

              Comment

              • mjm

                #8
                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 <incomprehensib le 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.

                Comment

                • Alexander Terekhov

                  #9
                  Re: Should I learn C++ or Java now?


                  Gavin Deane wrote:
                  [...][color=blue]
                  > http://www.accu.org/bookreviews/public/index.htm[/color]


                  (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.

                  Comment

                  • Nick Keighley

                    #10
                    Re: Should I learn C++ or Java now?

                    "Agent Mulder" <mbmulder_remov e_this_@home.nl > wrote in message news:<bf5uf2$pe 6$1@news4.tilbu 1.nb.home.nl>.. .
                    [color=blue]
                    > 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?[/color]

                    <snip>
                    [color=blue]
                    > 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[/color]

                    No! Some big books are terrible.

                    books with titles like:-
                    "Learn <anything> In 21 Days For Morons"
                    [color=blue]
                    > -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)[/color]

                    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

                    Comment

                    • Fao, Sean

                      #11
                      Re: Should I learn C++ or Java now?

                      > -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.
                      [color=blue]
                      > -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)[/color]

                      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


                      Comment

                      • AJ

                        #12
                        Re: Should I learn C++ or Java now?

                        elijahlofgren@y ahoo.com (Elijah) wrote in message news:<63ff2c1b. 0307161838.7e46 bca2@posting.go ogle.com>...[color=blue]
                        > 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[/color]



                        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.

                        Comment

                        • Default User

                          #13
                          Re: Should I learn C++ or Java now?



                          Peter van Merkerk wrote:[color=blue]
                          >[color=green]
                          > > learning C++ is best done aftee u learn c thoroughly[/color]
                          >
                          > 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.[/color]


                          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

                          Comment

                          • llewelly

                            #14
                            Re: Should I learn C++ or Java now?

                            spyqqqdia@yahoo .com (mjm) writes:
                            [color=blue]
                            > Find out if games are actually programmed in Java, ie. talk to game
                            > programmers.[/color]

                            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++'. :-)
                            [color=blue]
                            > 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.[/color]

                            Do your java tools come with a profiler? A profiler is essential for
                            modern action games.
                            [color=blue]
                            > 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.[/color]

                            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.
                            [color=blue]
                            > 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++.[/color]

                            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 :-)
                            [color=blue]
                            > C++ as a language is probably 3 times as extensive and complicated as
                            > Java.[/color]

                            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. :-)
                            [color=blue]
                            > 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.[/color]

                            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.
                            [color=blue]
                            >
                            > Linker errors in C++ are ultimate horror:
                            > "In function <incomprehensib le string, seemingly unrelated to your
                            > program> undefined reference to <ghastly string, 1000 characters all
                            > on one line, scroll right for minutes>".[/color]

                            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.
                            [color=blue]
                            > 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.[/color]

                            I have certinaly seen some bad error message, but none of this sort.
                            [color=blue]
                            >
                            > It will take a long time until you can even read these error messages.
                            > It is very daunting.[/color]

                            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.
                            [color=blue]
                            > 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++.[/color]

                            If you know Java so much better, what are you doing here?
                            [color=blue]
                            > On the other hand C++ is the pinnacle of programming languages[/color]

                            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'.
                            [color=blue]
                            > 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.[/color]
                            [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.

                            Comment

                            • Victor Bazarov

                              #15
                              Re: Should I learn C++ or Java now?

                              "llewelly" <llewelly.at@xm ission.dot.com> wrote...[color=blue]
                              > spyqqqdia@yahoo .com (mjm) writes:
                              >[color=green]
                              > > Find out if games are actually programmed in Java, ie. talk to game
                              > > programmers.[/color]
                              >
                              > No. Note that for certain popular game platforms - e.g., ps2, xbox,
                              > gamecube, gba, there is no availible java implementation. So [...][/color]

                              Why are we discussing Java _here_? Shouldn't the entire thread
                              move to 'comp.games.dev elopment.progra mming.misc'?


                              Comment

                              Working...