Linear Poker with Chris Morrell
E1

Linear Poker with Chris Morrell

Joe (00:01)
Hey, what's up and welcome to Side Projects. I am your host, Joe Tannenbaum, and today we are joined by Chris Morrell. Welcome, Chris. Do you want to give the people a little intro for probably the very few people in this audience that don't know who you are? Otherwise known as Bossman Chris. This is the moniker.

Chris Morrell (00:11)
Hello, hello.

That's right. That's right. I love I love I love the nickname. I wish that. Well, yeah, my name is Chris Morrell. I'm the CEO and CTO at InterNACHI. We're a trade organization for home inspectors. So we do a lot of certification and education and all sorts of things in the home inspection industry. But I am a programmer at heart.

So even though I have lots of other responsibilities, I spend a lot of time both programming for work and programming for fun. So that's who I am.

Joe (01:02)
Nice. And I would, I would almost say you're sort of the side project king and I, and I'm going to encompass sort of like tinkering. do a lot of tinkering. You do a lot of like, what if let's look under this over here, what's over here. And I, I always appreciate that. I feel like I, I am somewhat frequently getting texts from you being like, Hey, you ever thought about doing X and do you want to hop on and see what I did with X? know, whatever that thing is.

Chris Morrell (01:25)
Hahaha.

Yeah.

Joe (01:31)
And you're you're very curious person and I really love that about you. It's really a very endearing quality to me. Is that is that something just that's just perpetually you're always wondering what if in these in the programming realm?

Chris Morrell (01:46)
Yeah, think that I am the type of person who likes to understand how things work. So I very much can't just use a thing and just because it works. So I'm constantly looking under the hood. yeah, I don't think I've ever used something without source diving it. Yeah.

Joe (01:54)
Mm-hmm.

Are you always source diving? Are you always looking under the hood?

Wow. Better person than I.

Chris Morrell (02:13)
I don't think that that's a moral thing. It's just like, that's just the way I am. I don't feel like I have a basic understanding of how it works, I'm just not comfortable using it. I think that something about that, you just tend to bump into things that then lead to other things, that lead to other things, and all of sudden,

Joe (02:31)
Okay.

Chris Morrell (02:41)
you know, I'm on this path of like, but what if, you know, what if it was different or what if there was this other thing that used this same technique or, you know, and I think that, I think that in a lot of ways that, you know, I have ADHD, I have a form of ADHD that is not really the hyperactive, but more is like,

It's like an excess of attention, not inattentiveness, right? So like when I get fixated on something, it's very hard for me to let it go. And so I think that a lot of times my side projects come from just like, I had a thought and now basically I won't, like I actually won't be able to get anything done until I like pull the thread enough to get bored with it. Yeah, I don't need to.

Joe (03:13)
Mm-hmm. Mm-hmm.

Yes.

I need to see it through to fruition, otherwise it will never leave my brain. Well, to your personal fruition, to satisfaction, to satisfaction.

Chris Morrell (03:39)
Not through, I mean, God, if I could see it through to fruition, God, yeah. Well, yeah, it's really, it's just like, I have to get to the point where, like, in my head, I understand everything. don't, and like, as soon as I can see the finish line, it's like, okay, well, now this is not interesting anymore, you know?

Joe (04:01)
man, same hard, same. Yeah, I feel like when the interesting problem has been solved, my brain checks out really hard. It goes, well, the rest of this is just something I've built 100 times before. I don't really care about the accoutrement around it. I just want to like get to the core of it and then and then let that be a directory in my computer for the rest of my life. You know, yeah. And often, though, I will come back. I will loop back around and be like, I did this in this thing.

Chris Morrell (04:10)
Yes.

Yeah.

Joe (04:29)
And I did it this way. It would be nice to snag that little snippet or that little like class that I made. I do that with. it's there's always a purpose. There's always a reason. I've almost never left something and never returned to it for one reason or another.

Chris Morrell (04:35)
Yup.

Yeah, I definitely find that either you come back to it because there's a lesson learned that you want to apply somewhere else, or just code that you honestly just want to like lift out of it and put somewhere else because it's useful, or you come back to it because you have like some new thoughts and like maybe you push it another 10 % and then walk away again and like I used to really beat myself up for that, the like sort of

Joe (04:53)
Mm-hmm.

Mm-hmm.

Yeah.

Chris Morrell (05:14)
never finishing, but constantly kind of revisiting. And I've come to appreciate that as like more of a, just like a good thing in life. Like I am getting, I'm getting, I'm getting lots of things out of that cycle of work. It's just like, I'm not necessarily producing new products at the end of it, but that's okay. Like I've got other, other places to do that.

Joe (05:38)
Yeah, there's no situation in which doing these little exploratory tinkerings doesn't just make like the tiniest little dent in your brain that even if you're not consciously using it for something else, you apply it elsewhere. Something comes out of those little explorations where you go, I actually don't know anything about this. I'd love to know more about this. Or I would love to take this new tech and try something.

There's always something that comes out of it. And also, and we talked about this on, on, on your podcast over engineered, but there is something to like the art of it. There doesn't have to be an outcome. can just feel good to like tinker for fun because I feel like a lot of the code that we write is code that has a purpose and has an output and has a product. And there is something really satisfying about like sort of a, a no judgment coding session where whatever happens happens.

Chris Morrell (06:17)
Yeah, absolutely.

Joe (06:37)
And not everybody is that like views programming or code in that way. Some people it's just a job and that's totally fine. But for me, like I need sometimes a more abstract experience to serve the greater good in my case. You know what I mean? Like others, other scratches need itching in order to make the main pipeline actually improve or work better, you know?

Chris Morrell (06:37)
Yeah.

Yeah, absolutely. think this is a running theme that I feel like I talk about a lot, but programming as art, think, is really near and dear to me. I think, like everything, you can be an artist and pursue something as art.

or you can be an artist and pursue something as a career and both of those are fine. And a lot of times there's lots of overlaps, sometimes there's not. So it's certainly not universal, but I think for me, thinking about this stuff as like a fulfilling creative pursuit is really a big part of my experience. And.

Joe (07:32)
Mm-hmm.

It feels essential actually. it, if it didn't, if that aspect wasn't there, I would have dropped this a long time ago. I can't do this like rotely. I can't just do it sort of, I can't be like a little code monkey, just like tapping on the keyboard. It's just, that's not the life I can live. Yeah. Yeah.

Chris Morrell (08:03)
Yeah, yeah, no, I agree. I also do think, like, I think the more experienced programmers and folks who can solve problems effectively and quickly, a lot of where that comes from is just like having seen this problem before and having a solution that works for something in this general shape, right? And so I think that

Joe (08:30)
Yep.

Chris Morrell (08:32)
the other big advantage of working on side projects is just like, you know, if you work at a place that solves one particular type of problem, right, you get really good at solving that one particular type of problem, but like, there's all sorts of different, yeah, there's all sorts of other shapes out there, right? And like, you might bump into those eventually, but like, yeah, if you're working on the web, you're not gonna, you're just.

Joe (08:45)
You gotta see more shapes.

Yeah.

Chris Morrell (08:59)
you're probably in your main job not going to be doing hardware integration stuff, right? And that's fine, but there will come a time when understanding the fundamentals of I.O. in a different way is going to benefit you in your jobby job. And having done a side project where you like,

Joe (09:05)
Mm-hmm. Yep.

Mhm.

Chris Morrell (09:29)
got into some weird, you know, like system IO stuff, you'll have that knowledge then to apply. So I think that there's real tangible, like sort of commercial value in doing that work too, you know?

Joe (09:44)
Yes. Agreed. It's like that, that meme where there's the guy in front of the conveyor belt and that's a bunch of circles and then a triangle pops out and he says, well, I guess we're making triangles now, but we're populating that conveyor belt with as many shapes as we can so that we can make whatever we want. Right. Okay. So all that being said, let's talk about a side project. I know you have a lot to choose from. what would you like to bring to the table today? What, what is tickling?

Chris Morrell (10:00)
Yeah. Yep. Exactly.

Joe (10:14)
tickling your fancy as it were.

Chris Morrell (10:14)
Sure. Yeah, I mean, I do have a ton of different things that I've been tinkering with over the years that are in various states of completion. And when we were talking about this offline, the one that kind of jumped out, I think, was this linear poker project, which is interesting because it's like in a totally different ecosystem than what

Joe (10:37)
Yes.

Chris Morrell (10:43)
you and I typically work in, it's React and Vercel and Next and GraphQL and all these sort of buzzword web dev features that we don't use that much in, I don't use much in my day to day. And so that it was an interesting, it was an interesting project in sort of getting to see how

Joe (11:00)
of right.

Chris Morrell (11:11)
other folks experience web dev and some of the like positives and negatives of that kind of really jumped out to me. So like briefly, are you familiar? Yeah.

Joe (11:14)
Yeah.

Okay, so let's zoom out for a second. I don't know what this thing does. Just give me like a, what does it do and where did it come from in terms of like, you wanted to make linear poker.

Chris Morrell (11:25)
Hahaha.

Yeah. Okay. So I am, I think I spend an inordinate amount of time thinking about project estimation and like whether it's valuable and how to make it valuable. I realized that like in having conversations like John Drexler and I have talked about this a bunch and there's like, you know, I think there's a very valid argument for, for just like saying like,

Joe (11:46)
Mm-hmm. Mm-hmm.

Chris Morrell (12:01)
project estimation is broken and just don't do it. But I think that there's something there. I think it's useful to be able to say like, this thing, we can all agree at least is bigger than this other thing. In terms of just like planning and thinking about what to do next and how long it's gonna take, I think those things are useful, useful for a team to understand a little bit.

Joe (12:17)
Mm-hmm.

Chris Morrell (12:31)
and so back when we used Jira, we used a Jira plugin, that did planning poker and planning poker comes in sort of two forms. There's, there's like a version of planning poker. That's more traditional where you basically like bring up an issue onto, onto the screen or into the app. And like everyone on the team independently,

gives it a score, right? Whatever your scoring system, whether you use like, you know, shirt sizes or like Fibonacci curve or like there's all sorts of different ways to do like scoring, but you just, everyone gives it a score. And then you kind of like, everyone reveals their card at the same time. And then like it, it's an interesting way to like bring a conversation around like either, okay, everyone gave it the same number, easy. We just like, we all agree this is a two and we move on.

Joe (13:09)
Sure.

Okay.

That's what it is. Yep. Yep.

Chris Morrell (13:31)
Or it's like one person said it's an eight and one person said it's a two and it's like, obviously this issue is too fuzzy and it's not clearly defined enough. We need to understand what the problem that we're trying to solve is more clearly so that we can have a clear understanding of how hard it is to solve that problem. So that's planning poker. And it's like a really interesting process.

Joe (13:45)
Yeah.

Okay.

Chris Morrell (14:01)
The software that we used had an alternate version, was just like, basically, was like a relative scaling method where you essentially just like, it was almost like a Kanban board and you would just like take each ticket and just like, all you did was like put it, is this like.

Joe (14:15)
Mm-hmm.

Chris Morrell (14:25)
more like these ones over here or more like these ones over here and like these ones are bigger than these ones, right? So you kind of like bring everything, you make everything relative to each other. And then you just like give a point score to each column, which I actually, I think the like cleverness of, of poke planting poker is, is fun, but I actually found that process to be much more useful.

Joe (14:29)
that's an interesting way to do it. Sure.

Chris Morrell (14:52)
at least for us at that time and like our team. And so when we switched to linear, one of the things that I kind of missed was like, you know,

Jira, for all of its faults, has a huge marketplace of integrations. there just weren't, especially, excuse me, when we switched to linear, it was brand new. There really wasn't anything in the way of integration. And so we didn't have that as an option anymore. And I just kind of missed it. It wasn't a big part of our team's process or anything like that, but it was one of those few, it was.

Joe (15:12)
Yes, yeah.

Right.

Chris Morrell (15:36)
Perhaps the only thing that I missed about Jira, let's say.

Joe (15:38)
Well, it's a collaborative moment and a process that's typically pretty dry. I get why you would want that in the mix and get everybody's feedback and opinion on that in a slightly fun way. I get that. Okay, so you moved to linear, that was no longer available. So you were like, I write code.

Chris Morrell (15:53)
Yeah. So when,

Right, when Linear came out with their API, which I don't think there was a full-blown API when we first switched over, but they eventually released a GraphQL API, I thought, let me just see what it would take to build the rudimentary version of this. And I think I've spent a lot of time in the JavaScript world.

Joe (16:11)
Yeah.

Chris Morrell (16:32)
I've explored Node as like a, as a platform. Like I've built products on Node. So I'm not totally unfamiliar with it, but I had never, I had never at that point I don't think used Next.js specifically and like, don't, what was Vercel before it was Vercel?

Joe (16:40)
Mm-hmm.

Was it something with a Z? Yeah, it's not... Yeah, something like that. Yeah.

Chris Morrell (16:59)
as Veit or Zeit, Zeit. Yeah, something like that. You know, that was like, that was big. And yeah, I was just kind of like, I kind of want to like play with these things and see what they're about. And GraphQL was really at its peak, I think, at that moment in time, like the...

Joe (17:18)
Okay.

Chris Morrell (17:26)
the sort of promise of GraphQL was really interesting. And so like, it just felt like a project that fit all those things, those, know, hit all those notes because the linear integrations were all built on.

Joe (17:28)
Yeah.

so they were providing like little SDKs that were JavaScript basically that's for, for node. Yeah. Okay.

Chris Morrell (17:48)
Yeah, yeah, their API is exclusively GraphQL, which is very frustrating in reality. But if you're building in JavaScript and you're using Apollo and all the sort of stuff around that ecosystem, it works pretty well, Yeah.

Joe (17:53)
Got it.

It's at least easier or bearable, right? Yeah.

So this is a separate app built in Next.js that just integrates with linear. That's how this works.

Chris Morrell (18:23)
Yep. Yeah. So basically what it is, is you, you you click, you click login, it redirects you over to linear for an auth flow. we get a token, and then it's all client side. There's no, there's really, there's really basically no server side, other than like authentication. so in the client we make, like I just make

Joe (18:46)
Okay.

Chris Morrell (18:50)
the GraphQL API requests to the linear API using Linear SDK because it's all JavaScript, they provide that. And it just pulls up a list of all the tickets that you have in your, I guess, unestimated tickets and triage. there's just like a Kanban board, you know, and you just drag each ticket.

into the board. And you can click on the ticket to see a preview of the ticket. A couple little things like that. And then when you're done, you just click a button and it saves all those. Like, you know, it's all staged, so it doesn't actually make any changes because a lot of times you end up moving things around once you like, OK, we put this in this column, but actually there's a few tickets that are bigger than that. So we'll move it over one column and, you know, stuff like that.

Joe (19:41)
Yeah.

Right. I feel like that's the thing about the relative that trips me up a little bit is that like a ticket could come in and kind of blow the thing open and be like, well, this is actually a big ticket and all these things we put in big ticket are actually not, I guess they're, are they labeled columns or is it more abstract than that? It's more like you're sort of putting everything kind of on a, on like an unlabeled timeline. That's like an infinite. Is that, is that more of the vibe?

Chris Morrell (20:12)
In the original app that we were using, they were unlabeled and you applied labels to them after you did all the sorting. In my implementation, because basically with linear, you pick a sizing scale for the project and then that's tied to the project. So I just generate a column for each item in your scale, whatever the scale is that's assigned to the project.

Joe (20:22)
Makes sense. Yeah.

Hmm.

It sense.

Chris Morrell (20:42)
But yeah, mean, my answer to that is mostly just if you bump into a ticket that like blows all the other tickets out, like maybe just leave that because it's not a ticket, it's perhaps a project or two tickets or five tickets, you know? It's like, yeah, yeah. So it's more like, yeah, we just don't do this. We just don't pull this one into the...

Joe (20:59)
Yeah, that's true. That maybe says something more about the ticket than anything else. Yeah. Yeah, that's fair.

Chris Morrell (21:10)
the board right now and we just know, okay, there's something here that... Yeah, easy peasy.

Joe (21:13)
You just delete the ticket and now there's it's no more. And now you don't work on it. That's the best way to close a ticket. Okay. So is this something that everybody on your team is like able to do individually or you collaborate on this particular, like how did that work?

Chris Morrell (21:32)
Yeah, so that was the other interesting thing was I wanted to experiment with some like real time UI stuff. So in addition to having the like the sort of driver view, there's a viewer component every time you essentially once you sign in and you load up a board, it gives you just like a unique URL that's, you know, some some random string.

Joe (21:40)
Mm-hmm.

Yeah.

Chris Morrell (22:00)
And you can send that to anyone on your team and they basically see the board and they can see you moving things into columns and they can like, they can read, but they can't actually move things around themselves. So that way, you know, if we're on Zoom, screen sharing is fine, but like, I think a lot of times you might want to jump into linear and actually look at

Joe (22:16)
Okay.

Yeah.

Chris Morrell (22:30)
a couple of other tickets while you're talking about one, or you may need to go somewhere else to like grab some context about a ticket to have to like effectively have a conversation about it. So it felt like it was better if everyone was just in their own browser, sort of like watching, watching the process and contributing so that that like you're not like stuck in a position of having to have zoom open and watching the screen share to to be able to join.

Joe (22:56)
Yeah, you can do a little ticket side quest as you need.

Chris Morrell (23:02)
Yeah, yeah, so that was another fun piece was like introducing like, you know, pusher and having like a multi-channel live updates and that meant that a lot of the UI has to be, you know, it's not exactly as an event source, but it's kind of, you know, the UI has to be evented in a way so that like, these changes come in through that.

Joe (23:10)
Yeah.

Chris Morrell (23:29)
that WebSocket stream, can apply them to the UI, which is really interesting. It's an interesting problem to solve.

Joe (23:36)
How did you find that in that ecosystem? Did you find that pretty straightforward or easier, harder than what we're used to? I'm used to doing that with the broadcast driver and typically Echo and sometimes I'll reach a little deeper if I need to go deeper. But how did you find it in that ecosystem?

Chris Morrell (23:46)
Yeah.

Yeah, I I think that React happens to be very well suited to this type of implementation. You know, going back to Redux and now just like useReducer or like a bunch of the patterns in the React world are essentially around this idea of like events or actions or some type of thing comes in.

Joe (24:09)
Yeah.

Mm-hmm.

Chris Morrell (24:30)
and it changes the shape of your state and then the UI re-renders to reflect the new shape of the state. So essentially I just adopted that pattern for the entire UI and then instead of all of the events coming in from like clicks or typing or whatever, some events were just coming in from the WebSocket. And then it was just a matter of like you filter out the events that are from

Joe (24:54)
Gotcha.

Chris Morrell (24:59)
you and only like any events that you are firing locally just get applied locally and then all events come through that stream and you just apply any ones that didn't happen locally and it it's surprisingly resilient and and works pretty well you know there are

There are times when it would get a little janky and there's a little bit of conflict resolution stuff that you have to deal with from time to time. if you design your events to be relatively small and there are effects to be idempotent, you can get away with a lot. It's a pretty cool way to build a real-time UI.

Joe (25:29)
Yeah.

Yeah, that's pretty cool. I think, if I remember correctly, Laravel has that, what is the method? I don't know what the method is, but it's basically saying like broadcast this to everybody but me so that you don't get the, the like sort of echoey feedback of your own actions, which I always appreciated. yeah, that's cool. so I didn't realize that like the, was a real time aspect to it, which is, which is fun. let's talk about graph QL.

Chris Morrell (26:01)
Mm hmm. Yes. Yeah.

Joe (26:18)
for a moment. I have never ever, ever worked with GraphQL. I know enough about it to be dangerous, but also little enough about it to, you know, really need to start from scratch if I were to like work with it. Upside, downsides, would you ever want to work with it again? How do you, how do you, I mean, you kind of alluded to like not the promise that they didn't fulfill the promise that they set out, but how do you feel about it?

Chris Morrell (26:25)
You

Yeah.

Well, think GraphQL, I think a lot of the ideas behind GraphQL are still really smart. Being able to essentially just build a query that asks for everything that you need at once and asks only for what you need and can potentially span across multiple data sources like from the client side, it doesn't really care about where the data is coming from. It just says, I need the

the user and their team and all the tickets and like the ticket statuses and like I don't really care what it takes on the server to get me that data like that's just what I need you know.

Joe (27:19)
Yeah.

It's like the ultimate flexible API from the client's perspective. Yeah.

Chris Morrell (27:27)
Yeah. And I think like it facilitates API change in, I think, a really nice way because you can essentially add and deprecate fields without like having to introduce new endpoints pretty, you know, occasionally you do have to like version an endpoint, I think, but in a lot of times you can just get away with just adding a new field.

Joe (27:48)
Mm-hmm.

Chris Morrell (27:57)
leaving the old field until no one is asking for that anymore and then removing it. So I think that's cool. I do think that there's a lot to be said for the idea of just like, okay, we've just exposed essentially the true API, right? Rather than sort of abstract it behind something like REST, like in a lot of ways, you're just like exposing

Joe (28:19)
Yeah.

Chris Morrell (28:27)
the actual things that can happen in like a little bit more of a, I don't know, in a way that feels like a little more honest to me, maybe.

Joe (28:38)
Yeah, it's also that exact reason is why it always makes me nervous because I'm like, yeah, it feels very open, which is not a bad thing. But it and I know that there's control mechanisms, you know, on the other side of the equation. I'm like, man, it's just. It's just out there, you know, it's just like they're just asking for what they want. They're getting it. That's wild, you know.

Chris Morrell (28:47)
Yeah. No.

I think that that's 100 % legit and that I was going to put that on the other side as well is that, because it's so open, know, like in one hand, on one hand, it's like having to adhere to rest conventions when something isn't like sort of a resource with a crud operation can feel a little weird, but at the same time, yeah, at the same time, it's like,

Joe (29:24)
Yeah. Yeah, you're like shimming it in. It feels bad.

Chris Morrell (29:31)
Okay, if we're only thinking in these five verbs, everything is a resource, it makes it easier to guess in a large system where you might go for something, right? Because in a GraphQL API, you might just have a function that's like, get issues for team by type or whatever.

Joe (29:37)
Yeah.

Wait.

Chris Morrell (29:59)
And that's like very descriptive and like it tells you what it does and it does what it tells you. But like if I am trying to find all the issues for a team by their type, like in a RESTful API, I can immediately like know I'm looking for like the issues resource that's like a child of a team that's like got a type filter on it, right?

Joe (30:27)
Right.

Chris Morrell (30:28)
I don't have to guess at what the name that the developers picked for the function is, you know?

Joe (30:35)
Yeah, what does discoverability look like? there any, is there discoverability with GraphQL?

Chris Morrell (30:40)
Yeah, well, I mean, the cool thing is it's it's an entirely self documenting system. like by having a graph QL schema, you basically just get a full like API viewer for free. So like anything that's got a graph QL schema, you essentially can see like there's tools that just give you really nice ways to browse all the methods, view all the types.

Joe (30:46)
Yeah.

Okay.

Chris Morrell (31:08)
see how they interact with each other. It's really nice in that regard and because it's very, very parsable, IDEs can pull that in. in my IDE, when I was working with the linear APIs, I just got auto-complete on everything for free without having to do anything.

Joe (31:31)
Well, I was going to ask you about that. So you, I, this, don't know if this was the same project or you, or you were just working with the linear API for another reason.

I don't know if this was the same project or if you were working with the linear API for another reason, but I remember you showing me like, were you parsing like the like graph QL schema into something specific to PHP storm that allowed, like you talk about that because that was, this is another side product quest that was fascinating. And I was, I mean, the level of

Chris Morrell (31:56)
Yeah.

Yeah, well this

Joe (32:08)
of IDE, auto-completion and intelligence around what you were doing when it was, when it felt like a very dynamic interface was really impressive. Like what, talk, talk about that for a second.

Chris Morrell (32:21)
Yeah, well this gets into the main problem with GraphQL, which is, yeah, which is, GraphQL is great if you are really sticking to JavaScript, and even I would say if you're using the main tooling, so if you're using Apollo and Relay and some of these like,

Joe (32:26)
Okay, perfect. We're still on track.

Chris Morrell (32:51)
There's really, there's like the correct way to consume a GraphQL API. And it's like, it's a pretty specific set of like criteria. And so if you want to work with that API in any other way, it sucks. That's the big downside of GraphQL is like, it's pretty great if you're doing it exactly the way that it's meant to be done. But yeah.

Joe (32:57)
Mm-hmm.

Okay.

Chris Morrell (33:20)
I'm a PHP developer, I wanted to integrate with linear in PHP and like, yeah, fundamentally GraphQL is just a JSON like string that you post to an endpoint. So I could just like do a big here doc, you know, blob of GraphQL query and like just use the HTTP facade to send it to the API and like, I'd get.

Joe (33:38)
Yeah.

But who wants to live that way? No, feels bad, feels bad in your heart.

Chris Morrell (33:48)
Yeah, I'd get JSON back and it would work, right? But it's not a good experience by any means. like, yeah, you don't get any like, you don't get any code completion, you don't get any like syntax highlighting, know, you just like lose all of the modern niceties of development. So yeah, I went down this whole rabbit hole of building a PHP SDK for the GraphQL.

Joe (34:07)
Yeah.

Chris Morrell (34:18)
API for linear GraphQL API. And it was very fascinating because I was able to essentially take, because it's like a formal definition of their API, I was able to parse that into an abstract syntax tree and then walk that tree, right? So for every node in the tree, you know,

Joe (34:36)
Yes. Yes.

Chris Morrell (34:45)
one node might be a function or actually in GraphQL like yeah.

Joe (34:50)
Well, so wait, back up for one second. When you say it's a definition, how are you receiving that? Is it JSON, the definition?

Chris Morrell (34:59)
It's a .graphql file. It's like its own format. It's JSON-like. If you're familiar with JSON, it looks very familiar. It's JavaScripty JSON-y. And to be clear, I didn't write the parser.

Joe (35:02)
it's own thing. Okay, got it, got it. Okay, continue.

JSON Plus.

Okay. So you took, you took that definition and you started walking it as an AST and next.

Chris Morrell (35:27)
someone else has written an incredible PHP parser for GraphQL, right? I just... I looked at it some. And yeah, so like that just gives you an abstract syntax tree, right? So that's just like a tree of every statement in this file, right? So like you'll have...

Joe (35:34)
But you source-dive the parser to understand how it works, I bet.

Chris Morrell (35:57)
GraphQL has queries and mutations. you'll have a node that represents the query, but then inside of it, there'll be a node for the name of the query, and then a node for query parameters. And then a child of the query parameters node would be a query parameter node that then has a child that's the type node that's the parameter type, and then the name node. It's like this big tree of data about, and that's why it's called, it's a,

Joe (36:19)
Of course.

Chris Morrell (36:27)
data about the syntax of the file, right? It's like, but what was so cool was there's also an incredible PHP language parser that exists that has essentially the opposite. It lets you build a tree. Yeah, and then,

Joe (36:30)
Yeah.

Mm-hmm.

they construct it.

Chris Morrell (36:56)
just like take that tree and spit out the PHP code that that tree would represent? No, the I'm blanking out on the name of it, but the the other one. Yeah, yeah.

Joe (37:01)
Which one did you use? The Microsoft one?

I know it's the other big one that's, yeah, it's not just called PHP parser, right? It's something, yeah. Okay, I know which one you're talking about. I looked at that one too, yeah. That's cool.

Chris Morrell (37:16)
It might be. It might be just like PHP parser slash. Yeah. Yeah. Yeah. The Microsoft one is really good for parsing partially complete. Yeah. But it doesn't. It's a little less formal in its in its approach.

Joe (37:27)
Fault tolerance stuff. Yeah, yeah.

It goes like a completely different direction. Cause I think it's going like token by token to try to like fix it as it goes, if it needs to, alert you when it's gone wild or, whatever. But this, this one is like, we understand this to be, actually you were working from the other direction. So it didn't even matter. You were building this up from the other side, which is so cool. That's awesome.

Chris Morrell (37:41)
Mm-hmm.

Yeah, yeah, yeah.

Yeah, it was such a cool experience. So I had this tree of GraphQL, and I essentially just wrote some glue code that said, hey, when you see this node, just turn it into this PHP tree node. And they're not one-to-one, but they actually are pretty close in representation.

Joe (38:22)
Yeah.

Chris Morrell (38:24)
So essentially, like, yeah, when I saw a mutation, like, I turned it into a class that, extends this mutation class that I wrote, right? When I saw a query, I created a class that extends a query class that I wrote. And...

Joe (38:39)
And so you just generated an SDK basically for yourself for linear that's a PHP. That's so badass. That's so cool.

Chris Morrell (38:43)
Yeah, it's a full auto-generated linear SDK with like 100 % type compatibility with the GraphQL API. as linear releases GraphQL changes to their API, you just run a command and it spits out new code. it's such a cool, it's not super well documented right now, that's kind of the next step, but.

Joe (38:51)
Come on.

Play it again. Yeah.

Chris Morrell (39:10)
The nice thing is, you can look at the linear documentation and essentially it works 100 % the same way because it's exactly the same code. I hate generated documentation. Yeah.

Joe (39:18)
Well, you could probably also generate the docs. cause you're, no, well, all right, fair. But, I don't know, you're generating the code, you know, I bet you you could do, you get pretty far and then maybe hand roll some of it or something like that. I don't know. Maybe at least code examples or something like that might be, could be, you hate this.

Chris Morrell (39:38)
Yeah, maybe. Yeah, I think.

sure. Yeah, that's no, no, that's

Joe (39:46)
so much. can see this.

Chris Morrell (39:49)
Well, that's mostly what I've done is just like there are a couple code examples on the the the read me and that's like hopefully enough to get you started. And then, yeah, you just literally look at the the existing linear GraphQL documentation. And it's like if their docs say like whatever example get get issues by team of type or whatever. I can't remember what I said. But like if their docs has a function called that, then like you literally

just call that function on the SDK and it's there and it takes exactly the same inputs as the GraphQL one does. And that can be a little clunky because this is mostly convention, but by convention, GraphQL tends to, it cares about types a lot. So a function, like a mutation,

Joe (40:18)
call it here.

Yeah.

Chris Morrell (40:46)
typically takes an input that is a new object type. So if I had an update user function, typically you will have an update user input type that that function accepts. And that type has all the data that would be the arguments for the function.

that doesn't map one to one with the way PHP developers typically work. So the one downside of the SDK in my experience is you end up needing to instantiate a bunch of intermediate objects to represent the data. And it's OK. I honestly don't know.

Joe (41:32)
Yeah.

Do they basically serve as data, DTOs basically is what you're saying? Yeah, yeah, okay, all right.

Chris Morrell (41:42)
They're just DTOs, yeah, exactly. But they account for the fact that a lot of these functions can take 500 inputs or whatever, or 40 inputs, and all of them are nullable. And so it's just like an object with you put as many keys with values as you want on it. And that's super straightforward and easy in a JSON-like format.

Joe (41:52)
Yeah. Yeah, yeah, yeah.

Yep.

Chris Morrell (42:11)
But like in PHP, you need to instantiate something for each one of those. like, you know, I thought about, okay, you could pass like an array with just like string keys, but then like you lose all of the like type, the type magic that the rest of the like SDK has. Yes, I know.

Joe (42:28)
Yeah, I wish we had that. missed, like flipping back and forth between languages, that's one of those things I really, really miss. Yeah.

Chris Morrell (42:36)
Yeah. Yeah. So, but that was a, yeah, that was a really interesting, that was a really interesting project. And that, that did come from, I think that this, you know, to kind of go back to the original premise that we were talking about at the beginning of the show, like, I, I don't know that I would have approached it the same way had I not like worked with the linear GraphQL API years ago. I think I would have approached it. I would have

Joe (43:02)
Totally. Yep.

Chris Morrell (43:05)
I would have come to it with different expectations or a different approach to the problem.

Joe (43:08)
Yeah.

So I assume based on the way you're talking about it that the linear poker is not active and it's not being used. It's.

Chris Morrell (43:20)
Yeah, it's around. It still exists. We don't use it. We don't use it actively. Every once in while, I think about doing a planning session where we use it, but we don't for whatever reason. So it was just like, still sitting there.

Joe (43:24)
Yeah.

Okay.

Okay. But the new, you're clearly integrating something with linear, sounds like with on a PHP side and that's an active, that's an active project or that's an active integration.

Chris Morrell (43:41)
Yeah.

Yeah, I'm not yet. I want to write some of like daily, you know, of like cron type things to do some automated cleanup on our linear tickets. Yeah, I think it's kind of interesting. So a couple of ideas that we've had are essentially like priority decay. like

Joe (44:04)
cool.

Chris Morrell (44:15)
If a ticket has been sitting undone for a certain period of time, bump the priority down by one notch. So like, right, if it hasn't been done, like the priority goes down. And then the opposite is deadline prioritization. like being able to throw a ticket in that's low priority with a deadline, that's like a

Joe (44:27)
because it's clearly not a priority. Yeah, yeah.

Chris Morrell (44:44)
far future deadline, knowing that as the deadline approaches, the priority of the ticket will start to bump up and it'll surface itself. So those are two things that I think would just be really cool. And I just thought, we'll just have a scheduled task that does this every day on our linear tickets. John's using it a bunch for paper cuts. So he's actively using the SDK for that. And that's the first place where it's active.

Joe (44:51)
So smart, so smart.

So smart. Yeah, that makes sense.

Okay, cool. Cool.

Chris Morrell (45:14)
be being used but but I you know other than sort of like helping him out with that a tiny bit I don't know much about his his implementation with it.

Joe (45:17)
Well...

Side projects, not a waste of time. That's the verdict. We have, we have actively taken a piece of concrete knowledge and skill from a side project and put it into something useful and active. That's, that's the takeaway here.

Chris Morrell (45:28)
Yeah, for sure.

Absolutely. Yeah. Yeah, there's I know that we're getting close to the end and I feel like there's one there's one thing that like I did I thought was an interesting I don't know I think is interesting which is

Joe (45:53)
Hit me.

Chris Morrell (45:57)
Using Vercel and Next gave me a deep appreciation for like

Joe (46:00)
Mm-hmm.

Chris Morrell (46:10)
what I hope Laravel Cloud eventually becomes. In that, like, it made me realize that, like, as much as Laravel has a pretty good deployment story right now, like, with Vercell and Next, it's like, you create a Next app, and then you just, like, point Vercell at that, like, Git repo.

Joe (46:14)
Okay, talk on that.

Yeah.

Chris Morrell (46:37)
And it is just now you just have a URL for that app. that's all, like there's, there's no, there, is no step three, right? And it just, it just worked and it's like, I want like another, another thing at this URL. just put a, I just put a file there, like in the pages directory and, it just, now that that file reacts to that, like the file-based routing in next I think is really

Joe (46:42)
Freak strong.

Yes, yes.

Chris Morrell (47:07)
nice for the things that it does well. And the integration, like the deep, that like sort of deep integration with the platform makes it just like these features kind of sing together. The like server-side props stuff. I don't know how familiar you are with how like React and like server rendered stuff works, but like, you know, this is pre-modern.

Joe (47:11)
Yeah.

A bit, yeah.

Chris Morrell (47:37)
like use server, use client stuff. But it was just so easy to just like, you just define a little function at the top of your file that's like, this is the that only runs in the server and it does privileged work. I loved, I thought it was like really, it made me realize like the gaps that like,

Joe (47:39)
Yeah, yeah.

Chris Morrell (48:06)
in what we have. And yeah, so that was really interesting to me. And then I needed literally anything else. And it made me appreciate just how great Laravel is. Because like, I have to write my own session handling. Because if I want sessions,

Joe (48:07)
Mm-hmm. Mm-hmm.

Yeah, yeah, yeah.

Yeah, yeah.

what?

Chris Morrell (48:36)
Like, either I have to write my own thing or pull in some like third party authentication package that like talks to Auth0 or whatever. Like, every single thing.

Joe (48:48)
Next is not handling anything in that room.

Chris Morrell (48:51)
At the time, I just looked at the code. I just have my own use session hook that literally is parsing the cookie and storing something in whatever Vercell's key value store is. I know that I'm sure that there's a better story for that now, because this project is a number of years old.

Joe (49:08)
mama.

Yeah. Yeah. Should we, should we timestamp this? When was this? So this was like,

Chris Morrell (49:22)
This is a number of years ago. Let me see if I can, let me look at this code base and see if I have a sense of like, yeah, so this is like three or four years old. know, a lot has happened since then, yeah. Yeah, but like, and like databases.

Joe (49:38)
Okay. All right. that's, so a lot's since then. I, I hope that that is now being handled at some level. so, so the headline of this episode is yeah. Well, okay. So that, that was my next question is like, is for selling any heavy lifting on like detecting what's in your package.json and helping you out there in terms of like, no, no. So, so there is a little bit of, of you have to do a couple of things to set up.

like your database and your, or.

Chris Morrell (50:08)
Well, no, no, I take that back. I mean, all that stuff gets installed automatically. Yeah, yeah, yeah. But no, if you want to talk to a database, at the time, the answer was, is there a way for you not to talk to a database? It was like,

Joe (50:15)
No, of course, yeah.

no, no! Not bad!

Chris Morrell (50:34)
What if you use Firebase instead or what you know, like there there really wasn't I mean not to say obviously people were solving this problem and like Prisma existed But yeah, it was not it was not pretty and if you did it like it's not you're no longer on for sale anymore right so like if I wanted to talk to a database I had to sign up for a third party database provider and

Joe (50:45)
Yeah. Well, it an external provider is basically the answer is that you, went elsewhere for it.

Yeah.

Yeah, use their SDK probably that there is a different situation. Yeah. Yeah.

Chris Morrell (51:03)
like hook all that stuff up. Yeah, yeah, yeah. yeah, you're immediately outside of like the like, that's the thing is like, when you're inside the gates, right? Of like Next and Vercell, it's so cool. Cause like everything just like was so gloriously integrated. But like those gates are like holding in such a small little garden, right? Like it's basically routing and rendering.

Joe (51:20)
Yeah.

It just works. Yep.

Yeah.

Chris Morrell (51:33)
And it turns out that I could build a whole planning poker app with just routing and rendering because all I needed to do was I could do all my data fetching client side using linear SDK. I didn't actually have to store any data. So it was super great. And I've built other things. Another project that we talked about is this codec thing. That's another tool where

it doesn't need to have any server side state. And so like I shipped that on Vercel because it was like, this is by nature entirely a client side application. And just being able to just point this thing at a Git repo and have a URL to send someone is so great. Yeah. So if you really are in that space of like, all I care about is routing and rendering and like I can defer, either I can

Joe (52:20)
can be easier than that, yeah.

Chris Morrell (52:31)
rely on third party tools for all the other stuff. There are places where that's great, but it's just like, you just get so little, you know, and you have to start, you just have to make, you just have to make your own decisions about everything else. Yep. Yep.

Joe (52:44)
Yeah. It's the, it's the decision making fatigue that is sort of the issue here, but I do think that the title of this episode will probably be Chris loves for sale. And I think that that makes a lot of sense and we'll sell, sell well on the, on the podcast feed. dude, this was such a pleasure. I could talk to you all day, but, you know, we have, we have lives, but.

Chris Morrell (52:56)
Hahaha.

Yeah, there you go.

Yeah, this was great.

Joe (53:11)
you have a stockpile of projects. So trust and believe you'll be back on again to talk about, mean, I think you mentioned two, one more codec was one of them. And then you mentioned, think another one at some point, which I'm blanking out right now, but I know that you've got enough domains to talk about alone. You, could just do an episode where you pull up your domain list and we go one by one and say, the intention was this.

Chris Morrell (53:22)
Mm-hmm.

Let's just go through the list of domains.

Joe (53:36)
And I go, what lives there now? And you go, nothing. Next domain. The intention was this. And I go, what lives there now? And you go, nothing. But that's an episode. actually, would be fascinating to hear what the plan was, or even the potential seed of an idea was for all of your domains. Look out, listener. That's coming your way. That'd be fun. We'll trade. You know what? We'll pick our top 10 each.

Chris Morrell (53:42)
You

would be fun. I'd be happy to do it.

Yeah.

Joe (54:05)
And we'll just, that would be a great episode. is that too little or too much? You have like hundreds, I think.

Chris Morrell (54:06)
Only 10?

Well, it's just like, I'd really have to pare it down if we're only doing.

Joe (54:17)
Yeah. We also have to, we also have to announce our, our, our dead domain budget, like just like latent domains that are just sitting there and how much we spend on them every year, which I, don't want to, I don't want to calculate that cause it's going to feel bad.

Chris Morrell (54:18)
No, I'm just kidding.

God, I don't want to think, yeah. Well, I told you like, used to, back in the day, I've been doing web development professionally since the 90s. And in the late 90s, early 2000s, there were things that we could do for SEO that, let's just say are not approved these days.

Joe (54:54)
Yes. Yes.

Chris Morrell (54:56)
And one of them was, for example, buying 700 domains that were highly targeted to the topics that were relevant to your business and then paying, my God, rack space, a ridiculous amount of money for 700 unique IP addresses and building a giant network of sites that all link to each other.

Joe (55:06)
huh. huh.

Yes. A little SEO farm.

Chris Morrell (55:26)
And God, when I finally let it was, I'll always remember it was 717 domains. It every, every state, every state home inspector.com.net.org with and without hyphens both spelled out and not and, and shortened, right? So pa home inspector.com.net.org pa home inspector pa hyphen home hyphen inspector. Like, yeah, yeah.

Joe (55:41)
God.

But that was so common. It was so common to do that stuff back then, you know?

Chris Morrell (55:55)
But God, I finally was like, we haven't used these in a long time, this strategy doesn't work, marked all of those to expire, it was a good day. It felt good to let go of those. The relief.

Joe (55:58)
We're done here.

You took him out behind the barn and you're like, is, unfortunately your time has come. Look out over the field. Yeah. Was that effective though? That must've been effective for a while probably, I'm sure. Yeah. Yeah.

Chris Morrell (56:22)
for a long time. Yeah, I mean, the yeah. And honestly, I didn't feel that bad about it because each one of them did like we we listed every member in that state on each one of those sites and had some content. So it was like, you know, if you went to P.A. home inspector dot org, you got a list of certified inspectors in Pennsylvania. Right. So it wasn't the worst. It wasn't the worst like spammy thing in the world. But yeah, I mean, we built a ton of

Joe (56:36)
Yeah.

It was useful. was genuinely useful. Yeah. Great.

No, but that's how you that's how you got juice. That's that was how you did it. Yeah, you got the juice. Dude, what a pleasure. I'm going to I'm going to plug something for you. I'm going to plug over engineered. It's amazing. I love over engineered. I always listen to it. It's a podcast that Chris does where he wait, let me see if I can do it where we talk about the best way to do something or the heart that the wait, hold on.

Chris Morrell (56:52)
Link juice, yeah, yeah.

Thank you.

Joe (57:16)
The best way to do something that we already have a good way to do? No, that's not right. Do it, hit it. Yeah.

Chris Morrell (57:20)
Yeah, something like that. The absolute best way to do things we already have a perfectly acceptable solution for.

Joe (57:25)
There we go, there we go, nailed it. It's excellent, you should go check it out, over engineered. Anything else you wanna plug, where can people find you?

Chris Morrell (57:34)
Well, you can find me on Mastodon, artisan, rtsn.dev, and on Twitter, or you can go to cmurral.com to get my socials. And I'm going to be speaking at Lercon EU in February, so come to Amsterdam. It'll be fun.

Joe (57:51)
Yes, it's a great talk. Come to Amsterdam. It's so good. I'm very excited for it. Sorry, I didn't mean to override you, but I'm very excited for you to speak at EU.

Chris Morrell (57:59)
I'm looking forward to it. But yeah, thank you so much for having me on. This has been really fun.

Joe (58:06)
This was a blast. Thanks, dude.

Chris Morrell (58:09)
Arvin.

Episode Video

Creators and Guests