Ask HN: Should even small scripts have documentation?
The point of this post is, that these scripts, some of them written more than 3 years back and still running even on modern infra (since they do their job well), have no documentation. To understand how they are working, I have to spend lot of time reading them and co-relating them with other scripts where many scripts work in tandem to accomplish a major task.
Now note, some of these scripts are just 100 lines. But very cryptic 100 lines. Which made me think that when they were written by my (former/current) peers who are good in perl, it was all Okay for them, but since these scripts have survived and don't know how long will they survive, should there be a documentation for each of them? Like explaining what they do and give a high level overview of how they do it? Or would it be too much?
This question doesn't just apply to perl scripts, but to any script a SysAdmin/SRE/DevOps/Dev may write, no matter how small or trivial. What would be the best thing to do here? It may sound a bit of spoon-feeding for the future generation, even to senior folks who join later and who are expected to do things hardway (may be?) but will save time and help build a good understanding of systems and workflows quite fast.
If there is someone who does that, or an org where this culture is practiced, please tell me about it. If someone is against it, please share your views too. Please share all the best practices as I intend to implement that in my org.
NOTE: In coming few months I will be writing a small but major system which will replace a few of these scripts with new code but will retain some of the same functionality. I do intend to write comments in each function block and also a few README files along with architecture overview and diagrams. But want to know to what extend should I go to make my work kinda future-proof.