I am going to get into programming, but I am not sure what language to start in. Out of the following programming languages which one should I start in? Python, Perl, or Ruby?I considered BASIC but I read that it creates some bad programming habits when you move move to another programming language like C++.
Why not just start straight into C++?
Because I'm a noob.
Depends what you hope to create in the future, or what you might use it for.
If you would exclusively be writing windows apps then C# would be a good place to start. Otherwise I'd start with C++. Starting with Visual C++ wouldn't hurt if you have good teaching material.
Personally I started with Basic but I'm sure you don't need to these days.
Whatever tutorials google can find will be my teaching material. Unless there are some good books...
I would say that Haree78 said it correctly.
Why mess with the other languages if you are not going to use them. In other words base your decision on what you want the desired outcome to be.
Besides that, as the OP notes "simpler" languages (like VB) can have syntax quirks that lead to bad habits if you start off with them. C syntax is pretty common among the languages (C, C++, C#, Java, etc) used for apps and games, though, so if you do eventually need to learn younger languages, at least you'll have established good style and habits first.
I cannot advise books as I only use reference books these days and google, I would say a good book will give you way more than google in learning though. There are bad books out there too though, do your research
What I can give you is tips on learning. Doing practical hands on learning is worth 1000s of hours of reading. When you start going through learning material start doing the examples yourself, get them building, running and then try and extend them yourself if you think it will challenge you. You will be surprised how much a simple example can fail when you are learning, the development environment not set up right, not understanding the type of project you should have used in a Visual Studio app etc, getting all this is only learnt from doing stuff. Also it will make you more resourseful as a developer. All good developers don't remember everything, they don't know how to do everything, what they have is the knowledge that they can do something with a language and they know where to look to fill in the gaps.
There are lots of good places out there on the web to help with the questions you will have as you learn such as www.codeproject.com. Registering at these places can be worth your while.
Thing is if you get into programming you should have one syntax language, one you specialize in and a ton of languages you understand.
It's best to start with the syntax language and I'd say C++ is really good for this, the syntax has similarties to very many languages and it will be useful to know for both linux and windows sides. Easy to move to java, c, c# and I also found delphi rather easy. Another + is the amount of libraries you can find for c++ since it's so well established.
Now once you know all the moderate things in c++ you can either go on to the advanced topics or try some other languages. Python is a language I strongly recommend but not as your first language, because really... it doesn't feel like programming when you do 5 times the work in C++ compared to Python, so the problem solving parts from C++ is rather good to understand. Big plus if you learn memory management which is needed in a lot of aspects of programming.
For myself both my syntax language and main language is C++, my favorite is Python which I use for basically every quick thing I need to make since it takes way less time to test it in python than in C++. Now I can basically write a program in Python and make it work, then I can optimize it a bit due to the simplicity of Python and finally port it over to C++ for a more efficient program. Yes sadly python is a bit slow sometimes compared to C++.
Lastly and most importantly, programming isn't hard if you don't make it hard, same goes for C++. Making a calculator is easy, making a calculator that solves 10 variable equations is hard. Same example real life, 10+21 is easy, 10*x+21*y = 213, 21*x-10y=312 is harder. And don't try solving that, it's just random numbers =P
If i was needed to choose between these 3 language, i will choose Python... Why ? Because i am a modeler and a lot of the script used in my professional 3D software are using python...
A few year ago, i will have choose Perl... more interesting script language when you are webmaster...
The syntax of Ruby is broadly similar to Perl and Python.
Whatever tutorials google can find will be my teaching material.
- Ruby : http://www.ruby-lang.org/en/documentation/
- Perl : http://www.perl.com/pub/q/documentation
- Python : http://www.python.org/doc/
Enough teaching material there for a while...
EDIT : First know what you wish create and in function of this, choose a language adaptd for the task...
And also learning a language will make it easier to learn other languages.
I have school grades in C# and VB.NET... but im still very much a newb in all areas.. i can understand the syntax, having done some coding it is much easier to grasp a new one.
All good developers don't remember everything, they don't know how to do everything, what they have is the knowledge that they can do something with a language and they know where to look to fill in the gaps. Very true
Very true
Think of it as learning a spoken language its much easier to understand it than it is to speak it well.
Atm im trying to learn C++
IMO VB is easier to code in but C++ is easier to grasp what you are really doing.
Perl, Ruby, and Python are more like scripting languages. Not good for a beginner. Stick with C++ or Java as your first language.
Out of the 3, if you had to pick one, I'll choose perl.
Awhile back I was going to start with BASIC, but I read a post in another forum that said it can create bad progamming habits. I am interested in making simple (Yet not so simple) 2D flash games and maybe more advanced stuff in the future. I am 15 and I have some free time to spare so I have decided I want to do something productive with my life now rather than later when outside pressures like... Bills, womenz, cars, etc hold me back.
I am going to start with C++ and once I have a moderate knowledge of it I will decide what next to do. Maybe Python or Java will be next.
If you're serious about programming, you might want to start with C and C++. If you want to have a (very) general idea, or if you want to work on a higher level than most business-level languages, then you can go with a scripting language.
If you want one of those three, anyway, I'd recommend Python. It's cleaner, better designed, and it has a greater feature set. Also, if you go with Python, and if you want to play around with game programming, you have the option of using Panda3D.
For a learning language, Perl is easily the worst of the 3. It has a lot of very strange syntax. Perl can be written in very obfuscated styles. And there are dozens of ways to do any one thing in Perl (it's even part of their design philosophy). It's generally not a good idea to use it if you don't already know the basics of programming.
Python is probably the best language of the 3 for learning. However, personally, I'd suggest JavaScript (not Java); it has a pretty nice syntax that's a bit closer to C++ than most scripting languages.
No, don't do that. For learning how to program, jumping into C++ is like learning cooking by starting with a 7-course gourmet meal. Yes, you'll get it right eventually, but you're going to burn a lot of stuff along the way.
Programming is about more than syntax: programming is problem solving. Programming is about writing a series of instructions to a very stupid machine in order for it to do what you want. The essential essence of programming can be understood from any language.
C++ is not a good learning language. There are a lot of structural pitfalls you have to learn to avoid that have nothing to do with solving problems. Allocating/deallocating memory, pointers, and so on. C++ is a great language for a programmer, but it is far more complicated than you are ready to deal with.
My personal suggestion would be to start with a simple scripting language like Python or JavaScript. Once you have that down, move on to C#; it's a very good language. Once you feel comfortable with C#, then you should move on to C++.
It depends on what you want to do. However, having said that, I've worked with all the languages you listed professionally for years, and my answer to your question is "none of the above." C++ is an utter monstrosity, and is not what object-oriented programming was ever supposed to be (neither is Java).
Do yourself a favor. Learn a language like Smalltalk, Prolog, or APL.
I personally am starting with C++ and got a very helpful book which IMO does a great job of explaining the concepts. "Beginning C++ Game Programming" by Michael Dawson. Unfortunately I have been unable to get a decent book concerning Direct X programming with C++, something which is needed after that book since it only deals with running out of comand prompts. Oh, and avoid "Beginning DirectX 10 Game Programming" by Wendy Jones. It has caused me nothing but headaches. Even the example programs wouldn't compile properly.
Do you really have a few months (less or more, depending on your technical background, btw) to spare to get the ENTIRE C++ set of instructions and start coding any particular thingies?
I have to go against the tide here... if you are a true "beginner" fresh out of math school -- go for Delphi, now & forever while (at times) getting your hands dirty into MUCH higher level languages such as C#.
Even Read this, before you decide;
http://delphi.about.com/od/devutilities/a/delphivsothers.htm
Define your purpose and flowchart are two basic programming minimals while declaration blocks, memory stackings, functional routines & what else belong to compile multitasking that even the best reference guides or books won't exactly teach you.
What's a *push* or *register addressing* to you?
Then - code.
I'd suggest python if you want to pick between the 3. Perl has an ugly syntax like almost nothing else. Ruby is something I never managed to like. The only drawback of python id indenting with an arbitrary tab = 8 spaces.
Don't start with C++. The syntax is terrible to begin with (templates, function pointers), it's got a preprocessor inherited from C which you might want to use "creatively" and gives you so many tools to shoot yourself in the foot.
The real question however should be which language is best for which task, depending on what you want to do, the language of choice will vary. I mean Haskell or LISP or ML might be more appropriate for what you want to do than any of the aforementioned languages (however unlikely that may be).
Dangit! There are too many intelligent people on these forums... jk
I am going for Python. I have to start somewhere!
Excellent choice and stick along for the whole ride it will take to master or adapt it to your current or most probably everchanging needs.
But before you do anything else, i would highly recommend a quick splash into ASM and binary infra-structure call ops -- if only to have solid reference to the most fundamental process of machine code which EVERYONE must adhere to.
Blame my Cobol days of the 80's for this weird suggestion.
And... farewell my dear -- jmp dx, HELLO WORLD
Hello Alpha_Wolf:
If you have no experience in programming, then Python is not a bad language. It'll teach you what programming is about, and it's modestly powerful enough for you to do a lot of impressive things with it.
But if you want to learn and eventually write software professionally, I would advise you learn C++. C++ is very popular in the workplace, and it exposes a lot of finer details about programming that makes a good software engineer. As an example, when you know C++ well, you'll have no problem with languages like Python, Java, C#, etc... But the same thing isn't necessarily true if you know Python, Java, C# and try to use C++....
Cheers. Hope that helps.
Tango
I'd go with perl because day to day it always usefull. However, I'm not sure how easy it would be to pick up first. (and not to mention learning bad habits)
I personally think anyone in engineering should learn perl early. It's just that useful. (almost any job you're on a pc > 50% of the time actually...)
Fully agree...
Long time ago, when i was at university, the Pascal was used to lean strucured programming... The first versions of the Delphi Programming Language were named Object Pascal.
You can begin learn Pascal first... next step is Delphi ( offert a little more function but is almost identical )... and finish with Oxygene ( based on object pascal too ) who support visual studio and with support the lastest version of the .NET framework ( Delphi have stop support of the .NET framework in 2007 )... Final level can be the new Delphi Prism : http://www.remobjects.com/oxygene.aspx
This will allow you a evolutive learning method... starting from a very simple elemental language like Pascal... Finishing with the more recent multiplatform language supporting a growing technology callet .NET ( or Mono on other platform )
Personnaly, I would say Python, it is more and more used by professionnals, and nonetheless it's very very quick to learn. Excellent for beginners, as many really boring aspects (which will be necessary for "bigger" language) are automaticaly managed as the memory, the pointers, the types of variables... the fact that python have an interactive console makes it unvaluable for beginners, that plus the excelent integrated debuger. And if you choose Python, once you have understand the concept of list (or array), try to learn a little C, you'll see that C is a hell to learn due to the pointer arithmetic needed to build list (dynamical i mean). Python doesn't have to be compiled, understand a compiler and all its options is not an easy task. If you choose that language, many possibilities are offer to you, you certainly won't be able make an OS, but this is rarely the goal of beginners.Making games are possible (Panda3D,Soya3D,PyOpenGl), for example i was able to make a graphical application (and not a simple "hello world" program) after 2 weeks of learning with no knowledge in programation (except conditions and loop) when I began.
Get used to concepts of variable, loop, functions, classes, methods, heritage, lists, dictionnary. And then, I agree with Zyxpsylon : learn a little asm(ASseMbly, and even how to disassembly) before learn the C,C#,C++... well, heavier languages.
Download python 2.5 or 2.6, but not 3.0 for now, as it has almost no third party modules
python book to begin : How to think like a computer scientist with python
http://greenteapress.com/thinkpython/thinkCSpy/thinkCSpy.pdf
then : Dive into Python
http://python.ftp-developpez.com/cours/DiveIntoPython/fichiers/endiveintopython.pdf
There are many great features available to you once you register, including:
Sign in or Create Account