text
stringlengths
0
2.35k
\[40:01\] We understand delegation. For instance, if I tell you, Natalie, to breathe in, you don't have to think about operating your lungs. You just breathe in. And if I tell you to breathe deeply, then you will breathe deeply, and if I tell you to stop breathing, you will until you panic. \[laughter\]
**Natalie Pistunovich:** Defer. Breathe out.
**Ronna Steinberg:** \[laughs\] Yeah. You'll defer some breath, hopefully. Unless something is broken. \[laughter\] I do feel that when the code gets too complex and you don't understand it anymore, then you really need to start thinking in terms of objects. It makes things so much easier. People do understand those co...
So that's where it came from. It came from a real problem in our codebase. And then I kind of realized that if people don't agree that it's an object-oriented language, then I want them to see why I think it is, and at least give them the option.
Also, I feel like we failed them in some way. If people work with Go and they don't see the benefits at all, and they don't think it even exists... It's a massive part of the language that they're not utilizing.
Go is very simple, in the sense that -- for instance, if we compare it to my first language... It's not really my first language. Let's say my somewhat first language. My first language is Pascal, but if you point a gun to my head, I won't be able to --
**Natalie Pistunovich:** Same here!
**Ronna Steinberg:** Yeah! We're the products of the same education system. \[laughs\]
**Natalie Pistunovich:** Some people had -- was it Java...?
**Ronna Steinberg:** \[unintelligible 00:41:48.11\]
**Natalie Pistunovich:** Which is not really the uncle of Go, unlike Pascal, which is...
**Ronna Steinberg:** Yeah, that's true. That's actually true.
**Natalie Pistunovich:** Although I did start with Dr Scheme, to be very, very accurate.
**Ronna Steinberg:** Well, the only reason that I know that is because of Carmen Andoh, who went around telling everybody that Go is like a child of the branches of --
**Natalie Pistunovich:** Pascal...
**Ronna Steinberg:** Yeah... And then I learned also that Ruby is also somewhat a child of Pascal, which explains why I like Ruby... Although I don't remember Pascal at all, and I can't really tell if there are similarities or not. I have no idea.
**Natalie Pistunovich:** Try to take it with a piece of paper. Maybe it will refresh your memory more than with a screen. That's how it was for me at least, writing Pascal code. Not sure I ever actually executed any.
**Ian Lopshire:** Did you get to write it?
**Ronna Steinberg:** I don't remember...
**Natalie Pistunovich:** For better and worse... The education system... \[laughter\] It's the whiteboard of the early times. Anyway, yes, it's the uncle of Ruby. I did not know that.
**Ronna Steinberg:** Yeah, things that you learn when you go to conferences. Random bits of information, of trivia that could be useful in the future or not.
So back to C++, it has a million features that you're never gonna use. JavaScript as well. Nobody uses -- let's say what it is; it's not a common practice, in that case it's a best practice not to utilize all the features in those languages, because that is not maintainable code. But Go has been written in a way that s...
**Natalie Pistunovich:** What are some good or bad use cases for using that? You mentioned billing is your close-to-home example... Do you have some other use cases you would say definitely use it, or definitely don't?
**Ronna Steinberg:** So the quote that Rob Pike, that whomever sent me the message was basing it on - he said that (I don't know) a professor used multiple classes to perform something that was a simple look-up. And I think this is it. And I also understood why it happened... But again, it's not Go, actually.
\[44:09\] So again, when we go back to Java - you are not able to say that A is B, unless A is aware of B, and knows that it implements B. So you can't really say that A is B. And then in those languages you really have to work extra-hard to express the idea "A is B." And that could create those intermediate layers bet...
But yeah, generally speaking, Go is explicit. If you have a package, and it's well-written, then it should meet the open/close principles, and then you should be able to wrap this type or extend the functionality of whatever it is that you want. I understand why people struggle with that. I think the biggest issue is h...
By the way, for the workshop I had to revise my code multiple times, because I realized my design choices were sub-par, let's say.
**Natalie Pistunovich:** Less common practices? \[laughter\]
**Ronna Steinberg:** For instance, it's really funny... So I actually wanted to show that the code was extendible by actually creating an extra package that will use that package... And then I realized that \[unintelligible 00:46:00.14\] I mean, it should extend, but through an interface, not direct. And as I was doing...
So obviously, I fixed it, but generally, it's a different type of language. A package doesn't have to expose an interface. If you write code in Java, if you write code in C++, you don't want to express that A is B. But at the time that you write the package, or you write the class, or you write anything, you have to kn...
And then in Go you don't have to do it, but then you can write very easily an unusable package, or an unextendable package. So how to write it well, by the way, is something that I still don't know that we are very good at teaching. I'm trying to sort of figure that out as well, as I go. And how do I define that a pack...
\[48:00\] I love that when people explain the open-close, they always talk about curl command. Nobody is going to rewrite curl. It doesn't require redesigning. Well, why? Why is it so good? What makes it so good? And what makes a good package? It's a very, very difficult question. Regardless, by the way, if you have ob...
**Natalie Pistunovich:** One last question before we switch to the fun unpopular opinion, which we were missing so much throughout this entire episode... You've been kind of giving us sprinkles of information on the workshop. So other than this is being on object-oriented programming in Go, what else can you tell us ab...
**Ronna Steinberg:** Well, I can tell you that I will take the learners through a maze of object-oriented... \[laughs\] And when I say a maze, I mean quite literally. We are going to navigate through a maze. I mentioned Jeff Rosenschein earlier. He was my professor to Intro to CS, and our first exercise way back when, ...
I thought it was a very good way of exploring object-oriented. And I like to take people through journeys that I've found very good for myself. If I had an a-ha moment, I try to share it with the other people as well. And Natalie, you know this -- Ian, I can actually ask you, what is your a-ha moment in your career? Si...
**Ian Lopshire:** That's a real on-the-spot question.
**Ronna Steinberg:** I know, it's a difficult one. When did you realize that you can do this, you can code, you know what you do, you've got this?
**Ian Lopshire:** I mean, that moment was -- so I was in school, and I went to interview for an internship... And doing that interview. They did the whole whiteboard thing. It was eight hours of interviews. I believe that was like an a-ha moment. I feel good at the end of that, and that made me feel like "Oh yeah, I ca...
**Ronna Steinberg:** That's the thing, so for you it was trial by fire.
**Ian Lopshire:** Exactly, yeah.
**Ronna Steinberg:** That's very interesting. I think for a lot of people it is just like succeeding in something that they didn't think they could before.
**Ian Lopshire:** I didn't think I was ready for that kind of set of interviews... But that's a reason why I tell people to just -- you see a lot of those posts where it's like "Oh, you know, I'm trying to do these things before I apply for jobs and interview." And my advice is always just like "Just go interview." If ...
**Ronna Steinberg:** I think Natalie the next time we need to bring somebody who doesn't agree with us... \[laughter\] Because we are all so on the same page, it's a problem.
**Ian Lopshire:** A hundred percent.
**Natalie Pistunovich:** Yeah, we'll pull some from your emails. A thought that came to mind throughout this episode... Let's see if I can make this into a sort of an unpopular opinion... Probably not, so I'm not gonna make the tune just yet. But thinking of AI-generated tools, they get inspired from existing code, rig...
**Ronna Steinberg:** \[52:14\] Wow, I love it. You know, a few days ago I had that thought, AI is not going to write code OOP maybe, because they don't really understand the world like we do, and they don't have that restriction. A bot doesn't tell a person to breathe, you know what I mean? They don't need to. They can...
**Natalie Pistunovich:** Yeah. But maybe there'll be some way of doing this guided, and then we're saved from those boxes.
**Ronna Steinberg:** Exactly. So that is very interesting what you have there, because you know, something that I said earlier about how do you know that a package is complete - maybe a bot can do that for you.
**Natalie Pistunovich:** Static analysis. Or dynamic.
**Ronna Steinberg:** Maybe a bot can analyze if something is open-closed.