Every programmer should learn to use Python or ruby

Source: Internet
Author: User

http://www.aqee.net/why-every-programmer-should-learn-python-or-ruby/If you are a student, you should be c,c++ and Java. There will be some VB, or c#/.net. How much you may have developed some Web pages, you know some html,css and JavaScript knowledge. On the whole, it's hard to see how many students have the ability to master a language beyond the limits of these languages. That's a shame, because there are a number of programming languages that make you a better programmer.

In this article, I will tell you why you must learn Python or Ruby language.

  • Compared to C/c++/java ,-python/ruby allows you to write the same program with much less code. It has been calculated that the number of lines of code written by Python or Ruby is only equivalent to one-fifth of the number of lines in the corresponding Java code. If it's not absolutely necessary, why spend so much time writing so much code? And, some say, a good programmer can maintain up to 20,000 lines of code. This is not a distinction between the language is a compilation, C or Python/ruby/php/lisp. So, if you write with Python/ruby, you do it by yourself, whatever it is, if you switch to java/c/c++, you need a small team of 5 people to do it.
  • Compared with vb/php -Php/vb, Python/ruby is a kind of language that is designed to be much better than theirs. PHP and VB are very popular languages in developing Web sites and desktop applications, respectively. The reason they are popular is that they are very easy to learn. People who don't understand computers are also easy to get started with. If you have developed large projects in these languages, you will find that the design of these languages is so bad. is a friend, he will not persuade you to use PHP/VB.
  • Compared with Lisp/scala/haskell/closure/erlang ,-python/ruby is quite "mainstream" to them. Indeed, each of these languages has its own cool features, and for senior programmers, understanding these languages can give them a real boost to their thinking about programming. But these should be in your future career to decide which one or two to learn. For now, Python/ruby is a better choice between the language function and the actual use of the balance.
  • Compared to Perl ,-python and Ruby are the best and biggest dynamic language in the two languages before they emerge. But now Perl is a ruby/python, and more and more people are turning to it. I feel that Perl's object-oriented mechanism is a little contrived and very difficult to use. Perl is often thought of as a difficult language to learn because it provides you with a lot of different ways to accomplish the same task, its syntax is a bit like a password, it's very not intuitive-unless you've mastered it very well. In short, I feel that Perl is a language that is not suitable for students-unless you have a special reason to learn it (for example, you have a lot of regular expressions to deal with, which is the flash of Perl).
  • Compared to Sh/sed/awk/bash -If you use Linux/unix, you may need to do some shell programming, or even write some small programs. However, for these languages, once the program reaches a certain number of lines, things start to make you miserable, and you'd better use Python to do these things. Of course, Perl is the best choice for this kind of thing, and Python is second. (Ruby is not a good fit for system shell scripts.)

You can search Google for "Why X is better than Y"-where x is replaced by Python or Ruby, and y in another language-you'll find countless articles explaining why they're so good.

If you have the freedom to choose the programming language you use for your graduation design, you should choose Python or Ruby, which will allow you to save half your time in developing your project (unless you are developing a mobile app so you have to use Java or objective-c).

Here's a comic book on xkcd that tells you how powerful you will become after mastering Python:

How to learn them? Many, many websites offer textbooks and lessons for learning Python and Ruby. Here are some of the things I have chosen from them:

    • Google's Python course, learn Python's good resources.
    • Rubylearning, learn a good website for Ruby.

Do you have any questions? Please write it out in the comments and I will try to answer you.

Tail Note:

1: My article may be frustrating for a lot of Perl enthusiasts, and now I realize that the requirements for this language are too harsh. So I rewrote the section on Perl.

Both Python and Ruby are governed by Perl, and Perl is the largest and best dynamic language before the two languages appear. But Perl is now too old. Its object-oriented nature is not complete. It hasn't been upgraded for a long time, and its market share is losing. For new, very fire things (such as Web programming frameworks, Web APIs), it is not as good as Python & Ruby to keep pace with the times. Basically, Python/ruby is rising, and Perl is in recession.

2: The comparison of all the languages in this article is used for reference by Indian computer science majors in selecting programming languages. It is meaningless to say "X is better than Y", because all languages are survived by the test of time, and some languages are stronger than others in some fields, which is why they survive. In other words, in some cases, Php/java/c/c++/perl will appear to be more appropriate than other languages such as Ruby/python.

Every programmer should learn to use Python or ruby

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.