Delphi projects: Some stats about the top 1000 projects on GitHub

Photo by Carlos Muza on Unsplash

Last week, I analysed the top 1000 Delphi projects on GitHub, mainly out of curiosity, and also to play with another programming language (Python). I took Delphi projects because we at GDK Software have many customers with this programming language.

To be able to do the analysis, I did the following steps:

  1. Using the GitHub API, I created a list of Delphi projects (sorted by the number of stars).
  2. I cloned every Delphi repository to my environment.
  3. Then I analysed the source code. I mainly looked at some interesting statistics that I could get out of the code in this way.

Below is the entire list of repositories added, sorted by the number of stars on GitHub. I’ve removed some projects from the list because they weren’t Delphi projects, or (in the case of “awesome-pascal”) because it is just an overview of frequently used Delphi projects.

Top 10 Delphi projects on GitHub
Top 10 Delphi projects on GitHub, sorted on Github stars

If we make a selection of the repositories with the most lines of code, it looks very different (repositories with at least 10 stars):

Lines of code

To show some interesting conclusions; of the 1000 Delphi projects, there are no less than 240 where empty “except…finally” constructions occur. Also, 291 projects use Generics and 217 use the Firemonkey framework.

There are quite a few of these public projects that are not afraid of long functions or procedures. The largest procedure I could find consists of more than 2939 lines (project MCH_Delphi_Software).

As for the largest Pascal files, see below. If you want to view the Delphi files yourself, just search Github for the corresponding filename. Or, see below how you can clone the Delphi repositories.

In the next weeks, I’ll share some more stats. If there’s anything you’d like to see, feel free to reply and ask! 🙂

Download here the CSV file with the complete list of repositories.

If you want to download the repositories yourself, go for it! Make sure you first install the Python libraries pygit2 and Github

pip install PyGithub
pip install pygit2