Sign in to follow this  
dtg108

Best language to start programming in?

Recommended Posts

dtg108    394
So, I find myself walking back to the beginners section of the site again. Anyway, hey guys. I'm making a game at the moment, and I'm the team leader/animator/writer. I have a question. I want to learn how to program (for gaming, and eventually, hopefully, I can build an engine.) I know I will have to start small, but I want a language I can stay with so I don't have to keep switching around. What is the best language for me to start? NOTE: I know absolutely NOTHING about programming. NOTHING. What is a good language to learn?
Thanks, guys.

Share this post


Link to post
Share on other sites
thedude018    100
I'm not sure if i read that write, but did you say you were a programmer for a game? Anyway, i started with Java, it's simple, and more importantly, it's in everything. My only advice is download sample .javas and try to interpret how the game/program will work. If your into it, download Minecraft ([url="http://minecraft.net"]http://minecraft.net[/url]) and decompile it, then look at the code, it is definitely one of the easiest codes to understand, because once you get it, it just clicks. Also, if your very ambitious, make a mod for minecraft and release it somewhere and most importantly ACCEPT CRITICISM because it will ultimately make you better, anyway, Good Luck!

Share this post


Link to post
Share on other sites
Khaiy    2148
Honestly, it doesn't really matter if you're starting from no experience. I like C#, very easy to pick up, others like Java and Python. All have a good selection of libraries that you can use to get to game-making (relatively) quickly. I personally recommend C# with SFML, but I hear great things about Python and PyGame.

No matter which language you pick, you won't have to do any switching around. You can make a game in any language.

Share this post


Link to post
Share on other sites
alvaro    21246
You shouldn't be afraid to start with a language and then having to learn another one. Learning languages is easy: Learning programming, on the other hand, is pretty darn hard.

And now for the part that is totally my personal opinion and nothing else ;) . For people that want to eventually be great programmers, I recommend C, but I know this is not popular advice. If you want to get your feet wet with programming but don't want to learn every little aspect of how things work, perhaps Python is a better choice. I would stay away from Java because I don't like it and because I don't like how people who learned Java first tend to program. C++ is a terrible choice for a first language, because it's just too hard to learn. Edited by Álvaro

Share this post


Link to post
Share on other sites
PwFClockWise    512
It depends on what kind of games you are set out to do. I like C++ and started without programming experience. On the other hand I study programming, but still ^^. C++ is one of the widely used programming languages when it comes to triple A games. On the other hand C, C# and C++ are quite similar and once you know one of them transitioning into another isn't hard.

I would recommend C++, good luck!

Share this post


Link to post
Share on other sites
Aldacron    4544
I second the recommendation for C. I came to programming rather late at the age of 27 and the first language I started learning (on my own) was Java 1.1 back in '98. I thought I had grasped the concepts pretty well, but it wasn't until I started digging into C a few months later that I realized just how little I knew. I have still used Java off and on over the years, professionally and otherwise, but it does mask some fairly important concepts from you. Some of it is because of the way Java is designed, but it's also because of the wealth of classes in the standard library. No need to roll your own list when there's a perfectly good one sitting there in the utility package. In C, there's a great many things that you just have to do yourself (memory management) and others that it's usually just easier to do yourself (making lists). But most of all, I understood Java a helluva lot better after spending a few months with C.

In a classroom environment, I imagine Java would be fine since the instructor will usually give you certain restraints within which to work. But when studying independently, best to avoid temptation methinks. If I had to to it all again, I would start with C first. It's not that difficult to learn if you have a good book at your side (or, these days, a good web site) to get you through the rough spots. Stephen Prata's C Primer Plus is a good one to go with (and the latest version covers C99). And there really aren't that many rough spots.

I mostly work with D these days and rarely touch Java anymore. But I still love C. It can be extremely tedious to work with on a large scale and isn't really practical for as wide a range of tasks as it used to be, given the number of better-suited alternatives out there. But I really believe it's the best place to start. Some say that learning C first is rather like learning to swim by jumping into the deep end of the pool, whereas learning Java or Python first is more akin to playing around in the shallow end. It's an interesting analogy, but I don't see it that way. My take is that Java and Python have certain constraints imposed by the languages themselves which, while not necessarily a bad thing, can be mistaken by beginners as part of the process rather than understood as being quirks of the language. C has none of that, so you can see as much or as little of the bigger picture as you are comfortably able. After some time with C, moving on to Java, Python, C# or whatever language you want will be rather simple. Not so easy the other way round. Edited by Aldacron

Share this post


Link to post
Share on other sites
Mizu    1502
C#, Java or Python. Do [i]not [/i]go any deeper than that in the beginning. Both C and C++ has quirks that's too easy to run into, and both of those languages has a tendency to spit out cryptic error messages that might as well be some evil summoning spell for all a beginner knows.

Start out with an easy langauge to learn the basic concepts of programming, then if you realize that you'd rather sit and make your own lists and memory managers and what-not instead of making games, [i]then[/i] you can try out C or C++

[quote name='dtg108' timestamp='1354417683' post='5006196']
I want a language I can stay with so I don't have to keep switching around
[/quote]
Don't be afraid to switch programming language. It's something most programmers do alot ,and as others already have said: it's easy to make the transition once you have learned the basic concepts of programming. Last week, at my work, I had to switch between C#, C++ and lua....

Share this post


Link to post
Share on other sites
Dwarf King    2126
Python is a great language to start out with. It let you focus on the concept behind programming and not too much on syntax issues(which is great in the beginning) while you learn how to think as a programmer. I always recommend this book: http://www.greenteapress.com/thinkpython/

And it is free to use and learn from here and now. That book really got me and my class mates going back then. It did what no other book had done. It really teach you to be a novice programmer and then from there everything can be build upon.

Try it it out [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

Share this post


Link to post
Share on other sites
proanim    455
This is bad question to be asking (no offence), since everyonce will tell you one of their prefered choices. I personally started with BASIC the very old one from begginning of the early '90. Then i started learning C, and after very long time i started learning C++. There is popular opinion that beginners should start with Java, since it is simple. I would recommend you to learn C and over time adapt to C++. Since there is not much difference between C, C# and C++. C# has slightly different syntax but they all do the same thing same way. There are many many lessons with C and C++ that you can find on the internet at any subject of programming.

Share this post


Link to post
Share on other sites
Serapth    6671
[quote name='proanim' timestamp='1354475889' post='5006346']
This is bad question to be asking (no offence), since everyonce will tell you one of their prefered choices. I personally started with BASIC the very old one from begginning of the early '90. Then i started learning C, and after very long time i started learning C++. There is popular opinion that beginners should start with Java, since it is simple. I would recommend you to learn C and over time adapt to C++. Since there is not much difference between C, C# and C++. C# has slightly different syntax but they all do the same thing same way. There are many many lessons with C and C++ that you can find on the internet at any subject of programming.
[/quote]

Actually, among the more experienced members on the site, the advice is pretty consistent and not just a matter of exposing their favourite programming language.

General consensus is, start with a more programmer friendly language with a good ecosystem ( books, tutorials, etc ), with Java, C# and Python often being recommended, but higher level language like [Java/ECMA/Action]Script and Lua are equally valid. The particular language you choose from that collection isn't really all that important, the skills you learn will be transferable. The vast majority of experienced devs recommend against C++ as a first language, in fact, I can only think of one or two of the more experienced people here that recommend C++ to start. Edited by Serapth

Share this post


Link to post
Share on other sites
Serapth    6671
[quote name='proanim' timestamp='1354475889' post='5006346']
This is bad question to be asking (no offence), since everyonce will tell you one of their prefered choices. I personally started with BASIC the very old one from begginning of the early '90. Then i started learning C, and after very long time i started learning C++. There is popular opinion that beginners should start with Java, since it is simple. I would recommend you to learn C and over time adapt to C++. Since there is not much difference between C, C# and C++. C# has slightly different syntax but they all do the same thing same way. There are many many lessons with C and C++ that you can find on the internet at any subject of programming.
[/quote]

In this day and age, learning C to transition to C++ is an absolutely gonzo choice. They are completely different languages at this point, and for the most part, its the C parts of C++ that make it the ticking timebomb it is today. If you are going to learn C++, learn idiomatic C++ from day one. If you find yourself using a char* or calling new/malloc ( especially malloc! ) in the first month of programming, you are doing it wrong.

Share this post


Link to post
Share on other sites
evanofsky    2913
I recommend [url="http://unity3d.com/"]Unity[/url]! You can get a lot done without any programming at all, but once you learn some programming, it won't hold you back. It's very powerful. It also supports several different languages, so if you don't like one, you can easily switch.

Share this post


Link to post
Share on other sites
superman3275    2061
I suggest you start with Python, C#, or Java.

Python - Great language. You can get so much done so fast. Pygame isn't as good as many other counterparts with other languages, however it's great for beginners. Most people who stick with programming (Especially as a career choice) learn Python eventually, because there's so many things that it can do extremely quickly. However, every language has applications, and none are catch-all, especially Python.

C# - Amazing Standard Libraries. I recommend it, and many engines use it (Unity3D, as an example). Although people are saying XNA is dead, there are many alternatives, and some are better (Monogame, SharpDX, etc.).

Java - I tend to sway towards Java for smaller applications. I don't believe it's that good for learning programming, because after you've learned another language you tend to program better in Java than if you'd learned Java first.

It's not the language that defines you, or that's hard. It's how you learned to program that's important.

Share this post


Link to post
Share on other sites
TheChubu    9446
Something with light manual memory management. It makes easier later switch to managed languages.

So, get a hold of lower level concepts with some language like C++ (pointers, references, pass-by-value, pass-by-reference, procedures, functions, data structures, primitive types, control structures, etc) and then switch to another language that has "automatic" memory management to learn higher level concepts (classes, inheritance, polymorphism, methods, visibility, encapsulation, design patterns, etc). That way you will have all the basics very well covered when you reach higher level concepts.

Share this post


Link to post
Share on other sites
shadowisadog    3217
[quote name='GriefersSuck' timestamp='1354479553' post='5006371']
Probably either C# or Python. C# is better than Python tho... Python is limited more than C#
[/quote]

Sorry but I felt compelled to respond to this. Do you have sources to back up this claim? I see no reason that Python is more "limited" than C#. What metric are you using to establish which is "better"?

To the OP:

The main advice is to pick a language you are most comfortable with and just start writing programs. Like so many have said there are numerous languages and no language is "better" than any other (especially at a beginning level).

I am personally a huge fan of Python. I use it all of the time both at work and in personal projects.

So anyway try them and see which you like best, and don't give up! Edited by shadowisadog

Share this post


Link to post
Share on other sites
Serapth    6671
[quote name='TheChubu' timestamp='1354482529' post='5006391']

Something with light manual memory management. It makes easier later switch to managed languages.

So, get a hold of lower level concepts with some language like C++ (pointers, references, pass-by-value, pass-by-reference, procedures, functions, data structures, primitive types, control structures, etc) and then switch to another language that has "automatic" memory management to learn higher level concepts (classes, inheritance, polymorphism, methods, visibility, encapsulation, design patterns, etc). That way you will have all the basics very well covered when you reach higher level concepts.
[/quote]

I have to say you have that backwards.

Something without *HEAVY* ( if you consider C/C++ LIGHT memory management, what the hell is heavy? Assembly? ) memory management, will make it easier right away, and you possibly wont bother switching later.

For the record, memory management is not what makes C++ hard, it's what makes C++ fragile. It should take an intelligent person about an afternoon to grasp the basics of managing memory in C++. Hell, C# has manual memory management ( in the form of IDisposable or native code ) and it doesn't particularly make the language any harder. The difference is, the language is less convoluted. That is the problem with C++, it's complex, incredibly complex, often on things that should be extremely simple.

Share this post


Link to post
Share on other sites
blewisjr    752
In reality it really does not matter what you choose as long as you stick to it. Every language out there has pro's and con's to it no matter what. They are all really great in their own way. For instance I love Python for it simple syntax and elegant readability. There are cases tho where it's whitespaced based syntax can become rather bad and make things harder to read. I love C for it's simplicity. The language itself is really tiney and easy to get grips with but because of this there is so much more you need to do on your own which will really teach you a lot of useful core algorithms. Ruby is awesome because of the strong meta programming facilites that let you pretty much turn any API into it's only little programming language but when abused like it has been there is really no reason to learn Ruby because every API creates it's own little world now adays.

The overall point is to not fret over the choice just pick something and learn core programming concepts. After that is done you can pick up any other language you want and become fluent enough to use it for a project in very little time. Mastering is another story but you will be able to use it.

As for my recommendations I would say either C or Python but that is because they are my favorite programming languages out of the dozens I have used.

Share this post


Link to post
Share on other sites
TheChubu    9446
[quote name='Serapth' timestamp='1354484479' post='5006399']
I have to say you have that backwards.

Something without *HEAVY* ( if you consider C/C++ LIGHT memory management, what the hell is heavy? Assembly? )[/quote]lol no no, what I'm saying is that just practice basic things about memory management, Its hard to see what is a reference, pointer or what is a value when the language actively tries to abstract you from those things. For example, its easy to do silly things in Java if you dont know well enough when you're using a reference and when you're using a value. Like writing Object tmpObjectCopy = tmpObject; thinking that you just made a copy of your object.

On un-managed languages, the distinction between all those things is more clear. &tmpObject is a reference to tmpObject. End of story.

If you know about manual memory management, I can tell you "In java, objects are passed by reference, primitive types by value" and you'd get it perfectly. Now, if I tell a guy who just started in Java "In c++, you can pass parameters by value or reference, you can pass pointers too if you want" I dont think they'd get it just as easy.

As you said, basic memory management is not hard to understand. My point is that practicing it a little on an unmanaged language can be very benefical once you start with managed languages. It can make a lot of stuff you might encounter a lot clearer from the get go, regardless of their apparent abstraction.

Now, I consider learning both "worlds" important. If someone doesn't want to know about un-managed code, then learning about it probably wont be a pleasant experience for them.

Share this post


Link to post
Share on other sites
BMO    170
Check this out [url="http://www.gamefromscratch.com/post/2011/08/04/I-want-to-be-a-game-developer.aspx"]http://www.gamefromscratch.com/post/2011/08/04/I-want-to-be-a-game-developer.aspx[/url]

I like Python personally. http://inventwithpython.com/ is a good place for beginners. Udacity has some good python courses as well.

Share this post


Link to post
Share on other sites
cgdev    411
I recommend c/c++ if your question aims at performance. At the same time c/c++ is a better language for solving general purpose programming problems. Edited by Alin

Share this post


Link to post
Share on other sites
BigDaveDev    131
I would recommend C++ (specifically, the C++11 standard) as a good place to start off. It's not a hard language to learn. What makes it hard are features that beginners just don't need to worry about. The standard library contains many gems, and there are a plethora of GUI, physics, graphics, etc. libraries available to you as well.

Another benefit with C++ is that, later on, you can expose your library via .dll/.so and interface every language that can load them (Java, Python, Lua, C, D, whatever). That said, why not start with Java and target Android. If you download the package that Google offer, you are good to go. Eclipse makes learning Java exceptionally easy and what you learn from Java, you can take with you to C++, for example.

Point is, make a decision that suits your needs. We will pretty much just tell you what we like based on our experiences - that is, after all, what a general consensus is ;)

Share this post


Link to post
Share on other sites
Serapth    6671
[quote name='BigDaveDev' timestamp='1354561100' post='5006719']
I would recommend C++ (specifically, the C++11 standard) as a good place to start off. It's not a hard language to learn. What makes it hard are features that beginners just don't need to worry about. The standard library contains many gems, and there are a plethora of GUI, physics, graphics, etc. libraries available to you as well.

Another benefit with C++ is that, later on, you can expose your library via .dll/.so and interface every language that can load them (Java, Python, Lua, C, D, whatever). That said, why not start with Java and target Android. If you download the package that Google offer, you are good to go. Eclipse makes learning Java exceptionally easy and what you learn from Java, you can take with you to C++, for example.

Point is, make a decision that suits your needs. We will pretty much just tell you what we like based on our experiences - that is, after all, what a general consensus is ;)
[/quote]

Rarely do I disagree with a post more than I do this one.

What makes C++ difficult is its complexity. Period. You can't simply avoid it either, a new developer gets punched in the face by stuff they just shouldn't have to handle when starting out, such as the pre-processor and the horrifically outdated build/link system. To move past the most trivial of hello world applications, you need to conquer these beasts, and that's just the beginning.

To use a direct example, lets say a user wants to use a 2D library, such as SFML... great!

Now what?

Let's see, now they need to know how to add the library header files to the include path, the library lib files to their library path.. oh wait... which ones? Debug or Release? Multithreaded sor single threaded runtime? Why am I getting these LIBCRT errors all of a sudden??? WHAT THE HELL! Oh crap, SFML isn't compiled for Visual Studio and the shipped binaries are for 2008 and not compatible... ok, now I need to build the library myself. Oh crap, it depends on these other libraries and... oh crap, why is this one library statically linked? What the hell is static linking anyways...? Off to Google!

This might seem like an out there example, but it is EXACTLY what you will encounter if you want to work with SFML with C++.

Now, some might say you shouldn't be working in 2D graphics at this point and with C++ I suppose that is true. However, if you went with say... Python and PyGame, JavaScript or even C#, you will be able to be drawing graphics on screen day 1 and you wont be getting ahead of yourself.



Next up, Eclipse is the devil and beginners should stay the hell away from it. Over engineered, fragile with one of the worst UIs ever made. If you are going to go the Java route and dont want to repeatedly smash your head against a wall, do yourself a favor and use IntelliJ or NetBeans. Only use Eclipse once you are forced to ( and eventually you will be unfortunately. )

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this