Episode #83: Serverless and TypeScript with Tim Suchanek episode artwork

EPISODE · Jan 11, 2021 · 1H

Episode #83: Serverless and TypeScript with Tim Suchanek

from Serverless Chats · host Jeremy Daly & Rebecca Marshburn

About Tim SuchanekTim Suchanek is the lead TypeScript developer at Prisma, which makes advanced data infrastructure developed at large tech companies accessible to all developers around the world. Based in Berlin, Tim has been creating web applications for over 10 years, and enjoys great developer experience and cutting edge technologies.Twitter: @TimSuchanek LinkedIn: linkedin.com/in/tim-suchanek-08219346Prisma: https://www.prisma.io/Prisma Client: https://v1.prisma.io/docs/1.34/prisma-client/GitHub: https://github.com/prisma"Generics, Conditional types and Mapped types": https://www.youtube.com/watch?v=PJjeHzvi_VQGitHub: https://github.com/prisma"A Practical Introduction to Database Migrations": https://www.youtube.com/watch?v=xfaps6hgFvI"How Prisma Solves the N+1 Problem in GraphQL Resolvers": https://www.youtube.com/watch?v=7oMfBGEdwscWatch this episode on YouTube: https://youtu.be/Cci65o4IxaUTranscriptJeremy: Hi, everyone. I'm Jeremy Daly and this is Serverless Chats. Today, I'm speaking with Tim Suchanek. Hey, Tim. Thanks for joining me.Tim: Thanks for having me, Jeremy.Jeremy: You are a TypeScript lead at Prisma. Why don't you tell the listeners a little bit about your background and what Prisma does.Tim: Yeah. First of all, thanks for having me. It's an honor to be here. I have listened to several episodes already. Prisma is basically a database tooling company, you could say, where our core is implemented as open source. Everything we build is available for everyone, and everyone can contribute. What we basically focus on right now is a database client, database access, but we're also working on schema migrations. What this database client is doing is mostly giving you type-safe access to your database. We do that in TypeScript.The way Prisma is architectured, we can also implement clients in different languages like Go or Java. We have the core of the query engine is written in Rust, and TypeScript is basically a layer on top to give you type safety for your database. With type safety, I mean if you for example say, "I want to select a certain field," then you will also in your types, in your code will have the guarantee that this field will be there. I believe that still until today this is the only client out there giving you really this kind of experience. How this works is through code generation.We employ code generation quite heavily, and you define declaratively your schema. You say, "I have a user. A user has a post and so on or has posts." Based on this schema definition, we then generate the whole client in TypeScript. This is now in GA since 2020. We have been working on this for two years, and in general Prisma already exists for nearly five years. That's what we're doing. Obviously, if you use your database, you oftentimes in 2020 you use serverless, and so we see many users, we see a lot of adoption rising there. While still many users are using this in a containerized fashion, we see a big growth also how this is being used in Lambda and serverless.Jeremy: What about your background? How did you get into TypeScript?Tim: It's funny because I started JavaScript I think nine years ago and did not really besides having had type languages in uni like Haskell and Java, the usual stuff we had to look into, besides that I was really into dynamically typed languages, not really a big fan of anything. The type system was my enemy basically. TypeScript came around 2015, I had the first look into it. Actually, Johannes who's the founder of Prisma, he made me aware of it that TypeScript even exists, so I looked into it.First, I had I would say quite strong resistance to it because once you ... It feels a little bit like it's taking away your freedom. I'm so free in JavaScript, I can just do what I want. If you are looking a bit more into it, if you're reflecting a bit and thinking, "Okay. Where can this really help me?", you are step-by-step understanding that the compiler is not your enemy, but your friend, and just really protects you from your own stupidity basically. We are just humans. It doesn't matter how good of a programmer you are, you will do these mistakes and TypeScript really helps.Since 2015, I have not used anything else anymore. Here, I really have to site a colleague Ryan from Prisma recently tweeted if he is not writing code in TypeScript anymore, it feels like going outside without clothes. It's really like something is missing. It's like the safety net, the safety layer somehow missing. I am basically someone who converted from JavaScript as my religion to now TypeScript, both in nodes and in the front end and using it four or five years.Jeremy: Awesome. I've been programming in JavaScript for 23 years.Tim: Okay.Jeremy: Yeah. It was a very difficult change for me. It was a huge mind shift for me, but anyways, all right. I don't typically fool my listeners here, but I think we're going to fool them a little bit because even though this is a serverless podcast, we're going to talk a lot more about TypeScript. Of course, we're going to link it back to serverless here, and maybe we'll start that in the beginning, but there are so many really, really cool things that you can do with TypeScript. If you're building serverless applications, it's going to help you. I'd like to start by maybe just getting your thoughts on why TypeScript is going to be an important thing for serverless.Tim: Yeah. I just checked the stats. New Relic just released a report about which runtime is used in serverless most where the New Relic product is activated, and over 50% is using Node off the Lambda runtimes. It's clear. Node is the majority here. I would now claim if you do Node, you should do TypeScript. It's quite relevant to say most of them are using Node and in Node instead of having it on type in JavaScript, I think it's really useful to use TypeScript. Now is the question really why is that so useful, why should you do that. Maybe a quick introduction again or reminder what is TypeScript. Rather a reminder because I think most of the people know it already or know that it exists. There was the State of JS report 2019 where they asked, "Did you ever hear about TypeScript?" 58% heard about it and want to use it again, and I think only less than 8% haven't heard about it yet.Jeremy: Right.Tim: I guess most people have heard about it, but the question is really what is it. I would say you can define TypeScript as a super set of JavaScript. The JavaScript syntax, what you can express with JavaScript is a subset, so that means everything you can do in JavaScript you can also do in TypeScript. That was one of the goals upfront when they designed TypeScript. You need to be able to in hindsight be able to type any program you have written in JavaScript with TypeScript. You need to be able to put the types on top.Why is this so in...

On this episode, Jeremy chats with Tim Suchanek about why serverless developers should think about TypeScript, the benefits of type safety, how to equate TypeScript features with existing programming paradigms, how it can benefit edge computing, and much more.

NOW PLAYING

Episode #83: Serverless and TypeScript with Tim Suchanek

0:00 1:00:58

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

Spill The Growth Spill The Growth This podcast is designed for anyone striving to become their best self, whether that means achieving financial independence, advancing in their career, or improving mental and physical health. Each episode features chats with friends and experts in well-being, career development, and personal growth. Through authentic discussions, expert insights, and everyday experiences, we explore what it means to grow and learn. With practical strategies and relatable stories, Spill The Growth is here to guide listeners on their unique journeys towards success—whatever that looks like for them. Caribbean Mentors Joel Millington chats with industry experts from the Caribbean Caribbean Mentors is a podcast for Caribbean people or persons interested in Caribbean businesses and the people behind them. Every Monday Joel Millington would be interviewing industry experts from the Caribbean as they highlight their journey. If you are looking for inspiration, motivation and advice from persons who are from the Caribbean then this podcast delivers. BitChat Fuf Fuv In today’s episode, we’re exploring BitChat (https://bitchat.co.com/), a breakthrough communication app powered by Bluetooth mesh networking. Created by Jack Dorsey and developed by Chandorkar Technologies, this open-source platform lets you message peers with no internet, SIM card, or server in between. Whether you're in a subway, facing a blackout, or living off-grid, BitChat ensures private, encrypted messaging on Android, iOS, macOS, and Windows. We’ll dive into how it works, its standout features like group hashtags and password-locked chats, and how to get it installed. A must-listen for privacy-focused users and emergency communicators alike.Hosted by Ausha. See ausha.co/privacy-policy for more information. Porch Chats with The Magruders The Magruders Sit on the porch with Taylor and Marcus Magruder to have a raw and largely unedited conversation about life, faith, and family.

Frequently Asked Questions

How long is this episode of Serverless Chats?

This episode is 1 hour and 0 minutes long.

When was this Serverless Chats episode published?

This episode was published on January 11, 2021.

What is this episode about?

About Tim SuchanekTim Suchanek is the lead TypeScript developer at Prisma, which makes advanced data infrastructure developed at large tech companies accessible to all developers around the world. Based in Berlin, Tim has been creating web...

Can I download this Serverless Chats episode?

Yes, you can download this episode by clicking the download button on the episode player, or subscribe to the podcast in your preferred podcast app for automatic downloads.
URL copied to clipboard!