Choosing a first programming language

Started by Fred7162, Sun 07/04/2013 13:09:20

Previous topic - Next topic

Fred7162

 So I'd like some help with choosing my first programming language. I'm choosing between C# and Python. Also as some of you might know I already have 2 C# programming books, but I was dissapointed in these because they aren't actually meant for beginners who have no programming experience. So I thought that maybe I should continue with C# and simply find myself some beginners tutorials, even though there is a small problem with C# namely the fact that I can't use the newest version of Visual Studio because my computer still has wimdows XP. Also I did find 2 free e-books for Python that are for beginners( for children actually, but most children are beginners. I think?). So any advice on this is welcome(even if you suggest a completely different programming language).

bicilotti

Never fancied/got into C#, but if you choose python, you should check Invent with python: learn to program by making computer games.

It is meant for people with little or no programming exprience and, has enthusiastic amazon reviews and it's free to read online!

Cerno

Huge python fan here, so my opinion might be a little biased.

I am using C++ and Python as main languages for my day job and while I think C++ is more versatile when you want to go into optimizations and write fast performing code I still think python will make you quite happy because it has an awesome learning curve. If you want to get into object oriented programming, C# would be the better choice as python does not give you strict encapsulation and such.

On the python website you find a plethora of material for the beginning programmer:
http://wiki.python.org/moin/BeginnersGuide/NonProgrammers

As always, the choice of language depends on what you want to do with it, maybe you can explain a bit more?
123  Currently working on: Sibun - Shadow of the Septemplicon

Fred7162

Well I'd like to make some simple games platformers perhaps or something like the first zelda game on the NES and eventually I'd like to make an RPG game (with skills and all, and I actually have an inspirration as to what I'd like to achieve, a short rpg game that a guy on another forum made even though he used some old version of Game Maker I think). And I myself am also slightly leaning towards Python because it seems to make more sense(atleast to me). And the object oriented programming bit, I honestly do not know because I'm not really sure if I know what it means and if it is more benefitial or something.

Cerno

I'll be honest here:

Teaching yourself programming and starting out with coding a game engine might be grasping a bit too far and might get you demotivated quickly.
If you want to get into programming in general and use the game as a vehicle to learn doing stuff, that might work. Smaller projects might be more suitable to get you started though.
If you want to make a complete game without having to reinvent the wheel with a custom engine, I think it might be better to use a tool like RPG-Maker for starters. You could even try to do it with AGS: http://www.adventuregamestudio.co.uk/forums/index.php?topic=13649.0

Getting the skills necessary to write a half-decent game engine when you have no programming experience whatsoever might take you a few years depending on the time you can invest in this. Nothing wrong with that, but expect it to take some time to get where you want.
I'd say generally python will get you there faster than C#, and there are number of game libraries out there that will make your life a lot easier.
Keep in mind though that you will be learning two things at the same time: A programming language with all its quirky syntax errors that you won't all understand right away and a game design library which will have its own pitfalls for the beginner.

Long story short: Either use RPG-Maker if you want to get a solution fast or look for some smaller projects to learn the language properly before going into game design.

You may find some resources in this thread: http://stackoverflow.com/questions/29578/python-exercises-to-hone-your-skills, especially these two: http://pyweek.org/, http://www.pyschools.com/.
I learned my python here, but that's more about mathematical than programming exercises: http://projecteuler.net/
123  Currently working on: Sibun - Shadow of the Septemplicon

Fred7162

Thanks for the advice. But what would be the smaller projects that you'd suggest for learning programming then?

Cerno

It could be anything from short exercises that will result in just a few lines of code (see the links I provided) up to a tool that fulfills a specific task.

Standard beginner projects might be a calculator, a movie database, etc. You can find these in teaching resources of different universities. They often sound pretty boring and are rarely useful but are good learning material.
You can also be creative and think of a project of your own to solve things that would be a lot of work for you otherwise.
For a slightly advanced example, write a tool that reads photos recursively from a folder, extracts the EXIF information (using an external lib) and automatically reorganizes the photos into subfolders according to different criteria (e.g. year, gps coordinates, etc.). For starters, I would begin with command line tools and think about adding a GUI later once you got the grasp of everything.

I think the most important part is to find a project that really motivates you without being too difficult.
Of course this is my personal take on this issue. There are other approaches depending on your learning preferences.
123  Currently working on: Sibun - Shadow of the Septemplicon

Snarky

Both Python and C# are good, modern and popular languages. As an absolute beginner, Python might be an easier place to start; on the other hand, learning C# is going to introduce you to most of the main concepts and topics in programming, and the Visual Studio GUI builder tools really help if you want to put together a graphical application.

I agree with Cerno that nice, interesting-but-doable exercises are a must. When I was learning C back in the day, I followed a VGA graphics programming tutorial (mode 13h, putpixel, palette manipulation, Bresenham lines etc.) that was actually written in Pascal and asm. The issue of language translation didn't really matter (the program structure in C/Pascal is pretty much the same), it was all about having something cool to work on. When I taught myself Javascript, I wrote a little app to automate my Sudoku-solving strategies (i.e. using human logic rather than computer logic). Or for double the learning benefit, try to implement classic algorithms, whether it's QuickSort, A* or Fast Fourier Transforms. Whatever you can think of that would interest you (and you can solve in a couple of days, at most).

SpeechCenter

As a starting point, check out the (free) course An Introduction to Interactive Programming in Python
It starts Apr 15 on Coursera
https://www.coursera.org/course/interactivepython

It could be a good fit because it also includes building small and simple games.

Actually, if you intend to take programming seriously you should later also try C# (or if not C# something like Java), but as others wrote, you should eventually learn things like object oriented and basic algorithms since many of the concepts are required in most languages.


SMF spam blocked by CleanTalk