“What language should I learn?” This is probably the question that is asked the most often in any programming-related discussion venue. Usually, it is asked by somebody who wants to learn to program and wants to know where to start.
People suggest all sorts of languages for all sorts of reasons. My answer is always the same: Python. I shall explain in this post the reasons why I recommend it. It will also give me a page that I can link to, because I’m getting tried of repeating the same arguments.
- It’s free: If you want give programming a try, but are still unsure if you’ll continue in this endeavor, you are probably reluctant to spend money on it. Python costs nothing. You can go to their website right now and download it, completely free of charge. Even better, Python is open source: you can download the source code to see how Python works its magic. The vast majority of libraries written for Python are also free of charges.
- Free literature: Not only is the software free, you can get also get a lot of quality documentation for free. There’s the official python.org documentation, of course, and entire books freely available on the web (legally, too!) Some good ones: Dive Into Python, How to Think Like a Computer Scientist, Python Programming Wikibook. You can consult the Python wiki for a complete list (including non-free books.) However, the official tutorial and the books mentioned above should be more than enough to get you started.
- It’s easy to learn: When non-programmer people talk about programming, they view it as a mystic skill, where digital wizards cast complex incantations in weird languages. Of course, this myth is pretty far from what reality is; most people would be able to learn programming if they wanted to. Python is particularly easy to pick up: its rules are consistent and easy to learn, it doesn’t force you into object-oriented programming, you don’t need to be familiar with the low-level details of computers and it doesn’t have the complex and very advanced concepts that some other languages have.
- It’s easy to read: In Hollywood movies, programmers are the people who spend their days looking at binary or hexadecimal digits scroll down a screen and they understand it all. Reality is actually quite different. Python uses simple English words and familiar symbols (e.g. the arithmetic operators) for its operations. Python doesn’t use braces to group code together; instead, it relies on the indentation of the statements. Many people feel that this helps readability a lot. (Of course, it is possible to write unreadable code in any language, including Python, but when one is not intentionally writing obfuscated code, Python is generally very readable.) Some people have described Python code as executable pseudo-code.
- It’s popular: You may now be thinking “well, it sure is nice that Python is free and easy, but is it popular?” Obviously, it’s more motivating to learn something that’s used by more than a dozen people in their basements. Let me assure you, Python is a very popular language: a lot of programmers know and use Python. The exact number is unknown, but it is safe to say that it is in the millions. A number of large and well-known organizations also use Python: Google, NASA, Youtube, etc. This large community produces a good amount of third-party libraries, documentation, blog posts, discussion forums, etc. There are a lot of places you can go to ask questions and a lot of knowledgeable and enthusiastic people (as well as a few uninformed assholes) will answer.
- It’s practical: It’s not very motivating to learn something when you can’t do anything useful with it, is it? Python has a very large standard library (modules that are installed with Python) to help you solve all sorts of tasks. There are modules to access web pages, email servers, FTP servers, read XML files, write GUIs, manipulate files, etc. And because Python is easy to learn, it won’t be long before you can start building up your own little programs to accomplish the boring and/or repetitive tasks of your day.
- It’s an excellent springboard to other languages: Good programmers don’t know just one language, they know several. The core concepts you will learn in Python such as variables, conditionals, loops, functions, lists, input and output, etc. are found in other languages. Although the syntax and semantics vary between different languages, having a strong grasp of these concepts will make it easier for you to learn new languages.
- It’s fun: At the end of the day, this is probably the most important point. No matter how easy or popular or useful something is, if it’s boring like hell, you won’t want to do it. Python is fun! I can’t explain exactly why; maybe it’s the quick cycle from idea to reality or the ease with which you can create solutions to your problems. Regardless of the reason, people all over the Internet report that they find Python to be a lot of fun and I think that you will too!
Posted by gnuvince