633

June 28th, 2023 × #ORM#Database#Prisma#Drizzle

WTF is an ORM

Wes and Scott discuss what ORMs are, popular options like Prisma and Drizzle, schema vs models, and migrations. They also joke about dentists, pronunciation in tech, and share recommendations.

or
Topic 0 00:00

Transcript

Announcer

You're listening to Syntax, the podcast with the tastiest web development treats out there. Strap yourself in and get ready. Here is Scott Talinski and Wes Boss.

Wes Bos

Welcome to Syntax.

Wes Bos

Today, we are going to talk about what rid is an ORM. It's all about databases, relational databases using different types of databases with different packages. Which one should you use? Prisma, SQLize, Objection, Drizzle Mongoose, Type ORM, Waterline ORM. We're going to dive a little Deep on into it.

Topic 1 00:33

Scott went to the dentist early in the morning

Wes Bos

My name is Wes Bos. I'm a developer from Canada. With me as always is mister Talinsky. How are you doing today, Scott? Ready. Hey. I'm doing good, man. I just,

Scott Tolinski

I'm wide awake because I went to the dentist this morning, like, first thing. The kids' dentist appointments were, like, Bright and early. We had to wake up at, like, 5:45 to get there, just to get everybody out the door and they had school and stuff. So to make sure everybody is ready. Yeah. Yeah. We had to get up nice and early. And, at first, you'd think I'm a little sleepy. But, man, I I don't know. Something that something happened when I hit my thirties, and I really dread going to the dentist. Maybe not, maybe not in the 30th. What I what what I did is I had a tongue piercing for about, like, 8 years or so. And, rid. When people tell you that a tongue piercing will will ruin your gums, they mean it. My my, like, gums are are permanently effed, So I'm gonna have to get, like, an actual surgery to fix it at some point here. And it's just it's it it has ruined my life for too long now where I'm like, I just rid. I I just dread going to the dentist. I don't I don't care about the cleaning. There's just, like, 1 specific spot that was, ruined from the tongue piercing, and now it's like I I just, like, Think about it for months. So I'm already thinking about my next appointment in 6 months from now. So I'm going to have to have to do something about that. Oh, yeah. I always feel like rid. I let our dentist down. You know? Like Oh, yeah. Ours is just like, ours ours cares so much

Wes Bos

rid. Like, I come and I almost want to be, like like, stop stop abusing me. You know? Like, I understand rid. I'm not flossing as much as I should be. Just like, please, can we skip the the whole where you care more than I do? You know?

Topic 2 01:57

Wes and Scott dread going to the dentist

Scott Tolinski

Yeah. I've had to just start you know what? They actually, like, love me now because it's it's very funny. I I had to start caring a lot because of the Oh, yeah. Like, once your gums start to recede, they, like, don't stop. And because it was started by that tongue piercing, if I don't, like, really intensely, take good care and and floss like crazy and do the water pick and do the electric. If I if I'm not doing everything perfectly, it's just gonna continue to get worse, and it's already dire. So I'm like Yeah.

Scott Tolinski

I go in there and I told them, like, the the I had to use, like, an app to track When I was flossing my teeth, now they, like, tell all their other clients, oh, we had this 1 guy who was using an app to track his flossing, and I'm I'm used as, like, the model dentist citizen now. Oh, man. That's rid. Yeah. They're big fans of me.

Topic 3 02:43

Scott started tracking his flossing to improve his dental hygiene

Wes Bos

Let's let's get on into ORMs.

Topic 4 03:04

Wes asks Scott what an ORM (Object Relational Mapper) is

Wes Bos

You may have heard this term thrown around a lot. So no matter rid What language you're building your back end in, you you might want to use an ORM. What is an ORM, Scott? It's the sound I make when I met the dentist.

Scott Tolinski

Rid. An ORM, object relational mapping. Basically, it's the way that you can work In, database systems with the normal language. So it's like it's like a translation layer between the database And the language that you're working in.

Topic 5 03:20

Scott explains ORM is a translation layer between a database and application code

Scott Tolinski

And sometimes they do a lot for you. Sometimes they're minimal and they try not to get in the way too much. But oftentimes, you know, writing raw database queries isn't necessarily something that a lot of developers are doing. And maybe some developers think that, Like, I'm really super good at writing these raw queries whether it's raw SQL or whatever. I'm really good writing, the actual language that my database is expecting. So I'm just going to do it that way. But, I've often heard, like, the saying that, rid. You either use an ORM or you end up building your own because at the end of the day, you just end up needing some of the abstraction stuff that comes into play here And whether or not you're kind of authoring it yourself or whatever. And I actually fell into this trap myself when I removed Mongoose from our stack, which we'll talk a little bit about what that is and stuff. But I removed Mongoose from our stack to use the native MongoDB driver. And then I ended up using Xod to do my schemas. And the next thing you know, I'm doing my validations.

Topic 6 04:35

Scott explains he removed Mongoose but ended up rebuilding a mini ORM

Scott Tolinski

I'm doing my, like, translation. I'm doing all this stuff, and I have, like, a little mini ORM. And I did not Set out on making an ORM. I was just like, oh, Mongoose feels too heavy for this. Let me do something else. So I I directly hit that exact Quote in my own work, not intentionally doing it just because it it provides ease of use in abstracting the kinds of things that you do with a database or in a data layer day to

Topic 7 05:01

Wes says he often removes packages but ends up rebuilding them

Wes Bos

day. Oops, I did it again. Don't you hate that where you're like, I don't need this package? And then you rid. Wake up 3 days later. You're like, shoot.

Wes Bos

I just made my own.

Scott Tolinski

I know. And you know what? Rid. I I I don't know. There's something about my personality, but I find myself falling into that trap repeatedly.

Scott Tolinski

That that to me is like the, hey, don't do that. Ouch. Oh. Oh, hey, don't ouch. Like me just doing that repeatedly.

Scott Tolinski

So Yep. Yeah. Definitely a character flaw of mine wanting to do it myself and then, You know, realizing I should've actually used the thing that was popular, which is why we're using Prisma for our ORM on the new new syntax site. So we'll we'll talk a little bit about different rid. ORM options and JavaScript and stuff like that in in just a bit.

Topic 8 05:28

Scott has a tendency to want to build things himself instead of using existing packages

Scott Tolinski

But ORMs, they they've been along around for a very long time. Basically, anytime you need to map, rid. Data models to a language that you're using, an ORM has been there. And one kind of benefit of an ORM is often

Wes Bos

ready matter if you pick MySQL or Postgres or MongoDB.

Topic 9 06:08

Wes says ORMs allow writing the same database code across different database types

Wes Bos

The actual code that you write to select 10 things rid. Where the name has the word West inside of it is going to be the same across all the different languages. That can be really handy because Sometimes you might already have a specific database in place, or sometimes a lot of people are very opinionated about what type of database they'd like to pick.

Wes Bos

And you can just write the same code across all of them, right? You just hook up different type of database and all the queries work. What would you say when would you say,

Topic 10 06:45

Wes guesses the first ORM was developed in 1971 by IBM

Scott Tolinski

the 1st ORM like system was developed? Rid. What year?

Wes Bos

I was going to say 1971, something with IBM where they needed to rid. Right. A layer on top

Topic 11 07:01

Scott says one of the earliest ORMs was in the 1960s by SDC

Scott Tolinski

of some sort of data store tape. Yeah. I mean, you're very close because it says, Yeah. One of the earliest ORM like tools was integrated was integrated data store developed by SDC System Development corporation in the 19 sixties.

Scott Tolinski

So the fact that you were, like, 1971, like, early 19 seventies, that Yeah. That's pretty, yeah, that's pretty amazing.

Scott Tolinski

Rid It seems like they've just been around for as long as we've been working with data storage in any any type of capacity, which is wild to think about, especially Because the way we're working in ORMs today is is probably very, very different, but very fascinating nonetheless.

Wes Bos

Let's talk about, like, why would you want to use rid. Orm over straight up whatever the language is, because probably the biggest one to me is like writing SQL. So If you're writing MySQL or something like that, or you're writing Postgres, select queries, that is unless you're, like, very good at that. I actually used to work at a job when I was in University. I had a co op at a bank, And a big part of my job was writing, what's the Microsoft SQL Server? Rid SQL Server. That's what it is.

Topic 12 08:15

Wes used to write SQL Server queries but now prefers ORMs

Wes Bos

A big a big part of that job was was just writing straight up SQL Server queries, I worked at a bank and I was in charge of putting together reports and whatnot. So I wrote a lot of CRUISER. At the time, I was pretty good at inner joins and left join and primary keys and the different types and whatnot. But that's not something that I am good at or necessarily want to do anymore.

Wes Bos

I just want to use an object based language where I simply just have my model and I have a couple of different methods for querying and Filtering and pagination, all that good stuff on top of it. So that's where I would generally reach for an ORM, rid. Instead of straight up using MySQL, Postgres, whatever.

Scott Tolinski

Yeah. And, you know, I'm not I'm not really confident on many of those things that I could prevent security issues or anything without an ORM.

Topic 13 09:15

Scott says ORMs provide abstraction and ease of use for databases

Scott Tolinski

Not because I I don't trust myself in doing the research to figure it out, But, you know, I just haven't written enough. And and I've been working in MongoDB for so long at this point that and now granted The new syntax site isn't in Mongo, and I'm actually pretty excited to to be trying something a little bit more, robust, so to say, in many different ways. But It it it does feel like many times with Mongo or something like that, it's really easy to not get into, like, really crazy situations or or scary situations with With the database, it all feels very, like, almost ORM like anyways. You're just running methods and whatever. But for the most part, you know, having an ORM to do basic CRUD operations and make many of the things, but effortless, you know, update many, create many, whatever, delete many, whatever that language ends up being. You're just running those basic CRUD operations in what is a standard kind of method based, JavaScript plain English that many of us are really familiar with when just Writing straight up JavaScript overall.

Scott Tolinski

And, you get lovely things like type safety, which in TypeScript and JavaScript having type safety these days is just really great. So having it completely up and down your stack to the database It's fantastic if I'm going to, make sure my database is completely set up the way I'm expecting it to. And then I run a Create operation. And my create operation gets a red underline because a data type I'm trying to pass into one of the values in in my model Isn't correct? I I desperately want that. I don't want to hit that error, at a database level. I don't wanna hit that error anywhere else. I wanna hit that error while I'm authoring the code in the TypeScript with a little red squiggly, like I just made a tiny little mistake that I can I can figure out myself? Rid. So with ORMs, this is a question I have for you. You are always writing your schema

Topic 14 10:16

Scott had difficulty getting Mongoose schemas to integrate with GraphQL types

Wes Bos

in the ORM specific

Topic 15 11:09

Wes asks if ORM schemas are written in the ORM's language

Scott Tolinski

Language or is that just sometimes? Yeah. So we'll we'll talk about this a little bit later. I have a section called DB Schemas. And the only reason, I, you know, I wanna take the type this out specifically in that time is because, you know, I found the different ORMs tend to discuss A schema and a model can use those words in in kind of different ways. So like Drizzle has a schema where, with Prisma, you have models that make up your schema. Where with SQLize, you have models that can be associated with the schema. Yeah. I'll I'll talk about all that in a little bit here. So it it they typically do have that concept where basically you're structuring out your database or your data in a way. Right? Rid. And that helps with all those things like, the type safety. Right? So if you're able to define your data as a model is typically what they're called. So they're not necessarily typically referred to as a schema, but more or less as a model, even though I wish somebody smarter than me would tell me, like, what's the difference there because you do see them used of interchangeably. Remember when we had the MVC patterns and like, oh, in this framework, the v is actually The data fetching and not the HTML. And in this framework, the v is the HTML and not the data fetching. Like, that's the controller.

Topic 16 12:26

Scott finds blurred lines between models, schemas, and other ORM concepts

Scott Tolinski

So I I think sometimes they They take a look at these things in different ways. Like, what is the scheme of first? What's the model? But at the end of the day, you are modeling your data to fit into a database.

Scott Tolinski

And anybody who's used MongoDB knows that that is, like, kind of different than how you work in Mongo. Typically, it can be like the wild wild west. You can just throw data in there and Mongo doesn't care. But it does actually have a built in data validation using JSON schema if you want to use a model based, validation as well.

Topic 17 12:37

Scott says you model your data to fit the database with an ORM

Scott Tolinski

Done. You have a follow-up?

Wes Bos

Yeah. I was just going to ask about or talk about the validation is like, this is not something that is Part of every ORM, but some ORMs will also include, like, a validation layer where you can say, okay. When this thing is saved, rid. Check that it meets X, Y, and Z because it's kind of similar in to TypeScript, where TypeScript you can say this thing is a string Or this thing is a union of possible options.

Wes Bos

In database land, you have you can say this is a string.

Topic 18 13:26

Wes explains some ORMs have validation beyond basic types

Wes Bos

There's different types of strings, big ones, long ones, etcetera.

Wes Bos

But you're not able to do, like, custom validation where you say, all right, the string must start with Ord, and it must be 8 characters long. And if that's the case, then generally you write a little bit more code into your model that says, When I am creating this, it must pass this validation. That's not something every ORM includes. Actually, I would say probably most of them don't.

Scott Tolinski

Yeah. A lot of these things, it's it's funny. There's there's so many blurred lines. And I think one of the questions that people have, like, what exactly? Where does the, You know, how how much does this thing do for you right before it becomes more than an ORM or less than ORM? And to me, that that is also a little unclear because it does feel like some rid. Some of them want to do a lot and some of them want to do a little. But at the end of the day, you just have to think about it as this this layer that sits in between and translates. And sometimes they they help you parsing and validating. Sometimes they don't. Sometimes they help you with migration. Sometimes they don't. One thing that I really like about, so Prisma, the ORM that we're using has its own DSL. It's like a Prisma schema, right, where you're writing these Prisma schemas.

Scott Tolinski

And this Prisma schema allows you to have like a source of truth for the entire every model of your database and schema and all that stuff. One of the cool things about the fact that it's so very specific is that there's a Prisma specific linter That can warn you about specific issues across very specific domains, database domains. For instance, if you're doing something with Prisma in a way That isn't compatible with MySQL verse Postgres.

Topic 19 14:40

Scott likes Prisma's ability to lint schemas for database compatibility

Scott Tolinski

It's going to tell you, hey.

Scott Tolinski

You you can't do a relation this way using my sequel because it understands so much about the underlying database technologies and what you're trying to do. So for me, having that linter there not only, rid. Helps me write my sequel in a more complete way, but it's also saving me headaches down the line rid. In actually mapping out the relations in my database.

Topic 20 15:34

Wes says sharing schema types with GraphQL avoids duplication

Wes Bos

That's that's awesome. I didn't realize they had that because that's one of the downsides To using an ORM is that you might not understand the fact that this ORM sits on 2 totally different types of databases, And you could do the exact same thing in both of them, but what trouble are you going to run into at one point where you rid People say the same same thing with GraphQL.

Wes Bos

If you just give somebody a GraphQL API and you say, go nuts, you can nest these things 400 levels deep rid. When in reality, you have to understand that there's there's a poor old database somewhere running 900 queries every time you call that thing And joining all the data together is a possibility that you write something that's not very performant.

Scott Tolinski

Yeah. And then save me. I mean, I was doing, like, the roles, and I just like wanted the role system in in the new syntax site. I just wanted the roles to be like a string value And I want it to be like an Enum. So it could only be one of the following values. So when I'm mapping out the database, I saying, all right, this, rid. This particular field, which I would like to query off of, can can only be one of these following values. And The Prisma scheme was that, hey, that's not possible. The way you're trying to do this is not possible with my sequel. It's possible in Postgres, but not possible in in my sequel. If If you wanna do it this way, you need to create its own model for the roles entirely. So you have to have Really? A roles model. Yeah. So, like, there's It's not possible to say

Topic 21 16:19

Scott warns about creating deeply nested GraphQL schemas without DB understanding

Wes Bos

like in my SQL, you said, like, okay, this is just a what is it? Varchar, which is a string, right, of a certain size, and you're not able to say, like, it has to be one of these following strings. You had to create an entire separate table of the possible strings.

Topic 22 17:23

Scott ran into issues modeling roles as an iterable primitive in MySQL

Scott Tolinski

The the reason why is because it was iterable primitive.

Scott Tolinski

And, I didn't want it to be just like you only have one of these things. It it had to be an array of Okay.

Scott Tolinski

1 or many of these things.

Scott Tolinski

Rid. And that's why. That's specifically why. It was the fact that it was an iterate iterable primitive is is specifically what the error was was mad at me about. Makes sense.

Scott Tolinski

Oh, it's nice that they caught that type of thing. Yeah. Because I wouldn't have known otherwise, you know, that my history with MySQL

Wes Bos

is WordPress. And in WordPress land, I'm not writing, rid raw my SQL queries ever. I wasn't personally. So yeah. Yeah. You almost never write raw SQL queries in WordPress because they have their ORM, right? It's called the query in WordPress. And there is the ability to go straight into the database.

Wes Bos

But it almost never makes sense. Because if you're going straight into the database, it means you're probably not doing WordPress things. You're probably doing something that is outside and you should rid. Stop and say, how do I do this in the the WordPress way with custom post types and fields and all that good stuff? Yeah. It seems like every mature system like that Has

Topic 23 18:35

Scott says Laravel has the Eloquent ORM

Scott Tolinski

a mature and good ORM. Laravel has Eloquent ORM. That's their ORM.

Topic 24 18:40

Scott says mature systems tend to have good ORMs

Scott Tolinski

So it it always seems like anytime that There's a mature system with a database. There's a mature and good ORM to go along with it. Another nice thing is that it makes things a little bit more reusable.

Scott Tolinski

The the queries that you're writing, the the code that you're writing can just be written in straight up JavaScript. You can throw it into a function and have it be nice and easily reusable, put in your variables, Whatever. It feels just like writing JavaScript or TypeScript because it is. Right? So basically, yeah, it helps you write write safer code to connect to your database. It helps you occasionally write more performant code. It helps you write better code overall and it helps those connections take place. What about can I can I just ask you about the types as well? So something like Prisma

Wes Bos

generates the types. So just the best because you don't have to rid. Duplicate your types for like, you're like, all right, well, I built my database schema. Now I want to generate types off of that.

Topic 25 19:24

Wes likes that Prisma generates types from the schema

Wes Bos

And you can often also put those into your GraphQL types, which is really nice. So now you have your types sort of rippling through. And then The 4th place, I guess, is like your client side types. So do you also share your client side types or do you Make additional because sometimes the server side database stuff is not necessarily what should be put to the client as well. I think the most simple example is a password type. A password field shouldn't be on the client side. So do you also use those types on the client? I I do personally. And in fact, I I kind of ran into

Topic 26 20:14

Scott had difficulty sharing types between Mongoose, GraphQL, and UI

Scott Tolinski

this world before with my Mongoose set up before.

Scott Tolinski

So level up tutorials, when we were on Mongoose, I had to define my types themselves. That's like kind of 1 model. Mhmm. Then I had to define my Schemas in Mongoose, which is a 2nd model. And then I had a GraphQL server, which also had types. Those were 3 separate models. Yeah. And getting those 3 systems to talk to each other in a way that TypeScript actually liked was infuriating.

Topic 27 20:45

Scott now shares Prisma types between server and client

Scott Tolinski

It was really tough. Now what we're doing with Prisma is I am importing and using those types on the client side.

Scott Tolinski

And typically it's because the data that I'm sending is going to be that data. And Prisma is smart enough to know. Well, I should say Prisma and Seltkit are smart enough to know that when I pass in, this this from the database and I only want to project of the following fields. It knows that the types it's going to give me on that data are those following fields. Then Valket is smart enough to know to pass those same following fields along to the front end. Now the only time that I didn't have to reference the Prisma ones is when I'm Using like a subcomponent, and I'm passing that data into a subcomponent.

Scott Tolinski

But then you could always just use, like, pick or any of those, like, utilities

Wes Bos

to see. You could just Omit. Yep. Or even I think some of the ORMs will allow you to just the same as you can Mark a property as read only.

Wes Bos

You should be able to, like, Mark something in your schema as server side only.

Wes Bos

But if not, just run through them real quick. Use omit and strip out the tips. It's probably better to use pick. Yeah. Because which one is better? Yeah. Because, like, pick. You're explicitly opting in, whereas omit you're opting out. So, like, what happens if you add a new property And then you forget to omit that. You know, I guess it's not a big deal for types, but it definitely would be for queries.

Scott Tolinski

Rid. In a related conversation with, I you know, I've often wondered, like, is there a situation where instead of writing types once for something rid. In a in a component based flow for the UI and talk about UI.

Scott Tolinski

If you have, like, a leaf component And it includes an object with only 2 properties in it.

Topic 28 22:33

Scott wonders if typing subcomponents differently is ever beneficial

Scott Tolinski

Like, is there a downside To typing that component with the object and 2 properties specifically instead of just importing the object with all of the properties on it, even though that's the data that's Like getting passed into it because the the component only needs those 2 properties.

Scott Tolinski

Is that like I I, like, ran back and forth in my brain logically is, like, rid. I I don't see people doing it this way. Is this a dumb idea? I don't know. Is it too much work? Is that Just pass in the whole thing or, like, rid. I run into the same thing with, like, undefined types. You're like,

Wes Bos

it could be undefined, but it's not gonna be undefined. You know? It's not in this case, it's not. And, of course, yeah, it could be. You have to write an extra 11 lines of code to handle that case.

Wes Bos

Man. Yeah. I don't know. That's a great question.

Scott Tolinski

I do so much, like, self talk to myself about, like, No. This couldn't be. And it's TypeScript's always right about it. And I'm like, no. This will never be undefined. But it's like, oh, I guess it could be. Again, I guess. Yeah. So true. So the different node ORMs that I've I've really pod through and and these are the, like, the most popular ones that I've really found being talked about. So if there's other ORMs out there, I'm sure there are maybe almost even a popular one, given that, you know, I've only used a couple of these myself. But Prisma really seems to be The top dog these days. And, honestly, I'm I'm a easily influenced kind of guy in some ways. And if you go to all of these websites, Prisma has the nicest website, the nicest documentation, the best marketing presentation, like the overall most polished product award goes to Prisma. And I can't say that doesn't count for something because when I look at Prisma's website in their docs and everything, it goes it makes me wanna use Just based on on those things alone. But in my experience with Prisma, which has been somewhat recently, the 1st site I did with it was the the coupon code site for the Syntax t shirts And then most recently, the syntax site we're working on right now.

Scott Tolinski

I gotta say my experience with it has been is very, very positive overall. Like I said, I'm loving that linting going. It works with Postgres, MySQL, SQLite, SQL Server, Mongo, and Cockroach. I've only used it with MySQL so far, But, it gives me those linting errors. One thing I do like about it is that you do just define your schemas all right there. Now I don't like that you can't break up that a file into smaller files.

Topic 29 24:41

Scott explains Prisma strengths like schema linting and nice docs

Scott Tolinski

Can't do that. There's been like an open issue on GitHub for like. Oh, really? 7 years about that. Rid. Not that long, but forever. It's like the the longest standing open issue on Prisma. It's like, hey. Can we, split these up into different files? Probably because it's it's, like, statically analyzed. Right? Like, you can't. It's not JavaScript.

Topic 30 25:24

Wes explains Drizzle's PlanetScale implementation

Wes Bos

It's just its own DSL. Right?

Scott Tolinski

And they're they're technical. Yeah. Like he said, Specifically, technical reasons why. And, hey. That's fine. It's not a deal breaker. So for me, Prisma is is been a really nice option. And and definitely, like, Nobody's gonna get fired for picking Prisma these days. It it works really well. And the the things like the migration tools, which we'll talk a little bit about migrations later on, migration tools are excellent. The, CLI is excellent. The they have a nice little visual studio where Oh, that's the best. A database UI that you can pop open. And then you know what? You don't have to buy. You don't have to But, I I mean, you you could buy one of these third party database application database management applications, but it does make Basic tasks easier if you're not doing big, big tasks with, database stuff. Yeah. It's it's also like a cheap and easy admin. You know, like, before you write cheap and easy admin. Yeah. Before you write all the UI to CRUD

Topic 31 26:19

Wes says many solutions will suffice for smaller use cases

Wes Bos

and whatnot, that's what I do is rid Like, I have a whole admin thing. If something is not possible in the admin UI, then you just jump into the, in my case, I have to open up the, rid. MongoDB Compass, which is a fantastic tool for editing it. But Prisma gives you a whole UI for searching and filtering and whatnot.

Wes Bos

It's really nice to be able to do that. And then, of course, if you do that 2 or 3 times and you realize, oh, I should probably rid be building a thing. This is also kind of scary working inside of that, especially if you are outside of your validation library, rid. Meaning that, like, you could possibly make a change that would not be approved in your application, and then that could goof up rid. Well, Prisma Studio does block you from doing that kind of stuff, which is nice. So does Prisma Prisma has validation built in then? Yes. Oh. Well, I don't know. Like type

Scott Tolinski

validation. Type validation.

Topic 32 27:15

Scott clarifies Prisma has type validation, not custom validation

Scott Tolinski

Yeah, you're right. Outside of your like code validation, like you're saying, If you're wanting to have, like, a passcode that's 5 digits or something. You're right. It won't fall within. Yeah. But it would do. It would if, like, you're, like, changing,

Wes Bos

Like, something I do sometimes is someone say, oh, I bought this course, and I actually bought it for somebody on my team, And I need to transfer to them, right? And if that's the case, then you update the related user ID, right? And if you put in an incorrect user ID, it'll yell at you for saying, hey.

Wes Bos

That's not a proper user ID. Whereas, like, in my MongoDB, I don't know if it actually if it validates it or not. It's been a while since I built that tool, but there's a possibility you could just write ABC 123.

Wes Bos

It won't know. Hey. That's not a valid

Scott Tolinski

object ID that exists in this database. Yeah. So either way, Prisma full featured, nice tools, nice everything, nice system. So, You know, I'm I'm a big fan. You know, I think it might be a little bit heavier handed than some of these other ones, but it does does the job and it does it well. Another really popular one is SQLize, which SQLize does not support NoSQL database system, so it's it's very much a SQL system. Right? Supports Mhmm. Postgres, MySQL, Maria, SQLite, SQL Server. So it is very much like a, rid. A very specific use case if you have a SQL database and not like a more general works with everything kind of world. But, I mean, most databases out there, I'd say, are either,

Topic 33 28:47

Wes says most databases today are MySQL, Postgres or MongoDB

Wes Bos

rid Most are probably MySQL, Postgres, or or Mongo these days, right, you'd say? Yeah. A lot. It's Yeah. We had a couple years there of a lot of people rid. Kind of going with all these random databases, but it seems like people are sort of coming back and saying, yeah, you know what? Rid. Postgres was the way like, there was something from Figma where Figma was running on, like, a single instance of Postgres. Postgres. Yeah. The first, like, $1,000,000,000 they made or something silly like that.

Wes Bos

But Sequelize is fantastic, especially Like, this is something I run into all the time where I build a quick little demo and I go, I need to save this data somewhere.

Topic 34 29:17

Wes uses SQLite and Sequelize for quick demos without installations

Wes Bos

And when I run into that, I do one of 2 things. I say I'm just going to JSON stringify it, throw it into a Throw it into a JSON file on the file system because it's just local, right? And then and then when I pull it out, I just read the file, parse it out And you're good to go. But sometimes you want a little bit more control over that and SQLite supports SQLite, Which is great because SQLite doesn't require anything to be installed. It's just a file on your file system.

Wes Bos

And then you can even do it straight away in memory so that doesn't even have to be a file in your file system. It just goes straight into memory and then it gives you Much nicer, like user dot create or customer dot find one. And all I've done finder. Yeah. Has many.

Wes Bos

You can get up and running so fast without having to do any database connection strings or any of this type of stuff, probably in 6 or 7 different lines of code. So I've been sort of going that way. I used to use these, like, disk DB packages that would just give you kind of a lightweight database.

Topic 35 30:36

Wes sometimes uses SQLite instead of JSON for more control

Wes Bos

But then I thought, like, if this thing if I actually turn this project into something that is a little bit more, like, real Rather than just a quick demo or me trying to figure something out, it would be nice not to have to rewrite all this stuff. So if you use SQL, oh, well, rid Just flip this thing over, and you don't have to write massive schemas and whatnot, npm npx init or anything like that. Like Bigger projects, I probably would just use Prisma, but SQL SQLizes

Scott Tolinski

very fast to get up and running. Yeah. And it seems like it's one of those things that a lot of People use the like a a very common project. There's a version 7 that's in alpha right now. So, you know, it's it's definitely, like, still being, rid. You know, it's a product that's seeing updates all the time and stuff like that. So, hey, I I find it to be fascinating. I I haven't picked it yet. I haven't tried it, but definitely one to look into.

Scott Tolinski

There's also I hadn't heard of before we started this, show notes, I had never heard of Objection rich. J s, have you heard of that one? I have not. Yeah. Well, this was listed as one of the more popular ones and it has 7,000 stars. So it's not like a massive project, but it does seem to be one of those projects that, people do use and has been going. The initial commit was 8 years ago, so it's it's I'm still seeing commits this this month and it's been going for 8 years. So definitely feels like one of those mature options has TypeScript support, JSON schema validation.

Scott hasn't used Sequelize but it's popular and often updated

Scott Tolinski

It works with SQLite, Postgres, MySQL.

Scott Tolinski

It uses Connex JS? Have you I've seen Connex a bunch beef is it next? I I don't think the c is you said the c. Okay. Yeah? Okay. Rid. I don't I couldn't tell you, to be honest. I I you could go either way for me. They they shouldn't spell things like that is what is my opinion. That's that's a good point. English is such a bizarre language.

Wes Bos

I find it even more now that I'm teaching my kids to spell. Oh, God. So many times we're teaching them, like, there's

Topic 37 32:30

Scott and Wes joke about unclear pronunciation in tech

Scott Tolinski

Like silent letters? What the hell? Just anything. Yeah. Just anything. What the hell? My my son literally yesterday was like, I don't get why cities starts with a c. Why wouldn't they write the word cities with an s? And I was like, I don't know what to tell you, man. It's a That's, that's one of those questions.

Wes Bos

So on on connextjs.org, literally, the first line rid. Links to a YouTube video that pronounces it. Yeah. And it's it's connects. It's, like, like, connecting.

Scott Tolinski

So you're right. Yeah. Oh. I'm totally wrong. I mean, it makes both of the ways. It seems like if here's here's my hot here's my hot tip. If you have to put a pronunciation guide next to your product name, that's a bad product name. I don't. Can we I don't like it. We also talk about these, like, when people tell you how to pronounce something, rid. They put it with all these, like, squiggly letters that also make no sense to me. Like, I don't know how to read those. Who knows those? Does anybody know those? Yeah. I don't think anybody does. No. Probably people.

Topic 38 33:40

Wes says non-native English speakers speak better than them

Wes Bos

We were just joking about this before the episode is that often we'll have people on the podcast to English is, like, their third language, And there's so much more well spoken than Scott and I.

Scott Tolinski

Oh, yeah.

Scott Tolinski

It's wild. You know what? I wonder yeah. It's like linguist know the pronunciations guide, But, like, those people are gonna probably guess correctly how to say the word in the 1st place.

Topic 39 34:01

Scott doesn't like tools that require pronunciation guides

Scott Tolinski

Either way, connects is a batteries included SQL query builder. So, basically, it's a query builder. So this thing uses an existing query builder that's already popular anyways. So if you're if you have experience with that, then maybe, objection is a good way to go.

Scott Tolinski

Drizzle is kind of the the new hotness one because people are talking about it on Twitter. But you know what? I rid. I don't wanna say anything controversial because I haven't used it.

Scott Tolinski

I personally don't see enough to, pull me in to Drizzle right now in terms of I mean, it's it's lightweight. It's 0 dependencies.

Scott Tolinski

It doesn't use Code generation. So that's like a thing. You know, Prisma uses, I believe, code generation for their types.

Scott Tolinski

Hassle free SQL migration. So it has the stuff. It works with seemingly everything. Although, I am a little weirded that they rid. Have, like, PlanetScale separate from MySQL here considering you know, I think that's just to boost up their their numbers of What things they support? But they support Postgres and MySQL, SQLite, Supabase even, but they don't support Mongo Or or anything like that. Did you support Web SQL Lite? You know, and this is maybe me just being Like this kind of like salty old man, but like their whole, like, their whole word cloud where it's like developers, I hate rid Zolin. It's not production ready yet as, like, a joke. That really turns me off because it makes me feel like this product's not serious. And, like, I get it. I think it I think in some degree, it's funny, and I think a lot of developers will look at that and think it's funny. But, like, for some reason, I For some reason, I look at that and I put my, like, serious old man hat on and be like, I don't like it. And I I don't know why. I couldn't tell you why I don't like it. It just for some reason, whatever. Rid. It's fine. I think Drizzle looks like a cool new option to use. The reason

Topic 40 35:51

Wes is intrigued by Drizzle's serverless and inferencing capabilities

Wes Bos

Drizzle lists PlanetScale separately is because PlanetScale their sorry. Their PlanetScale implementation uses rid PlanetScale's own database JS driver, which is So instead of just raw SQL query. Yeah. It's HTTP.

Wes Bos

Ready. It's HTTP focused, which means it works in serverless.

Wes Bos

So we've done go back to the episode on where we talked about Serverless databases, meaning that like when you connect to a database, you generally make a connection via TCP and you just send rid data through that connection.

Wes Bos

But with serverless, you don't have an ongoing connection.

Wes Bos

You simply just send an HTTP request to the database and PlanetScale supports both of those, Obviously, TCP, but also being able to to send it requests via HTTP. So I guess the Drizzle's implementation uses the rid.

Scott Tolinski

HTTP version under the hood, which is cool. Okay. Okay. I take it back. K? I've learned my lesson there. No. I I think Drizzle is a cool option. And like I said, I I haven't used it yet. I I definitely can can be easily swayed. This this definitely could be me being, like, I'm on the the wrong the wrong page here. But it thing about databases that most of us are building

Wes Bos

stuff that is not like almost all of these solutions will be more than enough for a lot of people listening in what we build. Right. We're not on the century level where we're getting 300,000 requests per second. Armin was saying, you know, I'm signing up a couple 100 people a day and making several 1,000 queries per day.

Topic 41 37:11

Wes discusses building standards-based instead of Node specific

Wes Bos

It's a much different scale, and I don't know if rid. I would hit the issues that a lot of people do. One neat thing about,

Scott Tolinski

Drizzle that you might appreciate, Wes, is that they support Every major server full and serverless runtime. So they support Bun. They support, CloudFlare workers.

Topic 42 37:49

Scott says Figma had massive scale on a single Postgres instance

Scott Tolinski

All of that stuff. So Deno Deploy. So, yeah, if you're looking for like a really forward thinking ORM, this one seems to be it. I know that it's Still a little bit new, so to say. So it definitely is one that's gaining a lot of hype right now and and people are starting to pick it up. Ready. I think it could be a cool option, but again, it's fresh.

Topic 43 38:18

Wes suggests a show on supporting multiple JavaScript environments

Wes Bos

I didn't realize that that's awesome that they support all of the different JavaScript runtimes. We should maybe do a show on that because that's what my talk was at Reactathon, which is rid. Fun, Deno, Node, Cloudflare Workers, Fastify, Alibaba.

Wes Bos

There's like there's so many different environments.

Wes Bos

And In order to support all those environments, you have to write it in standards based JavaScript instead of Node APIs.

Scott Tolinski

It's a little trickier to do that right now, so that's nice that they've Done that from the start. Yeah. Yeah. Totally. It definitely like this one does feel like a project that's like, well, what if we started writing an ORM today? Not, You know, without having a legacy. That's how this stuff always works. Right? Mhmm. You start writing it today, and then next thing you know, everything's kinda shifted underneath you. So okay. So that's neat. We also have Mongoose. People wonder I see this question all the time. You're working with Mongo. Like, why do people use Mongoose? Mongoose is an ORM. It basically Allows you to work with Mongo in an easier way. One thing that Mongo by default doesn't do is hear anything above the shape of your data. So Mongoose Cares about the shape of your data and allows you to do validation stuff.

Topic 44 39:27

Scott prefers Mongo aggregations to Mongoose populate

Scott Tolinski

Not only that, it also allows you to, just keep a more organized way of doing things like what is that? Populate where you can do relational mapping. Rid. Yeah. Do relational queries inside of Mongoose using populate and have it work somewhat easy.

Scott Tolinski

Yep. I personally would rather just go straight up Mongo aggregation pipeline, but for me worked fine.

Wes Bos

So Mongoose is an option. Yeah. That's always a weird thing about like MongoDB is that like as soon as you want to do something a little bit different, you have to like duck out to aggregations. And like writing aggregations is really, really tricky. So I much prefer when, like like, for example, I have customers and I have users or, like, it's named a bit funny because I named them before I had the users in the database, and I've never wanted to switch it. But essentially, you can have you log in, And then you can have like a list of purchases, right? And if you if you want to query the user, but you don't care about their purchases, then you don't populate that value. But If you do, you just dot populate on the end of it. So you you because you were saying, like, with the Mongo pipe aggregation pipeline,

Scott Tolinski

It it's a pain to write. In fact, like most of the time when I wanted to write a Mongo aggregation, I would almost always run to the compass and use their UI To write my aggregation because it was way easier to tell what was going on. Yeah. Even just to do a simple lookup where with Something like a relational database using Prisma or any of these other ORMs.

Topic 45 40:41

Wes finds Mongo aggregations very difficult compared to ORMs

Scott Tolinski

The way in which you do a relational query or anything like that is as simple as, like, Include this field, and then it grabs the correct one based on whatever you have or, you know, the most complex one I have include Guests select guest equals true. And, like, that's it. That's the entire relation query. And and maybe it's just that I'm not used to writing queries in a relational database. No, it's actually impressive.

Wes Bos

You shouldn't have to, like, stop and give up everything when you're like, oh, I need to do this in a different way. Let me just scrap the query I've been building and move entirely to it In aggregation. Right? That's it's a bit odd that you have to you're essentially writing 2 DSLs or or 2 ORMs at that point, and that's that's really annoying to have to do that. Totally.

Topic 46 41:50

Scott regrets not using migrations for database changes

Scott Tolinski

Okay. Let's keep moving here. There's also Type ORM, which is the ORM from Nest JS. Anybody who's used Nest JS will have Use Type ORM. It's a TypeScript one. Works with MySQL, Maria Postgres, my Microsoft SQL, Oracle Cloud Spanner, and then rid. Which is the ORM from sales, which is the rails kind of equivalent of JavaScript or at least it was trying to be A very long time. Sales has been around for a long time at this point, but I haven't used it personally. So, people might ask about Supabase. Is Supabase rid. It's an ORM. It's not really it does weigh more than an ORM does because it handles the hosting of the database. It gives you sure, Sure. It gives you those crud operations and allows you connect to your database and stuff like that, but it gives you auth. It gives you webhooks. It gives you a lot more than a typical ORM would. So it it it it's a much bigger service than what it nor am would typically, accomplish.

Scott Tolinski

What are the potential downsides to using an ORM? Sometimes there's a performance overhead.

Scott Tolinski

That seems like a thing that they're really emphasizing with Drizzle is that it's very performant.

Scott Tolinski

I know that that can be a thing.

Scott Tolinski

Rid. You know, you can write some some unoptimized code, but also the fact that there is a layer in between you and the database means that inherently, there's going to be, some some bit of latency there, whether that is enough is whatever. 2, it could give you less control if you especially if you're used to writing, rid. SQL queries or queries in general, you can feel like you're giving up a lot of control going to an ORM, but most of the time you're just having to do it their way instead. And many of the times they give you In escape hatch 2. Right? Raw sequel. We've already had to do that, once.

Topic 47 43:26

Scott has run into issues debugging vague Prisma errors

Scott Tolinski

3, you have to learn the ORM. You know, I I talk about this as being a downside to anything, whether that's like a front end framework or anything. You have to learn the thing to do the thing. So, rid. You have to learn the ORM specific language. You have to learn their own things. And, yeah, sure, TypeScript can help with that, but you have to learn the syntax and learn the right way to do it. Rid. Also database compatibility issues depending on which database you're trying to use, even database versions, thing things like that. You have to Actually have an ORM that works with the database you wanna use and maybe you end up picking a database just to work with an ORM specifically. Right? Also, debugging, can sometimes be interesting. Let me tell you, Prisma throw some errors that sometimes it's like missing the column names sometimes because we're using planet scale in PlanetScale is not giving the column name correctly to Prisma, and then therefore, it says, hey. You have an issue with this column, and there'll be nothing there. Rid. Okay. Great. Thank you. Let me, let me just take a guess as to which column I have an issue with because you're not telling me. So, debugging, you know, anytime you're putting yourself between a layer or anything else, that debugging experience could could, see some issues. And and sure enough, you know, you gotta you're ready. Holding for somebody else to fix those connective tissues or get into the software yourself and fix it. Man, I'm just

Topic 48 44:43

Wes keeps researching Drizzle's capabilities

Wes Bos

rid. Sorry to come back to the drizzle stuff, but I am,

Scott Tolinski

I'm just looking at how to actually You're getting swayed. Yeah. Well, I'm I'm not getting swayed, but

Wes Bos

The fact that you can configure the whole thing in in JavaScript is pretty cool, and they have a infer model.

Wes Bos

Oh, Oh, that makes sense. They just have a bunch of, like, kind of, handy things to infer your types from

Scott Tolinski

a specific You can use zod with it. Should I rip out rid Charisma and go with, Drizzle. No. I don't I don't think so. I'm just I'm just trying to think of, like

Wes Bos

I'm just going back to my initial get up and running quickly kind of thing, but But then you still need a Postgres database, right? Like it would be cool. Oh, no. Does it work with SQLite? It does. I think it says Web SQLite, I think. Yeah, it does work with SQLite.

Wes Bos

Alright. After this, I'm gonna I'm gonna do a quick little example because that would be that would be pretty handy. Well, if we need to rip out our our our database ORM, now is the thing to do. No, man. Like Or we've gotten too crazy. Very happy working in Prisma. It's, like, so simple. The fact that the types follow you all all the way around, I think it's more than what we need for our website. Yeah. I do like it when Types follow me around.

Topic 49 45:53

Scott introduces topic of database schemas

Scott Tolinski

Yeah. Database schemas.

Scott Tolinski

Okay. So we kind of talked a little bit about this before. And just to elaborate upon that, Some of these things refer to the modeling of your database as a model. Some of them refer to it as a schema. Some of them refer to the collective models as your schema. At the end of the day, you are writing a model for your data. It's modeling the data. And that often determines exactly what that data looks like in the database, what type of fields in the database relate to the different fields. Therefore, you're not passing a string into a number field or anything like that, or you have unique IDs.

Scott Tolinski

Those types of properties or even default values are often defined within the model. So that that if you hear the word modeling or schema or whatever. Basically, you're just thinking about structure of your data, and that's the type of word you're going to be looking for when you're looking into these systems.

Wes Bos

I did look up the difference between schema and model.

Topic 50 46:50

Wes looks up the difference between schema and model

Wes Bos

Schema. People always say I say a funny schema. You do say it. Yeah.

Wes Bos

How do how do you say you say it? Like, I'm going skiing, ma. Schema. Schema.

Wes Bos

What what do I say? Schema. Schema.

Scott Tolinski

Schema.

Scott Tolinski

Yeah, because you got the Sch.

Scott Tolinski

Yeah. But I think you can just bypass that. I think we just pretend that doesn't exist.

Wes Bos

Schema.

Wes Bos

So apparently a schema is like the lower level, like the database level type of thing, whereas a model is more of like an ORM level, higher level description of it. So in most cases, we will be writing models,

Topic 51 47:29

Scott says models define data structure and schemas represent it

Scott Tolinski

and then the ORM will be generating schemas. But I don't I don't know if that really matters all that much. Well, it's funny that Some of some of the ORMs do refer to the model as a schema. A schema. It doesn't help. Yeah. It doesn't help. I know language. Right? It was like Yeah. When I was trying to look up Things for, like, model modals and popovers and and all that stuff. It was like, man, there's just either a lot of nuance here or things being named the same way or whatever. So, migrations is another thing that ORMs can do for you most of the time via like a CLI.

Scott Tolinski

A migration basically, if you don't know, is when your data changes over time, which it often does. You need to add a field, change a field, remove a field, anything like that.

Scott Tolinski

A migration makes sure that your database stays up to date in terms of, like, What where things or how these changes have been applied to your database and what those changes are.

Scott Tolinski

Therefore, you can't get into any invalid data situations or stuff like that. Rid And many things like Ruby on Rails, you know, migrations is one of the first things you learn. So my first experience with database migrations was via Ruby on Rails. So, rid. I'm sure many people who have picked up Rails have done the same thing.

Topic 52 48:18

Scott explains migrations keep the database updated over time

Scott Tolinski

But at the end of the day, a lot of these tools make a migration really simple because what you're doing rid. Is you're changing the database model or the database schema, and then you're running a CLI command, and then it's generating your migrations for you, and you just, like, don't need anything. And rid. What does Prisma output for

Wes Bos

the migration? Is

Scott Tolinski

it just like some JavaScript code that can be run? I'm gonna tell you right now, I don't even know. Okay. I've never looked at the database migrations.

Scott Tolinski

And, in fact, any time that, I can I can pop open something to see? Let's see. Yeah. I don't I don't even know here, to be honest. I'm looking at the I don't know where it generates that. I think it puts it in the node modules folder or something somewhere hard to find. It doesn't put it into your life. Oh, looks like it gives you

Topic 53 49:02

Scott has never looked at how Prisma handles migrations

Wes Bos

a SQL file, which you can then run. It does not work for MongoDB. I guess that makes sense because they would have to write the migration logic for every single implementation.

Topic 54 49:18

Wes says Prisma generates SQL migration files

Wes Bos

But Mongo doesn't Have the concept of migrations, which is Yeah. That's why, like, I have something misnamed in my code base, and I'm probably never going to change it because it's not worth the pain of changing it over. That's like one of these things that these systems, especially with migrations.

Scott Tolinski

Like, I I was telling you before the show started, Migrations were a topic that I was like, this seems like so much extra work for me that I don't understand why I have to do this. But then after having a database that existed for 10 years rid And something that started off as playlist ID, which was initially referring to the YouTube playlist ID.

Scott Tolinski

And eventually, every time I would query that data. I'd be like, oh, give me the playlist ID thinking it was the idea of the data database playlist model. No. It's the playlist on YouTube for some reason. Like, I would have loved to have changed that at some point, but I was really scared to touch my database because without proper migrations, everything was, like, very You just don't feel like you can make modifications to your database beyond adding fields. So it's just like, oh, just add another field or something. In the past,

Wes Bos

I've done rid. You add an additional field and then you kind of run it when you need to pull that value. Rid. Or what sorry. What I've done is you add a new field and then switch the old one to like a virtual field.

Topic 55 50:36

Wes has used virtual fields to transition old properties

Wes Bos

And then your virtual field will be able to, like, look it up. All right. Well, does it have this? Does it have the old value or does it have the new value? And then over Once you've finally done your migration, then you can, you can remove the old one. But that, like, sort of in between value, especially if you can't take down the entire website while you're doing it.

Wes Bos

Sometimes you have to run both at once and have a little bit of logic to decipher which one is needed.

Topic 56 51:14

Wes says some ORMs support middleware for hooks and events

Scott Tolinski

Yeah. Yeah. I know it's, it it is funny. It's like, I don't know. Some of these concepts that I I were taught Early on and my dumb brain was like, that seems like overkill. It's like almost never overkill. So if you're a young developer out there and you're hearing some things About either migrations or this or that. And you're thinking, oh, that seems like, why do I have to do that? Well, there's usually very good reasons, and it's usually just you being ignorant, Which it's for me, that's always the case. So Yeah. Cool. Well, that is, ORMs as a is a big old topic.

Scott Tolinski

And, I hope you found it to be interesting. You know, I these are one of the systems that I've only used a few of these. I've now used Mongoose and I've used Prisma specifically.

Scott Tolinski

And I used I've used ish ORMs before as well.

Topic 57 52:03

Scott asks listeners for their preferred ORMs and why

Scott Tolinski

Things that were just validating data that kind of did some of the roles in ORM. But If you've used any of these specifically and you find them to be just fantastic, you think Drizzle is the bee's knees, let us know. I wanna hear all about which ORMs you're using, Why you're using in them and what you like specifically about them is up on Twitter or any of that stuff. So yeah. Wes, sick pick, shameless plugs. Do you have a sick ready for us today.

Wes Bos

I do. I do. Actually, hold on. I have one more thing to add, and that is the concept of, like hooks or events or metalware, which is like, let's say you have someone's name. All of them have this, by the way. No, not all of them do. And It's really nice. Mongoose has this. Let's say somebody updates their name.

Topic 58 52:32

Wes mentions new show I Think You Should Leave

Wes Bos

And when you do that, anytime anyone touches the name property on a user. You want to regenerate a slug.

Wes Bos

You could just listen for that value to change, or you could do, like, soft deletes. I know Prisma has the ability to write a middleware where if you delete something, you don't actually delete it because the middleware will be like, it steps in and says, don't actually delete it. Put it in, like, a put a flag on it, you know, and that kind of stuff is But, Alberto, man, I miss I miss, what's that one that everybody's loving? What are you talking about? What's that new show that's like Portlandia? I think everyone's loving.

Wes Bos

It's my favorite show.

Wes Bos

Is that what the guy Tim Robinson? Yep. Yep. I've been I just started watching it with my wife, and she was not into it at all. And I was Dying. Wes Isaac picked the show twice now,

Topic 59 53:49

Scott loves I Think You Should Leave though his wife hates it

Scott Tolinski

after both the 1st and the 2nd season.

Scott Tolinski

And, Courtney hate it to the point where she will leave the room if anything is on and she really hates it.

Scott Tolinski

But it is my favorite show on TV And I cannot get enough of that show. I actually watched the entire 3rd season again last night for Father's Day because I was like, as my father's day, I'm gonna put on, rid. The 3rd season of I Think You Should Leave. So Yeah.

Wes Bos

I was we only watched, like, 2 episodes so far, but I've been, like, quoting it. Like, give me a sec. I'm doing something.

Wes Bos

Rid. He's just always yeah. It's just incredible. There's there's some, like, really amazing moments on it. The The part where he does the zipline, where he's like, oh, he's on the zipline, and then they bring in the, like, guy that rents the zipline. He's like, there's too much wear and tear on the

Scott Tolinski

he's he's too he's too rough on the zipline. He's too rough on the line.

Scott Tolinski

He can't do it. I know. I I've been, like, dying of the, the shirt. There's a one of the shirt brothers.

Scott Tolinski

I don't know if you've gotten to that one. He's like, hey, there are shirt brother because they're wearing the same shirt. No. No. Either way, there's a lovely song that you're gonna like at the end of that episode by a pop punk band that you'll you'll enjoy. Ready. Oh, I'll check that.

Topic 60 54:58

Wes says show humor is hit or miss if you don't get it

Wes Bos

That show seems to be one of those shows where if you were to, like, show it to somebody, you rid. You know, like, sometimes when you show something someone like a TikTok or something, you're like, this is the funniest thing in the world. And then there's like, what? Okay. I guess that's funny. That's what that show is, is if people don't get it, they don't get it. They don't get it. Yeah, I know. And it's not their humor.

Scott Tolinski

I could watch it. Watch it any time. I could watch it over and over again. I don't care that it's quoted and popular and whatever.

Topic 61 55:20

Scott praises brilliance and comedy of I Think You Should Leave

Scott Tolinski

Yeah, I just I really enjoy it. It's very funny to me.

Wes Bos

Rid. I'm going to sick pick, something I picked before, but I was saying I'm going to pick some travel stuff, and that is using Wise or previously we called it Transferwise credit cards on your phone. So I recently went to Europe and instead of just using our, like, personal credit cards, Canadian cards, because they rid kill you on the exchange rate.

Wes Bos

I just loaded up the Wise. So we have a business account on Wise and a personal account on Wise.

Topic 62 55:55

Wes suggests Wise cards for easy travel currency conversion

Wes Bos

And you. They give you these, like, virtual cards. They give you physical cards. I didn't take them along because there's tap everywhere in Europe and there's no limit on it. So You just tap and then it figures out, like, which account to take it from. I only had I had Canadian and US, And then it just converts it to euro at whatever the rate is. And like the wise the wise rates are so good. And I was like, this has been Such a nice experience being able to just I didn't bring the card a credit card out of my pocket the entire time, both because Europe is amazing for that.

Wes Bos

Rid. And just being able to, like, convert it and, like, it immediate for my business ones, it would immediately send you a push notification, And I said, do you want to upload the receipt? I was like, you're I do want to upload the receipt wise. Thank you for that. And then you take a picture, throw the receipt in the garbage. You're all done.

Wes Bos

Rid. Just such a great experience. And every time I use it, me and my wife are just like, this is such a good experience. So check it out.

Scott Tolinski

Wise. Not the,

Wes Bos

camera thing. Because we Not the cameras and not there's another one that's wise as well.

Scott Tolinski

Yeah. How How many of these have an owl as a logo? That's a. All right. Well, I am going to sick

Topic 63 57:14

Scott jokes about the number of companies with owl logos

Wes Bos

about that. I'll tell everybody about the hilarious, TikTok I saw the other day, which is talking about the I'm doing something.

Wes Bos

Rid. It was like, when you see another developer putting a pull request in for the same file you're working on, rid. You wanna get that pull request in? Stop. Stop. Stop.

Topic 64 57:30

Wes jokes about racing to get a pull request in first

Wes Bos

Let me go first. I'm doing something.

Wes Bos

Rid It's so true. You don't wanna be the 2nd person to have to rebase it. You have to pull up 500 cheeseburgers, 500 coffees,

Scott Tolinski

rid. 50 sodas.

Scott Tolinski

I'll I'll sick pick that. I'll sick pick season 3 of I Think You Should Leave. I've sick picked the 1st 2 seasons. They're both great. Season 3 really comes in. It's funny because you think after however many sketches of the same kind of style that it would lose some of its, Luster in a way and especially like I think even like episode 1 of season 2 people are like, oh, wait. This kind of feels already like a retread. Be Like has it like can even do more and then like you're the moment that that thought goes in your brain, it's completely out the door, because he he He's brilliant. I think he should leave his, like, they call it, like, kind of cringe comedy or something. It's, the whole premise of the show is Somebody is put into a situation where other people are are getting uncomfortable and would like him to leave, or like that would like that person to leave. So there there's always, like, kind of 1 person that's the focal point of, like, causing chaos or whatever. And it's usually at the behest of everybody else feeling uncomfortable in some sort of way. And I find this show to be truly brilliant. There's like moments in it where, it transcends everything about comedy and TV for me. So, yeah, it's very funny.

Topic 65 59:02

Scott says the show's humor is specific and not for everyone

Scott Tolinski

If you if you watch 1 episode of it and you do not laugh and you hate it, you probably won't like the rest of it.

Scott Tolinski

Either way, rid. You've probably seen the memes at this point around, on on Twitter and stuff. So check it out. I think you should leave season 3 very funny. Rid. Yeah. That's it for me. Shameless plugs. I'm going to shamelessly plug century at century. Io. That's s e n t r y dot I o. You can use the coupon code tasty treat, all lowercase, all one word to get 2 months for free. Sentry is the perfect place to track all of your errors and exceptions. And Guess what? We're building the new syntax site right now. We've been talking about it for a while. It's one of those things that, you know, it's gonna be a long time project, but we're building it. And I just set it up with Century using their new SvelteKit wizard that allowed you to quickly and easily get Century going for the whole application Within Sveltekit and essentially one little CLI command.

Scott Tolinski

And let me tell you, you know, CLI's that modify your code or do anything and and rid be hit or miss, but I ran this this code. I I ran it in 2 seconds.

Scott Tolinski

And next thing you know, it had Century up in my SvelteKit project.

Scott Tolinski

And that's just kind of par for the course with Sentry. And, you know, I've been using their their tools for a long time, but I was really quite impressed by the user flow of up and running a new project rid. It's been a little while since I set up a a full new site on Sentry. But either way, Sentry, perfect place to see all of your errors and exceptions happening. You can get Profiling, you can get, replays. You can see what happened when somebody clicked on a thing and it broke your thing. You can see it right there. You have, you can monitor your cron jobs now. You can choose how you wanna send alerts. If you have a big or small company, you could choose who's getting those notifications.

Scott Tolinski

Rid. West sent me a Slack message the other day that says, hey.

Scott Tolinski

You need to adjust.

Scott Tolinski

You need to adjust the alerts. I'm getting so many alerts, and you're you're just working on the site. And those were the alerts are coming from. So I was able to say, hey. Only throw alerts in this specific environment.

Scott Tolinski

Only throw them in production and stuff right now. So check it out, century.

Scott Tolinski

Io.

Wes Bos

Shameless plug. Westboss.com/courses.

Wes Bos

Check it on out if you wanna learn a thing or two about JavaScript That's it. Thanks, Eric, for tuning in. We'll catch you later.

Wes Bos

Peace. Peace.

Scott Tolinski

Head on over to syntax.fm for a full archive of all of our shows.

Scott Tolinski

And don't forget to subscribe in your podcast player Or drop a review if you like this show.

Scott Tolinski

Rid.

Share