So I'm learning C++ and Java.....

15357

Companion Cube
Joined
Jan 11, 2005
Messages
15,209
Reaction score
23
Having taught myself Basic and Visual Basic, I thought it was time to move on to greater things. I'm currently done with the basics of C and starting Java, (now currently more oriented toward Java) and finding Java to be a more hard than C.


Anyway, is there anyone else who pursues knowledge in these things?

Also, what compilers do you use? I'm stuck with Microsoft Visual Studio + MSDN Library (c) circa 1990s. It's the only compiler for C/C++ I know of anyway. Eclipse for Java.

Oh yeah, are there any books that teach you the advanced aspects of C++/Java so that I can get them when I'm done with the basics?

I don't really know why I'm doing this though, it's almost next to useless for me in getting a job.... I guess it's a hobby of sorts. I love the knowledge that I can create programs. :D

I guess my goal is to making a little enjoyable, free game that will make 20 minutes of people's lives a little bit more happier. :p






Oh, on a side note, is this the right forum?
 
I am using my Visual C++ 2008 Express Edition, because you need that or 2005 for Source, and it's free. http://www.microsoft.com/express/download/

I am not all sure what you could find more difficult in Java, except that it relies right from the beginning on classes. Classes are very important and useful even in C++. You shouldn't bother with Java, though, cuz it's silly.
 
Oh cool. I didn't know that was available for free. :D Thx.


Also, Java........ it confuses me a bit, because whereas C is neat and tidy, Java is.... I dunno. Dirty. :p
Anyway, since I have a lot of books on Java already (all from my father, who teaches Computer Sciences at a university), I think I'll stick with learning it until I'm content.
 
I know a decent amount of java and another decent amount of javascript (which is dissimilar to say the least), Au-heppa is right in saying Java is pretty worthless though, spend your time focusing on C++.
 
I started learning C++ by myself out of curiosity. I learned the most basic things, how to program simple programs that run in the DOS console, such as calculators and other useless things. However, when i took it to the next step to learn and use classes, thats were i hit a brick wall and lost all faith in it. Maybe it was the books/tutorials that i read, or maybe it was me, but that shit makes no sense to me whatsoever. I crunched hours upon hours of that stuff, but the shit simply...did...not...work.

Gave up. Occasionally i try it again, only to smash my head on the keyboard.
 
I know a decent amount of java and another decent amount of javascript (which is dissimilar to say the least), Au-heppa is right in saying Java is pretty worthless though, spend your time focusing on C++.

Hmm, really? My father seems to think the very opposite. Oh well, I like C++ better than Java anyway. :p

Ravioli said:
I started learning C++ by myself out of curiosity. I learned the most basic things, how to program simple programs that run in the DOS console, such as calculators and other useless things. However, when i took it to the next step to learn and use classes, thats were i hit a brick wall and lost all faith in it. Maybe it was the books/tutorials that i read, or maybe it was me, but that shit makes no sense to me whatsoever. I crunched hours upon hours of that stuff, but the shit simply...did...not...work.

Gave up. Occasionally i try it again, only to smash my head on the keyboard.

Yeah, classes are hard for me as well. I kinda don't see the point of classes.
 
You'll undoubtedly see the point of classes once your programs get big enough, especially if you end up writing any type of game engine. Classes really work well when you have a whole bunch of things in your world that have the same basic underlying behavior. For example, all sprites in a 2D game need to collide with the world and get drawn and have assets such as bitmaps or textures, so these would be written into a base class so you would only have to implement that part once (for all classes that inherit from a Sprite class, that is).

Java is actually quite a bit easier to hit the ground running with classes, and learning the language first in my college curriculum I actually found it to be "neater" than C++, but that's just me. Still, C++ is far more useful of a language to learn.
 
I concur with Mutoid Man, classes are a very important part of C++. Granted, I've only been programming in the language for 2 years now, but even with the small programs I have made (one was a randomly generated dungeon crawler of sorts), classes are a much more efficient way to code various commands.
 
Why do you guys say Java is worthless? I know a lot of the national laboratories I work with use Java very enthusiastically for their control systems.
 
Java is great when you need a stable system that will work on multiple platforms. But its not so great when you want to target a specific platform and you want to do it efficiently (like writing games) . I agree with the fact that Java presents the concepts of Object Oriented Programming better than other languages but thats mostly due to the fact that everything is watered down.

We use classes for two main reasons :-

1) To create Abstract Data Types . Imagine if you had to write a program to store both the names and ages of people. You could try to do this by storing the data in two seperate arrays , one for names and one for ages. But you will quickly find that everytime you update one array you will also have to ensure it is synchronized with the other array and if you have more fields (name, age , address , occupation etc.) you will have to keep track of more arrays. The problem here is that the different data types can not be stored in the same array and handled collectively. Now with classes we can wrap all the different fields (name , age ,etc.) into one variable allowing us to easily manipulate fields and process the data. So it allowed us to take several atomic data types like int , float , string etc. and create one big abstract data type.

2) Information Hiding... you can read more about encapsulation here : http://home.cogeco.ca/~ve3ll/jatutor4.htm
 
Java is great when you need a stable system that will work on multiple platforms. But its not so great when you want to target a specific platform and you want to do it efficiently (like writing games) .

Java is plenty efficient for anything you could possibly hope to do as a hobbyist. In fact, a non-trivial Java program written by an amateur will be a LOT faster than a C++ program written by an amateur. For C++ to be faster than Java, you'll be writing custom memory allocators and compiler intrinsics / assembly for SIMD.

That said, I greatly prefer C# and the .NET framework over Java.
 
Java is plenty efficient for anything you could possibly hope to do as a hobbyist. In fact, a non-trivial Java program written by an amateur will be a LOT faster than a C++ program written by an amateur. For C++ to be faster than Java, you'll be writing custom memory allocators and compiler intrinsics / assembly for SIMD.

That said, I greatly prefer C# and the .NET framework over Java.

I completely agree , i was just trying to explain where its used in the industry . Java is great for targeting multiple platforms and with all the new innovations in its compiling tool chain (like the JIT) its performance has seen a large gain since it first came out. I dont like the philosophy behind C# they should have contributed to the existing project instead of trying to reinvent (or copy in this case) the wheel .
 
I use bloodshed/visual studio with C++/C. Haven't tried Java, but C++ is a godsend thanks to the asm command. Got anything that needs a lot of processing? Assembly to the rescue! Of course assembly is slower to write and you have to have a good grasp of your CPUs architecture.

Also if you find it hard to understand object oriented programming you should try something like Python. Really easy syntax to learn and build for OOP. Plus the code you write with it is like 70% shorter than with C or C++, really neat language to do some prototyping.
 
I'm studying to become a computer engineer, and right now I'm learning C using CodeBlocks and DevCpp. I've done some C++ learning by myself though, for which I use Visual C++ Express Edition.

C++ is awesome. It's powerful to high heaven and useful for almost anything. I can't wait to learn the whole language and start making my dream game "Mongolian Wars". BTW, if you're a hobbyist I'd say some Photoshop skills would come in real handy for making GUI's and such.
 
Java is plenty efficient for anything you could possibly hope to do as a hobbyist. In fact, a non-trivial Java program written by an amateur will be a LOT faster than a C++ program written by an amateur. For C++ to be faster than Java, you'll be writing custom memory allocators and compiler intrinsics / assembly for SIMD.

That said, I greatly prefer C# and the .NET framework over Java.

I love C#! And so by extension, I love you.
 
I dont like the philosophy behind C# they should have contributed to the existing project instead of trying to reinvent (or copy in this case) the wheel .

.NET is not a clone of Java and has a very different goal. From the start, .NET was designed to be language agnostic, while Java was designed to be platform agnostic.

.NET is not "Java by Microsoft". And when you look at C# closely, it's probably more like C++ than like Java, with elements from other languages like Delphi.

Besides, when .NET was being developed, Java wasn't even open source.
 
And thankfully .NET can theoretically be platform agnostic too... but really, who wants to make applications for filthy Linux users and dirty, dirty Macintosh users?

I started up studying LINQ again and it's so unbelievably awesome.

http://blogs.msdn.com/charlie/archi...sberg-on-linq-and-functional-programming.aspx

In this interview Anders explains, in terms that all programmers can understand, why LINQ and functional programming will change the way we develop applications. As Anders sometimes says, functional programming allows developers to describe what they want to do, rather than forcing them to describe how they want to do it. If you are interested in LINQ, lambdas, expression trees, deferred execution, composability, functional programming or concurrency, then you should watch this interview.
 
Back
Top