Interview with Corey Haines at GOTO Chicago 2015
Transcript
Hi, it’s Mike with UGtastic. I’m here at the end of GOTO Conf 2015. I’m sitting here with Corey Haynes, who gave a talk about fun with lambdas. Thank you very much for taking the time to speak with me. So, fun with lambdas, they sound… Lambdas are always one of those comp sci kind of sounding scary things. What is so fun about them? Well, it’s along those lines of coding can be a joy when you put really crazy constraints on what you’re doing. And so, the idea is what can you do if all you have is a lambda that takes one argument, can return one thing, start with nothing, and then slowly build up things. So, what we did was we went through what are called the piano axioms, which are statements about the natural numbers. They were developed by an Italian mathematician named Giuse ppe Piano, and they just say things like, hey, zero is a number. And, hey, x equals x. And so, it’s easy. It’s very basic truth, stuff you learned in grade school about equality, that it’s like, you know, transitive. X equals y, y equals z, x equals z. Right. And so, if you start with these, and then all you have is a lambda, can you actually build up enough to have a numbering system ? And so, we start with, you know, zero, you know, and build a function called a zero. But then, to actually see if you’re right, you have to build an assert function. Right. Well, to build an assert, you have to have an if statement. To have an if statement, you need true and false. And so, starting with nothing, you end up having to go back and build these fundamental structures and these fundamental sort of concepts in programming. And it’s really just like, hey, what happens if you do it? Yeah. You know, there’s a saying of like, don’t try this at home. Yeah. This is more, don’t try this at work, but do try it at home . Yeah. This is stuff that you should do at home, delete, have a good time, and, you know, one of the things I really like about this is that it’s not just a thing. One of the things I really like to do is do exercises that take you away from, like, the work you do. And we all, you know, like to program, so why not program in the craziest possible way? Right. Yeah. And it just makes me think about the code retreat exercises you do. Did this talk, well, just to put some backstory in it, at the code retreats, you would do, well, I don’t need to tell you, he would do different exercises. He would do different exercises where you would not do an if, or only use objects, or don’t use a number. Yeah. Things like that. Did this talk kind of evolve from those thought exercises? The idea of programming with really heavy constraints always does. That’s one of the things I like to do in workshops and things. The idea for this talk and the reason that I’m doing it actually came about from being in a sensory deprivation tank. Oh, really? Yeah. So I went, you know, here in Chicago, there’s a place that you can, do it, so went and did this one time. And, of course, you get into this booth, or you’re floating , and it’s dark. Yeah. And, like, I remember getting in and going, well, what am I going to think about? Because I’ve got an hour in, like, pitch black and no sound . You’ve got to think about something. Yeah. So I was like, oh, hey, well, let me think about what are called church numerals. And I started doing that, and then just started to kind of think about lambdas and, like, a little bit of this lambda calculus stuff. And that came out of that, and I started actually working on a book about the lambda calculus and understanding lambdas and things like that, which is kind of on pause right now. But I started doing that. Incidentally, I did find out that they do not put eels into sensory deprivation tanks. Do you just hallucinate the eels then? No, no. I thought they might put them in there. I remember being in there, laying there, going, what if there were eels? Yeah. But there’s not. Well, I’ve heard of people going into those and actually hallucinating. Mm-hmm. That, like, our minds are so used to the constant stimulation that it plays tricks on you. Yeah, that’s what they say. I didn’t. I mostly just thought about lambdas and eels. Well, I guess maybe you kind of already had a topic where somebody goes in and is like, okay, now what? Yeah, now what? Then you let it go. Yeah. I was also worried about regressing to being a Neon. I was worried about being a Neanderthal, like in Alfred States, but that also did not happen. I did not regress. You did not come out and hit somebody with a club. I did not. Oh. I was actually worried about that, because you never know. I saw it in a movie. But that’s where this sort of this idea came from. And then I want to start doing a lot more talks. I’ve taken the last probably about a year, year and a half off of speaking at conferences, and I wanted to come back and do more, like, live coding and just, like, talks where I’m up there, it’s me, it’s Vim, just writing code and things like that. And this is a fun, it’s a talk that you don’t see a lot, and I’m not really one to give talks that are useful, I think, and especially my coding talks, it’s like, there’s, you know, the talks here at GOTO have been wonderful, you know, they ‘ve, one of the great things about this conference is they cover, like, Java, and they cover C#, they had a Futures of Java and Futures of C# talk. Yes. And they cover all of this great stuff, and I like to think , you know, it never hurts to have a talk that is completely useless. Yeah. And that’s my, that’s where I come into play. Well, I mean, it’s not entirely, as you’ve described it, and the Code Retreat exercises kind of prove that they’re not, it’s not a useless exercise , sometimes it’s, let’s think about something that isn’t just the “stay it dry, how do I execute X” things, and it’s like, one of the things I always liked about Bob Martin’s talks is how he starts off with those little diverse, little off-topic, totally irrelevant, but fun, and you never know what to expect. I mean, you know to expect that he’s gonna talk about something about gravity, and he’s gonna be really exuberant about it, but what is it gonna be , and what does it have to do with the topic, it may or may not have any relevance at all , but it’s fun. It’s so fun, yeah. I mean, you know, when you go to, when you’re educated at all, there has to be fun, there has to be something to kind of hook you. Yeah. It’s just lectures. Yeah, yeah, and why not, you know, sit there and watch somebody code up something that is not directly applicable, but is still like coding, and like, oh, hey, you know, a lot of people have heard about building up number systems like Lambda and all of that, but actually seeing it done and justified with these axioms is more of, it’s a little bit of entertainment, but also that, you know, learning a little bit. It’s very relevant, it’s salient. It’s on topic. It’s just… Not day-to-day useful. Yeah, yeah. You shouldn’t do it at work. Yeah, yeah. But always, you should do it at night. It’s a good way to sort of get into the mood of programming , you know, doing something that you don’t mind throwing away. I mean, I’ve done this and thrown it away many, many times while preparing for the talk, so yeah. So it made it a little bit fun to even prepare for. Oh, it was a blast to prepare for, I like, I really enjoy preparing for live coding talks, because it is like, you can’t get up there and have an unexpected error happen, because standing up there, you know, it’s horrible standing up there when you’re trying to debug something. Yeah. And it’s horrible sitting in the audience, because everyone in the audience sees where the bug is, except that you can’t tell the speaker, because they can’t hear you. And so live coding talks are always, like, you have to have them down. Yeah. So maybe when you’re doing something that’s a little bit more of a free-form performance, if you make a bug, eh, you know, it’s jazz, you know, what do they say, there’s no such thing as a wrong note, there’s just the right note played in a different way. Yeah, there we go, there we go. Something along those lines. There we go. But if you’re doing it like, oh, you have to do X, Y, and Z , yeah, there’s definitely … Yeah, and that’s like, my talk, if, you know, you start with nothing, and 50 minutes later, we have a number system. Yeah. And if I, like, lose track somewhere, then we’re not gonna have that at the end, and it’s like, you can’t, and then it’s just like, why did, you know, what did we get out of this thing? Yeah. There’s only, Ben Orenstein is a master at live coding talks. Yeah. He’s really, really good at it. I don’t know if he practices it, and, like, has all of his keystrokes memorized, I know I do. Yeah. Like, I practice it over and over again until I know the flow of the code. Oh, yeah. You were big in the katas and things like that, so … Yeah, so … Is it a similar kind of preparation that you go through? Yeah. And it feels a lot the same way, too, of just like that, writing the same code over and over again until you stop really thinking about the code, and you start thinking more about the flow of the code and the way that the concepts flow through it. One of the things about this is that we, in this talk, I talk about assert, and then that leads to if, and then that leads to true and false. And one of the things I tried to do was have it where I was sort of defining them above the previous thing. Okay. And then having it where when I implemented it, it made something lower, easier to implement, and clear, and then eventually, like, the test passed. Okay. So you’ve kind of like gone up and down and up and down. Yeah. And so I really worked on the flow, not just of the code, but of where it is in the flow. Yeah. Yeah. Yeah. Yeah. Like, where it is in the file and how it does. So even, like, having a tempo and a rhythm. Yeah. Okay. Yeah. So. Well, thank you very much for taking the time to speak with me. Awesome. Thanks. Thanks a lot. Appreciate it. Bye-bye. So there we go. That’s the end of the conference. Awesome. Yeah. So it ended up, it started a little slow today, but I ended up getting interviews with Jay Fields. Good. Trisha Gee. Gee. A whole bunch of people. I’m just drawing a blank on it. Yeah. I’m just drawing a blank on it. I have my notebook. Did you get Chris? Michael Thorn? No. No. But I got Josh. We got, what am I gonna do with my, oh, there it is. We got Jay Fields, Attila Szegedi. Szegedi, uh-huh. Szegedi. You know, he’s Hungarian. Yep. Yeah. And ‘cause I was, I wanted to pronounce his name correctly, and I said, “Is it Bulgarian?” He said, “No, Hungarian.” Okay. Mm-hmm. Mm-hmm. Mm-hmm. Okay. Jay Fields. Yeah. Yeah. Yeah. Yeah. Jay Fields. Jay Fields. We had some fun rescheduling stuff. Kyle. This guy. Gail. Gail Tanner. Oh, my God. We’re gonna be having a second interview. Uh-huh. Uh-huh. Nice. Because we finished the interview, and then he and I walked downstairs, and we’re talking, and he’s talking about Java, and then he basically explained to me in a few minutes the entire Java lifecycle. Mm-hmm. Now, I don’t mean, like, programming. Mm-hmm. I mean, the community process, and that, like, oh, yeah, Oracle says they’re, you know, you’re gonna be able to use it. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Oh, yeah. Yeah. drop support for a product they basically sign it over to there’s all kinds of cool things about that so I was talking with him and I’m just kind of looking at him I remember some of the things you said but there was so much dense information that even he agreed that yeah we probably should talk about this on camera but I’m like I think this is another conversation yeah get another conversation so we’re gonna do a Skype interview in the next few weeks that’s awesome yeah that that’s a really great thing to get into and I think that’s really important because you know it’s it’s a really important thing to do and I think it’s a really important thing to do and it’s really important to do and I think it’s a really important thing to do and it’s really important to do and I think it’s a really important thing to do and it’s really important to do and I think it’s a really important thing to do and it’s really important to do and I think it’s a really important thing to do and it’s really important to do and I think it’s a really important thing to do and it’s really important to do and I think it’s a really important thing to do and it’s really important to do and I think it’s a really important thing to do and it’s really important to do and I think it’s a really important thing to do and it’s really important to do and I think it’s a really important thing to do and it’s a really important thing to do and I think it’s a really important thing to do and it’s I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here. I’m going to turn right here.