Beware The Blinking Folder Of Death


Episode Artwork
1.0x
0% played 00:00 00:00
May 08 2020 31 mins  

Show Notes:
Links:
Stripe
Spam Nation by Brian Krebs

Bad To The Bone by George Thorogood
Grammarly

Egghead.io

Udemy

Chris Oliver

Jumpstart

Heya

Lamby

StimulusReflex

Andrew Mason
Remote Ruby podcast

Honeybadger

Full Transcript:
Josh:
So I'm sitting in my chair with this laptop and the thing literally crashes in my lap. And when I turn it back on, it gives me that blinking folder. The blinking folder. I don't know if you've ever seen the blinking folder, Ben says he hasn't.

Starr:
I've never seen it.

Josh:
The blinking folder is what you get when there is no hard drive attached to the system.

Starr:
Oh, no. What's there? Is there a hard drive in it?

Josh:
There was. It's not finding it anymore.

Starr:
I mean, is there one physically in there?

Josh:
There is a physical hard drive in the system. Yes.

Starr:
Okay, that's good. That's good.

Josh:
However, the hard drive I suspect has finally croaked. So now I've had to... I've literally had like two laptops die on me in one week. I don't know if I'm cursed or something.

Starr:
Well that's what you get for using that cheap aftermarket hardware.

Josh:
Right, yes probably. Just, I probably should never have upgraded the hardware, the hard drive. Anyway fingers crossed because if this Mac mini kicks the bucket then it really is back to Linux.

Ben:
It's just the universe's way of telling you it's time to take a vacation.

Josh:
I think you're right Ben. I've been saying that I could use a vacation.

Starr:
You two were talking about taking vacations and then like the world ends, so-

Josh:
Well, yeah that's like, the world ends and then it seems like... I don't know I've just been feeling pressure to get stuff done. I don't know.

Ben:
Yeah getting stuff done is a good thing.

Josh:
Yeah, it... Actually making progress on something is one way to kind of combat anxiety too.

Ben:
Well, speaking of getting stuff done. So while you've been trying to actually get anything done this week, I've been working on the... I was going to go on vacation, I was thinking about taking time off but then you said, "Well, I could use your help on this task." And so I'm like, okay, I'll help you with that. And that was two weeks ago and I thought it was going to take two days but it didn't end up taking two days. So what I've been working on-

Josh:
Sorry.

Ben:
That's totally fine. You know like sometimes the thing that's great about being one of the few people at Honeybadger is that we get to decide what we do, right? We don't have deadlines that we have to meet, We don't have like deliverables that we promised. And so when you have a case like this, where I felt like, there's something I want to get done here, we can just do it. So the task you gave me was to get some new pricing support ready. So we have some new pricing that we want to deploy. It's going to require some changes in our app too, because we're changing how we're structuring the pricing.

Ben:
And I'm like, yeah, I can bust it out real quick. And so then I looked at doing that and the way that... So Stripe has changed how they arrange the products and the plans and how you do pricing, since we launched with Stripe, seven or eight years ago. And I decided I wanted to use this new approach that Stripe has but the trick there is that you have to use the new API version or a recent API version. And we were not using a recent API version. We were using an API version that we started using back eight years ago. Which happened to be an API version of Stripe's from like, 2011. So-

Josh:
2011.

Ben:
Yeah. So I decided, you know what-

Starr:
It was year, you know?

Ben:
Yeah, it was a good year.

Josh:
It's a good vintage of API, like-

Starr:
Yeah. Exactly.

Josh:
Got to hand it to it.

Starr:
Like some people call that legacy, I call it vintage.

Ben:
Well, either way, props to Stripe for how they do their API versioning. It is freaking awesome. Like, you can stay on that old version as long as you want, basically, they will support it until the end of the internet, looks like.

Josh:
Yeah.

Ben:
And they have a really awesome way to manage the upgrade process, when you decide you do an upgrade and their documentation is very clear about changes that have happened between the different API versions.

Josh:
Yeah, I don't want to like jump ahead of you too far. But I was going to say, I noticed when I was reviewing the pull request that you sent, it looks like we're supporting both versions of the API for now or something like that. Is that true or did I misread that?

Ben:
That is true. So yeah.

Josh:
Yeah.

Ben:
So I just decided to go ahead and bite the bullet and do the upgrade of the API. Because I'm like, you know what, this is an area of technical debt that we should probably just pay down on some. And so as I was looking at the different payload formats, they're not dramatically different. Which is nice but there are some key differences. And there're two aspects, right? There's the outbound API request that you make, like when we want to update a card. We have to make a request to update the customer record.

Josh:
Mm-hmm (affirmative).

Ben:
But then there's also the handling of webhooks, right? And those webhook payloads also changed a little bit. And I knew that we could deploy the new version of our app with using the new API version but the webhooks would still be coming in as the old version. Until I went into the Stripe dashboard and changed that. Again, they're very good about, you can manage which API version you want. So I decided that we'll support both versions so that I could deploy the app, not have to worry about the timing of changing that setting in Stripe. Then go to stripe and change that setting and not have the app have to have an immediate deployment. So, kind of a straddling the river kind of thing.

Josh:
Basically, we've shaved all the yaks and we're ready to-

Ben:
I made a major payment on that technical debt.

Starr:
Yeah, we've completely like swapped out our old like Vim plugins for like new Vim plugins?

Josh:
Yeah.

Ben:
And it's, I think one of the reasons why it took so long is I did spend extra time on those tests because you don't want the billing system to break, right? You don't want to not be able to take people's credit cards.

Josh:
Oh, yeah.

Ben:
And to fail on those webhooks. So we have a lot of logic that happens when people's payments... You know things change and we don't want any of that to break.

Josh:
Yeah and I'm glad that you did.

Ben:
So one benefit of doing this work, aside from having that technical debt paid down and feeling all nice and shiny on the new API version, is that we also upgraded two major versions of the Stripe JS. So you know, we use th...