Everything old is new again. But this time we have the lessons of the past to guide us into the wild unknown. Sunil wants to revisit a few older ideas, and mix them up with the new capabilities of the edge and the web platform, and see if we can 10x the applications we build today.
Back to the Future
AI Generated Video Summary
The speaker shares their personal journey in the software development field, from starting in technology after college to experiencing burnout and taking steps towards self-care. They emphasize the power of technology and accessibility, as well as the emergence of edge computing. The speaker introduces their project, the Multiplayer Development Kit, and discusses the challenges of building real-time multiplayer apps. They also highlight the importance of work-life balance and personal growth in the industry.
1. Introduction to the Hero's Journey
I was here last year and it was so great and we're back again. My talk this time isn't as technical as I usually do and it's a little personal which is why I'm frightened as shit at the moment. The hero's journey is a storytelling pattern that is probably the most popular way to tell a story right now. So this talk is kind of a story about me. So this is me right after I got out of college, and I just started working in technology. I thought I was going to be a musician and a writer, a true artist.
I was here last year and it was so great and we're back again. It's really nice that the conference season is back alive. Clearly, very few people got the masking suggestions.
My talk this time isn't as technical as I usually do and it's a little personal which is why I'm frightened as shit at the moment. But it's something that I called back to the future.
Before we start, a quick announcement. I'm incredibly happy to announce that I will be the next prime minister of the United Kingdom. It's such an honor to accept this role. I promise to deliver on my campaign promise of getting process.exit done. Everyone's mentioned it as a promise but I truly will deliver on it.
The hero's journey is a storytelling pattern that is probably the most popular way to tell a story right now. Movies, books, comics, short stories, the idea is of a protagonist who starts from a point of zero and ventures out into the world or into a situation and faces numerous obstacles, a mentor defines advice, disregards it, and finds themselves at a very low point where they think everything is lost. And then by some magic, advice, friends, support systems, inner child, finding the courage, they crawl back out of that space and they return to where it all started, but as a new person, with new knowledge and a new way forward.
So this talk is kind of a story about me. It's kind of weird to even use the phrase a hero's journey, because, well, it sounds completely full of yourself, right? Like you are, of course, the hero of your own journey, but everyone is the hero of their journey. But it's fine. I'm trying something new. You all get to see a little raw version of how I think about a few things.
So this is me right after I got out of college, and I just started working in technology. I was doing a little bit of the contracting life, which meant that I could finally afford a nice guitar for myself. That's my blue Les Paul that I just loved to bits. I still have it. Look at how nice it is in the light. Just take a second. Just a beautiful guitar. I also got myself a little effects kit and an amplifier. See the thing is that I thought I was going to be a musician and a writer, a true artist. Technology was there only to pay the bills. It was never going to be a full-time thing. It would just pay the bills until I figured out how to have the seminal novel or a great album that's a fusion of Indian and Western rock music, of course.
And then right after that, she told me that this is never how you will actually write code. See the thing is that you can't actually write HTML by hand because it's hard to maintain and you need to use a templating language and you need to spread it about a bunch of things. You will never write your style in line inside your HTML. You'll write style sheets and use class names and architectures like, well, BEM came out in the late 2000s. This was way before then. You will never write an event handler directly on your element as well because that is hard to maintain. This is way before even DevTools, so you actually had to use Alert for debugging. And that kind of broke me, but I figured that's how technology is built, by learning the systems around it, by learning architectures and theories.
3. Experiencing Burnout and Taking Action
I spent some time in Oculus, which was by the way, possibly the coolest job I had, which was writing React for virtual reality. Burnout happens when you least expect it. You want to know what burnout looks like? It looks great by the way. This is photos of me in 2019. My weight was fluctuating. And conveniently enough around the beginning of 2020, Jan, Feb is when I started noticing where I decided to do something about it.
I spent some time in Oculus, which was by the way, possibly the coolest job I had, which was writing React for virtual reality, despite whatever your feelings about the metaverse were, this was the most sci-fi shit I've done in my life.
Somewhere along the way, I stopped playing my guitar. I also kind of stopped reading books, which is like my favorite thing. I even stopped writing, because who has the time to write other stuff when you're already doing 10, 12 hours a day of just writing code.
I was going all great until about late 2019, when I started noticing a number of things started happening to me. My body started falling apart. I was in pain more days than not. My relationships started falling apart. I found myself arguing with my wife about this stupid shit.
Burnout happens when you least expect it. Actually, when you realize that burnout has happened, it's way too late. And the worst thing is that your friends and family around you might actually be noticing what's happening, but they pointed out to you and they're like, well, go to hell. I'm a superstar on the React team and things are going great, so you have no idea what you're talking about. Don't tell me that shit. And she's like, you're my son. I'm like, yeah, but shut up. You don't know what my life is about.
You want to know what burnout looks like, what the face of burnout is? It looks great by the way. This is photos of me in 2019. I found it. I was like, and I looked at the data. I was like, yeah, these are the days where I was sleeping barely three or four hours a night and wasn't really eating well. My weight was fluctuating. I was, I think I was about 10, 15 kilos lighter than I am right now. It wasn't great.
And conveniently enough around the beginning of 2020, Jan, Feb is when I started noticing where I decided to do something about it. And conveniently enough, that's when a worldwide pandemic hit, which is just the best time for your mental health. By the way, you didn't get to focus on yourself and self care when that's happening.
4. Personal Transformation and Self-Care
I quit smoking, got my drinking under control, improved my sleep and eating habits, and repaired my relationships with my wife and friends. It's amazing how much better life is when you take care of yourself.
So this is not a story with a bad ending because clearly it's been a couple of years since then. I did a few things since then. I quit smoking. I don't know. Folks know this from last year. It's now been two and a half years of clear smoking. Disgusting habit. You should try it. You should hate it and you should quit it like immediately. Please don't try it, it sucks. It's not good. Got my drinking down. Got my hours of sleep in. I sleep really well now. I eat well. I fixed my relationship with my wife and my friends. Amazing. Once you have time to actually hang out, you're like, oh, shit, these are interesting people. I should hang out with them more. I shaped up.
5. The Power of Technology and Accessibility
Last year at this conference, I looked happier with a new haircut and a stylish suit. Frontend technology is just a tool, not the ultimate solution. I explored metallures and got into edge computing. Working with CloudFlare, I fixed their CLI and learned a lot. Technology starts with experts but quickly becomes accessible to everyone, just like databases and front-end development. Free courses and tools make it easier to learn and create. Don't be discouraged by the ups and downs of startups, you can succeed too.
And last year when I was here at this very conference, this is what I looked like. I looked a lot happier, I think. Also, I had a haircut and a trim, of course. And I got that sexy suit. Just look at that guy, right? Damn, even but the tie, it was nice. I was going for an English summer wedding and I needed a second occasion to wear the suit so I could justify the cost. But it's so nice.
Over the last couple of years I learned something else. One is that frontend technology is not the be all or end all. It is just a tool to solve stuff. I started exploring metallures. So I got into edge computing a bunch. I even spent the last year of my life in CloudFlare. Great place. Highly recommended. Working with them, fixing their CLI, which is not great and I fixed it. Thank you, you're welcome. And I learned a bunch. I started getting the same feeling that I did at the beginning of my career.
The thing about technology, of course, is that it starts off with experts, it feels like it's gatekept by people who are paid million-dollar salaries and so on. But then, conveniently enough, a bunch of people look at it and commoditize it. They ideally open source it so that everyone can learn from it, and suddenly you see it starts slowly, but very quickly everybody across the world learns how to do it, learns how to harness the power of this technology and move forward. This happened with databases. In the 90s, only there were like a few hundred people in the world who understood how to use it, deploy it. But now you can literally click a button on Super Base or Planet Scale or honestly some stuff, just like abstracts it behind you and you have a world-powered database that anyone can use over a weekend, and you don't really have to pay any money for it. A lot of it is free. Same way with front-end technology. It started off with you had to be an expert in what systems to use, how to write code without a type system, but now there are free courses for you to start on a weekend, and you could have something shippable in a few days or so. I mean, that's kind of how crypto startups happen, like they're up one week and the next week they're down. So if they can do it, you can do.
6. Edge Computing and the Cool Computer Club
I've started feeling the same way about edge computing. Everyone's getting into this place where you can deploy servers so extremely close to you, physically close to you, where the latency is under 10 milliseconds. You don't really have to be an expert to harness the power of a worldwide computer. I actually quit my job at Cloudflare a month ago. This is the right time to start your own venture. I call it the cool computer club. All of you are members, welcome to the cool computer club. The idea is that I've decided that there are seven big projects that we can solve for the world. And you're going to hear about one of them today. So project one is called the Multiplayer Development Kit.
I've started feeling the same way about edge computing. Previously it used to be a specialist position where you had to know how to scale an application beyond the scope of one server. You needed a team of people handling, managing a form of server somewhere, a data center, potentially spread across the world. But now with the new breed of edge computing providers, Cloudflare, Fastly, Vercel, Amazon, Lambda, Edge, I don't know, Fly.io, Bunn is going to come out with something. Dell or Deploy, and I assume a couple that, well, Superbase also will start doing, well, they do functions now, etc.
Turns out everyone's getting into this place where you can deploy servers so extremely close to you, physically close to you, where the latency is under 10 milliseconds. 10 milliseconds is effectively zero. But you as a developer don't really have to worry about that. Well, you, it would be nice if you understood it, but you don't really have to be an expert to harness the power of a worldwide computer. I used DALI for that, by the way. I said, hey, show me what a global computer would look like against a dark night sky. It's not bad. Imagine all of those are CPUs, I guess. This is also what's the scene in X-Men Cerebro where they start looking for the mutants versus the humans would look like. Anyway, carrying on.
So I actually quit my job at Cloudflare a month ago. It was great, love them. And it was weird, I needed to have the it's not you, it's me conversation with them. And it was nice. I love every single one of them. And it was weird, they're like, there's nothing we can do to keep you. I was like, no, you know, the government is super stable, the economy is doing so well, this is the right time to start your own venture. So I'm taking this moment to announce what I've been doing now, what I've decided to kind of dedicate the next few years of my life to. This is the logo, it's still a work in progress. I call it the cool computer club. All of you are members, welcome to the cool computer club. I will take all your money eventually. The idea is that I've decided that there are seven big projects that we can do, that we can solve for the world. And you're going to hear about one of them today. Are you ready? So project one is called the Multiplayer Development Kit.
7. Building Real-Time Multiplayer Apps
Developing a real-time multiplayer app should be as simple as building a single app. However, there are challenges with WebSockets, such as scalability, cost estimation, lack of local development experience, and the need for type safety. Preventing invalid states and handling message order and editing conflicts are also concerns. Additionally, battery usage and fallback options to HTTP requests need to be considered. These are issues that the platform should address, allowing developers to focus on building their apps with ease.
Developing an application in for real-time multiplayer sync, the next Figma, the next Quake 3. Quake 3 was released in 1999 by the way, and if they could do it well, it's kind of strange that we don't do it. Building the next Discord, building the next XYZ real-time thing should be accessible, cheap, it should be accessible to like 9 to 5 developers. It's not something you want to break either the bank or your mental health on.
My inspiration for this thing is clearly the movie of the year, Everything Everywhere, All at Once, Michelle Yeoh for the Life, baby. What a movie. What an incredible movie. Also feel the story is also something that I feel I can relate to, immigrant trying to make it out in the western world, with the weight of family and trying to create a business in a world that's falling apart. But the goal here is that building this multiplayer app should be as simple as building a single app. Sunil Pai from 20 years ago should be able to sit down and build it over a weekend and not freak out.
The thing is I actually did ask on Twitter, hey, what problems do you face right now if you have to do WebSockets in realtime? Because WebSockets has been technology for donkey's years. But you don't really ‑‑ everyone still talks about REST and GraphQL and request response stuff, which is great, of course, but the sci-fi applications that we have learned or that we have dreamt of for the last 100 years don't really follow a request response thing. They're directly connecting into a universal consciousness and feeding off of it. And I got some great answers. This is because everyone who follows me on Twitter is so smart, at 3.1 on Twitter, and they gave me such great answers. They told me, well, it's hard to scale. It's very hard to know how much it will cost me. The third-party services, not taking any names, they don't have a great local development experience where you can actually just run it on your server. It's not open source. I can't run the code. How do I even test such a thing? How do I make sure it doesn't break the bank? Special shout-out to Robert Balicky, who like really nailed it down into a bunch of technical notes. You don't have to actually read the words on the slide. It's fine. But it's very much a hey, like, it's a lack of type safety. So how do you make sure that it's safe and you don't break applications for everyone that's out there? How do you prevent invalid states, especially when there's, like, there's no guarantee on the order of messages that might come in. What happens when people edit stuff in different windows? And a lot more suggestions. How do you make sure that it doesn't chew all the battery in your phone? How do you fall back to something like just plain HTTP request if WebSockets is too expensive? These are not things that you as a developer who wants to write your dev hello world has to worry about. These are things that the platform should actually provide to you. Conceptually, the way I started thinking about it is that as a developer, you should be saying, hey, here's a class called room, classroom, here's a classroom, and just write a little logic for when a user connects to it. There should be an API.
8. Building Collaborative Experiences
This is a conceptual API that should be simple to use, fully type checked, and allow local testing. The platform should provide features like zero ops deploy and generating preview servers per PR. The goal is to focus on building collaborative experiences and only pay for what is used. The project has successfully introduced multiplayer mode into TLDraw.com, enabling real-time updates across different locations. The project is releasing in early 2023, and the speaker is taking a different approach this time, prioritizing work-life balance.
And this is, again, just a conceptual API. This isn't what it will probably be when it launches. But it should be as conceptually simple as starting up, making a new room constructor, and being able to connect to it without having to worry about using Redis as a synchronization thing, et cetera.
Simple things like zero ops deploy. Can I click a button, run one command, and deploy it across the world? Can you generate a preview server per PR? So can I produce the entire real-time system so that when somebody sends a PR to the project, it spins up a thing, you can test it, make sure it doesn't break before it lands? These are things that the library and the code, the platform, should provide to you. It shouldn't be something that you build yourself. Really what you want to do as a developer is you want to build collaborative experiences, the thing that you actually want to build and ship to your users, your next Figma, your next Discord, Quake 3 game, whatever. You want to focus on what makes your app great and you want to pay only what used. In fact, part of it is you want to measure what your users are using and pass that cost onto them as well.
So I'm happy to say that we actually sort of got this working. And I want to give a big shoutout to TLDraw. I've actually been incubating this inside TLDraw. If Steve is in the audience somewhere, hi, thanks, Steve, hey, Steve's the best, bother him about it, great little app called TLDraw.com, working on Rewrite and fairly quickly we were able to introduce multiplayer mode into this application. And it's great because basically you just to say, hey, here's a link, here's a link, multiple people can join onto it and it's the GIF playing, I do need to click the GIF to make it work. And conceptually you can imagine that this is happening in two different geographical locations completely, but please note that there are 60fps updates happening in real time. This is actually really hard to do with existing systems and existing third party services right now, so the fact that we got this working is awesome, I feel like this project actually does have a future. I was worried, I was doing a bunch of false bravado talking to them, yeah, yeah, we'll solve it, we'll like ship it, don't worry about it, and incredibly worried. But the fact is that it works and I'm excited that A, we were able to do it quickly, simply, and we're not, and the code is about 300, 400 lines of code that happen to do this. So I'm extremely happy and grateful to Steve and Diedra for letting this incubate in there. So this is releasing in early 2023, I want to make sure it gets into all your hands by then. Feel free to reach out to me and be nice to me if you want to see it before that, because I'm already showing demos around to everyone who will ask me about it. But what I want to point out is that I'm doing it differently this time. I'm not working twelve-hour days seven days a week. This is a picture of the Hampstead Heath Pond that me and Yanni go swimming at in London, and it's amazing.
9. Quitting as Prime Minister and Personal Growth
I'm quitting as prime minister. I got a new guitar and improved my life. Find me on Twitter or email. Let's chat at the pub. Thank you for your support. Let's move to the questionnaire booth. I started playing guitar before 2000.
It's freezing, I've never done something like that in my life, but I'm trying to be healthy and open myself up to new, wonderful experiences, like swimming in a pond in London. Just incredible.
I'm sorry to say that I will be quitting my position as prime minister. It's been a wonderful time, but I'm not able to deliver the mandate that it was too aggressive for me to suggest in the first place. Process.exit will have to wait for another day. The government has my full support.
So, yeah, I also got myself a red less fall now, so now I have a blue and red less fall and I'm managing to play the guitar a little bit more. My life feels a lot better. You can find me at 3.1 on Twitter. You can find me on my spanking new email address, sunil.coolcomputerclub.com. So that works. Or you can meet me at the pub and we can have a chat. I'm drinking sparkling water at the time.
Thanks. That's my talk. Thank you so much. Would you follow me to the questionnaire booth. I'm running out of synonyms for this area. Thank you. That was... I love it when you give a personal talk. I think the first talk of yours I ever saw was in React Europe when you spoke about your journey then, and it's really good to see how all of this fits together. I appreciate it, Yanni. Thank you for also being the friend for making sure we get our lives back in order. I know. That's right. Let's see some questions from the audience. I think one question was there is, have you started playing guitar? And the answer seems to be... I have. In fact, I only played music before the year 2000 because all this new music that the kids are listening to makes me deeply uncomfortable.
10. Balancing Work and Personal Growth
I love being a developer, but spending eight hours a day working for the industry really affects my capabilities to do some research of my own. If you are in an abusive job, start looking for a place that values developers. Talk to your manager about finding interesting ideas to apply at work. Find things to focus on outside of work that bring meaning into your life. Developers who do not code in their free time are not trustworthy. That's bullshit.
Also, I suck at synth and stuff. I know how to play some Iron Maiden, Bryan Adams, literally anything that was played in South India in the late 90s. That's what I'm playing. Cool.
All right, so a serious question now. I love being a developer, but spending eight hours a day working for the industry really affects my capabilities to do some research of my own. How do I change this? I think you can replace research there with really anything that requires time and effort.
Well, first of all, if you are in an abusive job, I would start polishing up that resume and looking for a place that does value developers. You know what? It's 2022, and I realize that we are in such a lucky place that we were barely touched by the pandemic. Like, you got to complain about, oh, I had to work from my couch for two years. It was way worse for a lot of other people. But really developers do hold a lot of technologies. Developers, folks who are under middle management in companies, they hold a lot of power and impact in the company. That being said, if you're in a place where you are struggling, maybe it's a question of talking to your manager about it. Finding interesting ideas that you can apply at work and figuring out how to get buy-in for it. So prototyping something quickly, or pitching to management, hey, I think this is a good idea, and we can actually focus on it. Because I guess most of my best ideas have come by taking advantage of the jobs I've been in and finding a place that I can use it there. And in usually every technology job, there's a wide, wide variety of problems and you can find something to attach yourself to. That said, even so, and I hate saying, like, yeah, you should do nothing after work is done. You should find things to focus on. There are books to read. And figure out... it's harder, I assume, if you're a parent or you're taking care of other people, but if you do have the privilege of having a little time, try to focus on the things that actually do bring meaning into your life. I kind of started doing that and I reclaimed my life without giving up the things that do matter to me.
I think there's a follow-up question here, which is I think we can knock this one out quickly. I heard once that developers who do not code in their free time are not trustworthy. What do you think about that? That's bullshit. That's right. That's bullshit. I knew the question already.
11. Sunil Pai's Tricks to Success and TL Draw
I just like the image so much, and I figured since I've done so well in my life, that the T-shirts I wear are the T-shirts that other people should wear. TL Draw is not just a great drawing tool, which it is. It has two or three things that are very unique about it. One is that it's built with taste. The other thing I like about it is that it's meant to be hackable and extensible. We have a new batch of questions just came in. We don't have time for all of them, so I'm going to ask this last one, and the rest of them you can find, Sunil, in the speaker Q&A room. But last question, first a statement, you are a cool engineer. I agree. A lot to learn from you. I agree. How are you feeling after quitting your job? I'm frightened, but I mean, it's very much. I've done a lot of talk over the last bunch of years. I mean, it is Twitter after all, right? Like it's very easy to drop wisdom and so on.
I meant to put it up there. Is your T-shirt a survivorship bias illustration? No, it's interesting. I just like the image so much, and I figured since I've done so well in my life, that the T-shirts I wear are the T-shirts that other people should wear. And everyone should follow my advice. I've decided to give a name to the phenomenon which is Sunil Pai's tricks to success in life. I don't know what the survivor bias thing you're mentioning is, and I refuse to find out. Thank you.
Alright, so, I think we're kind of like going into the less relevant questions, but I do want to ask, this is an opportunity for you to maybe talk up TL Draw, what makes this app, which I assume TL Draw, different from Miro?
Well, for one thing, I like the people who make TL Draw as well. I don't know who makes Miro, I assume they're wonderful people, but I like the TL Draw team. TL Draw is not just a great drawing tool, which it is. It has two or three things that are very unique about it. One is that it's built with taste. The moment you start using it, you'll find a number of micro-interactions, the way that arrows behave. It's created by a guy who created Perfect Arrows and Perfect Freehand, that's the thing that he obsesses about. And the way that the UI behaves when you use it is incredible. The other thing I like about it is that it's meant to be hackable and extensible. It's what you use to build other applications. Because if you want to build, for example, a Figma for X, Y, Z use case, you end up having to build all of Figma first and then the other thing. So TLR is the, hey, you want to build Miro for this use case, start with TLR, add your own UI customization to it, super great. If you want to find out more, Steve Ruiz right back there, definitely bother him, loves making friends and having people bother him, so tell him I sent you. Cool.
We have a new batch of questions just came in. We don't have time for all of them, so I'm going to ask this last one, and the rest of them you can find, Sunil, in the speaker Q&A room. But last question, first a statement, you are a cool engineer. I agree. A lot to learn from you. I agree. How are you feeling after quitting your job? I'm frightened, but I mean, it's very much. I've done a lot of talk over the last bunch of years. I mean, it is Twitter after all, right? Like it's very easy to drop wisdom and so on.
12. Confidence in the Future
I'm feeling confident and excited about this new chapter in my life. I have a strong support system and some savings to rely on. If things don't work out, I've even told CloudFlare to send my laptop back. But I believe in myself and the potential of technology. It reminds me of how I felt 20 years ago. I wish I could share this feeling with you. It's a fresh start, and I'm filled with positivity. Thank you!
So this feels like a moment where I'm like trying to put it to test and I assume I'm going to get a lot of it wrong. But I'm feeling confident because I have great friends and family and a support structure around me. I'm privileged enough to have like some savings. My plan B is hey, does anyone want to see me an engineer and want to give some money for a job? In fact, that's what I've told CloudFlare, which is in 6 to 12 months when I come back crawling to them, having failed just send my laptop back to me.
But I'm excited. I don't think that's going to happen. I honestly am starting to feel about technology right now the way I did feel about it 20 years ago. And I wish I could share that feeling with you. It starts here. I'm feeling good about it. It's good. I'm so happy for you. Swim tomorrow morning. Hey man. Let's go to the pond. All right. Thank you so much.