Best language to start programming in?

Started by
42 comments, last by Luau Design DF 11 years, 4 months ago
My €0.02 is Python, Java, C#. In that order (of preference, not learning).

Learning some basic C, as to how it handles memory allocation, may help you understand what is going on in hardware too. Not enough people learn that stuff any more.
Advertisement

Although I agree with the spirit of Seraph's post, I recently installed SFML with C++ on Linux and I didn't have any of those problems. The simplest Ubuntu install puts the header files and library files in the standard places, and I just need to add some -lsfml-blah options to my compile command, but I just got them from the tutorial on the SFML website and it worked fine on the first attempt.


alot of things are far easier in Linux these days (Especially application and library installations). If you download the source tarball instead of pulling the dev package from the ubuntu repository you're in for a world of pain though.
My main problem with Linux today is that some developers still seem to think that all Linux users know how to and want to compile their own software, SFML still gets this wrong. (It shouldn't be that difficult to toss up a apt:libsfml-dev link on the website to make life easier for beginners who happen to google for sfml rather than search for it using the package manager).
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

My main problem with Linux today is that some developers still seem to think that all Linux users know how to and want to compile their own software


I agree and if you look at the amount of patches that the packages for Ubuntu or Fedora have to write to get software to compile on their distributions then it will quickly be obvious that it is too awkward to compile from source these days (I blame GNU Autotools for being defective but I digress).

However, this isn't really to do with languages any more. For example, when I had to compile the MonoGame C# binding on Fedora 16, it was a horrible experience!
Much worse than something like the native SDL C library which has been tried and tested on many many distributions and is now extremely portable across them and actually built without any issues.

Though one thing that I thought was cool was the OpenTk Windows .dll worked perfectly on FreeBSD without needing any recompiling. (The best example I have seen of C# being truely cross platform).
http://tinyurl.com/shewonyay - Thanks so much for those who voted on my GF's Competition Cosplay Entry for Cosplayzine. She won! I owe you all beers :)

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.
For a beginner game programmer, the biggest problem is things are just frustrating initially as you are learning new language(s), game development concepts, and game API's (whether low level ones built into a language or something like OpenGL or a higher level toolkit). Learning programming can initially be a frustrating experience so anything that reduces that frustration and gets you seeing solid results is almost always the way to go.

Performance should be the least of your concerns as a beginner game programmer; the goal you need to first overcome is completing a few very basic games. Creating a fully functional, low FPS-performance, basic game in say GameMaker is going to be much more rewarding and get you where you want to be going faster than trying to create a 100 module, C++ / Assembly optimized game using your own custom low-level high performance multi-platform game engine. Your chances of creating the former are not too bad, but of creating the later as your first major programming project are probably about 1 in 10,000.

The first question a beginner should ask themselves is not which language to learn first, but what project do they first want to complete and on what platform. It should be something simple, like Pong or Tetris at most in complexity, and should definitely be 2D, not 3D. Along with this question is which platform do you want to target. XBox / PS are too complex for a beginner as an initial platform; the platform should be either web-based, Desktop PC/Mac, or Mobile.

It's fine to have a long term bigger goal, such as the very common "I want to design and create a MMORPG on Desktop PC/Mac, like World of Warcraft but with far nicer features". Just as long as you translate that long term vision into a very tiny, doable stepping stone. In this case, your stepping stone is first that it means you decided on a target platform of Desktop PC/Mac. Then for your first project, you might do some very tiny 2D game aspect of it, such as a basic Mini-Map where you appear as a dot that can move around it using the cursor keys.

For a 2D game on a mobile platform for a beginner, I would definitely advise Corona (which uses Lua as a development language) to start. You can have something animated move across a scene in under 10 lines of code. Lua is an easy to use high level language that is great for this kind of thing.

For a 2D game on the desktop platform for a beginner, I would choose Love2D, again in Lua. Much like Corona it is very easy to get started quickly even for a beginner and has lots of great advice in its documentation and forums.

For browser-based games, I'm not as familiar but GameMaker would probably be a good starting option.


Over time, you will become more familiar with basic concepts, such as 2D animation, 2D scenes, simple user input, simple game states, programming basics such as variable declaration, loops, and creating functions, and game-wise you will start getting a better sense of what you can realistically accomplish. Eventually, you can move onto other concepts such as Object Oriented Programming and try out some other languages and SDK's to get a broader feel of the available methodologies and tools.
I recommend to learn C from this book C in a Nutshell and would you would need to have access to linux/osx as your development system.
When your through with the 200 pages (part 1) you would have gone from totally nothing to an advance beginner.
What I really like about this book is that you write your example code (getting coding exercise) while reading about the subject.
You could learn C with in a week and if you're fast even less time.

After that you're next step should learning C++, after that OpenGL, then then ... before you know it you are creating games.

You could learn C with in a week and if you're fast even less time.


With prior programming experience, perhaps, and even then I doubt it. As a first language, no bloody way. C is a fairly simple language, but it would still take much longer than a week to learn, and certainly much longer than that to master.

Unless we are seriously stretching the definition of "learn". I mean, you could memorize the C keywords in an afternoon, but I would hardly call that learning the language.

You could learn C with in a week and if you're fast even less time.


Peter Norvig (head of research at Google) has something to say about this.

You could learn C with in a week and if you're fast even less time.
laugh.png
We spend a semester coaching M.Sc. students (who all have previous programming experience in another language) with C, and at the end of that their skills are quite shaky. If we could get them even to that point in a month, that would be awesome. A week would be a miracle.
Based on what you have said I would highly recommend C#, most of the main reasons have been said already, but one thing I think is often overlooked is you can take advantage of web development (if you ever need to) using ASP.NET MVC (not WebForms) which is amazing imo. You also get other libraries and features you can work with such as WCF, Windows Services, SQL CLR Integration etc
C++'s strength is the RAII, and it's weakness's are the C compatibility and weak library support. You need ton of knowledge to set up environment and write basic Win32 application without using some crappy GUI library (and all GUI libraries in c++ are crappy imo). Most of the internet, books and open source projects practice poor c++ programming practices. You need to be very careful not to inject your program with a crappy API. And when you decide what xml, networking, sound, and math libraries you'll use, they will be all in different coding style. Unless you wrap them (all and whole API's) all up, you're left with source code with 5 different coding conventions and workaround for the poor quirks from their poor design.

C# has extensive library, and it's all uniform syntax. Even 3rd party libraries follow the MS conventions. It also has better IDE and dev tools. It is much faster to develop at the beginning. There are many design flaws in the dotnet classes, some originating from the flaws of the language, and some just poor OO design. In the end it can get very verbose syntax wise (even more so than c++), and you have to be very careful if you want to do anything deterministically.

Java's design has been flawed from get-go, and the repairs haven't worked yet.

Overall, at high level, most concise source code will come from c++, but getting there will take lot of of code and might require you to build "meta language" with lower level classes first.

Now, after being out of picture for a long time for c++, Microsoft seems to invest heavily in (modern) c++ now. Maybe they will try to create some decent library for the first time ever. There's even some hints that they might try and make native compiler for C#.

This topic is closed to new replies.

Advertisement