text
stringlengths
0
2.35k
[1030.40 --> 1030.80] Yeah.
[1030.94 --> 1034.34] I had a Twitter poll the other day on the, what do you do when the pull request stretches
[1034.34 --> 1037.54] so much and there's 1 million comments that lead to 1 million commits?
[1037.68 --> 1038.88] Do you squash that or not?
[1038.98 --> 1043.64] And I think the answer that I liked most was during the pull request, have as many commits
[1043.64 --> 1044.02] as needed.
[1044.14 --> 1048.92] And once it's good to go merged, then squash it all into a readable one or two commits or
[1048.92 --> 1050.74] however many logically needed.
[1051.00 --> 1055.08] But exactly to allow the proper review, like you say, as many commits as needed.
[1055.34 --> 1055.58] Yeah.
[1056.22 --> 1056.44] Yeah.
[1056.44 --> 1057.60] Definitely good practice.
[1058.04 --> 1060.48] So you kind of chatted a little bit about your love of Go.
[1060.56 --> 1066.00] This is a Go podcast, but I would love to hear a little bit about your approach to PRs
[1066.00 --> 1066.82] in other languages.
[1067.12 --> 1067.50] I.e.
[1067.64 --> 1071.72] does the way that you review PRs differ depending on the language you're reviewing?
[1072.30 --> 1077.64] I think they do differ most because of the expertise, right?
[1077.64 --> 1082.80] I'm quite comfortable in Go to understand the language and understand what's happening,
[1083.06 --> 1083.28] right?
[1083.74 --> 1088.06] To know some caveats, some catches, and also to talk about conventions.
[1089.00 --> 1090.58] In other languages, not so much.
[1091.34 --> 1096.46] So I guess in other languages, I am going to focus more on general software architecture
[1096.46 --> 1099.74] because this is a general frame thing and functionality.
[1100.48 --> 1105.98] And of course, try to use as much as I know from the language convention, right?
[1105.98 --> 1107.56] I think that's another thing.
[1107.66 --> 1110.30] Prue requests are great, great to learn language conventions.
[1110.54 --> 1115.72] So I've learned so much about conventions in Go and the other language through prue requests.
[1116.34 --> 1117.16] And then that's it.
[1117.24 --> 1122.74] If I'm not so expert, I'm going to try to put in point the best that I know.
[1123.18 --> 1124.50] But I know that I'm not the expert.
[1124.70 --> 1128.26] And a lot of the times, it's probably not really my repo, right?
[1128.32 --> 1130.56] So I'm not there to enforce anything.
[1130.96 --> 1133.44] So they're going to be more on the suggestion side.
[1133.44 --> 1139.64] I mean, taking it kind of one step more granular, are there things that are more important
[1139.64 --> 1146.32] for Go when you're reviewing, i.e. like stylistic choices, almost principles that you might adhere
[1146.32 --> 1149.90] to more closely than you would in other languages?
[1150.72 --> 1152.14] I mean, Go is opinionated.
[1152.40 --> 1153.60] You have to use GoFund.
[1153.88 --> 1159.04] You have to format the code properly, even though we still have some space to discuss about
[1159.04 --> 1159.58] how to format.
[1159.58 --> 1161.48] But I think that's the first thing.
[1161.92 --> 1167.06] I usually would like to be super strict about how the imports are sorted, but I am not.
[1167.54 --> 1172.12] Wait, if the rep is consistent, I think it's a lot easier to enforce this thing.
[1172.20 --> 1174.04] If it isn't, not so much.
[1174.24 --> 1176.72] And all the language, they don't have so much.
[1176.78 --> 1180.34] So it's going to be more about team convention rather than the language.
[1180.48 --> 1183.38] And in Go, you get a lot from the language.
[1183.38 --> 1190.88] I haven't seen so much, but because Go, they're so focused, let's say, right, in concurrence.
[1191.34 --> 1196.60] Sometimes people try to either sneak in concurrence when they shouldn't, or they are not using
[1196.60 --> 1198.60] the right tools.
[1199.18 --> 1201.76] Also because, you know, ah, concurrence, let's use channels.
[1201.92 --> 1203.74] No, channels, they're for something.
[1203.98 --> 1205.34] In Mutex, they're for other things.
[1205.74 --> 1207.24] Weight groups, they're for other things, right?
[1207.24 --> 1212.78] So this is another thing that I would say, okay, no, perhaps we can do different or we
[1212.78 --> 1213.92] can do better, right?
[1213.98 --> 1217.14] Or this is too complex to understand.
[1217.52 --> 1220.86] If you use, I don't know, if you remove this channel, you put in a weight group, it's a
[1220.86 --> 1221.24] lot easier.
[1221.76 --> 1225.06] And you will, do you want to barrier weight group, right?
[1225.64 --> 1227.08] Channels, probably not.
[1227.24 --> 1228.48] So I think these things.
[1229.14 --> 1235.68] When there are new features and new things released in Go, do we see an uptick in people
[1235.68 --> 1237.22] using those and PRs?
[1238.24 --> 1241.18] I feel like you just get like, you just get overexcited, like, oh, generics.
[1241.64 --> 1243.36] Every PR now has generics.
[1243.68 --> 1248.90] I always wanted to push the new things and use the new as soon as possible.
[1249.48 --> 1253.50] I think in general, if you're working with microservices, it's a lot easier, right?
[1253.50 --> 1257.70] Because you can just update the version and redeploy and even something breaks, you can
[1257.70 --> 1258.56] roll back a lot easier.
[1258.92 --> 1263.32] Now at Elastic that you're distributing binaries that you're going to go to, I don't know how
[1263.32 --> 1265.32] many clients in the whole world.
[1265.32 --> 1268.82] So our, we have a release cycle, right?
[1268.88 --> 1272.46] So we have to choose, okay, let's change the version.
[1272.70 --> 1277.02] We have several repls that use Go and you try to keep everyone in the same version.
[1277.12 --> 1278.82] So it's a slower process.
[1279.44 --> 1285.60] But as much as I can and as much as I know, all right, what's coming up, I try to incorporate
[1285.60 --> 1286.80] if I can.
[1287.78 --> 1292.34] Oh, on that topic, have you folks started to use any instead of the empty interface?
[1292.34 --> 1295.56] It could be an interesting poll to write.
[1296.18 --> 1298.84] I don't know if you can phrase that as an unpopular opinion somehow.
[1299.02 --> 1300.32] Don't use that or something.
[1300.58 --> 1304.10] It can be one more unpopular opinion for your stash.
[1304.16 --> 1305.90] Your library that we're soon going to have.
[1305.90 --> 1310.88] I think I saw the first use of it today in the workshop with Bill Kennedy.
[1311.24 --> 1313.12] So he, his code had an any.
[1313.20 --> 1314.38] I was like, oh yeah, right.
[1314.46 --> 1315.42] We can use any now.
[1316.20 --> 1317.62] What was the use case that he used?
[1318.16 --> 1320.78] Was a map for logger?
[1321.24 --> 1321.50] Okay.
[1321.76 --> 1323.54] The map string empty interface.
[1323.54 --> 1326.02] I think it was in a log or something.
[1326.34 --> 1326.52] I know.
[1326.60 --> 1328.06] I think he was parsing a JSON.
[1328.72 --> 1333.10] And so instead of map string empty interface was map string any.
[1333.52 --> 1333.80] Okay.
[1334.08 --> 1337.58] Well, we can do the poll and then tag Bill and be like, please tell us.
[1338.70 --> 1341.58] Give us the example so we can all understand how you use this.