Ufuk Kayserilioglu
👤 PersonAppearances Over Time
Podcast Appearances
But before TypeScript, we were working on a PHP code base that was using type hints. So that was a PHP 5.3 code base, if I remember correctly, which had type hints. And we were really relying on type hints. So the project that started before I joined and it was built like that. And I ended up feeling like that was a good way to work because it was preventing us from shooting ourselves in the foot.
But before TypeScript, we were working on a PHP code base that was using type hints. So that was a PHP 5.3 code base, if I remember correctly, which had type hints. And we were really relying on type hints. So the project that started before I joined and it was built like that. And I ended up feeling like that was a good way to work because it was preventing us from shooting ourselves in the foot.
Even though that was still doing type checking at runtime, it was still failing fast, right? So that's like one of the principles that we software developers use a lot, this ability to fail fast. So static type checking really gives you that. So it allows you to fail fast.
Even though that was still doing type checking at runtime, it was still failing fast, right? So that's like one of the principles that we software developers use a lot, this ability to fail fast. So static type checking really gives you that. So it allows you to fail fast.
Either in our base case, you just run the static type checker and within a couple of seconds, it shows you if there's like some assumptions in your code base that don't check out. And that's way better than waiting on the CI for a couple of minutes. you can just run this tool constantly on your machine, right? Right.
Either in our base case, you just run the static type checker and within a couple of seconds, it shows you if there's like some assumptions in your code base that don't check out. And that's way better than waiting on the CI for a couple of minutes. you can just run this tool constantly on your machine, right? Right.
So Sorbet actually has an LSP mode. So the Sorbet binary, that's the C++ static checker binary. If you download the Sorbet static gem or the Sorbet gem, which pulls it in, you can actually do srbtc dash dash LSP, which turns on the LSP mode. So LSP stands for the language server protocol, I think.
So Sorbet actually has an LSP mode. So the Sorbet binary, that's the C++ static checker binary. If you download the Sorbet static gem or the Sorbet gem, which pulls it in, you can actually do srbtc dash dash LSP, which turns on the LSP mode. So LSP stands for the language server protocol, I think.
I'm not so sure about the acronym, but it's developed by people at Microsoft as they were developing Visual Studio code. They developed that specification, so it allows different languages to integrate with different editors, and LSP is the language that sits in between.
I'm not so sure about the acronym, but it's developed by people at Microsoft as they were developing Visual Studio code. They developed that specification, so it allows different languages to integrate with different editors, and LSP is the language that sits in between.
So Sorbet has this LSP server mode, and they're also working on an official Visual Studio Code extension that you can install that would bring all that richness into Visual Studio Code. And I'm one of the early testers of that inside of Shopify. And I've been using it for a while now and it's actually integrated into your editor.
So Sorbet has this LSP server mode, and they're also working on an official Visual Studio Code extension that you can install that would bring all that richness into Visual Studio Code. And I'm one of the early testers of that inside of Shopify. And I've been using it for a while now and it's actually integrated into your editor.
So it gives you the best auto-complete that you can ever find, way better than like all the other editors can do. But it also shows you all the errors within your editor. That's a great way to work because you get instant feedback on your code changes. I don't want to give too long an answer, but just to address the second part of your question is like, when would you reach for a tool like this?
So it gives you the best auto-complete that you can ever find, way better than like all the other editors can do. But it also shows you all the errors within your editor. That's a great way to work because you get instant feedback on your code changes. I don't want to give too long an answer, but just to address the second part of your question is like, when would you reach for a tool like this?
So scale is very important. So when you have like in our code base, tens of different components and 30,000 different files, then it becomes really important to have better contracts between all those different moving parts. And what better contract than types? And we've actually realized that types really work well for that.
So scale is very important. So when you have like in our code base, tens of different components and 30,000 different files, then it becomes really important to have better contracts between all those different moving parts. And what better contract than types? And we've actually realized that types really work well for that.
And I think that was the initial impetus for why Stripe started working on this as well. And I'm not saying that all Ruby codes should be typed or that everyone should reach for typing as soon as possible. Obviously it's a matter of needs and scale. But I also feel like that it's the right tools for the scale that Shopify is in right now.
And I think that was the initial impetus for why Stripe started working on this as well. And I'm not saying that all Ruby codes should be typed or that everyone should reach for typing as soon as possible. Obviously it's a matter of needs and scale. But I also feel like that it's the right tools for the scale that Shopify is in right now.
And the teams that are really relying on types are getting a really good return for their investment.
And the teams that are really relying on types are getting a really good return for their investment.