Why should O & M engineers learn 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 ++/Java compared to-Python/Ruby allows you to 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.
- AndComparison between VB and PHP-compared with PHP/VB, Python/Ruby is a language designed to be several times better than them. PHP and VB are very popular languages for developing websites 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.
- AndCompared with Lisp/Scala/Haskell/Closure/Erlang,-Python/Ruby is quite mainstream compared with them ". 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.
- AndCompared to Perl, both Python and Ruby are favored by Perl. Perl is the best and largest Dynamic Language before these two languages emerge. But now, Perl is the end of tomorrow, and more people are turning 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/bash compared-if you use Linux/Unix, you may need to do some shell programming, or even write some small programs. However, once a Program reaches a certain number of lines in these languages, things will begin 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.