We can compute the decay for individual commits too. I would have expected more of a decay here, and I'm surprised to see that so much code written back in 2006 is still alive in the code base – interesting! This plots the aggregate number of lines of code over time, broken down into cohorts by the year added. ![]() ![]() Git became self-hosting early on, and it's one of the most popular and oldest Git projects: There is a “ship of Theseus” effect, but there's also a compounding effect where codebases keep growing over time (maybe I should call it “Second Avenue Subway” effect, after the construction project in NYC that's been going on since 1919). It turns out that code doesn't exactly evolve the way I expected. The ship wherein Theseus and the youth of Athens returned from Crete had thirty oars, and was preserved by the Athenians down even to the time of Demetrius Phalereus, for they took away the old planks as they decayed, putting in new and stronger timber in their places, in so much that this ship became a standing example among the philosophers, for the logical question of things that grow one side holding that the ship remained the same, and the other contending that it was not the same. If all pieces are replaced, is it still the same ship? It refers to a philosophical paradox, where the pieces of a ship are replaced for hundreds of years. I'm a dad now, so I can make terrible puns. In moment of clarity, I named “Git of Theseus” as a terrible pun on ship of Theseus. ![]() The idea is to go back in history historical and run a git blame (making this somewhat fast was a bit nontrivial, as it turns out, but I'll spare you the details, which involve some opportunistic caching of files, pick historical points spread out in time, use git diff to invalidate changed files, etc). About Resume Top posts The half-life of code & the ship of Theseus Īs a project evolves, does the new code just add on top of the old code? Or does it replace the old code slowly over time? In order to understand this, I built a little thing to analyze Git projects, with help from the formidable GitPython project.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |