Knowledge Base

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

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 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.

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

To show some interesting findings; 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.

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 PyGithub

pip install PyGithub
pip install pygit2

Written by Marco Geuze
Director

Contact

Let us help you to realise your ambitions

GDK Software UK

(+44) 20 3355 4470

GDK Software USA

+1 (575) 733-5744