DEV Community

Discussion on: Blaming Git Blame

Collapse
teamradhq profile image
teamradhq

I think this is a really interesting discussion, and you make some points that I've not considered before. Although I feel that Linus' comments detract from this discussion. Firstly, because your quotes are almost a decade old, and Linus' efforts to self-moderate his bad language has been well publicised. Secondly because, as you explain later, the term predates git. And finally, as you point out, Linus isn't even responsible for implementing blame.

Personally, I've never felt any negative emotions about blame, although I often chuckle when I think to myself "Who the hell wrote this?" only to blame and see that I wrote it last year!

And when I read comments about how blame exists so we know which co-worker to blame, all that person is saying to me is that they don't understand its purpose:

Git blame is a git command which reveals what revision and author last modified each line of a file.

The key here is: revision and author. It's also important to understand that the author is not necessarily human. It could be a merge commit, or an automated build commit. It could also be that the author isn't just one person - maybe it's the pilot in a programming pair, or a colleague sat down and wrote that line. Perhaps the commit is a squashed commit containing someone else's work.

My point is that we're less interested in "blaming" the author than the revision.

As for renaming it, I feel that blame is adequate and accurate. Using author is insufficient because it doesn't accurately describe what it provides. Similarly, something like praise doesn't make sense to me. Mainly because we almost never look at the existing code of working implementations. And given the author might not be human it seems a bit strange to praise a machine.

To give an example, my most common use for blame is to identify when and where bugs were introduced:

  • Looking a file I suspect that unlucky line 13 might be the cause of a bug.
git blame file | grep 13\)
# 63ab903 (Paul 2021-06-17 11:44:05 +1000 13)   oopsie(daisy);
Enter fullscreen mode Exit fullscreen mode
  • Then I checkout this revision to verify if the bug is present.
git checkout 63ab903
Enter fullscreen mode Exit fullscreen mode
  • If the bug is present at this commit, I'll check previous revisions until I find one where the bug is absent.
git checkout HEAD~10
# 3d2e091
Enter fullscreen mode Exit fullscreen mode
  • Then I'll checkout the branch and do a bisect.
git checkout branch-name
git bisect start 
git bisect good 3d2e091
git bisect bad 63ab903
Enter fullscreen mode Exit fullscreen mode
  • And if bisect lands on the same commit, I now know where the bug was introduced.
# Bisecting: 0 revisions left to test after this (roughly 0 steps)
# [63ab903138aea32c3e32a90ec86ddfef6f3c2948] getIndex accepts negative value
Enter fullscreen mode Exit fullscreen mode
  • Now I'll git blame file again, checking for that revision:
git blame file | grep 63ab903
# 63ab903 (Paul 2021-06-17 11:44:05 +1000  7) import { toDataSets } from './toDataSets';
# 63ab903 (Paul 2021-06-17 11:44:05 +1000 13)   oopsie(daisy)
# 63ab903 (Paul 2021-06-17 11:44:05 +1000 36)   const output = elements.reduce(toDataSets)
Enter fullscreen mode Exit fullscreen mode
  • I'd also check for other files from this commit.
git --no-pager diff --name-only 3ca5d95a~1 
# file
# file1
# file2
# file3
Enter fullscreen mode Exit fullscreen mode
  • And blame those as well...

At no point, am I blaming people, I'm blaming the code revision that's responsible for the error that's occurred.

For me, changing to something like praise would be weird. Once I've isolated a bug to a revision, why would I then praise its contents?

And for you, if you feel uncomfortable with blame define an alias in your .gitconfig to use whatever language you want:

[alias]
awesome = blame
Enter fullscreen mode Exit fullscreen mode

Then you can git awesome file instead. It's the great thing about being computer literate, you can define your own language to interact with your machine (-; my personal favourite is git f*ckit that I regularly use to nuke any changes when I accept that my entire approach is wrong ;-)

Collapse
sanspanic profile image
Sandra Spanik Author

Hey, thanks for your comment and for taking the time to write it. But, I have to ask: did you really read my article in full? I actually mention git alias as well as why it's not an adequate solution, pre-empting replies like yours, so I'm surprised to read your comment.

In your reply, you also dismiss the entire section about how language subconsciously affects individuals. Your argument seems to be that because you understand git blame better than others and as a result don't feel negatively affected by it, the naming of git blame is totally fine.

Just because you personally don't feel affected, doesn't mean other people won't.

We clearly have different sensitivities when it comes to language, because I'd never winky smiley anyone the way you just winky smiley'd me - to me, it feels rude. It's okay that you don't, and I'm not offended, but it's important for you to be aware that just because you think certain language is cool, doesn't necessarily make it so for everyone. Becoming an inclusive industry means being aware of these cross-cultural and individual differences and accommodating the norm so as to cause the least amount of harm possible.

I am also concerned about the cumulative effect on an entire industry rather than just the impact on any one individual.

Fair point about my mentioning Linus' past behaviour. I felt his past behaviour illustrated the general mindset that led to the naming of git blame in the first place quite well. I hopefully make it clear enough that it wasn't directly responsible for it, and specifically link to an article about him having changed. I take your feedback on board though.

Collapse
teamradhq profile image
teamradhq • Edited

You’re welcome, and I did read your article in full. Did you?

Given your post's topic, it seems ironic to call people rude or dicks... If you truly believe about stepping away from shame culture and towards openness and inclusivity, how about you start by not shaming people and instead moderating your own behaviour and language?

Git alias does solve a problem. The reason I mentioned it is because your pre-emptive supposition is wrong. If your problem is that you don’t want to write git blame defining an alias allows you to not type the word "blame".

Similarly, this snippet solves your problem, if your problem is that you don't want to see the word "blame" on GitHub:

document.querySelectorAll("a[href*='blame']")
  .forEach(el => {
    el.innerText = 'Author' ;
  });
Enter fullscreen mode Exit fullscreen mode

If you really feel this language is a problem for many people, you could use this as a basis for a browser extension so that other people can utilise it. If many people use it, GitHub might even take notice and implement this as a feature. Nobody is stopping you from doing this and it would certainly be a more productive use of your time than insulting individuals.

And if seeing the word is an issue for you in vscode, you’re entirely welcome to checkout the extension you’re using for blame and modify it to substitute another word.

This is the great thing about being a programmer: you see a problem and you have the tools to fix it.

I don’t dismiss the subconscious effects language has on individuals. Obviously it could be harmful to call [redacted] and [redacted] dicks because they expressed a different opinion to yours. It doesn't seem very genuine to tell your audience to be mindful of the language they use as it may cause negative psychological responses in others, then say something ageist like that is soooo two thousand and late.*

Similarly, calling someone rude for signing off their post with a positive emote in a reply to a post that signs off with a positive emote is hypocritical and discriminatory. I mean seriously! You'd never use an emote in a discussion? Clearly you didn't get to the end of your article!

Passing judgement on someone who, unlike you, doesn’t have access to an emoji keyboard with star eyes isn’t very inclusive or accommodating, and I wonder if you’d have a problem with an emote in a post whose contents affirm your opinion, or if it's just because emoticons are sooooo two thousand and late and you hate old people.... if you still think using emotes in textual communication on the internet is inappropriate, you should remove them from your article (bearing in mind that emotes are language too).

[edit] and reading your replies to other comments, it’s clear you are discriminating as you didn’t call out other posters who signed off with a wink emote, and you seem to think it’s okay if you emote at people… obviously your rules don’t apply to you, just the people who are different to you.

Comments on individuals and insults to strangers (like yours) make our industry less inclusive. I hardly think that [redacted] or [redacted] would feel very welcome or safe to contribute to this discussion after being called old dicks... and you have no hope of changing an industry when you can't even follow your own guidelines!

Your statements thus far show a clear lack of empathy for people who are different from you and I hardly think you'd do well in a cross-cultural, diverse team with your current outlook and behaviour. My only hope at this point in our interaction is that you at least see the irony of your public shaming of individuals with different perspectives in an article telling an industry to avoid shaming individuals. I hope you take some time to contemplate what you need to change in yourself to be the change you want to see in an industry.

Thread Thread
sanspanic profile image
Sandra Spanik Author • Edited

I disagree with a lot here, and am hurt by your conclusions. You're making on the surface reasonable-sounding accusations that fall apart upon closer inspection, because your premises are false.

You continue to suggest my problem would be solved if I aliased git blame or programmatically removed the word blame from Github in my browser. This demonstrates I have either not been able to convey my point to you via the medium of my article, or that you're intentionally ignoring entire paragraphs.

  1. I describe how the effect of git blame on any one individual is negligible but how it has an industry-wide cumulative effect. I never characterise this as my problem to begin with, which you disregard in all your replies.
  2. I pre-empt replies like yours by mentioning why git alias is not an adequate solution - it doesn't address that blame remains the default wording for an entire industry.
  3. As for your code snippet. I can only conclude you assume I don't know about DOM manipulation or about how to implement it. You're wrong on both accounts. Besides, it takes more work than your bit of code to make the change permanent. If you're going to flex your coding muscles at me, perhaps suggest something that actually works.
  4. A browser extension also doesn't address the default. Neither does a new VS Code extension. Suggesting I build something from scratch, once again, ignores the premise of my article. I maintain that patching git itself is the most straightforward way to shift the default.
  5. You do make a fair point about censoring names. I will. I stand by my decision to include the screenshots though, for the same reason I stand by my choice to include examples of Linus' past behaviour. They're both exemplary of an overall, industry-wide norm that has led to naming choices like git blame. Equally, I stand by my choice to infuse the article with light-hearted humour in order to make the 15-min read more palatable. Blaming any one individual for the harmful convention would have indeed been hypocritical, but asking individuals not to be dicks going forward and indicating that a cultural shift has happened over the last 2 decades is not. Besides, the effects of language are weighted by the power dynamics it exists within. I'm hardly causing harm here in the same way a feature that affects millions and shapes our default is, or in the same way a leader with livelihoods depending on them would be.
  6. "star-eyed-emoji" ≠ "winky emoji" and there's no way you can frame my use of emojis as hypocritical. I didn't even call you out on the use of yours - I merely said that it's exemplary of our differences. The fact you're getting hung up over this and are trying to twist it into a portrayal of me as a hypocrite signals to me this is no longer a reasonable, factual discussion, but a personal attack.

And so I can only assume you're intentionally trying to hurt me. I will leave your comments up but I am putting up boundaries and disengaging from any future discussion. You've made this personal by intentionally misconstruing or ignoring my perspective on a multitude of issues and whilst I'm appreciative of factual debates, I draw the line at people attacking me.