Corey Haines

Interviewee: Corey Haines
Community: General
★ Transcript Available Jump to transcript
Duration: 20 min · Published: Oct 05, 2012

Transcript

Hi, I’m Mike with Eagtastic. I’m sitting here with Corey Haynes. Corey does the Global Day of Code Retreats and he’s also very active in just speaking and being involved in user groups and technical education. So, Corey, can you tell us a little bit about what is Global Day of Code Retreat and what’s a code retreat? Okay, so Code Retreat’s an event. It’s a community-focused, sort of directed practice event that has been going on for almost four years now. There’s all over the world and it’s a day that’s focused on practice rather than learning a new technology. So, you just write code? How do you practice? So, there’s a set format for it. We work on Conway’s Game of Life. We work in 45-minute sessions. And at the end of the 45-minute sessions… At the end of the 45-minute sessions, we delete all of the code we did, swap pairs, start again, and we do it about five or six times through the day. And then each session, we introduce different constraints, different ideas around object-oriented design, test-driven development, pairing, things like that. And so, it’s a day of sort of pushing yourself past where you normally code. Yeah. And I like to say that we take normal, sort of clean code constraints and different design ideas and we… Crank them up to 11. Yeah. I’ve been to one or maybe two of your events and things like no return values or don’t use conditional statements is always interesting. But for the audience, what languages are you using? I mean, is this like a Ruby-specific thing? It’s language agnostic. Okay. So, as long… We ask people to come with a development environment set up, what we call sort of your language of convenience. Okay. But the community… The community events are very much, if you’re interested in trying it in a different language, say you’ve never done Clojure, and somebody there has a Clojure environment set up, then they can… You can pair with them for 45 minutes, sort of get a feel for it a little bit. We started off a lot of Java, there’s a lot of C Sharp that shows up, a lot of Ruby that shows up, but they’re intended to be language agnostic. So, what do people do when they can’t finish the problem in the 45 minutes allocated? So, very few people can, and in fact, it’s intentionally chosen so that you can’t finish the problem. Oh, okay. The goal is to sort of retreat from the normal pressures of finishing. Yeah. We all know that we write our worst code when we’re rushing under constraints and under a time pressure, and the corners we cut, things like that. So, the day is built to allow you sort of that freedom to experiment. And trying new things, so the very first one, it’s frustrating for people, and by the end of the day, it’s frustrating not finishing it. But you’re kind of laughing. You’re laughing at it, and instead, sort of that pressure to finish goes away, and you start to focus on clean code, focus on investigating different design ideas, rather than rushing to finish. Right. And actually, have you ever had anybody, like, just be like, “Oh, Conway’s getting more light.” You don’t… Right. And actually, have you ever had anybody, like, just be like, “Oh, Conway’s getting more light.” You don’t… and just bring it out? I’m just curious. Yeah, we’ve had, like, for the first session, a lot of times people will sort of hack out a solution because they’re still in that mindset of wanting to get it done. But, you know, like a lot of us say, it’s easy to get something working when you write crap. Right. And so the idea of the day is to sort of write the best code you’ve ever written. Right. And see what that looks like and take what you consider great code, take it to the extreme, and, you know, we always talk about going too far, but very few people actually get close to too far. So shoot for gold plating. Shoot for gold plating. And what happens if you actually go too far? What happens if you refactor too much or you extract too many methods? What does it look like? And by taking yourself to that place, you get a better sense for when you are actually building a production system, how far you can go. Right. Yeah. And I think that exercise of, like, sometimes when you want to start to refactor and you’re looking and saying, okay, I’m going to refactor this code, and then you realize you did go too far. You spent half a day, and now you have to back it up. But this code retreat, you can say, like, what if I did this thing I want to try to do? And it doesn’t matter if you went too far because you don’t have to backtrack. You just throw it away. You throw it away, and that gives you a good perspective so that when you are working and you’re like, am I going too far? You’ll have an experience of actually doing it so that you can be like, well, no, if I go a little farther, it’s still okay. And what’s probably the most unique experience you’ve had? Like, do you have, like, a specific? Because we’re going to get into the global aspect of it, but the actual, at a code retreat, a solution that somebody did, has anybody done something like implemented it in VimScript or anything like that? We’ve had people fool around and, like, bash script. I think one team did try it in VimScript. And it’s always interesting. Every code retreat, there’s always some sort of interesting approach to it. So there’s nothing really that stands out. Like, that was the coolest. I did see at a code retreat in Colorado where, I think on the final session, some people ended up writing a fairly reasonable solution in about six or seven lines of Ruby. Wow. And I was like, oh, well, you need to do this or change this. And they, it was actually a really nice, small scripted solution. We tend, I tend to encourage people to over-engineer. So make a ton of classes, keep very small methods, things like that, to see what it means. We drop that term over-engineering all the time, but few people know, few people could recognize it and understand why that’s a problem. Now, about the global part. Now, I mean, I know you, you started doing these, these code retreats as kind of a one-off thing. You did them in a few places, but you do one that spans the entire globe in one day. Yeah. So last year in 2011, in August, I put out a blog post and said, wouldn’t it be cool if we had 20 cities around the world all on the same day and we could Skype and stuff. Yeah. And, um, it sort of took off. And by the, I think it was December 5th of 2011, we had 94 cities. 14 time zones, all doing it around the world on the same day. And you tried to, to hop around. So I did Sydney, which was one of the first ones. And then I caught a 6:00 PM flight that landed in Honolulu at 6:45 AM, the same day. So while the sun was going this way, you were going, I hopped the other way and went the other way. And so I’m going to try to do it again this year. Um, we’re aiming for 200 cities this year. Um, we are already at 60, which is about on track. And so we’ve got two months to go and that’s usually when it starts picking up and, uh, yeah, it’s a really great day. There’s a lot of, it sort of brings the community, the global community because code retreats, just as, as one-off things are done all over the world. Pretty much every weekend. Now there’s at least one or two going on a couple of weeks ago, there were six of them. On a day and, um, global day is really about bringing it’s a, there’s two really cool parts about it. One is bringing that global community together all around one event. And then, um, the other aspect is introducing and training new facilitators because during the day, the facilitator’s role is to introduce new constraints is to answer questions, help people out, ask questions. Um, and so it’s. Um, we do trainings, we do facilitator trainings. Yeah, I was kind of about to ask if somebody wanted to become a facilitator and it’s like, man, this is really cool. I wish I could do this in my city, but we’re in Anchorage, there’s nobody around, uh, you know, how do, how do they go about doing that? So let me, uh, well, the, the it’s built, the format is very well defined and so it’s sort of built so that even. Even if you are a horrible facilitator, if you stick to this format, then it’s going to be a great day. Okay. So it’s intentionally made for people to be able to just do it and follow a script almost and then for, as you do more and more, you get more understanding of sort of the subtleties of facilitation, how to introduce the exercises better, things like that, but if people want to do it. I’ve had lots of people email me with those exact same questions, like I’ve never done this. I don’t, I don’t feel like I’m a great developer, all of that, but it’s like the best way is just to do it. Yeah. Um, the, this isn’t a great developer exercise, it’s a path, it’s a path. And you know, I like to tell everyone that every facilitator that’s out there, there’s a handful of us who are experienced facilitators and have done a lot, but all of us had our first one and I know very specifically. People who are, um, very active in the community, do a lot of these things, and I remember their first code retreat when they emailed me and I talked to them and, you know, had a Skype call with them and walked them through some ideas and now they’re doing them all the time. And I mean, with it getting so big, I just wonder also, is it getting to start, is it getting to become a point where there’s a code retreat being set up and you didn’t even know about it and all of a sudden it’s like, yeah, that’s cool. I’m very strict about the format, and so we have it published, this is the format, um, I’ve been sort of iron hand holding the format that if you want to do a code retreat, this is the format you do. If you want to call it a code retreat. If you want to call it a code retreat, I always make sure to tell people that the, it’s not intended to be the only activity that anyone ever does, and it’s not the, it doesn’t cover all aspects of development, it has very focused things that it works on. And it’s, there’s lots of really important practice oriented activities people can do, but code retreat is this, and so I’ve been, um, fairly iron handed about that, um, and, but now, it’s, I’ve, I’ve sort of, as I’ve sort of curated it and, and, gone, it’s, it’s intended to be decentralized. Okay. So, you know, people set ‘em up and do them all the time, very few people now, like, email me and go, can I, because it’s not about my approval or my, um, influence or anything like that, it’s a local event to bring people together and practice. So it’s kind of finally grown beyond your, your, that’s, that has to be a really cool feeling. It’s a wonderful feeling, early on, I knew sort of what everything was doing, and, you know, I, I pissed a couple people off. ‘Cause they were like, oh, I’m gonna do this, and I’m like, well, that’s not a code retreat, I’d ask you to not call it a code retreat, but, um, now it’s gotten, it’s, it’s sort of reached that level where it’s beyond me, and it’s not centered around me. I’m sort of a, uh, one of my, one of the guys called me a benevolent dictator. Yeah, I think more instigator. Yeah, and I like to curate, like, I run the coderetreat.org site, but it’s not, like, I’m on there saying what can happen, um, and there’s enough people now who are experienced facilitators, experienced hosts, who just, they’re off doing it, and, and it, um, there’s not really experimentation around the format, but there’s more and more experimentation around exercises during the 45 minutes, so, um. I was just gonna, uh, would that be relevant, ‘cause I was, what I was just thinking about is, well, if it’s object-oriented, functional programming is very much becoming, uh, popular now, could somebody do a functional code retreat, would that still be a code retreat, or? Absolutely, absolutely, the, the format is the 45 minutes, the throwing the code away, Conway’s Game of Life, my, I’m an OO guy, and I’ve been doing a lot of, uh, sort of, thinking about OO concepts over the last couple years, and so, the code retreats that I facilitate, and the exercises that I do, focus on, um, sort of, the edges of understanding around OO design, I don’t have a tremendous amount of, like, expertise in functional paradigms, um, I did, I’ve done, you know, a fair share of functional programming, but. is J.B. Reinsberger started a thing called Legacy Code Retreat. Oh, okay. And it was the first sort of expanding the family of Code Retreat. And so they don’t do counters game of life. They have a code base that Chet Hendrickson and Patrick Welsh put together, which is a horrible code base. And so the exercises… It takes real talent to build a real world. Yeah, exactly. Well, it’s Chet. And so the exercises are about writing tests around it, refactoring, and it’s still a legacy Code Retreat. So the classic Code Retreat, I’m very, you know, here’s the format. There’s no reason you can’t come up with something like a… I think it’s Matt Hauser came up with a test automation Code Retreat. So they have been experimenting with doing the Code Retreat format, but around different techniques in test automation. Okay. So they use a code base and work on different automation tools. So how can we hit this way? How can we hit it that way? Yeah, and so what I’m aiming for and what I love to see is an expansion of the Code Retreat family rather than a… If you go to something called Code Retreat, you don’t know what you’re going to get because people are doing whatever they want. But if you go to a legacy Code Retreat, you know you get this. If you go to a test automation… Code Retreat. Brian Merrick for a little while was talking about putting together some exercises on a refactoring Code Retreat. And so I love this. How can you mutate a code base? Yeah. And so, but I tell people, I get people asking like, can I use a different problem, all of this? And I generally say no. Well, I always say no. But what I want people to do is use, you know, it’s been, we’ve been building and sort of fine tuning the format for almost four years now. It’s settled. It’s good. Yeah. Early on. We know this works. This worked. Early on, we did a lot of experimenting around the format and settled on something that works. And so what I want, what I would love people to do is come up with a different set of exercises centered around something specific and then call that a X Code Retreat. I love to see somebody who has more experience with functional languages and knows about functional design come up with a set of exercises that are really applicable to functional programming and have a sort of a functional Code Retreat. So, for example, one of the exercises that I love doing that always causes people problems is no return values. Yeah. My favorite. And in a functional language, say you’re doing it in Clojure, well, Clojure’s got a lot of just data transforms. Right. And what comes out is it’s transformed into some other format. And so the core, a lot of the core is built on data coming in, data going out. So asking them to say no return values, I don’t know. Like, I’m not a Clojure guy. I’ve fooled around a little bit and paired with people, but I don’t know if that would give them a valuable thing to practice. Right. I know. But at least it would make them try to think about something. Yeah. Like, if they’re always saying it goes this way, it goes this way, it goes this way, what if it goes like this? What if it goes like that? I know that in OO, the exercise around no functional or no return values is fantastic. And it’s a really valuable design style that you can use and get better at. And in certain cases, it’s a much, it’s a highly, it’s a much more superior, form in certain cases. In certain cases. And so one of the ideas is that we tend to have the way we code. Right. It’s sort of like. Our style. The, the wagon trail where you code this way for so long, you end up with ruts that your wheels go down and it’s effective and you get to California and you find your goal. But what if, if that’s your only tool that you can pull out, then, you know. What if a problem? What happens when the, you know, the wagon wheel falls off? Yeah, yeah, yeah. And so really, yeah, or what if, what happens if you get dysentery? Right, exactly. Yeah, what if Bobby dies? That’s a problem, yeah. So yeah, that’s really the goal of it and Global Day is about increasing the number of people who are comfortable facilitating, expanding it. After last year, last year, the majority of the people running them were new, new facilitators, new hosts. And that led to an explosion this year of people who had a little bit of experience doing it. So that’s where we got, every weekend, you can go to the event, you can go to the CoderTreat.org site. So it’s Coder, that’s what I was going to, to wrap up is say, for people who are interested in participating or running a CoderTreat, you have a website? CoderTreat.org is our, our social network. Okay. It’s built on Ning. And there’s a big banner right now, you can go, there’s a page for Global Day, it’s at GlobalDay.CoderTreat.org. Okay. But if you go to CoderTreat.org, there’s a banner you can get to. All the stuff is there. There’s an events listing. Okay. So it has both the registered locations for Global Day as well as what’s going on this weekend and it could be near your town. Okay, great. Well, thank you very much. Thanks so much for talking and keep up the good work. Appreciate it. These are great interviews. Thanks. Subtitles by the Amara.org community