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
Transcription
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 call 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, mentors, finds 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. 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'd 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. But I'd done really poorly in college and I found myself writing javascript for a small contracting company in Hyderabad, India. And I was being taught web development by a woman. And in about five or ten minutes, she taught me what would hold me for the rest of my career. html is how you structure your UI. Style tags, style, you use css to style your page to make it look a particular way. And you write javascript for behavior. And it was literally the snippet of code. And it looked incredible. In ten minutes, I figured, oh, my God, I could do anything with this. I can take any problem that is presented to be solved on a computer and pattern match it against building a little bit of a structure of a UI, styling it and giving it behavior. It felt like the world was open to me. 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 have to 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. This is me giving a talk at one of my first javascript conferences in India called JSFoo. Great conference. I was part of the organizing committee, so I still feel soft. So when I say it's the best conference, no harm done to react advanced. It was just that it was a conference I was ignored in. The slide actually says embrace templating because templating languages were the rage at the time, Jade, Handlebars, Pug. There were like ten. I don't even remember all of them. And I had made it part of my identity for learning what all the tools and libraries were, which one would be the best fit for you, et cetera, why you would pick something, what architecture system you would build. Because nobody should be writing raw html, css, and javascript, I thought. And I then spent the next 15 odd years across a number of companies. It's kind of weird. I look at this and I'm like, oh, shit, I job hopped a lot. But I promise you, I didn't piss off everyone. I actually went, I learned a bunch of things, I moved on to the next place. What I'm trying to make, the point I'm trying to make here is I was able to use my skills as a web developer in small companies, big companies, government firms, as a designer, as a developer. I remember writing the Yahoo maps rewrite. We scaled Mintra, which was an eCommerce startup, from like ten engineers to like 500. That was great. I spent some time in Oculus, which was, by the way, possibly the coolest job I had, which is writing react for virtual reality. Describe whatever your feelings about the metaverse were, this was the most sci-fi shit I've done in my life. I spent some time on the react team. That didn't go so well. And I built up a career of dedicating my life to technology and working my ass off writing code, writing a lot, a lot of code. 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 ten, twelve hours a day of just writing code? And 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 the stupidest 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. 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 I wasn't really eating well. My weight was fluctuating. 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 really get to focus on yourself and self-care when that's happening. 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 if folks know this from last year. It's now been two and a half years, clear smoking. Disgusting habit. You should try it. You should hate it, and you should quit it 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. And last year when I was here at this very conference, this is what I looked like. Like I looked a lot happier, I think. Also, I had a haircut and a trim, of course. And I got that sexy suit. Look at that guy. Right? Damn. Even bought 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. It's so nice. Over the last couple of years, I learned something else. One is that front-end technology is not the be-all or end-all. It is just a tool to solve stuff. I started exploring metal layers. 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 learned... 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. Right? 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 a few hundred people in the world who understood how to use it, deploy it. But now you can literally click a button on Superbase or PlanetScale or honestly, some stuff even just 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 it. 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 farm of servers somewhere, a data center, potentially spread across the world. But now with the new breed of edge computing providers, cloudflare, Fastly, Wercel, Amazon lambda Edge, I don't know, Fly.io, Bun is going to come out with something, DenoDeploy, and I assume a couple that... Well, Superbase also will start doing... Well, they do functions now, et cetera. 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, 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 the dark night sky. It's not bad. And all of those are CPUs, I guess. This is also what 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. I loved 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. 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'll be 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? Let's hear about. So project one is called the multiplayer development kit. Developing an application for realtime multiplayer sync. The next Figma, the next Quake 3. Quake 3 was released in 1999, by the way. And they could do it well. It's kind of strange that we don't do it. Building the next Discord, building the next XYZ realtime thing should be accessible, cheap. It should be accessible to like nine to five 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 life, baby. What a movie. What an incredible movie. I 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 so the goal here is that building this multiplayer app should be as simple as building a single player app. Sunil Pai from 20 years ago should be able to sit down and build it over a weekend and not freak out. See, the thing is that I actually did ask on Twitter, hey, what problems do you face right now if you have to do WebSockets realtime? Because WebSockets has been technology for donkey's years, but you don't really, everyone still talks about REST and graphql and like request response stuff, which is great, of course, but like the sci-fi applications that we've learned, that we've dreamt of for the last hundred 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'll 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 Bellicky, who like really like 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, there'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, 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 requests 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, hey, hey. Here's a classroom and just write a little logic for when a user connects to it. There should be an api. 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. Further, the things that you want from a system like this are that it should be fully type checked. I want to be able to run it locally so that I can mess with it a bunch. I shouldn't have to log into a service to use it. I should be able to write tests on it from 9 to 5 and go home afterwards instead of worrying whether it's breaking. I do not want to have to be on call for an application that I wrote. That's one of the nice things about being a front-end developer as well. We don't really have that much on call, on call. And if there's a problem, you just flip back to your older javascript bundle. 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 reproduce 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 Quake 3 game, whatever. You want to focus on what makes your app great and you want to pay only what you use. 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 shout-out 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. We have a great little app called TLDraw.com working on a rewrite and fairly quickly we were able to introduce multiplayer mode into this application. And it's great because basically you just say, hey, here's a link, here's a link. 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 60 FPS 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 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 happened to do this. So – oh, I'm out of time. I'm extremely happy and grateful to Steve and Deirdre for letting this incubate in there. So this is releasing in early 2023. And 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. I'm already showing demos around to everyone who asked me about it. But what I want to point out is that I'm doing it differently this time. I'm not working 12-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. 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 at 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, Jani. Thank you for also being the friend for making sure we get our lives back in order. I know. That's right. All 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 play music before the year 2000 because all this new music that the kids are listening to makes me deeply uncomfortable. Also I suck at like 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've 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... Technologists, developers, folks who are the 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 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. Is your t-shirt a survivorship bias illustration? No, it's interesting. I just like the image so much. And I figure, since I've done so well in the last few years, I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work. I'm going to have to try to make it work.