Isaac Askew: Welcome to Never Rewrite. I'm Isaac Askew.
Jeffrey Sherman: and I'm Jeffrey Sherman. And today we're going to revisit the metaphor of moving houses is similar to a rewrite. And it's not that moving houses is similar per se. The idea is when you move, you have to pack up all your stuff, move it to a new place and unpack it. And so this is similar to what you do in a rewrite where you have to get everything you've got to a new system and get it all working. And that's the fundamental thing. And what I have learned from my many moves over the years is it all sounds great and you start packing and you're everything nice and neat and organized and everything's packed well. And then you start running out of time and you start throwing, you know, packing less neat and nicely. And then by the end, you are throwing everything into a box and you don't even know if you care about this stuff or look at it. You just throw it in a box. And then you pay movers.
Isaac Askew: Mm-hmm.
Jeffrey Sherman: The movers move it, or use your friends, guess, depending upon where you are. You move it, you get to the other side, you unpack it, and then there's all these boxes of full stuff, and you look at it, and you're like, I don't even care about this. Like, I'm just throwing it away. And this, to me, is very much like a rewrite where you start off, you're being very judicious, you're being careful, and by the end, you're just doing everything to get it done.
Isaac Askew: You
Jeffrey Sherman: And then on the other end, you now have to figure out do you actually care or want any of this stuff.
Isaac Askew: Yeah. I'm wondering though, ⁓ I know like a lot of times people say the last 20 % is 80 % of the work for things, necessarily rights. But I'm wondering, I know in a lot of cases for the rewrites, would port over what you think is everything you need and suddenly you realized towards the end of the project, ⁓ this doesn't cover some use case or some customer or something that we thought we didn't need, but ⁓ now it's a problem. I think how it kind of disconnects a little bit from the metaphor is
Jeffrey Sherman: Mm-hmm. Mm-hmm.
Isaac Askew: discovering you don't need it. I feel like you discover you do need it, if anything. But it is still the scramble of, there's still some features slash boxes that have not yet been moved over. So we have to hurriedly move them over.
Jeffrey Sherman: Yeah. Well, I posit to you, you know in broad strokes, hey, I'm gonna go through my kitchen and I'm gonna throw everything in a box because it's all my kitchen stuff. But do you need some of that kitchen stuff? Like I know there's stuff in my kitchen that I have not used in years. And I don't, you if I moved, I wouldn't need to move that packet. I wouldn't need to pack it, wouldn't need to spend the effort packing it, wouldn't need to move it, wouldn't need to unpack it. And if I got to my new place and I didn't have a spot for it, I would probably throw it away.
Isaac Askew: Mm-hmm. Yeah. Yeah, it's the just in case. you don't know that you don't need it. So you'd rather just keep it and carry it with you just in case. Or like you same thing with porting features or if you're.
Jeffrey Sherman: We don't know what you have. Right, well I'm saying that when the time crunch comes you get the scramble of you start off like packing plates is a really slow process because they're fragile. But packing a drawer full of silverware is easy, you open it you dump it into a box. Silverware is not fragile. When you start off you start off you've got all these time consuming things but by the end
Isaac Askew: Okay. you
Jeffrey Sherman: You're into the drawers and you've got all those, you've got these knickknack drawers. You've got a drawer full of spatulas and the drawer full of these. Like, and you're going to end up dumping them in a box. That's just how it goes. And then you get to the other side and now you have to unwrap it, know, unbox it and decide where it goes. And now you have, now is when you're going to consider this thing. Cause now you have to consider where it goes in the new place. And this is when you realize that you didn't need to pack it in the first place. It should have just gone to trash or goodwill or whatever.
Isaac Askew: Yeah.
Jeffrey Sherman: No metaphor is perfect. So now I posit to you, in this new age we are in, how would AI change this metaphor? If you can pack and unpack the stuff, does that change anything? If AI can pack all the stuff for you, you've got robot packers.
Isaac Askew: Right.
Jeffrey Sherman: And I think it lowers the cost of packing up stuff that you don't need, but it increases the cost on the other side because the robot doesn't know where the stuff goes in your new house. Because you don't know where the stuff goes in your new house.
Isaac Askew: Maybe, I guess there's a couple of different threads that are still going from the metaphor, I Well, one, again, I still think that the main disconnect is the last features instead of it being the ones that you don't care about and you throw it into a box. In rewrites, those tend to be the most important ones. People just forget, ⁓ we can't even swap over because...
Jeffrey Sherman: Alright, go for the metaphor. Pull a thread. Mm-hmm.
Isaac Askew: those last little things we didn't consider as we're, you we didn't even notice them until we went, ⁓ this is the screw that goes to that very important thing. You know, so it's, it's not throw awayable. It's very important. I think that's the main disconnect, but regardless, the cost of, know, porting it over is an interesting, different question because AI can help understand the context better than humans can. that, that, thing where you forgot to port that feature over,
Jeffrey Sherman: Mmm. Yeah, right, it's small, but it's important. ⁓ Mm-hmm.
Isaac Askew: into the last minute in the new age of AI, can usually catch those things. You can catch that, ⁓ customer ID is hard coded here. That's the thing we have to consider. Or you can scatter a bunch of ⁓ access points like logs where you can see if that particular line of code was hit and then funnel all of that into one big ⁓ function essentially to compare and see ⁓ should we port it over. Right? So it almost can self filter before you even pack. So even before you get to the last process, when you're getting ready to pack, can say, analyze my whole house and tell me what things I haven't used in seven years and separate that from the ones I have. Right. Yeah. And then you pack up what you need. And then you can maybe, maybe still bring some stuff with you just in case, cause people want to hoard it cause they haven't used it in long time. Doesn't mean it's not useful.
Jeffrey Sherman: Yeah, find my junk for me. Yeah.
Isaac Askew: It might be just a really old part of the website that whenever one of your oldest clients triggers this thing once a year, they expect it to work. Even if you haven't used it in a year, it's still this old thing you report over. But I think it kind of does change the equation.
Jeffrey Sherman: It's that contact us page there. Sorry, I was going to make a joke about the contact us page where people will ask you, please, I would love to hire you. And you want that to work, but also nobody's going to click on it.
Isaac Askew: Right. Contact us. So I think, yeah, so it makes, I think it helps separate the junk from the rest of what you need. But it's also just a good first pass to kind of like, whatever you think about commit history, if you go back to the programming realm, ⁓ I might not read
Jeffrey Sherman: Yeah.
Isaac Askew: a commit history that goes back eight years. And an issue a lot of times with rewrites is when people want to rewrite functionality and they go, I could do it better than the dumb programmer that was before. That person's not there to defend themselves or there to explain themselves for why it works the way it works. for AI, assuming you have decent commit messages or can compare changes,
Jeffrey Sherman: Mm-hmm. That's a big assumption.
Isaac Askew: It's a big assumption, but it could also go back through and do diffs if it sees like if you see the history of a particular component rather than just commits in general Then it can go through and see diffs and compare and so before you make a change if you want to do something like that Why would this ever work this way? And you want to change it it could scan back through eight years or even before People were there that you your contemporaries are there and tell you the history of it so that context I think was lost before because
Jeffrey Sherman: You can do it, see ya. Mm.
Isaac Askew: People couldn't do that as easily on every single little component. Whereas now you can have like a site-wide search and it can help self-filter. ⁓ actually, that's not junk. You thought it was junk. We should have actually packed that because of this reason and where it's historically relevant to keep this thing over. So I think it does help out a little bit.
Jeffrey Sherman: This odd thing that you don't understand goes to this thing.
Isaac Askew: Right, imagine if you have a box of different types of screws and tools and you see one really long brass screw and you're like, I remember this went somewhere and it knows where. You don't have to spend all the time or just toss it thinking, I'm going to that. And then like two years later, you go, I threw away that screw. That's the moment you needed it. So it does a good job there.
Jeffrey Sherman: Yeah. Yep, right, that's where the FOMO kicks in and you packet the screw and you move because you don't know if you need it.
Isaac Askew: Right, yeah. Well, I think I'll use that or the thing you've never used or the book you've never gotten around to reading. The moment you're asked, do I throw this away or donate it? Then you go, I think I will eventually get around to reading this. And thus another 10 years goes by.
Jeffrey Sherman: I defend the books because sometimes you read them and also they're small. But I definitely have had junk drawers full of like power adapters that have become separated from the thing that they, know, it's like, kids, this is a thing that used to happen is you would have DC nine power adapters and there's like 50 of them. You think a USB A, B and C is bad? You should try a nine volt power adapter from the eighties.
Isaac Askew: Yes, oh yeah. Mm-hmm. Right.
Jeffrey Sherman: Literally 30 formats and probably more and they all end up in a box like okay I've got this thing and it's got a round hole and it takes DC nine and Which one of these is You know the cable and if you're wrong you burn it out
Isaac Askew: Yep. So I think this is also why it's relevant in the programming realm too, because finding stuff like that, although it might seem silly, ⁓ I worked with somebody about like two months ago and they were using AI to clean up the code base. ⁓ And they were being very careful about it because they were like worried about, this was actually before one of the recent cloud models that was really good at this. So was like kind of still hallucinated a bit more and was kind of.
Jeffrey Sherman: Mm-hmm.
Isaac Askew: You sort of trust it, not wanting to trust as much. So they ended up doing something similar when I was talking about where they just threw in a bunch of blogging all over the place temporarily to see what they knew. They knew the high traffic ones were meant to be kept, but there's a lot of other, not just files that never seem to be hit, but functions within files that were hit that never seemed to be hit. And they wanted to filter all them out. And there's like lot of JavaScript assets on the front end that like, they were just like,
Jeffrey Sherman: Mm.
Isaac Askew: huge packages, but then they couldn't find anywhere that they were actually being included. And so I like, is this just something someone downloaded years ago? ⁓ And after doing a ton of cleanup and testing iteration after iteration, they'd clean up in pieces to make sure that it was enough to roll back or target certain sections of the site to. ⁓ Ended up saving about 2.3 gigabytes of code data.
Jeffrey Sherman: Wise. Yeah. ⁓ wow.
Isaac Askew: ⁓ from just deleting unused things that accumulated on this code base over like 16 or 17 years. Just dead code, dead assets. And that matters when you're deploying stuff quickly in your pipelines. ⁓ So the less you have to deploy, the faster you deploy it. So it was a pretty substantial cleanup. ⁓ So I would say even still, it's funny to talk about the moving metaphor and think about things you want to box up, but like,
Jeffrey Sherman: Mm-hmm. Mm-hmm Mm-hmm.
Isaac Askew: Imagine if half of the things that you owned were never used, not just a handful. Right? And you can handle that and make sure you're not needlessly paying for boxing and moving costs for things that you don't ever use.
Jeffrey Sherman: Yeah, I've been using AI for cleanup and looking at what it's doing here. It's doing the grep. It's doing the shell commands. like, yep, that's what I would do, but I don't want to look at the answers and then compare them to other things and like, go do all that for me. And I'm pretty sure it's not a hundred percent correct, but that's okay because, you know, I filtered out the false positives. There were string collisions, you know.
Isaac Askew: Mm-hmm.
Jeffrey Sherman: This string was also used here as this string, and so I thought it was no longer in use. I like, ⁓ clean it all up. Or not clean it all up, but like, here's the list of things. Yes, clean this one. No, clean that one. And the value was in the research and the looking at it and saying, do I want this? And the plus end in the code. The code was trivial.
Isaac Askew: Right. I guess it's still a little bit like a...
Jeffrey Sherman: We're getting off topic. ⁓ same we're off topic, but keep going.
Isaac Askew: No, I'm still on topic. I was just gonna say, guess it's still like, rewrite is still like a move in that case. There's just a couple of little things here. We like coming up with metaphors on the show. So they're not always perfect, it is, I think, very shared experience that people do tend to get to the last bit and throw everything in there and just, I think the closer metaphor for that is just like trying to call the project done. What can we say? Technically there's five tickets.
Jeffrey Sherman: We do. Mm-hmm. Mm-hmm.
Isaac Askew: That's redundant, but that one over here, we can just loop that in and say that's done. Mark done, mark done, mark done. That's your last bit of cleanup that you're trying to carry with you over to the new thing.
Jeffrey Sherman: Yeah, I just watched the Chernobyl mini-series from HBO. And when you get to the end, you learn that the reason that they blew up the nuclear power plant was they were trying to run a safety test that they had said they'd run so that they could get their bonuses for getting the power plant open on time, but they had actually skipped. And they were trying to run it now on the down-low. And that's why they were doing the things that resulted in the nuclear power plant exploding.
Isaac Askew: ⁓ so good. That's kind of haunting actually, that sucks. All right.
Jeffrey Sherman: Yeah. But anyway, yeah, so I think coming back to it, AI is not going to help you with the, didn't leave enough time to pack and it takes a long time to unpack parts of the problem, but it might help you look at objects and decide whether or not you want to keep them if they're useful faster. Right? In theory, could scan, have AI scan everything in your house and give you a pretty good idea of what you don't need to move.
Isaac Askew: Yeah Yeah, it kind of goes back to that topic that you found on this. There was a particular author on Blue Sky that was talking about don't rewrite, rebuild. And we were like kind of joking about like the terminology of rewrite and rebuild and refactor and like trying to get it squared away. But in this case, he was essentially saying like, find out what works and then build a new thing. And you want to necessarily rebuild what you've got, build the things that matter going forward, build the new system.
Jeffrey Sherman: Mmm. Right.
Isaac Askew: So it would help in that flow, I think. You don't have to necessarily port over every feature when you rewrite something. Even if you do want to, we're saying not to. But if you are in the new age of AI, you don't necessarily have to port everything over. ⁓ You can just port over all the features, like the MVP that actually works, the pieces of it that you actually care about, and leave the rest behind because it's just unused.
Jeffrey Sherman: Yeah, that sounds great. Should we leave it there?
Isaac Askew: Yeah.
Jeffrey Sherman: Awesome. Well, thank you all for listening. I'm Jeffrey Sherman.
Isaac Askew: Another Myzik ASCII, and this is Never Rewrite.