Advertisement

Python for 1st language?

Started by January 09, 2016 03:23 AM
18 comments, last by Tutorial Doctor 8 years, 10 months ago


I recommend learning C.

I recommend the OP not do this. I also recommend that the OP only uses the tools needed to do the job and do the job well. C does not fit that criteria.

[moderator edited]

C is a good choice by all means. You did not state a single reason not to.

Hey I`m that guy who started learning python to make some games, ulimatly i made soe android games using a nice library called kivy.

BUT there was a lot missing from my arsenal of knowledge so for about 2-3 months now i am learning c/c++ and also started a few days ago to read a nice tutorial from lazyfoo on SDL. So Yes python is easier but if you`re in it for the long haul I also recommend going for c first , then go for python or continue learning the "++" ;). Good luck dude!!!

Advertisement

I recommend learning C.


I recommend the OP not do this. I also recommend that the OP only uses the tools needed to do the job and do the job well. C does not fit that criteria.

[moderator edit]
C is a good choice by all means. You did not state a single reason not to.

Pointers. No string type. By themselves, those are reason enough for a beginner not to use C.

Fundamentally, you spend more time fighting the language than learning to program.

Oh, and for the record, I started in C.

if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight

With my moderator hat on:

Insults and personal attacks on other members will not be tolerated. I have edited some posts, it needs to stop.

With that out of the way...

C is a great language. Learn it if you want to. It will teach you many things. However, it is a different language than Python, or C++, or Objective C. C has a much deeper learning curve than many of the other recommendations. C requires a deeper knowledge of various topics like object lifetimes and memory management and pointer manipulation that are common for beginners to get wrong. Even back in the 1970s and 1980s C was not generally recommended for a first language.

You do not need to learn other programming languages or parent- or grandparent-languages to learn today's programming languages. Going through Wikipedia's history of programming languages, you don't need to learn Autocode, or IPL, or Flowmatic, or Fortran, or Lisp, or Algol, or Fact, or Cobol, etc., to master today's languages.

As far as programming languages go, C++ is usually not recommended as a first language. It has a high learning curve and it works off the assumption that you know what you are doing, which beginners rarely do. It requires the programmers understand details about object lifetimes that beginners often struggle with. It is something you should learn eventually because it is (currently) the primary language of systems development, and most game engines use it these days. Nothing is poised to replace C++ right now, but history says eventually it will be dethroned and another systems-friendly language will replace it.

Python is frequently recommended as a first language. It is powerful, handles most of the object lifetimes automatically, has many good game development libraries, and is often used in game development scripts.

C# is frequently recommended as a first language. It is powerful, handles most of the object lifetimes automatically, has a few good game development libraries, is used by some major engines like Unity, and is frequently used in game tools.

JavaScript is sometimes recommended as a first language. It is everywhere, handles most of the object lifetimes automatically, has ever-growing usefulness with HTML5, and has plenty of learning tools available.


JavaScript is sometimes recommended as a first language. It is everywhere, handles most of the object lifetimes automatically, has ever-growing usefulness with HTML5, and has plenty of learning tools available.

I have only moderate experience with JavaScript. 100% agree that it's an incredibly useful language to know (in fact, it's almost mandatory these days), but from my limited experience, I found the language itself to have a few weird quirks that are potentially confusing to a beginner (more so than C# or python anyway).

Interested to hear your opinion on this.

if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight

I don't like JavaScript, I find a lot of the scripting things are an abomination.... but I know several people who recommend it for a first language.

There are great debugging tools in Chrome and most budding young programmers already have it installed. Tutorials are easy to come by.

For a beginner, someone who is just learning to understand the basics of programming, I can see the appeal. Free hosts are everywhere, it takes about five minutes to get a WordPress site working. Inside that you can immediately drop in a bunch of HTML elements and script them on the same page.

For the newcomer there are no worries at this point about memory leaks, or buffer overruns, or seemingly-complex function calls, or inclusion from other files and libraries. It takes a lot of hacking and experimentation, but if you get it wrong nothing is going to break. You don't get the jokes about undefined behavior doing 'anything including maybe crashing or formatting your computer'. At worst your web page doesn't display.

So while I dislike a lot of the more advanced things --- for example I just spent four hours today fighting stupid variations on box models on different handhelds --- for the beginner JavaScript is approachable and relatively friendly.

Also, it is a language most programmers are going to need to work with eventually. It is one of the first five languages I recommend programmers get exposed to. Those are Python, JavaScript + HTML, C++, C#, Java. You don't need to know them well, but if you are going into games you'll likely be exposed to them all, and they are closely related to each other to the point where learning the last few will come quite quickly.

Advertisement

When you are programming against the canvas, you don't have to worry about subtle (or not so subtle) differences in the rendering engine of the browser. Also, while JavaScript does have differences when compared to other, more typical object oriented languages like python and C# (some call these quirks), you can avoid many of them by using a cross-compiled variation of JavaScript. TypeScript has been seamless in my experience using Visual Studio 2015, and TypeScript emulates the typical class/interface paradigm that most people are comfortable with and will give the newbie more of a leg-up when transitioning to another object oriented language.

I would say that if you are completely unfamiliar with computer programming that Python is a good start, it is a language emphasizing readability which is useful for beginners. However, in my opinion it is not the best language for programming multi-platform games. If you want the basic of computer programming and some basic syntax then learn Python. If your intention is making games on a low budget I would suggest a game engine such as Unity. It is free for the personal version and comes with just about everything you'd need to make great games for PC or other operating systems, plus WebGL and Unity's built-in Webplayer. Unity uses C# (a relatively easy to learn object-oriented language) and JavaScript (definitely a language to know!). Also, there are tons of great tutorials on using Unity.

Want to play awesome free online games?

Free in-browser online games and more at some-boring-games.weebly.com

I'd advice in favor of Python over C# simply to have something different to chew on. Make no mistake, I love curly braces languages, but certainly having programmed in something else (Python, or Pascal derived languages like Ada or Delphi in my case) does broads a bit the understanding of what is a programming language.

Otherwise you risk just hanging on too much on the syntax when learning new things.

Moreover, starting with an all Microsoft stack (VS for C#, VS for C++) also has the same consequences. Last thing I want is more people calling auto-complete in every IDE "intelli-sense" :P

So Python is a good choice. Used a lot on Linux distributions, very broad scope (from tiny scripts to web sites and games). All in all, a good experience. Later you can jump on the "mainstream" stack of Visual Studio, C++, D3D, etc.

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

My journals: dustArtemis ECS framework and Making a Terrain Generator

Another vote for python.

For a start I have created tutorials for it as well as the Godot Game engine which uses a Python like syntax to make games called GDscript.

You could pick up GDscript pretty fast and be that much closer to making your game already. You don't have to go through the bottom end to get to the game development phase.

Maybe this will set you on the right track:

https://github.com/TutorialDoctor/Software_Development

And If you have any questions contact me on twitter or here.

They call me the Tutorial Doctor.

This topic is closed to new replies.

Advertisement