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 also be some VB, or C #/. NET. You may have developed some Web pages. You know some HTML, CSS, and JavaScript knowledge. In general, it is difficult for us to find that some students are able to master languages beyond these languages. This is a pity, because there are many programming languages that can make you a better programmer.

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

  • AndC/C ++/JavaCompared with-Python/Ruby, you can write the same program with less and more code. Someone has calculated that the number of lines of code written by Python or Ruby is only 1/5 of the number of lines of the corresponding Java code. If there is no absolute need, why spend so much time writing so much code? Some people say that a good programmer can maintain a maximum of 20 thousand lines of code. This does not distinguish whether the language is assembly, C or Python/Ruby/PHP/Lisp. Therefore, if you use Python/Ruby to write your work, no matter what you do. If you use Java/C ++, you need a team of five members.

  • AndVB/PHPComparison-compared with PHP/VB, Python/Ruby is a language designed to be several times better than them. PHP and VB are widely used in website development and desktop applications. The reason for their popularity is that they are very easy to learn. People who do not know the computer can easily get started. If you have used these languages to develop large projects, you will find that the design of these languages is so bad. If you are a friend, he will not advise you to use PHP/VB.

  • AndLisp/Scala/Haskell/Closure/ErlangCompared with Python/Ruby, it is quite mainstream ". Indeed, each of these languages has its own cool features. Understanding these languages for senior programmers can actually improve their thinking on programming. However, you should decide which one or two of them will be learned in your future career. For now, Python/Ruby is a better choice after the balance between language functions and practical use.

  • AndPerlCompared to Python and Ruby, Perl is the best and largest dynamic language before the emergence of these two languages. But now, Perl is the end of tomorrow, and more people are switching to Ruby/Python. I feel that Perl's object-oriented mechanism is a little tricky. Perl is generally considered a difficult language, because it provides you with too many different methods to complete the same task. Its syntax is a bit like a password, not intuitive-unless you have a good grasp of it. In short, I feel Perl is not a very suitable language for students-unless you have special reasons to learn it (for example, you have many regular expressions to process, this is the highlight of Perl ).

  • AndSh/sed/awk/bashCompared to-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 will start to make you suffer. You 'd better use Python to do these things. Of course, to do this, Perl is the best choice, and Python ranks second. (Ruby is not suitable for system shell scripts ).

You can search for "Why is X better than Y" on Google-replace X with Python or Ruby, and replace Y with another language-you will find that, there are countless articles to explain why they are so good.

If you have the freedom to use the programming language for your graduation project, you should choose Python or Ruby, they allow you to save half the time in the Development Project Process (unless you are developing a mobile application, so you must use Java or Objective-C ).

The following is a cartoon on xkcd, which tells you how powerful you will become after understanding Python:

How to learn them? Many websites provide textbooks and courses for learning Python and Ruby. The following are some of my selections:

  • Google's Python course, learning Python resources.

  • RubyLearning is a good website for learning Ruby.

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

End note:

1: My article may make many Perl lovers very depressed. Now, I realize that the requirements for this language are too harsh. Therefore, I have rewritten the section on Perl.

Both Python and Ruby are favored by Perl. Prior to the emergence of these two languages, Perl was the largest and best Dynamic Language. But Perl is too old. Its object-oriented nature is incomplete. It has not been updated for a long time, and its market share is being lost. For some new and very popular things (such as Web programming frameworks and Web APIs), it is not as good as Python and Ruby to keep up with the times. Basically, Python/Ruby is emerging, and Perl is declining.

2: The comparison of all languages in this article is used for reference when selecting programming languages for Indian computer science students. Sentences like "X is better than Y" are meaningless because all languages survive the test of time, some languages are better than others in some fields, which is why they survive. In other words, in some cases, PHP/Java/C ++/Perl may seem more suitable than other languages such as Ruby/Python.

Original article: http://reliscore.com/why-every-programmer-should-learn-python-or-ruby
Http://www.vaikan.com/why-every-programmer-should-learn-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.