The battle of life and death programming version: Python vs Ruby vs Golang

In general, all programming languages ​​have a history, strengths, weaknesses, and frameworks that serve different purposes. In a language's "life", there is always a "hot" point in which they are most used with the highest efficiency. In the languages ​​that we are widely using and are "hot", Python, Ruby and Golang deserve to be three "rivals" at least in the present time because it makes "headache" how many people are trying to choose one more language to learn.

Python

2

Vietnam Web Summit 2016

Ho Chi Minh (October 22, 2016) – Hanoi (October 29, 2016) – Da Nang (November 5, 2016)

image00

This programming language has been "live" for 24 years and perhaps even longer with a philosophy that is "less code, more" and because there is no need to code so much so bugs also … little follow. If we compare Python and Java, Python will take less programmer's time from start to product, although considering performance, Python is theoretically impossible in Java. . Python is best suited for web construction and data analysis.

From big banks to YouTube, Python is being used, both in game programming, sever maintainance or building systems for art and music (Spotify and Ruby on Rails are a typical example). ). In addition, this is a potential language for building fast scalable apps, which is why startups often love Python.

Ruby

3

Since appearing in 1995, Ruby has always followed the slogan "don't repeat yourself", saving a lot of programmer's time and effort.

A typical example of this is the easy way to write "Hello World!" In Ruby, with just one line of code, not the other. There is also a feature that helps ruby ​​not only "compliment all the water" but sometimes is full of "stone bricks" that are "many ways to receive the same results".

If you want to print 6 Hello World lines in the shortest way, you may think of the loop immediately. Ruby still has a loop but why do it while you can perform in a simple, more intuitive way by … a multiplier.

Golang

The final candidate of this language competition first appeared in 2009, developed by several experts at Google. Language follows a minimalist trend. Like Python, there is only one way to do something, not "chaos" like Ruby. This feels a bit rigid at first but when you get used to it, your code will be much "cleaner" . Golang is very fast and gives programmers some control over memory usage. Many startups also use Go for concurrency.

5

Many good ways.

Between doing one way and doing the best and many ways to do one way both have different strengths and weaknesses. Strict in each space, indent , and the entire layout help Python to be easy to read . Many educational institutions choose Python because of its pure and simple structure. Meanwhile, Golang is the strongest in the clean code range.

4

Golang uses more lines to write something similar when compared to Python. Automatic list expansion (Automatic list expansion) is a plus point of Python. Go limited in number of options, want to loop? You only have one option for the loop, unlike the numerous functions you can use in Ruby.

Vietnam web summit

Opportunity to participate in the largest Web programming event in Vietnam: Vietnamwebsummit.com

Speed ​​problems

With "Vitamin C" root, Golang has a slight advantage in speed and built-in functionality very well. While on the table, Ruby and Python seem to be "out of breath" compared to Golang because for quite a reason, Golang does not need to be interpreted. Moreover, we need to remember that: Documentation is an essential part of language, parallelism is much easier to implement on Go. In addition, Go has an "exclusive" feature: A standard library that includes a complete web server can work. Along with a plus point, it is: A large community answers every question and an open-source repository is available to help you save time building many things.

8

For beginners

In Go, you just type "go run mycode.go" to compile and run the code, automatically doing this compilation saves a lot of your time. However, Go has a very strict outlay and is not a "recommended" language for beginners. Python and Ruby are more suitable for beginners. Ruby will be a great language if you already know one or two languages. Python, on the other hand, is a good choice if you are a complete learner from scratch.

Some people consider Ruby to be just a framework language, but no more than a subjective opinion. Overall Ruby and Python are two very suitable languages ​​for beginners , only Ruby is a bit of a memory hog to have better performance.

User objects and trends

Ruby is becoming more and more widely used, one of Ruby's most widely used applications for DevOps. Ruby is used in many DevOps frameworks like Chef and Puppet . As for the API and backend, Go is probably the brightest candidate of all three. However, in terms of work and features, Python and Ruby are still reliable choices when working in groups or working on projects. In fact Python has even been compared to …. English because of its clarity and clarity. Analytics, system administration and data manipulation are all suitable for Python.

The problem of time

6

In object- oriented and functional programming (oriented code and functional code), Ruby is faster than Python . Ruby also eats off Python at an average run time interval. For recent Ruby releases, execution speed (execution speed) has also been significantly improved. But overall, Go is faster than the above two languages.

Each language has its own strengths and weaknesses. Times change, old technology, new technology comes on repeating and repeating, "The best language to work" also changes or even doesn't exist. We can close the article with a quote from a famous programmer.

"Any language is the best language, if the programmer knows exactly the purpose that language serves."

How to choose?

Sometimes choosing a language is based not only on the purpose it serves but also on the trend of programmers at that time. If you have a language that correctly serves your requirements but … no one uses it, now you get the open-source code, library, framework and everything else to do. Being really involved in a programming community and following the trend is sometimes not a crowd run, but a good choice. Coming to Vietnam Web Summit 2016 , with the participation of more than 80 speakers who are CEO, Fouder, Product Manager … from big technology corporations and Frotend Backend programming, you will surely catch the coins. programming directions are "waking up" in the country.

Coming to this topic group includes the pros and cons of Javascript / CSS / PHP / Ruby frameworks , making comparisons between frameworks, and the purpose of using the frameworks suitable for the specificity of the project. In addition, the program is expected to have themes for web programming languages ​​other than PHP / PHP7 such as ROR, Python, Java … their pros and cons, and why big projects in the world use They are for building products.

9

Any support information please contact:

Tel: 08 6273 3497

Hotline: 0944 685 243 – Ms. Ngọc | 0963 651 587 – Ms. Original

Share the news now