USA Linux Users Group Forum Index
Log in Register FAQ Memberlist Search USA Linux Users Group Forum Index Album

Can't decide.. Java or C/C++??

 
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Shell Scripting and Programming
View previous topic :: View next topic  
Author Message
Jeff K USA
New Member


Joined: 30 Nov 2024
Posts: 19

PostPosted: Thu Dec 03, 2024 3:03 am    Post subject: Can't decide.. Java or C/C++?? Reply with quote

Ok so I am wanting to get into programming and I thought about starting with learning C++.

But I started to teach myself Java a while back(didnt get far into it).
Now I am wondering should I start with C++ like I originally thought, or should I go with its early version of C or should I start with Java. I remember from before that Java is based off of C++ and is easier to use...

So was just wanting people comments.
Should I start with C or go ahead and start with a OOP Langauge?
Please list your reasons why or why not to choose one of the above.
For future references. I am going to start with one of the above please don't try and force apon me a different langauge or reasons why I should choose a different language. Thanks.



_________________
Fedora 12 Desktop Edition
Back to top
View user's profile Send private message
Lord.DragonFly.of.Dawn
Advanced Member


Joined: 18 Jul 2024
Posts: 607
Location: South Portland, Maine, USA, Earth, Sol System

PostPosted: Thu Dec 03, 2024 4:55 am    Post subject: Reply with quote

What do you want to program?

Programming for Windows you want to use one of the .net languages. C# is a great choice here.

If you want to program a game, C++ would be a good choice.

If you want to program Linux system utilities (non-gui) C or C++ would be a good choice.

If you wanted to program Linux GUI stuff then C++ and learn either GTK2 or QT4.

Java is a bit weird and unless you are concerned about cross platform compatibility via a single binary (compile once, run anywhere) then for my money Java is not where it is at.

Now. How tech savvy are you?

Have you used the command line extensively (in linux or windows)? No? then you want a good IDE. Codeblocks for C and C++ is okay but Eclipse for Java is much better.

Are you comfortable with your computer on a scale of 1-10? 1-5 Java might be better, 5-8 C++ is a good choice, 9-10 C it is man!

How well do you know the internals of your computer? If you could build a microprocessor given enough transistors, solder, and time then C (or even assembly) is the way to go. If you could probably build one given the parts to put together and even understand a little bit how they work C is still an excellent choice. If you know kinda what is going on in there but no real details C++ is probably a better choice. If it is a black box of mystery Java is the way to go. at least for now.

What about Python? or Ruby? are you doing Web work where PHP would work better?

I don't have enough detail to recommend any one language.



_________________
ArchLinux x86_64 - Custom Built Desktop
ArchLinux x86_64 - Compaq CQ50 Laptop
ArchLinux i686 - Acer Aspire One Netbook
ArchLinux i686 - Dell Presario ze2000 (w/ shattered LCD)

PuppyLinux, CloneZilla, PartedMagic, DBAN - rescue thumbdrives
Windows 7 (x86_64 desktop alternate boot)
Back to top
View user's profile Send private message Visit poster's website
VHockey86
Advanced Member


Joined: 12 Dec 2024
Posts: 988
Location: Rochester

PostPosted: Thu Dec 03, 2024 7:27 am    Post subject: Reply with quote

Lord.DragonFly.of.Dawn wrote:

I don't have enough detail to recommend any one language.

Normally I'd make a biased push for Python, but since you don't want to hear about that Smile

I personally don't like Java, however I think it's definitely a lot less archaic than C++, and easier to learn. It's more "purist" OOP too, kind of enforces OOP by nature of the language, whereas C++ is more of an OOP hack on top of C...and don't even let me get started on the mess that is templating. Compiling/linking and the overall build process for C++ is a bit messier too, and varies from distro to distro (library locations, etc) and is even worse when you do anything cross-platform.

Eclipse makes programming in Java very easy (good auto completion, shows syntax errors without compiling, etc) - I've never found an IDE for C++ that didn't seem like a big mess, but then again I haven't done much c++ in quite some time. You can add plugins to eclipse for doing GUI design and stuff in Java, and the libraries are all part of the standard library, no need to worry about the system having QT or GTK or whatever installed.

In Java you tend to get much more helpful compiler errors than GCC. Run-time errors always throw some sort of an exception in Java, making it easier to debug. Get used to seeing "segmentation fault" in C++ if you're not really careful about memory management, pointer arithmetic, etc.



_________________
Main Desktops : Kubuntu 10.4. ArchLinux 64-bit. Windows7 64-bit. Windows XP 32-bit.

MacBook: OS X Snow Leopard (10.6)
Back to top
View user's profile Send private message
Jeff K USA
New Member


Joined: 30 Nov 2024
Posts: 19

PostPosted: Thu Dec 03, 2024 2:47 pm    Post subject: Reply with quote

Alright thanks.
From the replies I can tell I want to start with Java.
I am clueless when it comes to building a computer.
Also I am not very tech savvy.
Hopefully programming will open doors to learning more about the computer.

Now time to get a free copy of eclipse. Very Happy

Anyways thanks guys!!



_________________
Fedora 12 Desktop Edition
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Shell Scripting and Programming All times are GMT
Page 1 of 1

 
Jump to:  
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
All content © 2024-2009 - Usa Linux Users Group
This forum is powered by phpBB. © 2024-2009 phpBB Group
Theme created by phpBBStyles.com and modified by Crouse