Comment by watwut
5 years ago
If you have to track down the author, then it is already bad. The code should not hope that the author never finds a new job.
5 years ago
If you have to track down the author, then it is already bad. The code should not hope that the author never finds a new job.
But sometimes it is bad, and not fixable within the author's control. I occasionally leave author notes, as a shortcut. If I'm no longer here, yeah you gotta figure it all out the hard way. But if I am, I can probably save you a week, maybe a month. And obviously if its something you can succintly describe, you'd just leave a comment. This is the domain of "Based on being here a few years on a few teams, and three services between this one, a few migrations etc etc". Some business problems have a lot of baggage that aren't easily documented or described, its the hard thing about professional development especially in a changing business. There's also cases where I _didnt'_ author the code, but did purposefully not change something that looks like it should be changed. In those cases, without my name comment, git blame wouldn't point you to me. YMMV.
A 1000 times this. We never use git blame - who cares? The code should be self-explanatory, and if it's not, the author doesn't remember why they did it 5 years down the line either.
I rarely want the author name. What I want is the commit message explaining the changes, and I want to see what the code used to do.
Code without history is nearly unsupportable without reverse engineering it all.