3 ms·
That sounds like some poor programing in bash. The essence of the problem from what you wrote is something like: display the blame for all lines of all files p
by IncRnd 4y ago
That sounds like some poor programing in bash. The essence of the problem from what you wrote is something like:
display the blame for all lines of all files per folder | sort by name | sum counts by name
A single command-line can contain all the bash code, since the necessary tools are all available and can be placed together in a pipeline.
- Stratoscope 4y agoIn all fairness, the Bash code really did quite a bit more than that proverbial one-liner. But much of it wasn't calling and tying together those external tools, it was data analysis code that would have been so much simpler in Python. Plus, being a Python shop, any of us could have maintained a Python version, instead of the one engineer who was truly a Bash wizard. Some common sense and manual work might have been even better: just ask everyone in the company to identify the code areas they were familiar with and manually populate the CODEOWNERS files, instead of spending months on a mostly-failed attempt to automate the whole thing. Or, just teach people how to use git blame! After all, many of us touched many different parts of the code. Git blame would tell you immediately who was familiar with the different bits, at a much more granular level than a CODEOWNERS file in a directory.
- IncRnd 4y agoYou've pointed out several ways things could have been done better in that project. They are all clearly important and hard-won knowledge. But, I have found that one of those is super-duper-extremely important: know when not to program! You can just ask other SMEs (subject matter experts) for the answer!