In this appendix you can find the steps needed to get the data and create the graphics showed in this article.
After run SLOCCount over the different versions of gedit, the information gathered was inserted in a database table with the next structrue:
CREATE TABLE gedit ( version VARCHAR(5), date DATE, size INT(11), `lines` INT(11), ansic INT(11), sh INT(11), sed INT(11), python INT(11), perl INT(11), PRIMARY KEY(version) );
The data was inserted with different sentences like that:
INSERT INTO gedit VALUES ("0.5", "1999-02-12", 364591, 15210, 10142, 4975, 93, 0, 0);
R commands:
library(RMySQL) con <- dbConnect(dbDriver("MySQL"), user="root", password="root", dbname="gedit_sloccount") query <- "SELECT * FROM gedit;" results <- dbGetQuery(con,query) plot(results$lines, type="l", ylim=c(0,75e3), xlab="", ylab="Lines", main="Evolution SLOC") lines(results$ansic, col="blue", type="l") lines(results$sh, col="red", type="l") lines(results$python, col="green", type="l") legend("topleft", inset=.05, c("total", "ansic", "sh", "python"), fill=c("black", "blue", "red", "green"))
R commands:
pie(main="SLOC by programming languages", c(57909, 9515, 6180, 30), col=c("green", "blue", "red", "yellow"), clockwise=1, labels=c("ansic", "sh", "python", "perl"))
See Figure 2, “Source lines of code by programming language ”.