Python Learning 2 : Python History – ByteSavvy

Python Learning 2 : Python History

Python is a programming language written by Guido van Rossum, the famous “Uncle Turtle”, during the Christmas season of 1989, in order to kill the boredom of Christmas.

Nowadays, there are more than 600 programming languages in the world, but there are only about 20 popular ones. If you’ve heard of the TIOBE list, you can get an idea of the general popularity of programming languages. Here’s a chart of the changes in the 10 most commonly used programming languages in recent decades:

Overall, each of these programming languages has its own strengths and weaknesses.C is a close-to-hardware language that can be used to write operating systems, so it is suitable for developing programs that seek to run faster and take full advantage of hardware performance. Python is a high-level programming language for writing applications.

When you start real software development in a language, you need a lot of basic, already-written, off-the-shelf stuff, in addition to the code, to help you speed up the development process. For example, if you write an e-mail client, it would take a year and a half to develop it if you started from the bottom with the network protocol code. High-level programming languages usually provide a better basic code base, so that you can directly call, for example, for the e-mail protocol SMTP library, for the desktop environment of the GUI library, in these existing code base on the basis of the development of an e-mail client a few days out of the development.

Python provides us with a very complete basic code base, covering the network, files, GUI, databases, text and a lot of other content, figuratively called “built-in batteries (batteries included)”. With Python, you don’t have to write many features from scratch, you can just use what’s already there.

In addition to the built-in libraries, Python has a large number of third-party libraries, which are things developed by others that you can use directly. Of course, if you develop code that is well encapsulated, you can use it as a third-party library for others.

Many large websites are developed in Python, such as YouTube, Instagram, and Douban in China. Many big companies, including Google, Yahoo, etc., and even NASA use Python heavily.

Uncle Turtle’s position for Python is “elegant”, “clear”, “simple”, so Python program always looks simple and easy to understand, beginners learn Python. Python is not only easy to start, but also can be used to write very complex programs in the future.

Overall, the philosophy of Python is to be simple and elegant, to write code that is as easy to understand as possible, and to write as little code as possible. If a senior programmer shows off to you that he writes obscure, unimaginative code that is tens of thousands of lines long, you can laugh at him all you want.

So what types of applications is Python good for?

The first choice is web applications, including websites, back-end services, and so on;

The second choice is many of the widgets that are needed on a daily basis, including scripting tasks needed by system administrators and so on;

The other is to repackage programs developed in other languages for ease of use.

Finally, the disadvantages of Python.

Any programming language has disadvantages and Python is no exception. With the pros out of the way, what are the disadvantages of Python?

The first disadvantage is that it runs slowly, very slowly compared to C programs, because Python is an interpreted language, your code will be translated line by line into machine code that the CPU understands when it is executed, and this translation process is very time consuming, so it is very slow. C programs are compiled directly into machine code that the CPU can execute before running, so they are very fast.

But a large number of applications do not need to run so fast, because the user does not feel it at all. For example, if you develop a web application that downloads MP3s, a C program takes 0.001 seconds to run, while a Python program takes 0.1 seconds to run, which is 100 times slower, but since the network is slower and you need to wait for 1 second, do you think the user can feel the difference between 1.001 seconds and 1.1 seconds? This is just like the reasoning between a F1 car and an ordinary cab traveling on the 3rd Ring Road in Beijing. Although the theoretical speed of a F1 car is as high as 400 kilometers per hour, due to the traffic jam on the 3rd Ring Road the speed is only 20 kilometers per hour, therefore, as a passenger, the speed you feel will always be 20 kilometers per hour.

The second disadvantage is that the code cannot be encrypted. To distribute your Python program, you are actually distributing the source code, which is different from C, which does not have to distribute the source code, only the compiled machine code (that is, the xxx.exe file you commonly see on Windows). It is impossible to back out the C code from the machine code, so any compiled language does not have this problem, whereas an interpreted language must release the source code.

This disadvantage is limited to when you are writing software that needs to be sold to make money. The good news is that in the current Internet era, there are fewer and fewer business models that rely on selling software licenses, and more and more models that rely on selling services through websites and mobile apps, the latter of which don’t require you to give the source code to others.

Besides, the open source movement in full swing now is consistent with the free and open spirit of the Internet, and there are countless excellent open source codes like Linux on the Internet, so we should never overestimate the “commercial value” of the code we write. The more important reason why those big companies don’t want to open their code is that the code is so badly written that no one would dare to use their products once they open source it.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *