Every programmer should learn to use Python or ruby

Source: Internet
Author: User

Every programmer should learn to use 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:

<ignore_js_op>


This article is honored by "Foreign periodicals It Review" Network (www.aqee.net)
[English Original: Why every programmer should learn Python or Ruby]

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.