text
stringlengths
0
1.82k
**Erik St. Martin:** No Go tool, makefiles.
**Peter Bourgon:** No Go tool. GC, 6G, 6L... Yeah, sure.
**Erik St. Martin:** Yeah.
**Peter Bourgon:** Yeah, so at Soundcloud we sort of built out sort of an internal platform that was all in Go. I was on a team that did some -- again, it happened to be the search/discovery team; all of our internal infrastructure and applications were written in Go, and there were a couple other teams scattered throu...
So we built up a relatively good background of early Go tips and tricks, and we made a lot of mistakes, and corrected for them, and all of that information... I conducted some interviews and scribbled some ideas together from different teams throughout the company. I probably interviewed about six or eight different te...
**Erik St. Martin:** It's interesting... You've kind of spoken about the horror stories, like being disappointed, or things that we've done incorrectly. I'd actually like to circle back to some of those... Does everybody have an example of one that they remember that went horribly wrong? Something you viewed about the ...
**Peter Bourgon:** Super common, I think.
**Carlisia Thompson:** Yeah, I think so too. I don't know, when I came into Go things were already rolling, and a lot of people to give advice... So when I started to write channels the first time, I quickly got advice to just "use a mutex here, you don't need it." So I was like, "Oh, that's a thing..." and I looked in...
**Erik St. Martin:** Yeah, I would use them for state.
**Scott Mansfield:** I'm lucky that most of my beginning code is in the same project that I'm still working on, so it's all been kind of rewritten. That just erases that bad memory...
**Erik St. Martin:** \[laughs\] You don't have to look at it anymore...
**Scott Mansfield:** Exactly.
**Erik St. Martin:** Yeah, well that's the hard part, too - if you put stuff out in the open source world, it kind of lives on forever, even past the point where you look at it and you're like, "Yeah, nobody should be using this."
**Peter Bourgon:** I don't know if I remember any specific horror story, but I definitely remember it took me a long time to really grok the subtleties of interfaces.
**Erik St. Martin:** Yeah, I'd agree, too. I always forget what the exact error is, but one of the confusing parts for me was in the early days with interfaces when you'd pass something as a value or a pointer, and it needed a pointer receiver. If it expected a pointer receiver on the method it would work, but if you p...
**Carlisia Thompson:** \[08:07\] Somebody gave a talk about that one at the Go Language team members, I've forgot who, and there was a good explanation. But yeah, it's not easy; you don't find this information right away when you start learning. Even now...
**Erik St. Martin:** Well, I guess it exists in the form of the language spec, right? That's actually a really good place, in the Memory Model. I remember reading the Memory Model, and that started solidifying a lot of concepts to me, about ordering, how the compiler can actually reorder your statements, so you can't a...
**Carlisia Thompson:** Yeah.
**Peter Bourgon:** Totally.
**Erik St. Martin:** If you just read the language spec and the Memory Model you're like, "Okay", and then you're gonna still make the same mistakes.
**Carlisia Thompson:** Yeah, I agree.
**Peter Bourgon:** This is a trap I find myself falling into whenever I'm trying to teach newcomers, or give advice sometimes. Everything I learned was a function of my doing it the wrong way once, and then kind of realizing it's the wrong way. It's a very didactic process, and I think most people probably work in a si...
**Scott Mansfield:** Yeah. I know that I never actually learned any new language or any new concept without going and implementing something in that language, or just trying to implement that concept. It just doesn't stick.
**Erik St. Martin:** Yeah, there's that balance... Like, how do you get enough knowledge to not be totally falling on your face, but be developing enough battle scars from doing it where you can kind of start to understand what's going on.
**Carlisia Thompson:** And talking about learning and teaching, Peter, I see that you are now giving workshops. Do you plan to continue? How's that going?
**Peter Bourgon:** Yeah, I guess there's a couple of topics that are sort of in my wheelhouse and it depends on the audience. I've given basically Go training from zero, and kind of a tour of the language, and it gets the class up to reasonably sophisticated Go programming. In that course, I just walk through all the l...
So I've done that a couple of times in different setting and different lengths... And that's okay, that's kind of rewarding. The main thing for me is just to get more people into the ecosystem, and maybe this is hubris, but kind of point them down the right paths, rather than encouraging them to build yet another HTTP ...
These are quite popular workshops, especially at typical conferences like GoTo or QCon, or some that I've done lately.
**Carlisia Thompson:** \[12:10\] I love that idea. I wish you would maybe write about it. Is there a book in the works maybe? \[laughter\]
**Peter Bourgon:** A book, good lord...
**Erik St. Martin:** You're putting work on his plate for him. You're committed now.
**Carlisia Thompson:** I'm delegating. \[laughter\]
**Peter Bourgon:** Goodness...
**Carlisia Thompson:** No, it really is to me I think very useful to have an approach to teaching the language that highlights its best features. There are many ways of teaching things, and I think people make use of different ways in this way of teaching that -- I don't remember exactly how you said it, but presenting...
**Peter Bourgon:** Through the lens of servers, yeah.
**Carlisia Thompson:** Right, because it's so much of what we do, and especially what we do with Go, so it's super useful.
**Peter Bourgon:** Yeah, I totally agree.
**Erik St. Martin:** So the microservices thing is kind of like another explosion in recent years too, and we see a lot of frameworks in many different languages, and orchestration platforms, and service discovery and things like that. Let's talk a little bit about that and your passion for that, because you've kind of...
**Peter Bourgon:** Yeah, I guess there's two angles on this. There's the why is it interesting to me at sort of a high level, and then there's the why do I think Go is a great match at a technical level.
I'll start with the first, I guess. I was really doing microservicey type stuff for quite a long time; of course, it didn't have that name until very recently. I really only dove into what we commonly know as microservice workloads today, when I was at Soundcloud, and we kind of made an executive decision - or at least...
You had to read the code, but that was never enough; you had to go and ask people why things were the way that they were, and sort of probe them with intelligent questions about, "Well, did you consider this alternative? Oh, okay, you did and didn't work out for these reasons... What implications does that have on this...
That's sort of the soft side, it's why I love microservices. They make me confident again, and they give me a certain amount of happiness that I lost when I was working on gigantic years-old legacy monoliths or huge projects like that. That was a lot of talk, I'm sorry for taking the floor.
**Erik St. Martin:** It's your floor to take.
**Carlisia Thompson:** That was a great explanation, and I love this idea of the ideal size of a codebase being whatever amount that you can hold that in your head as a mental model. This has been coming up over and over again when we talk about microservices.
**Erik St. Martin:** I think it applies to a lot of things though, too. Recently I was talking to some people at KubeCon last week or the week before, and I used almost the same premise for whether or not you should use something like Kubernetes like an orchestration platform, and my example was if you can't name me al...
And in management too, right? From your perspective, when you have an organization with a big monolithic project, it takes a lot more coordination between teams, that are seemingly unrelated, but because now they're in the same codebase, the projects are more tightly coupled together than they need to be.
**Peter Bourgon:** Yeah, and as ever, it's this balance. There's a spectrum between -- I like this word, "balkanization", where everything is its own separate service; you can take that to an extreme, of course, and you just have to look at the architecture diagrams from Uber, or whatever... It's like a thousand micros...
Now I guess we're getting a bit to the technical side, and this is a point that I'm very clear to make - whenever you move away from a monolith or you start down this path of giving each developer a set of their own independent microservices to manage, you're actually creating way more technical problems for yourself, ...
**Scott Mansfield:** \[19:48\] Let me give you a counterpoint to this kind of argument. You can do the same thing in a big monolith - you have very well-defined interfaces, for example, between each packages, and then you don't have to worry about the vagaries of going over the network every time you want something. Wh...
**Peter Bourgon:** Absolutely. I think the term that gets batted around for that architecture is the "elegant monolith" style, where everything is pretty well delineated internally. There's not a lot of shared code, very well-defined API boundaries... It's just that the deployment artifact is all hosted in a single pro...