PDA

View Full Version : C++ or Java Programming



swat150
02-24-2004, 12:52 PM
I am sighning up for my junior classes next year and have chosen Cisco 1 and Cisco 2. I also want to do a programing class. my teacher recomends me doing java programming and visual basics. He says C++ is getting old. However my freind strongly discourages me from doign java and recomends me doing C++.

What do you think?

Thanks
Pat Lucas

Dryden
02-24-2004, 01:08 PM
Hands down, no question, C++.

Learning C or C++ (C++ especially since it's object oriented) first will make learning Java much easier, rather than the other way around.

Both languages are portable, but with the industry shift away from Microsoft AND Sun, and the explosion of Linux, I think you'll find infinitely more job opportunities if you are very proficient with C/C++.

Java has practical applications, it's especially popular with distributed data applications and appliances, such as the "MegaTouch" bar top coin-op games, digital jukeboxes, and lottery terminals. However, for desktop computer applications, it's not as practical because speed becomes a major hurdle as the program grows in size and complexity.

C/C++ concepts are so basic to programmers that many other programming languages end up being C look-alikes. The benefit to learning C is that you also learn about 50% of PERL, Java, and a dozen other languages, which is what makes C/C++ a great "first language."

A lot of the decision rests on what you eventually plan to do, write your own desktop software, video games, or build appliances.

Given that you're doing Cisco courses though, I presume you're looking at network and systems admin in the short-term for a career? I think C/C++ will suit you better there.

71 LS6
02-24-2004, 01:22 PM
I took C++ for two years, followed by a half year or so of JAVA. Personally, I liked the C++ a lot more

Kevmaster
02-24-2004, 01:37 PM
I'm in my 5th semester of C++ now. VERY happy I'm here and not in JAVA.

C++, if learned, will allow you to learn JAVA quickly down hte road. Both will do just fine, pick the one with the better teacher...THATS the key...

Miscue
02-24-2004, 03:45 PM
What language you learn isn't that important, considering that you probably won't be able to create something useful for a while. What's important is that you learn good programming technique - the language is merely a tool.

Learn C++ first, if you can. The transition from C++ to Java is not a huge leap. Java is wonderful, I think it's great... and all programmers should know how to use it. However, I recommend it as a second or third language.

VB is good, but learn it on your own time. Although it is "easy," I think C++ is better to start with if you want to learn good programming technique.

Familiarize yourself with as many languages as you can. The more you know about "programming languages" in general, the better a programmer you will become.

f3rr3+
02-24-2004, 05:11 PM
bah... i wish that my school offered c++ the only prgramming lang. they offer is VB... :rolleyes:


edit: it is HS tho so i guess i should be happy with anything

redzone
02-24-2004, 07:04 PM
id go with c++ and if you want you could learn java on ure own time...theres programs you could buy

gibby
02-25-2004, 02:38 PM
I hate to say it...but listening to whatever my teachers or advisors told me never prepared me for what I want to do as a career. The most important thing isn't the language you learn, but the concepts and dicipline of programming. Learning a language can be picked up if you have the logic required to think and solve problems.

Most of the teachers taught purely on theories and didn't really teach us application of those theories. It was a great way to dicipline myself in how to code or design, but didn't give me the real world skill. Most of the projects I did heavily focused on theories which can be good and bad. Then again, my school probably sucks! LOL! Most of my learning happened after graduating. But that's probably true in most cases anyway. ;)

But that being said...take C++.

Edit: Also make sure you learn the algorithms as those are applied in many real world applications. And if you're planning on getting into games...learn your Linear Algebra like your life depended on it!:p

Automaggin2
02-25-2004, 11:00 PM
Definatly C++. Java is passing it as the language of choice, but many people still program in C and C++. I'm in my 3rd year of programming, I take Java now. I like c++ so much more, but it helped me alot with Java. Java is more object oriented.

swat150
02-26-2004, 12:25 PM
What do you mean by object oriented?

Miscue
02-26-2004, 02:09 PM
An object is (Brian scratches head and tries to explain) a self-contained logical unit that can hold both data, methods, and other information... and has a built in way to create a hierarchy defining how separate objects are related with each other.

So like, you can have an object called "schoolBus." And in that schoolBus you can store other objects like a bus driver or students. And in the schoolBus object you can define the methods for how the bus driver and students interact, how the bus driver drives, when the driver blows his whistle when the kids get noisy. :)

The goal of object-oriented programming (OOP) is to facilitate the means to make modular programming easier and provide a hierarchy to the program. You break the program up into small pieces. In theory it results in faster development time, ease in which multiple people can work together, maintainability of software, and some other stuff.

C++ is kind of a hybrid where you don't have to use OOP. This is partly why I recommend C++ first, because OOP is a complicated topic for learning programmers, and really needs some previous experience to understand it - you can use C++ without OOP and don't have to learn to run before you walk. And, C/C++ are the primary languages of UNIX-type systems - learn them and you will be able to make better use of these OSs.

Java is mostly OOP, you pretty much have to use it. Smalltalk is labeled as a pure OOP, where about everything (or maybe it is everything, I forget :) ) is an object... even your variables and stuff.

Joni
02-26-2004, 03:24 PM
Forget java and C++...I say haskell :D Functional programming is great! I study computer science at chalmers university of technology, and the first programming course we had to take was haskell. I can tell you that for a person that has a little experience in c++ or java, thats a real headscratcher:cool:

Anyway, on topic. I have more experience in Java than C++, but I know that in java it's easier to avoid bugs. There are a lot of safetys built into it. Although, it seems that c++ is still more widespreadn in the industry than java, so it can be good to know that. Anyway, I agree with Miscue. What language you learn is not that important, although learning a good programming style is. After a while, learning a new language is rather simple. (The other day I learned enough MPD in two days to make a programming assignment for a course I'm having right now. I should be doing the second assignment right now instead of posting on AO =)

Miscue
02-26-2004, 04:07 PM
Originally posted by Joni
Anyway, on topic. I have more experience in Java than C++, but I know that in java it's easier to avoid bugs.

Urm... I know what you're talking about, and it involves a strong typed language versus a weak typed language and such things... but I think to say that one language "avoids" bugs is an incomplete and inaccurate generalization. At the learning level, it doesn't make a whole lot of difference because the stuff you're working on is so simple that it doesn't matter. There become issues when you get to production level stuff.

But here's my take on programming languages: Learn as many as you can, and use the language best suited for a particular task. Once you've learned a few, picking up the basics of a new language doesn't take much time at all... not saying you can become an instant expert but you can quickly familiarize yourself with it at a superficial level, discovering that many of its features you already know how to use because they are present in languages you already know.

Also understand that it takes years to really get 'good' at a language, because you're not just talking about the language itself but all the libraries and the whole suite that's available for it. Learning the language itself is a trivial thing, it's the whole package that is the challenge.

But yeah, concentrate on computer science theory and programming style and technique... programming languages are merely necessary tools to practice these things.

mikey101
02-26-2004, 05:03 PM
if you've never touched programming before, i'd take a look at scheme before you start java/C++. gives a good grasp on how to think like a programmer when approaching different kinds of problems. the language itself is a bit dated, but it helps you understand the basics of programming which will be invaluable later, from there you can tackle anything you want.

I like java for it's memory management, the way it references data and automatically sends the garbage collector around to clean up unused data makes it very clean and neat. java also utilizes inheritance which which is unique to the language, and saves you quite a bit of time.