Which programming language to learn?

Status
Not open for further replies.
I'm having an itch to attempt to learn a new programming language. So far my only experience has been as a hobbyist with ActionScript, some webdesign (HTML, CSS, PHP), and a C++ class at my college that I didn't do so well in.

I'm working as an artist with a group making an indy game and we're using Unity as our engine. Unity equally allows for JavaScript, C#, or Boo (a Python-based language, apparently) as it's scripting language. I figure this is a good chance for me to get familiar with one of these well enough to insert my own art into the levels.

I'm leaning towards JavaScript because it would have a use in helping me regain my footing in web design if I ever need/want to. I know C# can be useful, but I'm not feeling excited about it as I would if it were Java because I'd rather learn something that isn't windows-specific.

What are your guys' thoughts on what might be a more useful language to start learning in the long term?
 
I'm familiar with C, C++ and Java, I don't have any experience with C#, but from what I understand, it's like the bastard child of java and C.

I'd recommend Java, personally. I found that much easier to program with than I'm finding C++. I think Java would probably translate more easily to learning other object based programming, such as iOS development and such.
 
Are you interested in learning in order to practice programming technique? Some languages lend themselves to the process of learning more than others, so it's important to decide whether you are choosing a language to learn that language, or to learn programming.

--Patrick
 
Right now I think I'd have to say to learn programming. It would be nice to choose one of the three with immediate beneficial use, but we do have a dedicated programmer on board who could probably breeze through things it would take me hours to figure out if I just let him take care of it. It may be better for our start-up in the long run if I get programming in general down first.
 
For your specificuoses, I'd go for JavaScript. It's universal, relatively easy, very well documented, and it will be more useful for you down the road than C# or python, although those are both valuable in their own way.

I'd vote for C# second. The will always be a job for those programmers that know C#. Python jobs are a little harder to find.

I suspect that C# is going to be a little more powerful and speedy though, so if you are planning on making more than just a simple game, you might want to take a second look at using C# for it.

You really can't be the cross platform capability of JavaScript, though, especially given how good the current JavaScript engines are these days.
 
I just finished up a C++ exam and boy, do I miss the object library of Java. Inheretence in Java is sooooo much easier.
 
I talked to the project leader about my interest in it and he said C# would probably be the most beneficial for our purposes. I've gone ahead and started reading a tutorial book for it and will see how well I can start grasping it.
 
If you're going to be working with Unity and don't want to get platform specific I'd recommend Python.

JavaScript is insanely flexible and powerful, but also soul crushingly difficult and strict (not a contradiction, the language allows for some interesting things, but that also means it's easy to break the parser if you're not careful). JavaScript is also an incredibly useful language to learn, good to learn if you've got tough skin.

Python is an awesome scripting language, easily does some things that are big PITA and time wasters in other languages. Its string manipulation is amazing, and you'll never have to type a curly brace.

C# is a good language. Comparable to Java, your big advantage here is Microsoft Visual Studio and .NET.

Java is another good language. Cross-platform (largely, there's edge cases, but you'd most likely never hit them) and a solid Object Oriented language makes Java ideal for learning. Most people will cite performance issues with java applications due to the cost of running on the JVM (Java Virtual Machine), but the truth is that it has become negligible for most applications over the years due to performance improvements to Java and the fact that computers have gotten exponentially faster since the mid-90s. Unless you're writing a AAA quality game you shouldn't care. Minecraft is written in Java. Many large-scale enterprise applications are also Java.

C is the low level language. Direct access to memory makes it powerful and efficient. If you need performance you want to write in C or for Object Oriented programming, it's younger brother C++. Things that are easy in nearly every other languages need to be implemented manually (or with helper libraries) in C/C++. A great language to know, not one I would recommend now if you're just starting out.
 
I may start looking into learning C# on my own after I'm finished with my C++ class. I'll state for the record that I HATE, HATE, HATE C++.

I know it's good for me to know it for understanding exactly how memory is managed, but jesus christ is it a pain in the ass.

I'll probably be getting a C in that class (heh) when I got an A in my Java class.
 
Is it weird that I'm having an absolute blast with the codecademy website? I wish could have found a tutorial site like this for ActionScript when I was trying to get into flash game programming.
 
Is it weird that I'm having an absolute blast with the codecademy website? I wish could have found a tutorial site like this for ActionScript when I was trying to get into flash game programming.
Codeacademy rocks. Some of the lessons are better than others, but it's been my favorite way to learn a language so far.
 
I still have nightmares of learning to code in C. All... those... pointers...

Now that I think about it, my university course throwing us right into the deep end by having us start with C might have contributed to me flunking out.

/personal responsibility sucks anyway
 
Programming is fun.
Until you get stuck on a bug or hit a limit of your chosen language.
Then it can be frustrating.

--Patrick
 
I actually had fun doing java programming, but C/C++ is kind of kicking my ass right now.

Doesn't help that my professor is straight out of Russia and doesn't come close understanding student questions enough to explain answers to them. I swear that dude THINKS in binary.

Great mathematician, but not so great teacher.
 
I had a similar problem with my c++ professor. She was a lady from China, spoke English pretty decently, but was bad at it just enough that exchanging a conversation with her took some effort and rethinking how to explain a problem I was having. She seemed like someone who mastered the language in a classroom, but had only very recently started having practical experience with native speakers in it.
 
Bless his heart, you can tell that he's trying his best to understand what you're asking and wants to help you, but he's just not very good at it.

Sometimes I just think I should have taken a nice, easy communications or literature minor, but those classes don't challenge me. I came back to college specifically to be challenged. Let's just put it this way. I've been on the deans list for the last 2 years even with a semester of Cs and Ds from back when I was young and stupid and left college the first time. I've gotten all of 2 Bs so far. With that in mind, I'll be getting my first C since returning to school in his class. I could possibly pull it up to a B if I ace the final, but yeah... shit be hard.
 
Wish me luck, I have a programming competition this weekend and my prof is giving us extra credit for every java program we successfully get to compile and run. If I play my cards right, I could change that C into a B.
 
Code:
//Beginning Game Programming, 2nd Edition
//Chapter 2
//HelloWorld program
#include <windows.h>
 
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    LPSTR lpCmdLine, int nShowCmd)
{
    MessageBox(NULL, "Motoko Kusanagi has hacked your system!", "Public Security Section 9", MB_OK | MB_ICONEXCLAMATION);
}
Any ideas why this gives me a fail error when I try to compile with Visual Studio C++ express 2010, but Dev-C++ compiles and creates a windows pop-up for me just fine? VS gives me this output:
1>------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
1>LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
1>c:\users\david\documents\visual studio 2010\Projects\HelloWorld\Debug\HelloWorld.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
You're missing the required libraries in your VC++ project. You can add them in the project settings or right clicking the references in the solution explorer.
 
I've finished through most of the codecademy javascript course and for practice and am trying to write a script to make a text adventure game. Still mostly pseudo code so far.

Code:
items {
description: "string to use after examining item"
locationData: "String for room to use to describe item"
canTake: true/false //determines if player can pick up the item
}
 
locations {
description: "string to use when entering location"
items: [array of items inside of location]
exits: [array of directions that lead to new locations]
}
 
player {
inventory: [array of items in player's inventory]
equiped: [array of items the player is wearing]
}
 
 
//The player should be able to input [VERB] [OBJECT] syntax for commands.
 
var commandLine = ""; //the player's input
 
var commandVerb = ""; //the player's action
 
var commandObject = ""; //object the action is on
 
var parseCommandLine(commandLine){ //splits the player's command into a verb and object
    this.verbStop = commandLine.indexOf(" ");
    commandVerb = commandLine.subString(0, this.verbStop);
    commandObject = commandLine.substring(this.verbstop + 1, commandLine.length);
    performAction(commandVerb, commandObject);
 
    this.getItem = function(commandObject){  //moves item to player's inventory
        player.inventory.push(commandObject);
        for (var i = 0; i < locations.items.length; i++){
            if (locations.items[i] === commandObject){
                locations.items.splice(i, 1);
                break;
            }
        }
    }
       
}
 
//Takes an action and calls for the appropriate response from the targeted object
var performAction = function(commandVerb, commandObject){
    switch(commandVerb) {
   
    case "examine":
    console.log(commandObject.description);
    break;
   
    case "take":
    if(commandObject.cantake === true){
        getItem(commandObject);
    } else { console.log("You cannot take the " + commandObject); };
    break;
 
    case "inventory":
    for(var i = 0; i < player.inventory.length; i++){
        console.log(player.inventory[i]);
    };
 
    default:
    console.log("I don't understand what you're saying.");
   
    }
 
 
}
 

Necronic

Staff member
This is an old thread, but I thought I would throw something out there. Learn SQL. It's ridiculously easy to learn and it's invaluable for working with databases (which most programs do at one point or another.) It's not a proper language, but it's something you should be able to execute from C# or Java or whatever.

Also screw Java . Sun was terrible about updating their libraries.
 
C is the low level language. Direct access to memory makes it powerful and efficient. If you need performance you want to write in C or for Object Oriented programming, it's younger brother C++. Things that are easy in nearly every other languages need to be implemented manually (or with helper libraries) in C/C++. A great language to know, not one I would recommend now if you're just starting out.
I'm in way late here, but if you consider C++ to be "C with Classes" (I'll admit that was literally the early name for the language) you are doing a MASSIVE disservice to C++ as it is today. Templates alone offer a staggering amount of flexibility, though as with most things in C/C++, they give you enough rope to hang yourself with, and then some (and hang your friends, and your neighbors, and your city, and...). But I always feel like the language trusts YOU to be "not an idiot" rather than giving you the scissors that can't cut butter, which is how I feel in the "coffee" languages. (I saw the "coffee" term when talking about any language on a runtime, such as on the JVM or the CLI, and thought it was great)

I'd say that 90%+ of why people like Java and C# is because of their respective standard libraries. They have stuff to do everything in there, and it's all in one nice documentation spot. Great. But what if you want to do something else? You're pretty much screwed, or you have to link back down to a C/C++ library again. But people haven't LOOKED at the C++ standard library in a long (long) time typically. See here, as that's the modern standard. It does a LOT more than it used to, and is extremely usable for virtually all tasks. Don't see what you need there? Then try boost, which covers nearly everything else and is open source in a good way (use it with anything, non-bitchy license terms). I guess I just wouldn't be afraid of using "helper libraries" because if you're doing "serious" programming you're going to have to do it eventually in the other languages too, and it'll be 10x more painful. But for the hobbyist, you don't need to in C++ anymore either.

Are there a few areas that both Java and C# do better? Sure there are, and I would never begrudge people from learning or using those languages, but don't shy away from C++ just because you think it'll be "harder" there. It probably won't be, and you'll be able to do things that you just can't in those other languages, and the list of things you can't do in C++ that you can do in C# or Java is extremely small (no, you CAN do closures in C++ now. Lambdas that capture variables are in C++11). If you think I'm wrong about that last claim, I really want you to challenge me on that one: name things you can't do in C++ (language, not library, though low-hanging fruit there is OK) that you can in Java/C#. And if you try memory management, I'll pwn you. ;)
 
The internet runs on C/C++ on the low level (routers, etc, aren't running javascript), and for web applications: NaCl from google

That being said, as I mentioned, I'm not saying that there's no places for scripts and such, and they can be extremely useful (there's a reason I know and use Python too), but there's many things you can't do in those that you can't in C++. There's much you can not do without native (C/C++) glue code in those other languages.
 
Status
Not open for further replies.
Top