Pages

Open Source Documentation

After my Bachelor’s in Mechanical Engineering I started to work at an Information technology firm. The first and the most important thing which was told to us (new software developers from non computer background) and then pounded every now and than is to write proper comments/documents for the code one writes. Thus, for whatever lines of code we develop there was about 25-30% of comments so that the next developer who works on it can better understand the code. Now when I am in Open Source world the situation is opposite. There is hardly any documentation for the code developed which may make the life of the developer studying the code very difficult. Open Source development is always criticized for not having proper and formal documentation. Often the developers are geographically dispersed and communicate with emails or IRC. The following table gives us the relative amount of comments with respect to the total lines of code for the Open Source projects. Thus, the data represents the percentage of comments for the Open source code for a particular programming language across five thousands Open Source projects considered.

Language

Average comments (%)

Matlab

0.46

Java

0.35

Ada

0.29

Pascal

0.27

PHP

0.24

rexx

0.24

C#

0.24

AWK

0.23

DOS batch script

0.21

C/C++

0.20

Objective C

0.19

Assembler

0.19

JavaScript

0.18

Ruby

0.16

Tcl

0.16

shell script

0.15

Emacs Lisp

0.15

Perl

0.14

Scheme

0.14

Lisp

0.13

Python

0.12

Lua

0.11

Visual Basic

0.10

CSS

0.08

Boo

0.04

HTML

0.03

XML

0.03

It can be seen that the percentage of comments/documentation is really very poor. Matlab has the highest comments of 0.46% of the total lines of code which is very poor with respect to the classical software development.



No comments: