NSFCD

Generally Speaking => Power On => Topic started by: Lotos on April 06, 2010, 07:44:17 AM

Title: Which C('s) should I teach myself?
Post by: Lotos on April 06, 2010, 07:44:17 AM
C, C#, and/or C++?

I'm not liking Java too much, mainly because its GUI doesn't conform with the other languages, the little icon popping up for applets, and that I can't work with it at home as it keeps saying stuff like "error in main" or it can't find the runtime.  Still, remember that I have a little bit of Java knowledge and my two main OSes are Windows 7 and Ubuntu (might be XP soon if my father gives me the newer old computer) when suggesting.

Anyway, I heard that you should learn C if you're going into Computer Science.  I heard that you can get C and C++ confused with each other.  I know that C can be used with Lua, which I would like to learn.  I also heard that C# is similar to Java and can be used to make XBL and PC games.

Care to help me?
Title: Re: Which C('s) should I teach myself?
Post by: bluaki on April 06, 2010, 07:49:26 PM
C is amazing. The core of modern programming languages. Learn it first.

C++ is also good. For the most part, C and C++ are directly forward-compatible, and C++ adds object-oriented concepts that C originally lacked (but unlike Java, not everything has to be in a class and you can altogether ignore OOP). Object-oriented programming is apparently somewhat useful for GUI applications and games and there are more C++ libraries than C libraries out there for such tasks.

I don't know anything about C#, but it doesn't look too interesting to me. C++ seems to have all necessary features of OOP and most C# code is for Microsoft .NET or similar stuff.

What do you mean the GUI of Java doesn't conform with the other languages? Are you referring to Swing? I haven't tried messing with any GUI libraries yet with C, but I hear GTK+ is good for it and Qt is good for C++. As for compilers, stick with either GCC in Linux (it's included in all installations) or MinGW (a port of GCC) for Windows. I personally don't use an IDE and just compile via command-line.

I'm, personally, still learning basic C. Haven't tried using very much of the standard libraries nor any type of import library and I haven't done anything in terms of advanced data structures and advanced pointer sequences. Though, out of what I've learned about Java from AP Computer Science, things I can make in C currently include anything I'm able to make in Java and more. I haven't even attempted to start messing with C++
Title: Re: Which C('s) should I teach myself?
Post by: Lotos on April 06, 2010, 08:20:04 PM
Quote from: bluaki on April 06, 2010, 07:49:26 PM
What do you mean the GUI of Java doesn't conform with the other languages? Are you referring to Swing?

It doesn't look like it is a standalone program in my opinion.  Take a look at Tile Molester's GUI. (http://randomhoohaas.flyingomelette.com/ripsprites-tilemolest01.PNG)  That's what I mean.  Never mind.  It looks more normal.  The outer window had the metallic look too which I disliked.

Edit:  Damn ADD.  I forgot to mention that swing makes me want to KILL people.  It's too confusing and I can't figure out how to combine stuff.  We had to learn by examples we found on the web.  I hope he didn't teach the normal class this, because I must have missed it.  The AP class read something on it I think though.

Quote
Though, out of what I've learned about Java from AP Computer Science, things I can make in C currently include anything I'm able to make in Java and more.

But you're a genius as far as I know.  How long should it take me to learn (weeks, months?)?
Title: Re: Which C('s) should I teach myself?
Post by: Silverhawk79 on April 06, 2010, 08:52:13 PM
C++ is the easiest to learn, or so I've heard. It's also the most widely used out of them all.
Title: Re: Which C('s) should I teach myself?
Post by: bluaki on April 06, 2010, 09:27:50 PM
Quote from: Lotos on April 06, 2010, 08:20:04 PM
But you're a genius as far as I know.  How long should it take me to learn (weeks, months?)?
I don't have any "normal programmer" familiarity outside of my AP Computer Science classmates. Who can't figure out on their own how to properly use conditionals and loops, let alone separate methods/functions, to make a program that does simple tasks like generating a list of prime numbers within a range.
And those people are taking this long to learn those simple concepts which apply to any programming.

If you can figure out stuff like that well, it shouldn't take more than a couple weeks. From what I know so far in C, you can compare it to previous knowledge of Java and say that, in comparison to Java, C has, most basically:


Side note: this is my first post on my new IP address. I miss 72.77.233.6 ;___;
Title: Re: Which C('s) should I teach myself?
Post by: PsychoYoshi on April 10, 2010, 05:18:45 PM
Quote from: Silverhawk79 on April 06, 2010, 08:52:13 PM
C++ is the easiest to learn, or so I've heard. It's also the most widely used out of them all.

Uh, no. C++ and C# are both object-oriented languages, so you need to dick around with classes and other poop (even though it's not nearly as bad as Java), therefore they're harder to learn than C. As my father explains it, when you program in C, you're creating verbs for the computer to use. When you program in C# or C++, you're creating nouns.

C# is more limited than C++ is, but it has a few safeguards built-in that prevent you from intercourse ing up and causing as many errors as you might potentially cause with ++. It's used in embedded a lot, but it's not nearly as prevalent as C++ is, as Blu said.