Summary:
Graduated from university to now use the most programming language or c,c++, and later learned a bit of python, think that Python is the door to learn the language is not regret. Especially suitable for non-programmer learning, as a teenager to learn the first language of computer is also good, college students learning computer using Python language as a primer is also good. A software engineer who feels that it is acceptable to be c+python+html5+javascript. For the Python language has been some misunderstanding, collated a bit of information on the Internet, just as the fun of their own learning, but also to the drum cheer.
Note:
There is no need to discuss the programming language, because programmers are serious, a discussion of programming language will be lively, such as the previous Linux author Linus Torvalds C and C + + debate, ..., PHP is the world's best language and so on.
Practice martial arts to practice, but also to practice the internal strength, to discuss programming language not too serious, choose the appropriate language to solve their own problems good.
Figure: Linux's father Linus Benedict Torvalds
Python is a new language:
The Python language in the domestic large-scale prevalence is mainly from around 2014, this point from a Niang search index can also be seen.
Figure: Search index trends for several programming languages
As the graph shows, 2014 years ago, python in the domestic search index is very low, 2014 years later gradually increased, to 2017 unexpectedly surpassed the eldest brother Java. But don't think of Python as a new language, but you know Python's history knows that Python was born in 1989 and released its first version in 1991, 4 years older than Java. A famous example of Python's early use was the first successful web crawler of Google in 1996. And Java more like the grassroots than Python, has been silently cultivated, eventually bloomer. So many people like to say that Python still has its own merits.
Python is an interpreted language and has not been compiled:
Python does not have to be compiled into executable programs like C and C + +, but it is more like Java, which compiles the source code into its own bytecode. Bytecode has an interpreter (Java called a virtual machine) to handle execution. Python and Java are more than fully open source, not controlled by a large organization, and have more interpreters, such as CPython, PyPy, JYTHON/JVM, IRONPYTHON/CLR, and so on.
Python is a scripting language, not a separate development language:
Python is indeed an object-oriented scripting language, and one of the pioneers in this field. Because of its simple syntax, it supports cross-platform and is ubiquitous in Linux,macs and other Unix machines. In particular, the Python language is definitely the first choice for automating operations. Automation testing is also starting to choose the Python language more.
But not because it is strong enough to overlook the nature of Python's most independent programming language, in fact, Python may be one of the most flexible and powerful development languages in the universal programming language. Some examples are given below:
1. Telephone infrastructure (Twilio)
2. Payment system (paypal,balanced Payments)
3. Neuroscience and psychology (many examples)
4. Numerical Analysis and Engineering (NumPy, Numba and many other examples)
5. Cartoon (LucasArts, Disney, DreamWorks)
6. Game Backend (Eve Online, Second life, Battlefield and many other examples)
7. E-Mail infrastructure (mailman, Mailgun)
8. Media Storage and processing (YouTube, Instagram, Dropbox)
9. Operations and Systems Management (Rackspace, OpenStack)
10. Natural language Processing (NLTK)
11. Machine Learning and computer vision (Scikit-learn, Orange, SIMPLECV)
12. Safety and Penetration testing (Dnsrecon, Patator, Xsser, too many, including ebay/paypal/)
13. Big Data (Disco, Hadoop support)
14. Calendars (calendar Server, which powers Apple iCal)
15. Search system (ITA, UltraSEEK, and Google)
16. Internet Infrastructure (DNS) (BIND 10)
17. Cloud computing Platform (OpenStack)
18. Reptile FRAME (Scrapy,scrapy-redis)
19.WEB Architecture (Django, Flask, Tornado)
20. Commissioning and reverse engineering (many of them are not listed here)
Other examples of endless can be searched via the internet. In the present, Python as the main development language is not a problem, can be used as the first language.
Python is a weakly typed language:
One obvious feature of Python is that variables are dynamic types, which does not affect Python as a strongly typed language. In a sense, Python has a more powerful type system than Java. Java primitives and objects have their own type systems, and NULL exists in a gray area.
Python, on the other hand, has a uniform, strongly typed system, and none of this type has a clear definition.
About the Python type system, in the application also need to pay attention to, the careful processing, otherwise also can cause the trouble.
Python is not secure:
Python is an interpreted language, usually the software release using the source code, so it is not safe to think of codes, security is not good. As I said earlier, Python is supported for compilation, in fact Python can be compiled + interpreted mixed type.
In addition, security can not rely on the compiled state of code, more importantly, to make the operating environment more secure. Because in essence, each language has an disassembler or can be cracked, which destroys the program's protection state, so security can not just rely on the compilation.
A core principle of security is to render as small a target as possible. CPython solves these problems with simple, stable, and easy-to-audit virtual machines. In fact, in a recent analysis of Coverity software, CPython has received the highest quality evaluation.
Python also has a wide range of open source, industry-standard security libraries. Combining Hashlib,pycrypto and OpenSSL with Pyopenssl, some processing is done to meet a variety of security and performance requirements.
According to the public information, there are many examples of using Python's security app in PayPal's application security group:
1. Creating a security agent to facilitate key substitution and enhanced cryptographic implementations
2. Integration of industry-leading HSM Technology
3. Build a wrapper agent based on Transport Layer security for incompatible stacks
4. Generate keys and certificates for our internal two-way authentication mechanism
5. Developing an active vulnerability scanner
Domestic BATJ companies are also heavily used in Python development, and many of the operations-oriented systems built by Python imply security features such as firewalls and connection management.
Python lacks good concurrency support:
Referring to Python, the Python Gil (Global interpreter Lock) will certainly be mentioned, and it will certainly question "Python lacks concurrency". This is really not good to say. It's only easy to see.
Python has a large number of concurrency primitives, including generators,greenlets,deferreds and futures. Python has a lot of concurrency frameworks, including eventlet,gevent,pulsar,toro,offset and twisted.
A lot of work has been done to customize the run time for concurrency, including stackless and PyPy. All of this, as well as more cases, show that using Python effectively can be programmed concurrently. These enterprise-grade products have been officially supported and used.
The Global interpreter lock Gil is a performance optimization in most uses of Python, and is also an ease-of-use optimization in the development of CPython code. The Gil makes it easier for the operating system's threads or green threads to be used without affecting the use of multiple processes.
Currently a large number of server-side software in Python development, we also see the Python server every day each machine has millions of requests, but they can be easily processed. So you can't say Python lacks and releases support.
Python is not suitable for bigger projects:
One of the main features of Python is the high efficiency of development, and the Python project team can accomplish larger projects with a small number of developers. Instagram hits billions of times a day and $1 billion, and the company still has a team of dozens of people. Dropbox had only 70 engineers in 2011, and the other Python teams were very similar, with few people. Also brings a query, Python can not do large projects, the formation of the team. Instagram,dropbox a small project?
Let's look at a few examples, Bank of America actually has more than 5,000 Python developers, and a single Python project has more than tens of thousands of lines of Python code. JPMorgan Chase has undergone a similar shift. YouTube also has thousands of engineers and millions of lines of code. Large products and large teams use Python on a daily basis, and they have excellent modularity and encapsulation features that, beyond a certain point, are basically the same size as general development. Tools, strong conventions, and code reviews make large projects easy to manage.
Writing large projects any language will encounter problems, not by language constraints. Should abide by reasonable and strict norms, develop a good programming literacy. Such as: can support the PEP8 specification, before committing the code, we use Pyflakes and other tools to execute the Python code static analysis and so on.
In fact, Python not only develops efficiently, but also makes it easier to develop efficient, stable software.
Python cannot be extended:
This is a little blurry, the Python language itself is extensible, and Python can develop software that is extensible. YouTube is developed in Python and is an extensible website. Each month, more than 1 billion independent visitors upload more than 100 hours of video per minute, occupying 20% of the internet's peak bandwidth, all using Python as the core technology. Dropbox, Disqus, Eventbrite, Redtwilio, Instagram, Yelp, Eveonline, Second Life, EBay, and PayPal attest to the extensibility of Python.
Simplicity and consistency are key to success. CPython This basic Python virtual machine to maximize these features and also to make the runtime predictable. It's hard to see Python programmers focus on garbage collection aborts or application startup time. With a strong platform and network support, Python naturally adapts to intelligent lateral scalability, mainly in systems like BitTorrent.
Two other questions:
These two are not a misunderstanding, but they can be said to be true.
1. Python runs slowly
Python, as an interpreted language, is generally understood to be faster than a compiled language without C and C + +. But the Python language is slower than Java, and this is debatable. The problem can be seen in the following ways: Language is only a factor, and it is sometimes inappropriate to evaluate the speed and slowness of a language alone. It should be evaluated against an application, preferably for a specific use case. For example, using Java,python to implement a software evaluation. Since python can be very good with C, C + +, you can use C, C + + in places where you really need performance, and then you need to improve coding efficiency in python, so that the overall software you write may be faster than Java. And now there are some optimized python interpreters, such as: PyPy's JIT compiler has achieved faster performance than the C language. There are Python applications on the server side of the majority, and run faster than network throughput is also a bottleneck, from the existing software, Python speed is not the biggest problem, Disqus user scale from 250 million to 500 million, has been using the same 100 servers. Increasing the speed of software iteration is also a factor to consider. Python has put developer productivity first at the beginning of the design. Based on experience, the Python project will have more iterations than C + + or Java projects for the same amount of time.
2, Python programmer scarce
Python is relatively late in popularity, and before Python is often used as a second language for engineers, the number of Python development engineers is less than true.
Python's web development engineers are less than PHP and Java. This may be due to the linkage between industry needs and education, but educational trends suggest that this is likely to change.
The high efficiency of Python development enables the development of Python, a smaller team that can perform an efficient, powerful software development project. This is also a factor.
From another point of view, Python practitioners are also relatively small, the absolute number of Python practitioners are also many. There are millions of python developers around the world, dozens of Python conferences, Stackoveflow on tens of thousands of Python-related issues, some companies such as YouTube, Bank of America, and lucasarts/ DreamWorks employs thousands of Python developers.
A new project or start-up company prefers Python for the following reasons:
Python is very easy to learn, and is the preferred programming language for kids, college students and incumbents. For a new Python programmer, it only takes a week for him to get the initial results, often in 2-3 months, with rich interactive tutorials, books, documents, and open source code repositories that make this possible.
The number of Python development engineers has soared in recent years. Employees pay is good, so there will be a large number of beginners admission, the average salary is pulled down is inevitable. Practice is risky, and you need to be cautious.
Figure: Bruce Eckel is the exact words "life's short, you need Python"
Python: After more than 10 years, have you not eliminated the misunderstanding to me?