Research Question (Problem)
A programmer that works with various programming languages and for multiple organisations (work, school, side-projects) stores a lot of source code locally. Unlike the physical world, or at least a map thereof, the filesystem provides little help to grasp the structure of the source code folders stored. This project aims to provide such an overview.
Source Code Folders
A source code folder is a hierarchical fle system structure that contains
- other folders (projects, modules, sub-modules, etc.), and
- files (containing source code in different languages).
One possible organization of source code folders is to create a folder for every SCM server in the home directory (or a code subfolder thereof), e.g. github.com and gitlab.enterpriselab.ch, into the home directory. Within that directory, there is one folder for every group or project, containing multiple repositories.
This are some examples from one of the author’s laptop:
/home/paedu/github.com/patrickbucher/reversi /home/paedu/code/github.com/patrickbucher/davi /home/paedu/code/github.com/skiapoden/kurtoid /home/paedu/code/gitlab.enterpriselab.ch/iotcourse-h19/arduino-examples /home/paedu/code/gitlab.enterpriselab.ch/iotcourse-h19/makefile-examples
The structure is always the same:
/home/[user]/code/[scm-server]/[group]/[repository]
A repository folder contains other folders. This is an example from the repository px (a command line client written in the Go programming language):
Makefile cmd/px.go scripts/ci-pipeline.sh scripts/ci-px-login-logout-test.sh scripts/envvars.sh tokenstore/tokenpair.go tokenstore/tokenresponse.go tokenstore/tokenstore.go tokenstore/tokenstore_test.go
The folder not only contains code written in the Go programming language, but also shell scripts, a Makefile, and some documentation written in Markdown.
Using the gocloc utility, the number of lines of code by programming/markup language can be displayed as follows:
--------------------------------------------------------------------------- Language files blank comment code --------------------------------------------------------------------------- Go 10 112 9 1053 BASH 8 25 157 8 Markdown 1 34 57 1 Makefile 1 8 23 0 --------------------------------------------------------------------------- TOTAL 20 179 246 1062 ---------------------------------------------------------------------------
Project idea
The idea of this project is to visualize this data in order to gain more insight:
- How big are those source folders and files in comparison?
- How much code do I write in which programming language?
- How dense is the code?