text
stringlengths
0
2.35k
Awesome! So we talked a little bit about -- well, actually you alluded to this, Sarah, like being cognizant of the people who are reviewing your PR. So I'd love to hear a little bit about how many people should review your PR before you merge it; is it one person, is it two people, is it the entire team? What are the t...
**Angelica Hill:** I'm sorry I'm doing this again, I want to bring back to the previous question... \[laughter\]
**Natalie Pistunovich:** Do it.
**Angelica Hill:** So when you say too long or too short, what do we measure? Number of lines? Number of commits? Number of files? It can be -- depending on many things, the answers can vary in the same PR. It can be one PR where you removed one file, but that's like many lines... Is that long, is that short? This is m...
**Natalie Pistunovich:** Yeah, I can see it. Also, I'm learning, now, actually just as a Go Time host, every time I ask a question I should pause and defer to Natalie, and be like "Do you have a follow-up question?" \[laughs\] That is a great question, I'm very glad that you answered-- asked it... That definitely said ...
**Angelica Hill:** Yes...
**Natalie Pistunovich:** Wonderful. I'd love to hear it.
**Angelica Hill:** But we're here to hear other people's opinion, so I'm curious to hear the crowd's opinions more than I am interested in sharing. I mean, I'm also happy to share mine, but I'm more curious about others. Is there a convention in your team, for example? Would you say this is too much - what would look a...
**Jeff Hernandez:** Yeah, I'm really curious about hearing more about Sarah's - the team's standard... But at least from me, if I'm reviewing something, the first thing I look at is the number of files that were changed. That's just like the easiest thing to look at. If it's a long list, I am gonna go to lunch maybe, a...
**Sarah Duncan:** Yeah, I definitely think files are a good initial indicator... And sometimes that can be misleading, because you could have a bunch of files only have one line change, or you moved a folder into a subfolder, and that changed a bunch of files, and you can just check all those off as okay... But I think...
\[19:57\] The analogy I try to use and that I recently used at the New York Times to kind of explain how to break down your PRs - it ties into your question, Angelica, about the number of reviewers... My analogy is that if my ticket is to bake a cake, and let's say it's chocolate cake, we've got some butter cream frost...
So if I'm trying to perfect the chocolate cake, and Jeff, you're like "This cake is too dry.", You have to go back and make it less dry", that is so much more work for me to reconstruct that cake all over again... But if I break that down and first I make my chocolate sponge, Jeff, you taste that and you give me feedba...
So I like to think about it as like breaking it down so that ideally one person could review it, and maybe one subject matter expert could review that part. Then when we get to the assembly piece, you're judging me on the assembly, you already know that the individual components are -- we're all on the same page about ...
So I think it's a hard thing to measure, because even just that "Oh, one subject matter expert is not a hard and fast rule." This is one of the things I think is something that comes more with experience and intuition. It's a skill that you're able to hone as you gain more experience around what the right size to ask f...
**Natalie Pistunovich:** That was so great...
**Sarah Duncan:** The teacher in me... You know, we've gotta bring in the fun things.
**Natalie Pistunovich:** That was wonderful. I feel like I've learned so much, genuinely. I will never think of PRs and constructing of a feature again in the same way. Like, "Can I see the frosting, please?"
**Sarah Duncan:** Please. \[laughs\]
**Natalie Pistunovich:** "Let me check the topping."
**Sarah Duncan:** Yeah. How moist is the cake?
**Natalie Pistunovich:** "How moist is this cake?" I'm gonna have to be very careful whom I say that to, because some people don't really like the word "moist". I don't particularly, but it's fine.
**Sarah Duncan:** Judge your audience, yeah.
**Natalie Pistunovich:** Judge my audience. Good perception. So flipping over kind of to the other side of a PR, how do you go about reviewing a PR? I'm gonna pause. Natalie, would you like to talk about putting in a PR in any more detail before we switch over?
**Angelica Hill:** \[laughs\] No, no, sorry. I'll go back to being German and sticking to the schedule.
**Natalie Pistunovich:** No, no, please, don't. I came across like I was being a little bit sassy...
**Angelica Hill:** No, no, no...
**Natalie Pistunovich:** ...but it was a genuine question.
**Angelica Hill:** I love making German jokes, any day.
**Sarah Duncan:** I should have made it a German chocolate cake. I'm so sorry that I missed that opportunity... \[laughter\]
**Natalie Pistunovich:** Oh, my gosh...
**Angelica Hill:** A Strudel... This is Austrian.
**Natalie Pistunovich:** Natalie will be the final -- like, once the beautiful cake has been constructed, she is the ultimate SMA
**Angelica Hill:** Wait, did you use sugar or salt?
**Sarah Duncan:** The ultimate taste testing... \[laughter\]
**Break:** \[24:00\]
**Natalie Pistunovich:** Great! So you are going to review a PR... What are the almost unspoken rules of PR review? Are there actual rules of PR review? I'd love to hear how do you approach reviewing your colleagues' PRs.
**Natasha Dykes:** I think it goes a long way if you lead with empathy. Go through the PR, address anything that you think could be updated, but not in a way that you're talking down to people... Just having a willingness to learn, a willingness to teach... I think these are all core factors of doing a good PR review. ...
**Sarah Duncan:** Yeah, I totally agree. I think there are a lot of small behaviors that we as engineers can adopt to be more empathetic in our code reviews. I really enjoy some of the resources that other people have already written and shared around this. I particularly like Alex Hill's "The Art of Giving and Receivi...
For example, instead of saying "Oh, you should use this other function. It already does what you're doing here", asking "Oh, can we use this other function here? Is there something that we can reuse?" And that gives the opportunity -- because you could be wrong. I'm a staff engineer, and I'm wrong all the time... So if...
\[28:13\] I think remembering that the person who's coming in with the pull request has spent so much time, presumably, on this problem, that - yes, the fresh pair of eyes is really helpful, and you might see something that they didn't, but also giving acknowledgment to the work that they've put in on this pull request...
**Jeff Hernandez:** Yeah.
**Sarah Duncan:** Check your ego...
**Jeff Hernandez:** Totally, plus a thousand what they've said so far. It's not a one-sided street, it's two sides. You can take something back from the review, and then they can take something forward... It's always an opportunity to learn something new, especially from people who have way more experience than you do....
**Sarah Duncan:** It's really great.
**Natalie Pistunovich:** I'll make sure I put it in the episode notes. And it is a great article... So when you're thinking about reviewing, are you predominantly reviewing for the functionality, and like "Does this thing work?" or are you also commenting what are the I guess rules around commenting on style? Like, how...
**Natasha Dykes:** I think a bit of both...
**Sarah Duncan:** Yeah, definitely. And not to over-reference this article, but one of the things I think is one of my key takeaways from this was that there are those kinds, like code style things that can be automated. So having a team norm of "Oh, we're always using this linter for this codebase, we're using this fo...
That's where I think having a set of norms on your team that you regularly revisit when somebody new joins, when you have a new repo you're working in... Those norms will help smooth that conversation, because if you have all already agreed, like "Oh, we're gonna make sure we follow DRY practices", or whatever - those ...
**Jeff Hernandez:** \[31:58\] It's really important having that team understanding. At least in my previous company we had shared standards as to how things -- we had pillars in everything, we had a standards committee that we were trying to... For code style, and stuff like that.
But on the other side of the coin, I'm kind of -- sometimes if I see a spelling mistake, I will point that out in the PR, just because it's... Like, if it's already committed and I see it, I wish someone had called it out in the PR. In my PR I will fix it...