I have over 50 repositories on GitHub with the majority being one time projects that were either me exploring a new technology, writing a small script, or doing a quick data analysis and visualization project. Every once in awhile when I’m a bit nostalgic I’ll go through these old projects and mend some of the code.
What’s surprising is discovering old projects and scripts that work as is without me having to do anything to update the underlying code. I’m used to so working with so many open source libraries and cryptic documentation that it’s rare to find a public library that works exactly as you expect. Of course my projects are much simpler than the typical open source library but I find it remarkable that I can get code up and running within a few minutes of a checkout.
This is something that we should aspire to when writing code - writing it in such a way that if someone were to use it in a few years it would be easy to follow and understand while being able to be run without requiring any modification. There’s an urge to constantly improve and extend everything we write but in the world of software it’s possible that we may end up making it worse. Rather than adding bells and whistles to everything we write we should take a step back and think how we would react if we were to discover it in a few years.