How big is the largest Python project you've ever seen? You've seen it in line 100,000? Also say that the amount of code is small?

Source: Internet
Author: User

The table above has been ordered by the number of lines of code. The interesting point is that the top 4 of the code, except for the CPython of the other three are all operations of the nature of the project, originally I guess the code should be a lot of projects such as Odoo rankings but very close. I have limited knowledge of the operations project, and I'm not sure why the code size of these projects will be top-ranked, perhaps because the content to support is more miscellaneous?

The Sentry of pure Python code in this statistic is almost 70W, which is quite a scale project. There are three items in the 30w~50w line code, including the base project CPython. There are three lines of code for 20W and 10W, and the remaining 7 are within 10W lines.

Having seen this list, you should be convinced that dynamic languages are completely free of problems on projects with at least dozens of w lines of code. This is the limit of the majority of ordinary applications, if the code is really up to millions of lines of scale, then no matter what language, will inevitably face the problem of splitting the project.

The first indicator is the average number of lines of code per file. In a modular view, it is obviously unreasonable to stack too much content in a single file, which usually means too much coupling, difficulty in understanding and modification. However, how much is appropriate, and does not have a clear standard. I hope that through the analysis of these projects, I will look at the choices that open source authors make in practice.

The second indicator is the ratio of annotations to code, and this problem has a similar situation. Annotations are not as detailed as possible, but they always require a certain amount of comment to explain why. Too few comments indicate that the author of the project did not leave enough clues to the subsequent maintenance staff, which could cause maintenance problems. On the other hand, we are looking at all the open source projects, no company assessment or KPI constraints, so we can rest assured that there will be no author intentionally write more comments.

The aforementioned Sentry is uncontroversial because the comments are too few to last, which does not necessarily mean that the project is poor, but at least a signal that the project may be problematic in terms of maintenance. And for projects where authors are willing to devote their energies to writing annotations (Ansible, NumPy, Fabric, Salt, etc.), it is a good sign that the author has invested a great amount of effort into the project, and that this is a great signal that these projects are trustworthy.

The last statistic is about the file type. There is no doubt that the vast majority of Python projects should be Python code, but at the same time I would like to see which major files are included in a project in addition to the Python code. C/html/javascipt's list is no surprise, but there is a kind of document I did not think beforehand, that is. PO (Common language resource files for open source projects).

For the two projects of Django and Django-cms, the number of PO codes is even more than the Python code. Presumably, Django supports more than 90 languages, and it's no wonder that the number of language files is so large.

Enter the group: 125240963 to get the mystery package!

How big is the largest Python project you've ever seen? You've seen it in line 100,000? Also say that the amount of code is small?

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.