Best Programming Language to learn first?

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • RE: Best Programming Language to learn first?

      Coincidentally, we were just talking about this at work. If you are brand new to programming, I would recommend a very simple, approachable language like Lua where you can concentrate on basic programming concepts like if/then statements and for loops. One you have a good handle on that, you can switch over to a more full-featured language like C# and start messing with tools like Unity.

      -Rez
    • I'm personally not convinced it matters. My first language was C++, but most people will tell you to start with C#, Python, LUA, VB.NET, etc; because, as Rez said, you can focus on the basics.

      I think the biggest benefit of starting with something more complex like C/C++ is that you are forced to learn a lot of good programming practices along the way just so your code doesn't segfault every time you compile.

      A guy I work with wants to get into IOS development, but he's only ever written code in C#, and some basic javascript/JQUERY. I doubt he could write any sort of complex app that didn't leak memory like a sieve.

      That's just my opinion anyway, I guess there are positives and negatives for going either route.
    • Like previously mentioned, I learned C++ first, technically HTML, PHP etc, but my first real programming was with C++. They are right in that if you learn how to program in Lua or another very high level language, you may miss out on some of the more complex issues like memory management, however if you have trouble getting started in lower level languages, those higher languages would allow you to focus on getting your logic learned and then focus on the more complex issues, it is completely dependant on your learning style. but either way is a good start
      PC - Custom Built
      CPU: 3rd Gen. Intel i7 3770 3.4Ghz
      GPU: ATI Radeon HD 7959 3GB
      RAM: 16GB

      Laptop - Alienware M17x
      CPU: 3rd Gen. Intel i7 - Ivy Bridge
      GPU: NVIDIA GeForce GTX 660M - 2GB GDDR5
      RAM: 8GB Dual Channel DDR3 @ 1600mhz
    • RE: Best Programming Language to learn first?

      As you can see, there as many opinions as there are programmers. Honestly, it depends on what your goal is. If you want to get into the professional game dev world, you'll need to learn C++ eventually and deal with hardcore memory management. If you're just trying to tool around, it almost doesn't matter what language you choose. If this is a hobby for you, use whatever you're comfortable with. Some amazing games have been written 100% in C# or Python.

      For beginners, I recommend a simple, easily approachable language because most beginners have no idea if they even want to be a programmer. It's certainly not for everyone. With a language like C or C++, there's a lot of overhead to just print something simple to the screen. Here's a hello world program in C++:

      Source Code

      1. #include <iostream>
      2. using std::cout;
      3. int main(void)
      4. {
      5. cout << "Hello World!\n";
      6. return 0;
      7. }


      Here's the same program in Lua:

      Source Code

      1. print("Hello World")


      Here's a program that asks for your name and prints it out in C++:

      C Source Code

      1. #include <iostream>
      2. #include <string.h>
      3. using std::cout;
      4. using std::cin;
      5. int main(void)
      6. {
      7. char name[128]; // hopefully we don't go over 128 characters....
      8. memset(name, 0, 128); // clear out the memory
      9. cout << "What's your name?\n";
      10. cin >> name;
      11. // print a special message if this is DaKai
      12. if (strcmp(name, "DaKai") == 0)
      13. cout << "Welcome " << name << "!\n";
      14. else
      15. cout << "Hello " << name << "!\n";
      16. return 0;
      17. }
      Display All


      And here's the same program in Lua:

      Source Code

      1. print("What's your name?")
      2. name = read()
      3. if (name == "DaKai") then
      4. print("Welcome " .. name)
      5. else
      6. print ("Hello " .. name)


      See the difference? Languages like Lua let you focus more on the actual algorithm and programming aspect instead of all the nuances of things like memory management. Yes, learning memory management is very important, but right now you really just want to see if this whole programming thing is something you want to do. That's why I think you should start simple and them jump into the deep end when you reach the limits of languages like Lua. Honestly, as a professional programmer (or enthusiastic hobbyist), you'll end up learning several languages. Start with something simple that lets you express what you want without a lot of headaches.

      -Rez
    • They are completely different languages that look a bit similar. C++ is a lower-level language that is a bit closer to the hardware while C# is higher level.

      -Rez
    • RE: Best Programming Language to learn first?


      For beginners, I recommend a simple, easily approachable language because most beginners have no idea if they even want to be a programmer.


      This is very true. The second CS class at my college, was nicknamed the weed-out class. It never failed, the class would always go from 40-50 students down to 20 or less by mid-terms.

      A friend of mine actually made it through this class with some help from me. But decided to switch majors to EE during the third class. I think she could have stuck with it, but I guess she just didn't have the interest.

      By the time I graduated, I was taking classes with 15 or fewer people.
    • One of the biggest differences between C++ and C# is the way they are converted into language the machine can understand, when you make a C++ program, you must press the build button, which converts your C++ into machine code to which is very at run time, C# (Never used it so correct me C# vets) gets converted to machine code at the time the user runs the program, don't ask me what the advantage of this is, but it is definitely slower.

      Also C# manages its own memory, where C++ you do this yourself
      PC - Custom Built
      CPU: 3rd Gen. Intel i7 3770 3.4Ghz
      GPU: ATI Radeon HD 7959 3GB
      RAM: 16GB

      Laptop - Alienware M17x
      CPU: 3rd Gen. Intel i7 - Ivy Bridge
      GPU: NVIDIA GeForce GTX 660M - 2GB GDDR5
      RAM: 8GB Dual Channel DDR3 @ 1600mhz
    • Not exactly. C# is compiled into byte-code which is read by the .NET interpreter and executed at run-time. It's faster than actually parsing the code, but not as fast as executing a program compiled for the machine architecture you're on (which is what C++ does).

      -Rez
    • Some day I will break into C#...I have tried to twice now, and have trouble even looking at it, I guess I am just too stuck in my old ways
      PC - Custom Built
      CPU: 3rd Gen. Intel i7 3770 3.4Ghz
      GPU: ATI Radeon HD 7959 3GB
      RAM: 16GB

      Laptop - Alienware M17x
      CPU: 3rd Gen. Intel i7 - Ivy Bridge
      GPU: NVIDIA GeForce GTX 660M - 2GB GDDR5
      RAM: 8GB Dual Channel DDR3 @ 1600mhz
    • If you are new to programming I usually urge people to look at C# or Java to learn OOP and then move on to C++. I find that C# and Java are much more forgiving and easier to understand than C++ which is so different from the newer high level languages. There is also such amazing documentation of Java and learning resources available.
      - Matt G.

      The post was edited 1 time, last by Debunez ().

    • Hello there

      Many languages to choose from today, but i would still vote for C++, very powerful language that works well for utilities, to "office apps" to games.

      Myself at the age of 42 i have tried many laguages, to name a few c, c++, java, cobol, assembly(turbo assembler mostly), C#, vb but when i made my MQ monitor at work i turned to C++ since the code had to compile on Aix, i used C++ builder to write the code on my laptop using windows 7, then copied the source file to aix and compiled it using gcc, one minor change had to be done to compile, C++ is rather portable unless you use the managed version in Visual studio, but then it is like a totaly different language, at least to me :)

      For me in the end C++ is likely the language i feel most at home in, c for instance with all the printf %somethingortheother drives me nuts :) i gave up on c a long time ago cause it felt frustrating to code in it, c++ feels good, c# reminds me a bit of c with the {0} stuff, cobol is fun to with close to english syntax but i doubt there are any games written in it :)
    • Regarding the benefits of byte code (C#, Java, etc.), is that it allows a program to be compiled down to something that is quick to interpret by a computer, but platform neutral. In C++ when you compile something, it is tied to a specific platform. In most cases this will be something like x86 Windows, or x64 Windows. However with byte code, when you compile a C# exe, it can be either x86 or x64 Windows, and it just decides at start up. Similarly, you could take that same byte code and run it on Linux using Mono (provided the same referenced libraries are available).

      Another promising area for byte code is the option to do very architecture specific optimizations. For example, if a new Intel processor came out with some fancy way of doing something, but it wasn't available on any older processors, you'd have two choices in C++: Use that extension and have to build two versions of your application, one using it and one not using it, or just build a version of your application that doesn't use it so that it works on all the processors. With something like C#, you can just build one version, and then the JIT (Just In-Time compiler) can decide whether to use the optimization or not, allowing for potential optimizations without having to build a bunch of different versions.

      Hopefully that helps,
      James