File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Looking for helpful suggestions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Looking for helpful suggestions" Watch "Looking for helpful suggestions" New topic

Looking for helpful suggestions

Philip Herzer

Joined: Oct 21, 2003
Posts: 21
I am relatively new to programming and Java in general. My question deals whether I should focus on Java in general or as a beginner to programming focus on C++ and Java together at the same time.
It is my goal to become a better programmer and to learn many different languages. I believe each language has a different methodlogy or way of thinking that can be used to solve many different types of problems. However, It might be confusing at first to learn, lets say for example, Python and Ruby, and pair it with Java and C++.
I picked up some Deitel books: Learning to Program using C++ and the other one for Java. Both languages are quite familiar as far as syntax (i.e. type casting, loop structures, arrays, classes.). The only thing I notice that is different is that I don't need to specify memory handling parameters, java has efficient garbage collection.
Any suggestions on what to do. I want to be efficient with multiple languages instead of being a jack of all trades.

"Mejor morir de pie que vivir toda la vida arrodillas."<br /> Emilio Zapata
Elouise Kivineva
Ranch Hand

Joined: Feb 07, 2002
Posts: 154
With Java you can more quickly learn to do a lot more, but C++ perhaps teaches you more exactly because you have to know and understand a lot more "nuts and bolts".
I would think it would be better to develop a Java proficiency first because you will get on your feet faster and because there seems to be more demand for Java programmers. Afterwards C++ should be less painful but quite good for developing your understanding of programming on a deeper level.
I've found that Jesse Liberty's C++ (Teach yourself C++, Clouds to Code, C++ Unleashed) books are exceptionally useful and interesting.
sever oon
Ranch Hand

Joined: Feb 08, 2004
Posts: 268
My answer will be a big surprise considering you're posting this question on a Java board: learn Java first.
The reason is that you'll be a much better OO programmer once you work with Java exclusively for a few months, provided you're really thinking about every little thing and you rack up a good amount of writing code in that time. One thing I found when I learned Java is that it made a lot of OO concepts clear to me that C++ doesn't explicitly call out as a language.
A quick history lesson on's not actually an "object-oriented" language. If you want to be really pure about it, neither is Java, because true OO languages are only allowed to have objects, and both of these languages have primitive types: int, long, char, etc. So, if we look at these languages on a spectrum from object-oriented programming (OOP) to procedure-oriented programming (POP), I'd say that C++ falls about 1/3 from the POP extreme and Java falls about 1/4 from the OOP extreme. (The joke goes that C++ is more like a "procedure-/object-oriented language", or POOP.)
So, the upshot is, there's a lot more OO you'll learn and solidify programming in Java, and then you can take that knowledge over to C++. For example, C++ allows global variables, Java does not. So if you learn Java first, you'll find out how Java handles situations where you need globally accessible constants (like pi, for example) enclose those constants in a class and make the class available to anyone who wants to use it. This is very cool, even though it seems a bit more complex than the C/C++ way, because by forcing those constants into a class you've organized them out of some nebulous, general namespace into a specific one.
Another Java language construct is the interface. Once you program and read enough about Java to understand why an interface is not just an "pure" abstract class (or "pure virtual" as C++ calls it), you'll be able to go back to C++ and use pure virtual classes as you would a Java interface, which will result in better designed code.
Java's event model will also provide insight on how objects can communicate with each other--there is no such standard in C++. And on, and on.
Ultimately, though, I'd say that if you're interested in teaching yourself a bevy of languages, after you learn Java the thing that will truly help you the most is to go to Assembly. Yes, plain old Assembly. That'll teach you all the nuts'n'bolts of how a computer really does what it does. After that, I'd learn C. Because you already know Java's syntax and Assembly's memory management, you'll find learning C and C++ are cake. You can probably pick up both of these languages in a week or two if you're solid in the other two. And at some point you should study up on regular expressions because just about every language use some variant, and you can even use reg exps in shells and shell scripts if you run linux.
The sky's the limit from there: PHP, Perl, Python, C#, Smalltalk, Lisp, Eiffel, Objective-C (no reason to learn this one nowadays). I think you'll find that once you learn the basics of how a computer works and OO, you'll pick up new languages rapidly.
Philip Herzer

Joined: Oct 21, 2003
Posts: 21
Thanks for all the helpful suggestions. I will focus most of my attention on mastering java, than will try to go back to C++. Hopefully I will gain a better understanding of OO principles that will make me a good programmer.
As far as Assembler, if Im corrent the syntax between x86 and ppc be different? I assume so, because the system calls and number of registers differs on each processor. Wouldn't it be hard to learn assembler on PPC. Doing a google search, not to many resources on ppc assembler on linux for beginners . But, just learning an overall approach wouldn't be bad, and could be very benifitial.
Off, to the Deitel & Deitel book !
sever oon
Ranch Hand

Joined: Feb 08, 2004
Posts: 268
Oh, I disagree. There's a big assembly community centered around the PPC, you're just not looking in the right places. I will admit, though, I've only done assembly for the PC, and I could recommend a book for that: Master Class Assembly by Wrox Press (best book I've found). I'm sure there are equivalent resources for the PPC, but you probably have to do some searching around the GNU assembler (called gas).
Or, you could learn it for the PC. You can probably find a PC with DOS being given away somewhere in your community, a school or library probably has one laying around. All you literally need is an old 8086 and a copy of DOS, though you'll probably be hard-pressed to find something that primitive unless a local museum is clearing out an old exhibit. You're more likely to find an old 80386, 80486, or Pentium for free.
All you need is that, an old version of DOS (probably installed already on there), and some kind of assembler. There's tasm (borland), wasm (watcom), and a bunch of others that come with debuggers. You could probably put this whole thing together, including mouse, keyboard, and monitor for less than $30.
I truly believe no one can really, truly be a good programmer until they understand the basics of how the machine carries out its tasks at the most fundamental level. You'll never truly understand what the difference between a vtable and a page table is until you learn asm.
Adrian Yan
Ranch Hand

Joined: Oct 02, 2000
Posts: 688
Maybe it's just, while I been programming Java for over 5 years, and still do today. I think learning C/C++ should be the first language. Why? C/C++ really forces students to learn the basics of computing (O/S, compilers, network, etc). From my interaction with other people, the best programmers (java) usually come from C/C++ world, while those "Pure" java programmers often fail to understand some very basic computing knowledge (system, network related).
I think the reason for this is that most of the C/C++ programmers come from UNIX progamming, and have a strong understanding of memory, data structures, and algorithms. While many Java programmers simply do what the API allows them to do without coming up with any creative or new.
As one of my old professor told me once, "Developers write C/C++, programmers write Java".
Of course, Java is a very good language to learn, and it's getting better everyday, my biggest complain is that its core API is so bloated that beginners take a longer time to actually learn how to use them properly, while C/C++, APIs are relatively minimal, so beginners can learn the basic more quickly.
Just my silly $0.02.
I agree. Here's the link:
subject: Looking for helpful suggestions
It's not a secret anymore!