Dirty language statistics in Linux kernel code

Source: Internet
Author: User
Tags regular expression expression engine

According to the number of dirty words/version number statistics

By language density/version number statistics

The above illustration shows the c,h in the Linux kernel and the bad language statistics in the s source code, which I will update once a month, and updated once the new version is released. I was inspired by the Linux kernel fuck count, but unfortunately the data inside it has expired.

It is clear from the figure that the number of swearing has increased substantially since the 2.4 edition. However, the total amount of code has also increased a lot, so, overall, the average curse density per line is reduced.

Introduction to statistical methods: words that appear in any place are counted in the total--in another word. Could have done more reasonable, but it turns out that the FreeBSD regular expression engine has a serious memory leak problem, I have no further improvement. A dirty word may be counted several times in a row, because sometimes a programmer encounters a very, very annoying day.

You can find this script, but it's written in a really messy way, not recommended.

Related Article

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.