text stringlengths 0 2.35k |
|---|
**Natalie Pistunovich:** Yeah. |
**Anderson Queiroz:** So to get the proper ping, it's hard. And the other thing that -- at least on GitHub... I've used a bit of BitBucket as well. I've submitted one, perhaps two PRs to the Go wrapper, with Gerrit. But on GitHub it's really hard, when you do the first review, you're asking for changes, and then people... |
**Natalie Pistunovich:** Isn't this a new commit? |
**Anderson Queiroz:** If someone just forced -- |
**Natalie Pistunovich:** Oh, forced push. Okay. |
**Anderson Queiroz:** If someone's a forced push... Right? So sometimes it's hard to get just the bit that I have to re-review. That's a pain point. |
**Natalie Pistunovich:** Yeah, I had a Twitter poll the other day on "What do you do when the pull request stretches so much, and there's one million comments that lead to one million commits? Do you squash that or not?" And I think the answer that I liked most was "During the pull request have as many commits as neede... |
**Anderson Queiroz:** Yeah. |
**Natalie Pistunovich:** Yeah, definitely a good practice. |
**Angelica Hill:** So you kind of chatted a little bit about your love of Go... And this is a Go podcast, but I would love to hear a little bit about your approach to PRs in other languages, i.e. does the way that you review PRs differ depending on the language you're reviewing? |
**Anderson Queiroz:** I think they do differ, most because of the expertise, right? I'm quite comfortable in Go to understand the language and understand what's happening, to know some caveats, some catches, and also to talk about conventions. In other languages, not so much. So I guess in other languages I am gonna fo... |
I think that's another thing... Pull requests are great, great to learn language conventions. I've learned so much about conventions in Go and the other languages through pull requests... And then if I'm not so expert, I'm gonna try to put and point the best that I know... But I know that I'm not the expert. And a lot ... |
**Angelica Hill:** I mean, taking kind of one step more granular, are there things that are more important for Go when you're reviewing, i.e. stylistic choices, almost principles that you might adhere to more closely than you would in other languages? |
**Anderson Queiroz:** I mean, Go is opinionated. You have to `go fmt`. You have to format the code properly. Even though we still have some space to discuss about how to format... But I think that's the first thing. I usually would like to be super-strict about how the imports are sorted, but I am not. If the wrapper i... |
I haven't seen so much, but because Go is so focused, let's say, in concurrency, sometimes people try to either sneak in concurrency when they shouldn't, or they are not using the right tools... Also because, you know, "Oh, concurrency! Let's use channels!" No. Channels are for something. A mutex - they are for other t... |
\[20:08\] So this is another thing that I would say, "Okay, no. Perhaps we can do different, or we can do better." Or "This is too complex to understand if you use \[unintelligible 00:20:16.17\] If you remove this channel and put a waitgroup, it's a lot easier. \[unintelligible 00:20:20.02\] Channels - probably not. So... |
**Angelica Hill:** When there are new features and new things released in Go, do we see an uptick in people using those in PRs? Like, you just get over-excited, like "Oh, generics...! Every PR now has generics." \[laughs\] |
**Anderson Queiroz:** I always wanted to push the new things and use the new, as soon as possible. I think in general if you're working with microservices, it's a lot easier, because you can just update the version and redeploy, and even if something breaks, you can roll it back a lot easier. Now at Elastic \[unintelli... |
We have several wrappers that use Go, and you try to keep everyone in the same version. So it's a slower process. But as much as I can, and as much as I know what's coming up, I try to incorporate, if I can. |
On that topic, have you folks started to use any, instead of the empty interface? |
**Natalie Pistunovich:** \[laughs\] It's an interesting poll to write. I don't know, I think I'd phrase that as an unpopular opinion. "Don't use that", or something. It can be one more unpopular opinion for your stash... |
**Angelica Hill:** Your library that we're soon gonna have... |
**Anderson Queiroz:** I think I saw the first use of it today, in the workshop with Bill Kennedy. His code had any, and I was like "Oh, yay! We can use any now." |
**Angelica Hill:** What was the use case that he used? |
**Anderson Queiroz:** It was a map for a logger... |
**Angelica Hill:** Okay. |
**Anderson Queiroz:** The map string empty interface. I think it was in a logger, or something. Or no, I think he was parsing at JSON. So instead of map string empty interface, it was map string any. |
**Angelica Hill:** Okay. Well, we can do the poll and then tag Bill and be like "Please tell us. Give us the example so we can all understand how you use this." |
**Anderson Queiroz:** Yeah... He was asking everyone to have Go 1.18 because of that. He was like "Okay, you're gonna use any, so please..." |
**Break:** \[22:27\] |
**Natalie Pistunovich:** What do you do when you have very large pull requests? Lots of files, lots of commits, lots of lines. |
**Anderson Queiroz:** I sit and cry. |
**Natalie Pistunovich:** How do you get on top of that? |
**Anderson Queiroz:** No, that's a tough one... I try to review at once. Sometimes it's not possible. I think there's no magic, you just have to go through it. |
**Natalie Pistunovich:** Do you review everything on a high level? You know, see the list of the commits, if they tell some story, or maybe look at the list of files, or do you just dive into the first one, and one by one, until it starts making sense? |
**Anderson Queiroz:** I never look at the commits. I don't know if because when I'm coding and committing -- like, I'm gonna squash everything before morning. First things first. So to me, the commits themselves - they don't matter so much. I try to put in a way - if I need to revert something, I do. But at the end of ... |
**Natalie Pistunovich:** And look at the files by the name, basically. |
**Anderson Queiroz:** The big ones I just go click, and "I've seen this file. I've seen this file." |
**Natalie Pistunovich:** Hm... So just by the order of appearance. Because sometimes it's not always the correct flow, kind of. |
**Anderson Queiroz:** Yeah. If it's hard to understand, I get the code, I check out the feature branch, and I go to see... Because I also sometimes... You know, I'm also going on, you wanna jump, you wanna understand how it was called to do something, and then it sits there on an IDE and you have the code. And also if ... |
So either it's something really simple and I'm 100% sure that it works, or I'm gonna probably write it in the code itself, and I might test it, to not suggest something that is broken. |
**Natalie Pistunovich:** Maybe even a few steps back... When you go to review a pull request, do you start by reading the issue? So the first thing you do is read the issue. |
**Anderson Queiroz:** \[26:13\] Yeah. I have to understand what's happening there. |
**Natalie Pistunovich:** Then do you review the diff on GitHub, or in your IDE? |
**Anderson Queiroz:** No, on GitHub. |
**Natalie Pistunovich:** So you go kind of file by file on GitHub. |
**Anderson Queiroz:** Well you know... |
**Natalie Pistunovich:** \[laughs\] Philosophical questions... |
**Anderson Queiroz:** Good point. Because to me, that review -- actually, going back to the other episode... We're doing a code review. It's not the pull request so much, right? What's happening. |
**Natalie Pistunovich:** \[laughs\] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.