text stringlengths 0 2.35k |
|---|
[424.32 --> 430.24] So, you don't really get to choose a great deal about the actual format of your code. |
[430.58 --> 437.10] Which, again, I think to some people when they're used to having tools that allow them to configure all this, |
[437.18 --> 439.18] they feel like that's a deficiency in Go. |
[439.48 --> 442.26] But it turns out to be one of Go's superpowers in my opinion. |
[442.68 --> 447.98] Because what happens is all Go code starts to look the same and starts to look familiar. |
[447.98 --> 456.50] And I've done it where I've been to a project and found that the code just looks like I wrote it and I definitely didn't. |
[456.96 --> 458.92] And I think that's awesome. |
[459.02 --> 462.96] If you think about pull requests, you know, with white space. |
[463.08 --> 469.96] Sometimes pull requests and having loads of white space makes it really difficult to really see what the crux of the change is. |
[470.62 --> 474.56] Well, with GoFumpt, we don't have that problem because it's all formatted nicely. |
[474.56 --> 478.96] Anyone else? How do you feel about GoFumpt? |
[479.00 --> 481.82] How do you pronounce it, by the way? Let's just get that one out of the way. |
[483.18 --> 483.88] GoFumpt, right? |
[484.42 --> 485.22] Okay, good. |
[485.82 --> 487.56] I mean, that's what I know. |
[488.46 --> 490.30] Yeah, that's what I'm told. |
[490.78 --> 496.84] It's always awkward when I'm teaching or something and I say the Fumpt package, for example, |
[497.02 --> 500.64] which is, you know, people kind of look at me sideways. |
[500.78 --> 503.14] I'm like, yeah, I know, I know. Just go with it, right? |
[503.14 --> 508.12] Because if you say instead, if you say FMT or format, God forbid, like, you know, |
[508.28 --> 509.84] gophers are going to look at you a little weird. |
[510.02 --> 511.10] Just go with it. |
[511.62 --> 518.46] Yeah, it takes a while for people to, I think, parse it initially and then they learn it and like they take it and like they don't question it. |
[519.18 --> 522.34] So I'm trying to, you know, keep it consistent by saying GoFund. |
[522.94 --> 523.50] Yeah, same. |
[523.76 --> 525.26] I mean, I agree. |
[525.26 --> 527.46] Like, I wouldn't have done that. |
[527.58 --> 529.92] I don't think naturally, but I heard about it. |
[530.20 --> 532.38] And yeah, I do it for consistency too. |
[532.38 --> 541.44] So it's funny because like sometimes people will say Golang because when we use Google and when we search or when we use hashtags, |
[541.68 --> 545.38] we tend to write Golang, but we never say Golang. |
[545.86 --> 550.12] So it's a little pro tip for anyone that's new to the Go community. |
[550.12 --> 552.94] When you're talking about the language, just call it Go. |
[553.24 --> 554.12] Don't say Golang. |
[555.34 --> 556.18] Same with Phumpt. |
[557.04 --> 557.34] Yeah. |
[558.86 --> 564.40] So with regards to the Phumpt, well, not Phumpt, but GoPhumpt, I should say. |
[565.80 --> 570.28] The reason, well, let me step back a little bit. |
[570.28 --> 583.88] When I first came across Golang, I was taken aback, honestly, because I wasn't used to basically tooling, sort of formatting my code to look like a standardized sort of any sort of way. |
[584.06 --> 584.16] Right. |
[584.20 --> 593.36] So, you know, I come from programming languages where everybody has their little pet peeves, little quirks about, you know, I like my braces, you know, to be lined up together. |
[593.36 --> 604.00] And another person would be like, I like my braces to me to end at the declaration and then for the closing bracket or brace to be at the end or whatever. |
[604.16 --> 611.90] And so it's like people would have sort of these back and forths around sort of styling, you know, what's more readable versus what's not as readable. |
[612.44 --> 614.42] And obviously, it was all sort of subjective, right? |
[614.44 --> 617.46] Everybody has their own preferences, their own quirks and what they're used to and what they're not used to. |
[618.06 --> 622.70] But GoFund sort of threw all of that out at the window when I first came across it. |
[622.70 --> 630.12] And I'll be honest, I mean, for the first month or so, I was like, I don't like everything about what it does. |
[630.30 --> 634.48] You know, I'm happy with like 90% of it, but I don't like everything about it. |
[634.84 --> 648.94] But then over as time went on, I really began to love the tool and what it does because the beauty of it, I think you touched on that, is that every basic Go code started looking like I expected it to, right? |
[648.94 --> 655.22] So basically, that cognitive load, that aspect of looking at code and reviewing code, that just went out the window. |
[655.30 --> 659.82] I didn't have to worry about, okay, is this person's code going to look differently formatted than this other one? |
[660.22 --> 669.42] Basically, I could just focus on the actual code and what it was doing as opposed to, you know, sort of trying to figure out parts in my head, okay, this person's quirks are that way and that person's quirks are that way kind of thing. |
[669.42 --> 670.76] So it was valuable in that way. |
[671.46 --> 671.68] Yeah. |
[671.84 --> 678.20] There's actually something from Robert Grismer that he used to say, he is the person who is maintaining GoFund and like all the rules and so on. |
[678.42 --> 681.46] He says that he doesn't agree with like all the styling. |
[682.54 --> 689.26] You know, I mean, he doesn't necessarily agree with GoFund, but it's really good that like somebody, some tool is enforcing it. |
[689.26 --> 690.52] So there's no question. |
[691.52 --> 705.20] I mean, I work for a very large company and I witnessed, it took like four years to just tweak one little side guideline change on the Java style guideline. |
[705.20 --> 715.16] And can you imagine like, you know, there's all these like hundreds of people with like strong opinions about style, just like wasting four years debating on minor style issues. |
[715.34 --> 721.42] I like the fact that it is like GoFund, there's like this canonical place and there's no debate. |
[721.74 --> 726.58] There's like one source of truth type of thing and everybody has to agree with it. |
[726.94 --> 731.60] Even if, you know, the formatting is not always what you would desire. |
[731.60 --> 737.22] Yeah. Do you think they would be able to retrospectively fit that into the tool chain? |
[737.34 --> 742.10] Say that there wasn't GoFund originally and it just came out now. |
[742.28 --> 746.68] Do you think the community and everyone would rally around it in the same way? |
[747.04 --> 751.26] Or do you think there's something to be said for the fact that this was there from the very beginning? |
[751.94 --> 759.70] I think it's necessary that like initially you create some like, you know, initial culture around, you know, just relying on a tool. |
[759.70 --> 767.90] Because I think it creates like enough people, you know, it creates this community with enough people supporting the idea and understanding why it's valuable. |
[768.28 --> 773.18] If you try to like inject this type of tools at a later time, the community is already fragmented. |
[773.32 --> 782.66] And there's a lot of excuses to, you know, prepare a personal style because you already, for example, invested in one particular style all across a company. |
[782.66 --> 786.78] And like, there's no way to, you know, just kind of like fix things at a later time. |
[786.78 --> 790.60] So it's really good that they, you know, came up with a tool initially. |
[790.86 --> 791.86] At least that's my opinion. |
[792.46 --> 793.40] Yeah, I agree with you. |
[793.48 --> 800.88] I mean, there's a few examples where the foresight or the insight from the team in the original design, |
[800.88 --> 804.58] I think we really benefit from some of those decisions. |
[805.16 --> 806.86] And we'll talk about more of them as well. |
[806.86 --> 812.18] I think the fact that another one of the tools, GoTest, that was there as well from the very beginning. |
[812.72 --> 817.62] So testing as a concept was part of, it was a first class concern in Go. |
[818.04 --> 824.96] And that was, of course, makes sense because we, at the time it was being designed, you know, |
[824.98 --> 827.14] that was kind of how we were building software. |
[827.26 --> 828.92] Now we were writing tests a lot. |
[829.02 --> 831.90] It was an important part of software engineering. |
[831.90 --> 839.54] But the fact that they make these decisions, I think, early just sets a precedent. |
[840.18 --> 844.14] And yeah, from there, I think it pays dividends every day. |
[844.60 --> 847.30] Yeah, I think Go is doing a good job in terms of like, you know, |
[847.40 --> 851.72] identifying 80% of what is essential in software engineering. |
[851.92 --> 855.40] And I think, you know, tooling is kind of also representing those priorities. |
[855.40 --> 859.60] Yeah, so extensive thinking beyond GoFund then. |
[859.84 --> 863.58] If we look at GoLint and also GoVet, |
[864.16 --> 868.18] does anyone want to have a stab at describing the difference between those two |
[868.18 --> 870.24] or describing what they actually do? |
[871.74 --> 872.08] Cool. |
[872.54 --> 876.52] Well, yeah, so GoLint. |
[876.96 --> 879.54] GoLint is, I like it. |
[879.54 --> 887.52] It essentially looks at your code and does some static analysis and can catch common mistakes |
[887.52 --> 889.38] and kind of give you warnings about them. |
[890.02 --> 896.02] And usually, sometimes they're not mistakes, but they're just best practices. |
[896.68 --> 902.30] And you can run the Lint tools on your code and see if it's got any recommendations |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.