Hello, and welcome to another episode of The Bike Shed, a weekly podcast from your friends at ThoughtBot about developing great software. I'm Stephanie Min, and today I am joined by a very special guest, Casper Tim Hansen. Hi, Casper. Hi, Stephanie and listeners. So I'm wondering if you could just introduce yourself in your own words for our audience.
Sure, yeah, I'm Casper. I used to be on a Rails core team, been doing Ruby, Rails stuff for a long time. These days I'm doing consulting, so helping Rails apps with stuff, figuring out the domain modeling, because I think it's the stuff you kind of want to get into, because I've been doing a bunch of work and all that. Infinance, live in Copenhagen, that kind of thing. Did a lot of open source, still do, have some gems, trying to figure stuff out, trying to take things further, trying to conceptualize things slightly differently, trying to figure out what I want to do with this consulting thing. Also, a little bit more focused on domain modeling. Yeah. Yeah, amazing. How long have you been doing the consulting thing now? It's pretty new, right? It's still pretty new. It's about two years, and I'm still finding my way with all this stuff. Good technically, pretty great technically, but it's all the other stuff.
around it that I'm still figuring out. Yeah. Yeah. That makes sense. Cool. So I kind of want to share a little bit about how we got to know each other. You and I both spoke at RailsConf in Detroit in early May, and I got to see your talk, Riffy on Rails, Sketch Your Way to Better Design Code. And I loved it so much, I had to talk to you at the speaker dinner like that night. Can you tell us a little bit about that talk and just what you covered? Yeah. Yeah. So this is something that's been going on for me for a while.
kind of a long while, actually, where I've been getting into domain modeling and trying to figure stuff out there. How do you represent things? What's an attribute? What's a relationship? What's actually an association? How do you connect all these things together? What about naming things and so forth? And it's just this riffing technique that I developed over time, which basically is a blank Ruby file that you open up and then you toss things in there. So you don't have to play around with migrations or worry about migrations or Git commits or even test for now because you're still in a design phase of figuring things out. So what it allows me to do is to first find a shape.
And then once I have something that I kind of like, I can just try out a whole bunch of different alternatives. And because I don't have all the drag of the usual process, which is stuff that we do need, but just not necessarily in the design exploration phase, I have a lot more stamina and I can try a lot more things. And I find that it's a lot easier for me to have new ideas. Like, oh, let me try this name because it's so easy. It's all in one file. It's kind of...
Sometimes I just use an untitled file that I don't even save or whatnot. I ended up doing this on the stage of RailsConf too, whereas I tried a live demo, which was just a little too ambitious, I think. But I think people liked it overall. But at one point, I was like, oh, I don't like where this is going. So I just deleted the code I had already. And I remember getting a chuckle out of people for that. I was like, oh, that's okay. But so I've been doing this stuff for a long time and trying to figure stuff out. And it's like, oh, there's something here with this process I've been doing and trying to put more names to things. So at one point, I wanted to do a whole course about it. And I just couldn't write it for whatever reason. And I put it out for PR. People were nice enough to buy it. And I think they just kind of wanted to be supportive of one. But I still felt really guilty about not doing it. So
who was really kind and helped me put together a few videos with it. And we were kind of like rough, kind of a little bit what we were doing over Zoom here, just talking about it and trying to show the process off. And then, so I recorded that, sent it out to the course participants and hopefully they liked it. And then I also sent those videos to Jeremy Smith, who I've known for a while. He's pretty well known in the IndieRail scene. He runs the podcast IndieRail as well. And he tried it out and he's like, oh, I had good results with this. And he tried out, I think he did a session first. Most of these sessions, by the way, they're only like an hour long. So once you get into the flow of things and using them, they're pretty cheap to run. So it's not really like you ever really lose anything by doing it.
So he did this for like an hour there. And then I think he did another one after lunch or something. And then he came back to the next day and did a third one on the same thing he was working on. And he presented to the client. He was like, oh, I actually got results with this. And he had some feedback for how to frame some of the things as well. So he and I have been talking about for a while about, he's also solo freelance as well. So just a bunch of that stuff we've been talking about. But then we got on a call and he was like, have you ever considered, because in the videos, it seemed like you kind of sometimes stalled a little bit and whatnot. Would it be helpful to have a partner as well for some of these things? And he's like, and I was thinking about it. Like, yeah, it would. But you're the only person I know who's actually used to take and have results with it. So it's just like a really natural fit for doing that. And he and
So we're just like, okay, let's do some Zoom sessions. So we just put out a call on like Twitter, Messenger, whatever, that if people want to join, they can join Zoom sessions. And we took those videos and put them on YouTube. So I have a YouTube channel that has like five or six different sessions as well. We did one pre-record, I think, just to see how that would go. Yeah, just to solo the two of us, which is the one that's the most viewed about, like Spotify's, it has some generative layers and whatnot. And then we kind of kept going from there and kept practicing. And I knew I wanted to do the RailsConf talk about this stuff. So we did the Zoom sessions, put them on YouTube, and I knew I wanted to do the RailsConf talk. So this was all in prep for that. And everything just kind of flowed really naturally from this place. So we...
We ended up doing a course that was specifically about domain modeling in Rails for like 12 participants for the month of April, every first day we had a session. It was about this whole riffing technique. And we heard good things from people from that too, that they liked it, that they found it really practical and kind of easy to get into. I heard from someone recently, like, yeah, I'm still using it. And they're doing, they did something that's happened for me too, which is you try a version out and then you try an alternative version out and then you kind of see which one kind of wins. And what they found is that instead of A or B winning, it's actually, oh, we can actually just pick the best from both and combine it into like a third version. This was exactly my experience. I was like, oh, that's really interesting that they had that independently as well. Yeah, and then the RailsConf talk kind of happened. Amazing, yeah. I guess what I really...
found compelling about riffing was how it was not really prescribed at all. I feel like I was picking that up in when you're explaining how do you share this technique with others? You really have to just see it in action because it's not like there's steps to take, right? You literally just open a blank file and just try some stuff out. It's really difficult to kind of explain. So I keep always like going back and forth with all these different analogies and whatnot and trying to figure out because it's like trying to put words to all this like exploratory design space that's a creative space. So it's kind of, and riffing sort of leads a little bit to a music band or whatever where you're sitting around having a jam session. It's kind of, you kind of don't explain that either. You're kind of trying different stuff, seeing what happens with.
what the other person is doing, responding to that. But you're still together for, I guess, making a song or whatever in that case. But here, you're trying to produce something that's about the design problem you're working on, like having a prompt, for instance. But it's difficult. I don't really know how to put it into words. One of the feedback I got from the talk, it was really interesting. People came up coming up to me and being like, I do something similar. So I found it really interesting. Not that I thought, because I actually didn't know how other people felt about it. It's because I haven't heard very many people talk about this stuff, really. And I found it really interesting that there was other people that were doing something similar, even.
I was like, oh, okay, I didn't, okay, I haven't heard, because most of what I see online, at least in terms of the content, is like really nitty-gritty, business logic, technical, it's a lot of meter stuff, all this other stuff, which is fine. I just, I don't see any of the stuff that's deaths. the space before you settle all these things of like what do you do and what are we working on and what do we actually want to produce here and and what about this potential blocker that we're seeing now and whatever like one of the things i like to say about this is also that if i don't know later then i also don't know now but then i'd rather know that i don't know early as opposed to like in a week or so i just want to have that early which is what these sessions give me because i'm tossing things around and it has like a pretty fast pace feel to it i mean you can go and turn it up a little bit depending on how it's going but once you get into the flow of things like oh this is pretty easy to toss things around and then i get stuff out of it pretty quickly actually yeah yeah well i would like to talk a little bit about how much fidelity you put into it and you know you were talking about like yes this is a tool for kind of your when you're in the exploratory software design part of the process but it's different from say like an entity relationship diagram because you're writing code right you're doing what you would do later on in the process but maybe at a just
with different goals, right? The goal is not to get the code working at all. Can you tell me a little bit about, I guess, in more specifics, what are you putting down in the file? Yeah, yeah. And it varies a little bit depending on what problem you're working on. One of the things Sierra and I did was we started out with just like a spam detection thing. And that happened to be pure Ruby. Most of the other ones we've done have had some, have been problems that are around like, what do you do with like a Rails app for something? And what we tend to put down there is like active record models. And it's been fairly simple, actually. It's been belongs to, has many, has many through. That's been the majority of what we've been writing. And then putting a name to those relationships and connecting them together.
seeing whether or not they actually seem to hold up that's a lot of what i tend to do with these things like does this hold up okay this seems to hold up now okay now it doesn't seem to hold up okay let's backtrack a bit and then we just change our mind pretty much immediately so we don't have to keep dragging that around or have some costs in there like oh well now i don't want to change because look at all the stuff i put down which is why this is done with these like one files so you don't get too precious about it because it is about exploring all this stuff but you can still drop into actual business logic if you need to to see whether or not things hold up so i always liken it a little bit to i guess there's that quote about that sculpt issues where it's like i just chipped away all the things that weren't a sculpture when they made it that's kind of a little bit how i feel with this It was like, I just keep chipping away at things and saying, is this a sculpture? It wasn't. Let's backtrack. Let's backtrack. Oh, this seems to hold up. Okay, fair enough. That's it. That's close. And so when you get stuck on one thing, you kind of go to the next thing and keep playing around with it or whatnot. Like, oh, let me scratch a little bit here and see if it does anything here. Okay, it seems like it is. So like, no, that's not it. That's not it. And then go somewhere else if you get stuck or whatever. So you keep playing around and keep moving, kind of. It's a feel kind of thing. I like that analogy a lot. And the other thing I was just thinking about is, obviously, you're trying to uncover relationships between models.
In some ways, when you do drop down to that little bit of implementation, you can see more about how they interact with each other as opposed to not just like, oh, these things are related, but like what's the nature of the relationship? What's a method that I could call or write to talk to this other thing? And that part was really interesting to me because I do think that's what's missing in other types of techniques where you're just maybe diagramming and not writing code. So yeah, there's something really interesting about just like... taking kind of the aspects of different parts of how we work and combining them to be like, actually, like, we can also work this way. Yeah, yeah. Picking up on what you're saying, there were diagrams. That's how I always felt about them. Like, things like UML diagrams or whatever. Like, I don't know how to read them for whatever reason. You see the box there and it has a line to this other box and then it has, like, an extra little squiggly on it or whatever it means that's many or whatever. I don't know how to parse that. Because what I'm used to and what I train my brain to read is actor-reader models. The lines to has many, all that stuff. And then I see the diagram kind of without necessarily needing to see it. That's how it works in my mind, at least. So that's what I want to see first.
So in my mind, when I'm seeing a diagram, I want to convert it into those lines because that's what I'm used to. And that's what helps me actually be able to parse it and see it really, ironically enough, even though it's like, you can see the diagram, but I can't see the diagram. I need to have the code there so I can see the diagram, weirdly enough. But then from then on, it's like, oh, now I have it in this active working way. Now I want to play with it and see if it actually makes sense to take it a step further of trying out the business logic because otherwise I can't get the same info from the diagram. It's too many layers and I have to keep translating back and forth. So it gets like too costly for me at least to be able to work with it really. So that's what it's like for me.
It just felt natural. Like, oh, now it's in Ruby. Now I can kind of play with things and try to see, does this actually work with what I know and whatever. Yeah. Yeah. And not everyone is a visual person in that way. Like, I'm certainly not. I like much prefer to read words, I think. But another thing that was really interesting to me that I'm kind of picking up on now as well is you're saying you're just chipping away at stuff, seeing if something holds up. How do you know if you like something or not? I don't know. Is there a, do you have any way to describe that? Or I guess I always find it so interesting. It's like figuring out what feels good in terms of syntax or just code or even.
naming stuff like that yeah yeah i don't have a definite thing because this is where it gets into all this like feeling things out because it's not necessarily one thing you weren't necessarily saying it's one thing so what i like in the process of the whole riffing thing is well i can just keep playing around with it until i feel more confident in it and then it's like oh well now i know i have one so if i have something it's like this feels good but then i have a little bit of an aggy suspicion about hmm but is there something else so what i said is okay let's put that down now we have this in the file whatever let me save this or whatnot or try an alternative maybe tomorrow or whatever or take a break or whatever. Or if I feel like I have stamina or have an idea for what the alternative would be, let's just try it right now. And I'll just keep playing around. And once I have that part written out, the alternative written out, suddenly I can see both of them and be like, wait, I think I actually like the second one better. Well, so then it must be better. And then I can just swap over to that. So what I find that works for me in this process, if I have a nagging suspicion that it might feel good, but then if I have a nagging suspicion, let me just check that out and double check it just because it's pretty cheap to do all this stuff and play around with it to see whether or not there's something better. So that's kind of my way of exploring. It's like, I guess I'm going to feel good, but then I want to explore that.
Yeah. Well, that's cool. Because it reminds me, I actually revisited your slides from the talk before this. And you have that slide that says negative feelings become useful or something like that. And that's what I'm thinking. I was like, yeah, I don't know. Normally, I've certainly been in a position where it's like there's a nagging feeling, but maybe it's like even like, oh, I don't know if I really want to see what that's about because I've already committed to this other thing. And it would be so much effort to start out from scratch or to even consider, is there something that's not?
ideal about about this and it can be scary so it's like like you said when you surface it earlier in the process it's less loaded i think Yeah, it's less daunting too. Sometimes the analogy I use is the difference between like the snowball having made it all the way down the mountain and then you're pushing up from there against the giant boulder as opposed to like the way the top was just like this little, you could just flick it away or whatever. I don't want this to roll. That changes things a lot for me versus what it was like for me. And the story I gave in my RailsConf talk was also that in previous versions when I would do product work, it would be, I'd feel really overwhelmed at the start of a feature, not knowing how to tackle things, where to start, whatever, and all this stuff. But then towards the end of a feature, I'd be like having this nagging suspicion, this all this anxiety, like could I have done things differently? Should I have thought about something else? What's other things I missed or whatever? And so this whole riffing thing became my way out of that. It was like, well, if I just start tossing things around really quickly
I seem to be getting better results. And I seem to be uncovering things early. And I seem to be getting better names. And so just kind of like all the things kind of line up and work better for at least for my brain or whatever. Yeah, negative feelings. They become useful, right? Because you can just like, oh, let me go and check this out. This nagging suspicion I have that like, maybe this isn't it. Or like you have a way to resolve that feeling that is not as expensive. Yeah. So usually I'd be having this anxiety towards the end of it. But then I couldn't do anything about it because, well, we were already, it's too late. We've committed all this stuff. We set it on a path that we're going to be doing. So I can't really change anything. So I just like, it would just stir. And then I feel bad about it. But now I haven't shifted things kind of early.
Suddenly, these negative feelings are actually really, really useful. Another thing I like to say is, well, if I'm incompetent, I want to know early. And it actually feels really good to know early. And when I say incompetent, it just means, oh, I don't know how to do this. But it's like, if I don't know how to do this now, I also don't know how to do this in a week, necessarily.
Maybe I will or whatever. It's like, okay, well now I know. And now I know that I can talk to someone else about it. I need to go read blog posts or whatever to learn more, to be able to actually tackle this problem in a way that's not just throwing around and adding a whole bunch of incidental complexity just because I don't know what I'm doing and not know how to tackle it. Yeah. That's so ironic that you call it incompetence, but I think that it's such a skill because it's like, I can't, I don't know. I don't know how anyone could hear about a complex problem and be like, I know exactly how I want to solve that without, I don't know. Couldn't be me. Yeah. Yeah. Yeah. I guess this is my way of framing it. At least I like.
calling it that because it helps set me free in a way it's like because i guess you could say imposter syndrome my fear is that i'm incompetent or whatever but then being able to actually say that out loud it's like oh this is the way i feel and then it's over already because i've named it and whatnot and it's not yeah oh here it is okay cool and it's not bad it's not a you know i can't it's not as amountable not only can i see it and name it and feel okay with it and do something about it pretty early yeah oh this is the end of the road cool yeah you're very good at saying i don't know no in a way that's like actually that's how you know that someone does have a lot of knowledge about their process or has it almost like a mastery of themselves right It doesn't feel that way, but I get what you mean, yeah. Yeah, yeah, yeah. Yeah, I get what you mean. You're not in the double unknown, the like you don't know what you don't know situation, which is like I think always can be really challenging right down the line. It's like you're able to surface what you don't know early on and then you can go find out. Like you said, you just put it out there and then you're like, okay, at least now I know where to go from here. Like I have some options. Yeah, yeah. I feel like I'm not always the best at surfacing. So Riffing is my way to help surface these things and make it easier for me to do that.
Because I'm not necessarily, I feel the best at it or whatever, but I also tend to slag on myself for not, for like you said. There's a part of it, she was saying the thing with, I don't know who could just like have a solution for something right away. I was like, there's a part of it was like, but I should be able to do that. But that's not the job. I don't believe that. Yeah. I know. I want to talk a little bit about collaborating and how riffing enables collaboration. I think this has been another thing you've been kind of exploring or just trying out a little bit, which is different ways to collaborate on using this process. Yeah. Do you have any, I guess like any initial thoughts about that?
Yeah, it was really interesting because when Jeremy got on board, that was the first time I'd actually really done it with another person. I had, for the most part, just thought, oh, this is really useful for me to play around with stuff on my own. But then getting him on board and the fact that we could actually do it together was just like, oh, okay, this works. I had no idea that it would kind of work like this and it kind of worked really well. But there is a need for like a psychological safe space where it's safe to just throw things out. And this was actually one thing that I missed to put in my RailsConf talk because I was like, oh, this feels too silly or whatever. But all this riffing stuff is actually really a lot like improv where you keep building on top of the stuff that's already there and you keep seeing how it works out and whatnot and then keep playing with what's there and build it from there. And then you can always take it later because I think...
Part of what collaboration can sometimes be a little bit fraught among programmers because we're so focused on all the correctness of it, which is really important. Like if we're making banking software and we don't deduct from another person's account or don't actually send the money, that's a human's bug. Which means that we're going to be out of business really soon or whatever. So of course we need all the correctness. But what I find is sometimes all of that correctness part makes it really hard for me to breathe. It makes it really hard for me to feel like I have a say or whatnot or that I can't collaborate or whatever because it's not correct yet. And what I find with this roofing thing is giving me a lot more of a space to breathe and play around things. And then of course we still need the correctness, but we can have all this design space. And same as what designers do with wireframing.
playing around with things and saying, oh, let's settle the layout first. And then we have all this, sometimes I like to say that we settle all the organizational skeleton first, and it really helps clarify where all the business logic goes afterwards. We settled all this foundation. So now I don't have to worry about that. It's out of my mind, and then I can focus a lot more on the business logic itself that I'm having to implement or whatever it might be. And then it's the same with collaborating. It's kind of, I feel like it helps.
What I really like when you're doing this riffing stuff with another person is the more organic you make it, the better it is. Like we did one in Chicago when I went there for like a meet or whatever. He brought a prompt along. So we had this thing we looked at and it went really well. It just happened to. I was in like a really good walking. I tried riffing with someone else just before and I felt bad about it. I was like, oh, I wasn't because I was really focused on, oh, I promised I want to meet you as well. So it's like, oh, it's in two places. And then we were looking at riffing on this workout app that she was working on. And then at one point during our session, the work grunt came up in my mind.
I was just thinking about it. Yeah. Like you had an idea for the previous riffing session. Yeah, exactly. What you and I were doing. Yeah. Yeah. So I was, so I was walking my way there and what kept coming up in my mind is grunt. What does this mean or whatever? So my mind kept, because there's a workout app. It's like, Oh, there's a teacher, a trainer side where you're setting things up. And then there's the grunt level side where the other person just kind of has to do it. And it kept coming in my mind. It's like, Oh, it just feels almost like a workout at patrols. So what happened was I was in.
This whole other very, like, this space of just like, oh, these really odd connections of things that don't seem to go together at all. But I find that really useful for this collaborating stuff. So when I got to the meetup place that you were at there, I was in this space. So I remember when we fired it up and started going, I was kind of ready to go. And I think in that 20 minutes, we had the whole thing ripped out. And we just sort of talked about a whole bunch of stuff afterwards because it led to a bunch of different pointers and things to talk about after that. But the majority was, like, done there. So this is another thing I'm trying to put into words for, like, collaborating. This goes with the improv stuff as well. Of, like, I've been trying to put it into a point of calling it, like, reading the accountant's guide to real cheese, which makes no sense.
But that's the entire point because it makes absolutely no sense. It's things that don't go together. It's like, what, what? But I find that that kind of brain space to be in is really helpful for this riffing stuff. Like, what? That makes no sense whatsoever. That's so funny. Yeah. I like that a lot. I mean, I don't even. Exactly. It's not meant to be understood. It's just meant to be like, what? Yeah. I find it that's really helpful for this stuff is have these suggestions that are a little bit more out there. Again, going and moving away from some of the correctness stuff. It's like, yeah, does it work? Like, well, I don't know yet, but right now I want to explore these things and I want to have the space to collaborate as well and then see what kind of pops out of us.
of like names from different places, whatever. I don't know where this is coming from. Or now when a flow state, let's see what happens now. I find it really helpful because I find out to get better ideas that way. And then the ultimate goal for me is like, I want stuff that's creative, but not clever. You know, I don't want what people talk about to talk about clever code. It's like, oh, this is really difficult to stand or like it's meet by 10x engineer and then they leave and everybody else has to maintain it. I don't want that stuff. But I do want creative solutions that help put things together in a way that's clearer or the flow is clearer. So it's easy for other people to pick up as well. Yes, I have lots of thoughts. I know because you covered a lot about collaboration and I just, my mind also was just spinning. And first of all, I have kind of a similar.
headspace, I guess, when I'm in that creative, I'm willing to try anything. And I call it good idea or terrible idea. And even though technically I'm using like evaluative words, but at the end of the day, I don't actually care if it's good or bad, like terrible. It's just, it just becomes an idea when I like frame it that way. Right. But I think it kind of helps if I am working with someone kind of convey that I am not attached to this, what I'm about to throw out. I'm just throwing something out and it might be terrible, but then it'll be funny or it might be actually something good. Yeah, exactly. Yeah. I still come back to when Jeremy had a session at one point, at one point I made a suggestion, it's called spistowment.
And I think she was like, wait, what? And I was also like, I don't know where this is coming from or what it doesn't make sense. We also may end up going somewhere else. But I still think about it sometimes. It's like, oh, there's something interesting and different about this. And I'm also, and that's also why the whole riffing thing is meant to feel so throwaway. So you just suggest things and you're not, I'm not too attached to this. Let's just try it out. And we can always do another session. We can always come back to it tomorrow and see whatever. It's just additive to all the existing process we have.
The other kind of two words that are sticking out to me are low stakes and fun, which works well with kind of what you're saying about the connections to improv. Because you're right, when you do throw out the idea of making sure that the software is correct or performant or like all the, I don't know, whatever things that people claim makes good code, then you're just like, there's no moral authority about what's getting things right. I think there is something really magical about sharing that space with another person too. And what's cool about riffing is that at least when I read code, I usually have like some reaction, right? And it's kind of like...
bringing that way earlier into the process when you're just looking at stuff. Because even when I read code, I'm not even necessarily able to totally grok like what's happening inside of a method, right? But I'm like, oh, like, that's a weird name. Or like, why is this direction here? Those types of things. I think it's really interesting to have a way to kind of talk about that. And just that because it is a little bit of a, I mean, you know, it is a very different headspace from the other parts of writing software, I think. Yeah, yeah, for sure. Yeah.
That was the other thing that happened when Jeremy did the sessions was also, he'd ask me questions about, like, what made you think of this suggestion? Not in a critical way, but just a curious way of, like, what made you think of this? Oh, okay, I see, okay. Then we talk a little bit more, and would this make make sense then? So it became really easy to collaborate, just change something up. Oh, this is, yeah, okay, let's try it. That sounds good. And for me, what I try to do, both in overviews for coworkers and whatnot, generally, like all the open source I've been doing, is just, well, if we have a better idea, let's just use that. I don't want to be attached to my stuff. We can talk it out and figure out, what are you coming with this thing? Or where did that come from? Okay, cool, that's cool. Let's just use that. Again, the whole improv thing of yes and, and I'm like, well
the better to do whatever because it's just it's going to be easy to maintain hopefully it's going to be more fun to work on or whatever as opposed to just like trying to brute force no i'm actually right and whatever like i'm just like well who am i to say right this sounds weird but it's just like well and i have some seniority for sure but it's also like well okay what do i do with that then so let's just be an asshole or to people or whatnot that's not really my thing it's just like well let's just talk about it and so it's also more welcoming for everybody else like or juniors whatever it's just yeah i really try to find consensus when either suggesting changes like encode review or pairing. It's very much like, I want to know what the other person thinks of this because it doesn't, in some ways it almost like doesn't matter what I think. It matters what we think. The other place that my head was at just now was I've tried just if I do have another idea or I'm trying to like propose something, saying it in words and that doesn't like verbally and that has not been successful. So I actually think, and whenever someone leaves a view comment and has like a little bit of pseudocode, it's kind of like that a little bit. They're like, hey, like, what do you think about this design? And usually it's not like a fully fleshed out.
implementation is just meant to get the ball rolling on thinking about a different way to do something. Right, yeah, you mean in a code review comment, somebody's written out some pseudocode to, like, give a suggestion of, here's, what if we move in this direction? And then I started doing it, too, where it's, I have just three minutes to riff on this one, one particular piece of the code in this little, in my little GitHub comment. In that environment, I don't care at all about, I usually am saying, like, I don't think this works, but here you go. Or, like, it probably doesn't work as it is. You might want to double check, but, like, this is kind of where my head is at. Yeah, that's funny. That's actually where the whole riffing thing started for me, because I did, when I was on Rails core team, I do a whole ton of code request views on Rails itself.
probably a thousand of those or whatever and it would always be like i'd start off and because there's so many pull requests on there that you have to review but no i didn't have time to pull everything down or whatnot i just need to make suggestions so what i got really good at was exactly what you're talking about opening up a new pull request comment grabbing some of the code and then copying it over to my editor and stop playing around with it And then I learned a whole bunch of stuff by grabbing pieces of things into my console and give me different inputs. So I get a feel for a method. So like array partition for whatever that one, for instance, is not as well known. It's where you just partition an array based on a partition of whether or not something is like, let's say you have numbers 1 to 10, whatever, partition on whether or not even. Then you get all the even ones in the first array, all the odd ones in the second array. But then by playing around with stuff in a console, you get a feel for it. It's like, oh, now it's actually, I like to call them safe building blocks because now I know how to use it in a Rift where I'm just playing around with stuff as opposed to writing a whole test and everything because that little gap.
where you have to go back and run tests. I feel like that makes too much of an indirection so I don't get a feel for something. So that's where it started. And then I get really good at all that stuff, doing different suggestions. And so at one point when I was a product engineer, it just became really easy for me to be like, oh, let me just try the whole riffing thing out. That was before it had an aim. Because I've been used to doing it at the method level, but now I'm just doing it at a different object level. Yeah, exactly. Putting things together. I've been doing that kind of stuff too for different gems and whatnot. Let's try something out and see what this looks like and this expression. And I have a bunch of different gems that I did the same way too. Like, oh, I have an idea for some sketch. Let me try to put it together and see how that looks like.
But like you're saying with co-review comments, it's the same thing for me. Like, I think this could work. Maybe this could be a different direction and whatnot. And I've done a whole bunch of those, too, where people are actually really appreciative of that kind of stuff for the most part. I found these. They're like, oh, you actually, I met an old co-worker at a conference I was at recently where he's like, yeah, I'm actually really thankful for the co-reviews you did because they were really in-depth and you really played around with stuff. And your thoughtful suggestions. Oh, that's okay. Thank you. That's cool. I have thoughts about this, which is there is also a fine balance of like not wanting to rewrite the code for someone else. But in fact, that's actually what I like about what if potentially just writing out some.
some interactions, right? Of like how different objects can talk to each other. And like, maybe you don't even implement it at all. And you're just kind of like, this is what I'm thinking from a very high level. Just throw it out there. It gives them, I think, agency back, right? For them to react like, oh, I like this. No, I don't like this. If they do like it, great. They can go off and explore that on their own. And if they don't, then like no harm, no foul. You didn't invest a ton of time into rewriting the code in the way that you wanted, which is an issue I've seen kind of in other engineering cultures. But it's more like an invitation. Yeah, yeah, yeah.
And I mean, just to be honest, I've been that person. I didn't want to be, but you know, and this is how you learn as well. It's just like, oh, okay, no, this was too much. Okay, fair enough. I'll try to speak a little bit. But I really like the way you put it. It's meant to be an invitation ultimately. I'm just like, are you interested in this other alternative? Or are you not? That's fine for the most part. Unless I really feel like, no, wait, okay. Then that's a lot of failure. Yeah, but then that's a perfect time to be like, oh, let's talk, right? Let's work through this together synchronously. I mean, that was going to be a question that I posed earlier, but I think we kind of talked a little bit about it. Just does this work async? And maybe a little bit differently, but I think that it can. I don't know. Do you have any other thoughts about that?
Yeah. Yeah. Well, I've actually been doing that with another friend of mine, Thomas Cannon, who's working on this little CRM tool where we just, we got to meet in person at Blue Ridge this year, Blue Ridge Ruby in Asheville. And the day after the conference, we had known we wanted to work together. So we sat together and just like talked about the whole, a bunch of different ideas for things. And then after that, over, we've just been using GitHub. He's been sending me these riffs that he's been doing. These like 400 line files or whatever, like a bunch of different models and everything, all the stuff we talked about. And then to see little data at the bottom, it's like, let me wire all these things together to see how it actually looks. It's like, oh, this makes a lot of sense to me in terms of being able to see it.
And he's also done the thing where he's gone to the next level thing where you can actually wire up. It comes from the buck report templates that Rails has for active record, where if you go and look at those, you can actually hook up a SQLite memory database to your one single script file. And then you can set up your schema as well. So everything's connected to this memory database. And you can do binding.rb at the bottom of your script file. And you can load the modeling layer for your Rails app in line in one script and play around with things and see how it actually feels. And you can do all these local variables and set up with post.create or whatever, or attach a comment to that post or whatever, and see how it actually looks and feels. Just like the next level step for this thing, if you've done so far, like, oh, let me make sure I really test this out and see what it looks like.
Or you could send it to coworkers as well. So that's what he's been doing. And then we've just been talking back and forth, async on GitHub. And we didn't have a call yesterday to talk about some stuff more because there was a single tricky thing that I, it was about graphs and stuff like that. I was like, I don't understand how to, like, get the whole, like, we talked about earlier. We didn't use those. It was, like, graphing stuff. And it was, like, nodes and edges. And I was like, I have no idea. It's not my, my would say. So, yeah. Or I guess I kind of like, even if you are mostly practicing roofing solo, sometimes you just need a little bit of a nudge from someone else to try to think about things in another way. It's like, you don't need, you don't necessarily need a 60-minute synchronous conversation. You're just kind of like.
give me something else to react to. And then that starts getting the juices flowing. Yeah, yeah, yeah. No, for sure. Yeah. It only takes like the same thing I had with the whole, that for me was just that one word grunt for whatever it just kept spinning in my mind. Like, what is going on here? I feel like there's something here that just works and kept bringing out more ideas, the more I thought about it or whatnot. And sometimes that's all it takes. Or you hear something somewhere, whatever it might be that just gets you, yeah, like the juices flowing or whatever, whatever a juice bar, I guess. That's the most literal version of a, that ever works. I don't know.
Well, I feel like we, as usual, as per usual of the conversations between you and I, riffed on riffing today. So I had a lot of fun. If our Bikethead listeners want to find out more about what you're up to, where can they find you on the internet? I'm in a lot of places, K-A-S-P-T-H, Casp-T-H. That's just the handle I've been using forever. I'm on GitHub that way, Ruby.social, Twitter as well. What else? I'm on LinkedIn these days. I set it up recently.
Yeah, and I think that the RailsConf Talks might be uploaded soon, hopefully by the time that this episode comes out. So if they are, I will link them in the show notes. You can check out Casper's talk. And yeah, thank you so much for joining me, Casper. Yeah, thanks for having us. It's great. Yeah, always great. On that note, let's wrap up.
Show notes for this episode can be found at bikeshed.thoughtbot.com. If you enjoyed listening, one really easy way to support the show is to leave us a quick rating or even a review in iTunes. It really helps other folks find the show. If you have any feedback or questions, you can reach us at hosts at bikeshed.fm via email. Thank you so much for listening to The Bike Shed, and we'll see you next week. Bye!