Description
There's no one that I know personally who has a more interesting backstory than Dan Abramov. In a matter of years he went from hacking on VBA and C# apps for $200 a week in Russia to building one of the most popular JavaScript libraries (Redux) and working as an engineer at Facebook. I've always been curious about this process and I finally got the chance to ask him all about it. In this episode we talk about his upbringing and what it's like learning to program in Russia, the backstory of how Redux came to be, handling burnout, and much more.
Transcript
const Tyler = "Tyler McGinnis";const Dan = "Dan Abramov";
Tyler: Welcome to this podcast where I decode the implementation details of successful Software Engineers. When I first had the idea for this podcast, someone who kept popping into my head over and over to try to interview was Dan Abramov. The problem with that, is that I'm trying to have all of my interview for this podcast just because it feels just a little more geniune that way. Unfortunately, I live in Utah and Dan lives in London so we are no where close to each other. But, luckily for me, Dan attended React Rally last week here in Utah and was kind enough to sit down with me as a last minute request. If by some small chance you don't already know who Dan is, he's the co-author of Redux and now works at Facebook on the React team. I've always been curious how someone from such a humble background as Dan could have such a positive impact in our industry so quickly. What I found in our interview, and I think this attribute can be credited to a lot of his success, is Dan is probably the most curious person I've ever met. He never comes out and explicitly states this, but every story he tells, whether he's a 14 year old in Russia reading bootleg VBA books or a twenty something year old writing Redux to prepare for a conference talk, every story is just engulfed with curiosity. With that said, I am so happy to bring you this interview with one the developers that I look up to the most - Dan Abramov.
Tyler: I think what interests me most about you, and this is kind of universally what I've heard is, you have an incredibly interesting backstory. And I don't know if I have ever heard it personally. Everyone kind of knows you are from Russia and they know you are at Facebook. But there's a lot in between there that I don't know that if you've ever talked about or I don't know if it's really been discussed. That's the first question I have for you is, how does someone go from Russia, to now, working at Facebook? Tell me, probably in more detail than you want to, the steps or kind of the history of how you did that.
Dan: I think I was about 12 maybe. I did not really intentionally start to program. So I remember I had a book on Pascal actually, which I had no idea what it meant. Like, I didn't understand that it's something you need to input into a computer so it was like a book with code printed in it. And I don't remember it was some kind of database thing. So I remember seeing it, but I didn't make anything of it. I didn't have any like... We had computer classes in school but they did not include programming at all. It was Word, and PowerPoint then Office programs, Microsoft Paint. And so I was just doing, yeah. And I loved PowerPoint. PowerPoint was my favorite program ever because I tried to inspect every feature.
I opened every menu in PowerPoint and tried to test it and it had this crazy features I don't know if you remember, but you can insert all the objects which is like you can insert, so Microsoft had this... its own component model back in the day where you could have applications export different types of content that would be embeddable in other applications. So Iike, if you installed both Excel and PowerPoint, you can embed Excel spreadsheets into PowerPoint slides. And then if you press on it it's going to activate, like the tool bars are going to be replaced by Excel. And I was just fascinated by is kind of like things that you can put into other things and they like do something. And so it also, so apart from this it also had these animations. So you could schedule animations on like some kind of board you could say, "This thing flies off from like from the right, then it fades in. Then like this thing happens..." So it was a visual way to design, I guess, not an interaction but like just animations. But then I noticed a really cool menu years so it was called service-micros and what you could do is it would show a tool bar which looked like a tape recorder so it had the, "Record," "Play," and, "Stop," buttons. And I remember that I pressed record and then I just moved somethings on the side. And then I pressed stop.
And then if I pressed, "Play," it would do the same thing again automatically. Like, repeat what I did. And I found it really cool and I noticed that if I double click it, it opens up some completely different program with some weird menus and a white screen of text and in the text it says, 'With Picture box One. Dot Left equals something, Dot Top equals something. End With" And I changed those numbers and I pressed play again and it would move it to a different spot and I am like, "Wow. Like, these are coordinates." And if I press, "Up," so like it let me assigned properties. And if I pressed that again, it would show a list of all the properties that are available. And I would just try every property in there to see what I could do with these pictures and objects. And so this was really fascinating and the thing was called Visual Basic for applications, it's like a small version of Visual Basic . I bought a book on it. And in Russia they would sell technical books in our underground when you go to an underground station, before the entrance to the station there will be a small shop. I am not even sure if it was official licensed or whatever, but they would sell CD's and DVD's everything. It was pirated, of course. And there were some books and some technical books as well, and so I bought a book, like a book by some, it was not even a translation, just some Russian author who wrote about automating stuff with VBA and so I read that, I read another book on VBA and I started just, so my grandmother sure so like to like buy me treats and I stuff and I just asked for books about Visual Basic. So our favorite...
Tyler: Which is normal for a 14-year old.
Dan: Yeah. Totally. And my favorite way to spend a weekend was to go with my grandma to eat some pizza, something like this, and then go to a bookstore and pick the thickest book about Visual Basics. I had like maybe five or six such books. And I mean as books they were probably not very great because they didn't teach programming, they just described the APIs, and stuff. But I quickly started, so I picked Visual Basic 6, that was the version that was popular at the time. And I don't know, I was just, you could drag and drop things onto like a window, and it would have this Visual Designer and then you could write some code for event handlers. And this really how I got into programming because I could just like put a button. It felt very powerful to see a window, and track a button on it. And press, "Play," and I see this as a real thing, as a real application.
Tyler: Was feedback.
Dan: Yeah. It was. So there was this talk at, so we are at React Rally, for the context of the conference. And there was this talk today by Preeti. And she talked about how feedback loop was important to how she got into JavaScript. And I now realize that I did not, like JavaScript was not popular at the time when I learned. But for me it was also this visual feedback loop that got me into programming, I would never have gotten into it if, with this book about Pascal this didn't make any sense for me. But just dropping things and running them and seeing them live, I think that made the biggest impression on me.
Tyler: When you were learning Fiber, you tweeted how you were building a to-do list or something in order to learn it. Has that always been kind of your path to learning new things is basically just getting as hands-on with that is possible or what's a path? Like, say because back then it was purely your drive, your reading books, all you had were books essentially. Your Grandma, books and pizza, right? Is the process still similar today with newer technology?
Dan: I don't learn new technology much.
Tyler: Unfortunately. So say when you're learning Fiber, which was I think a year ago or something? What was the path you took to learn that?
Dan: For the context, Fiber is a project that, it is like a rewrite of React that Sebastian Marbage has started which is a bit complicated because it's not like the JavasScript code that I have seen before. Yeah. It took me some time to understand the reasoning behind how it's written. I think for me the way I understood it was just by trying to implement a feature in it. So like, we needed to get to feature parity. Yeah. And actually I started work, the first feature that I worked on in Fiber was Error Boundaries, which was actually a new feature. So I would just write some tests, like initial tests for what I was trying to do here, and wrote the hackiest version like, I could write that did what I was trying to do here. And obviously it was violating some principles of how Sebastian wanted it to be done. So Sebastian actually wrote up an issue called, "Contributing to Fiber," where he lists that his constraints, like the things that he, the way that he wants the code to be written like, things to be aware of. And after reading that and talking with him through it, "I think I got a clearer picture of like what he was trying to do." And the like, the invariants, the constraints that I need to follow. And yeah. It kind of went from there. But I mean it wasn't also it wasn't like I'm learning a new thing. It was more like Sebastian started like shaping it. And you know, it's kind of like a sculpture, right? So you have this raw material at first and then you like, work on them and they become something, and he had shared it with us at a very rough stage, like the first stage. And then we just try to learn how to work on this thing together. It changed many times as we were working on it but...
Tyler: It worked out.
Dan: Yeah, it...
Tyler: It shipped. It's working out.
Dan: Yeah. I mean it shipped to Facebook. It's just we haven't released 16 yet, but hopefully in a few weeks, it'll be out.
Tyler: So let's go back to when you're in Russia with your grandma. She gets you pizza, treats, you'd be reading like these super fat VBA. So what was the path from there to learning JavaScript? Where was that transition?
Dan: So it took a long time really. So again I started at about 12. But I stalled a lot I'd been trying to write a single program like for my step-dad. So basically he needed, he worked as a photographer and he needed something like a database for keeping track of like, of photoshoots. Like location, topics, tags, descriptions. Yeah. And it was just a regular it could have been a spreadsheet, but he didn't know how to use Excel.
Tyler: Everything can definitely be a spreadsheet.
Dan: Yeah. And so I was trying to gather, but I was reading books. So right after Visual Basic I think I never I didn't start reading books about programming fundamentals, but instead I got fascinated by the OOP stuff. So I started I read Gang of Four, I read refactoring, design patterns, I got super fixed on UML for some reason. So I was drawing these crazy diagrams of object oriented things and inheritance hierarchies and all this stuff.
Tyler: Was this so you could build a product for your step-dad or was this out of curiosity?
Dan: It was kind of both. I was using this project as an excuse to do everything. So like, I was trying to, I was reading a book about how to gather project requirements and like user stories and Agile stuff and all of this. And I was, like 14. And I it made a big impression on me at the time. So I was, yeah, I was just drawing UI mockups and figuring out how to express this in objects. And also at the same time, so I was using this project as a test bed for everything I learned. I was also buying part of the copies of ActiveX controls. Wow. That sounds really funny in 2017. And there was this component abstraction for Windows, which is a way to share comp- like this is like React components now that I think of it. You could just drag and drop them, and decide their properties. And they had events. This is ridiculous, it's like I am working on the same thing now. Yeah, but at the time they were not open source. So like, open source was not a big thing back then, everything was commercial. But in Russia, you could just go to this underground shop and there would be CD-ROMs with 250 ActiveX controls...
Tyler: Oh my goodness.
Dan: And stuff like this. And I would just like, I was fascinated by toolbars. So there were a lot of controls that implemented Microsoft Office style tool bars, that are not native to windows. Like, you actually have to implement them and I would like, try every single one of them and I would change like the tool bar implementation every week and try to give it abstracts so I could swap them up. And like, this project was ridiculous, and I never really shipped it, so I think it kept going for like, two years for me. I was just tweaking random things I mean he was using it at some point because like, it kind of worked but I think I never really finished all the features I wanted to finish. And yeah. It took me a long time just to I think it's gotten to a point where so, .NET came out and VB6 was kind of deprecated. I was trying to migrate to VB.NET and I started learning C# around the same time because like everybody was using C#. And I think the project kind of just sunk like, I couldn't change anything without introducing a bug. Because like, the code was such a mess that like talk to database and do everything in a single place, in the event handlers and forms that I would like, fix one bug and introduce three other bugs. And at some point I just abandoned it. But that's, I think that was the longest project I had at the time and then I kind of stopped programming for a few years.
Tyler: Do you know remember what year this was when you finished the program?
Dan: So I think I was about 15, so that was 2007. And I stopped programming for a couple of years after that.
Tyler: What made you stop?
Dan: I just didn't have any I was just frustrated after this first project, and I also had the school was getting more demand. And although I hated school so I just copied my homework. And I don't know, I just wasn't in a good place to like, do something like this. I wasn't really very interested, but I got into a programming forum so I started to spend a lot of time online. I had a smartphone with Opera mini as a browser which was super efficient in terms of network, and I would just spend days there. There was a forum. Like a Russian programming forum where I tried to, StackOverflow didn't exist back then. So I was trying to just answer questions even if I didn't know the answer, I would just google them and try to get better at googling things for other people. And I became a moderator of VB .NET subsection and later I think, of the whole .NET subsection. And yeah, it was kind of fun. So I think, I spent most of my time just on the on the forum back then, without any real projects. But I was learning a little bit about windows API's, and interfacing with Windows native APIs from managed C# code. Yeah. So, that's the way I remember it.
Tyler: So that was 2000, you said 2007ish you finished the project. So took a little break for the next few years doing school stuff. I don't know what, is there a high school in Russia? I don't know the equivalent of...
Dan: Yeah.
Tyler: So did you go to college for a little bit or?
Dan: No. It's a bit different. So in Russia you have, I'm actually not sure how it works now but when I was there it was, so the school was ten years and then you either go to there is something I'm not sure how American system works either, to be honest, but like you could go through a thing that last two years, but it's not preparing you for any kind of high-tech job, it's just like, If you want to be a plumber you could go there, but you could also go to a university. So I actually did that, I went to a university that I thought would teach me programming because. Like, I don't know why I thought that. There were supposed, I think there was something related to programming there but they actually turned out that the first three years are the same for everyone...
Tyler: Okay. Yeah. It's same here.
Dan: Which means it's super generic. There is one programming course, where the course work is to write two functions that print a table to the console. So it's, like... the good part was that they gave free Macbooks while we were there. That was one of the reasons that I joined. But I dropped out of the second year, and I got a job at the same time.
Tyler: Okay. It was at the...
Dan: I got a job and I realized that I don't want to do the university.
Tyler: And that was a developer job?
Dan: Yeah.
Tyler: Okay.
Dan: So I was 17. I was 17, I finished school and it was my first year in university. And when I was 17 I started doing freelance stuff. So there was a website, like Russian website, with freelance jobs. They were super low paying but I would try to build a, like a small portfolio there. On just random things somebody needs to fix their ASP website or there was a project I worked on which is like to build some kind of thing to enter data and like visualize it or something like this. Also, all this was windows programming. I didn't know anything about the web at all. Yeah. And it like paid, suddenly I got $200 for two weeks of work. Yeah. And I mean it wasn't too bad for a Russian teenager at the time. Yeah, considering it people who, even people who got paid, like well in Russia, I think like $2,000 a month is considered like a really good wage.
Tyler: Interesting.
Dan: And I mean housing expenses are pretty small there compared to U.S. and stuff. Yeah. So I was just doing this freelance small things and tried to build a brand on this website. I would look at people who are successful there and like mimic them. So I would, I don't know, make beautiful screenshots of my stuff. And put beautiful descriptions there and try to explain what I did. And so a guy contacted me. He was copywriter so he was padding some ad texts on his website and he had an idea for a joint project. So the thing that he needed was... so in this industry people write just ad texts for some very small money, and they need to be optimized for SEO so that they match Google keywords and stuff, but you need to make sure that the keywords are not too dense in the text, otherwise it's penalized. It's at the time between 2 and 5% was considered to be a good, I don't know how to say it in English but yeah. So ...
Tyler: The ratio basically.
Dan: Yeah. So you needed to be careful about that and there were, the tools that existed to measure it were not very good. And he wanted me to build a tool that would display like, let people enter the keywords and display them. So that they can see if it's working well or not. And I think, I spent also, I think two weeks on it. I think I got $100 for it. But I put my name in the status bar. Like, I put his name and my name. And I got a like, I kept getting orders from this. So like, people would just, because like everybody in this free lancing community started using this tool. People like, I don't know, word of mouth would come that, "Hey.Here's a person who can do some like coding stuff." And so I kept getting orders. And it was pretty good like, for my age. Yeah. And actually I googled this program, it's called, "TextTrust Pro." I googled it a few years ago. And there are like a lot of Youtube videos about it, it still exists and a lot of people still seem to use it.
Tyler: We got to find that. That's awesome. So is this, so I know Stampsy is coming up, right? So was this after university or like during university?
Dan: The freelance stuff was during the first year of university when I was just trying my skills to see if I can actually do something real. And I think it finished when I, So I implemented Linux support for fun in this project like it has this Plot abstraction UI abstraction that would you spot for specific views and stuff and I figured that, "Okay like, if I did that and it works, maybe I'm ready for like a real job." And I went to a meetup that was hosted by some, basically it was a talk by some guy who was a, I think he was a co-founder maybe, of a local outsourcing company, so it was like a company that wrote Windows line of business apps basically for finance companies. It was just general Enterprise outsourcing stuff. And I just came up to him and said, "Are you looking for somebody who can do C#?" and he said, "Yeah, sure. Drop me an email. "
And I dropped an email and I went to the interview and like I showed the thing that like the program that, it was a really cool program. Like I used free text input for, so you could copy and paste your text there, and I use windows API's to actually highlighted those keywords, right in-line so that... it sounds trivial today. But like it was really hard for me back then. Yeah, so I showed this thing and I showed they did a test where I would,like, write a program that showed running processes and stuff like this. It wasn't hard and yeah. They just hired me and I started working there as a C# developer there. And so at that point, I realized that I'm just wasting time in the university not because I'm smart or something but just because like there was barely any programming at all. And there was a lot of stuff that I didn't care about not in the least. So I quit the university and I worked about two years at that company, it's called DataArt. It's like a joint Russian-American company and I gained some experience with enterprisey stuff there. And then I quit.
Tyler: Where does Stampsy come into play? Because I'm assuming Stampsy was your introduction to JavaScript.
Dan: Yeah.
Tyler: Like where you really started using it in production.
Dan: Yeah. After I quit, I think I quit DataArt when we were hired to do a project that was something, like eBay. Like a startup but outsourced and was really silly because, like they were, they wanted us to like micro optimize anything but they didn't have a real product they didn't have any users at all. So it just collapsed. And I just felt like I'm wasting my time doing, like stuff for contract stuff like this. So I quit my job. And I moved back with my mom because I didn't have any income for like three or four months. And so I moved back in with my mom. But I, so I found a new thing on the internet. There was this guy, Yury Lifshits, he worked at Yahoo for awhile and then he came back to Russia. He was running a workshop thing that, so the way he phrased it is that it would teach you web development. And I was really scared about that because I spent all my life doing desktop development. And I didn't know anything about the web. And I was frankly terrified. Because like, it seemed like the web is picking up traction. And you can't really, I'm just out of touch. And so I went to the thing and it turned out that the way it works is that I don't pay anything, he doesn't pay me anything, but like, there is 20 of us. We have root access to like servers, servers with his projects. And we just implement things that he needed to build for this project. So like, he didn't have any formal educational thing, it was just voluntary.
Tyler: Building stuff. Yeah.
Dan: Yeah. We just learned. I guess he just taught us how. He basically gave everyone Django tutorial and said like, "Go through this tutorial and then build this feature." And we were just trying to do that. And it was fun. And I learned Git, and CSS, and some HTML and some super basic JavaScript built with JQuery. And I kept going till I programmed for a few months maybe, and I felt like, yeah, like I get it, I understand the web more or less. I didn't really like learning JavaScript at the time, I was just like comfortable enough to write this simple jQuery thing. But then I decided to apply for the coolest, at the time, company in Russia. So there was, I mean there still is, VK it's a Russian clone of Facebook. Yeah, but I mean it had a nicer UI you know, it was based on a version of I think Facebook of 2005 or something like this, when it was uncluttered and I think VK really paid high paid attention to not cluttering it. They didn't have a lot of features but it was really neatly designed and super fast.
At the time, everybody wanted to work there and they had like super solid team of maybe ten people maintaining the whole website with millions of users. So I went to an interview there and they told me to build in all the complete component, that like worked the same way that theirs worked. And I did that. And yeah. But they did not really look at the code. It was more like how does it handle the balancing and caching and I didn't really think about some of these things, and in the end I didn't pass the interview and I was really frustrated and I didn't know what to do so I just went to Coursera and I joined two courses, "Machine Learning," and, "Compilers." Because those were like two topics that seemed absolutely magical to me. And I thought like, "Maybe I want to do something like this." And at the same time, I got a call from some, so some guy was emailing me asking if I, oh right, so I missed a part. I organized, I mean I didn't really like do anything I just messaged a few people. But a few people from that group that did those projects with Yury Lifshits, so few people were into watching educational videos.
As I was going through this Coursera courses, I messaged a few people, "Let's like spend a day just watching educational videos. You know like, why not? This sounds fun." And we went to this working space that Yury rented, we just stayed there until like 5:00 a.m. or something because I needed to get the homework for Coursera done by the deadline which was like 7:00 in the morning in Russian time. And I had a friendly chat with somebody who also stayed with me. And then this person, it turned out that this person recommended me to someone who lived in Moscow. So some guy from Moscow was messaging me if I would be interested in chatting about working his startup potentially. And I was still kind of frustrated about the whole VK thing that didn't work out and I was also, ill I think I had mononucleosis. So I looked awful and I didn't want to talk to anyone and I also googled this guy and he looked like some kind of fashion guy he had like a slick haircut, and he was appearing in GQ Russia something like this. I thought what the hell does this person have to do with software development. And so I kind of ignored him. And then I really looked like I'm not truly like interested right now. Like maybe in a few weeks. But he was super persistent and he actually messaged me again in a few weeks. And I said "Okay. Like let's Skype." Because like I am in St. Petersburg and he was in Moscow.
Tyler: How far is that?
Dan: It's like four hours by a train, by a really fast train. Or a night, you know, on a slow train. And so he messaged, yeah, we Skyped and he showed me, so they made a video about a product that didn't even exist. It was like a flash mockup. But it was a really slick production.
Tyler: Yeah. It was a great, great video, I'm sure.
Dan: Yeah. It was like, "Wow. This was beautiful." And so the idea of the product was like a thing to create DIY magazines on the web. Like the format that would be like, not like real magazines but more like Zines. Maybe adapting Zines to web format and it was really magical. It was like a button that you pressed and it would change the layout beautifully, and, that button is ridiculous. When we tried to implement it, it was crazy. We got it in the end. Yeah, but I was fascinated by it and like, aesthetically it felt like it's something I want to try doing. And so, I went to Moscow to meet him and the other folks and, he was really trying to give a good impression, and yeah, I decided to join Stampsy. So that was I think 2012 maybe, or 2013.
Tyler: When did you leave Stampsy? Was it after React Europe?
Dan: It was before, a few months before React Europe.
Tyler: Yeah. That's right. You did a few months. So you worked with Stampsy for the next few years doing Backbone initially, right?
Dan: Not exactly. Initially it wasn't even a web app. We started with an iPad app so it was Xamarin and C# just because like we knew C#. And after, so we released the iPad app. It was even featured by Apple. Like Apple folks wrote to us saying that, "Hey. The design is great and stuff." But the product didn't really make sense because it was it was a compromise between two visions. It was like in part, one of the co-founders was pose like in part one of the co founders was...So Roman, he was more like a visionary. But he had this like idea for Stampsy. And like he always wanted to make Zines. Like he used to make Zines when he was a teenager and he had this art project where he would create several web magazines with by hiring like graphic designers. And JS developers that would look pretty cool with like glitch effects and stuff like this. But it was pretty expensive, so he just wanted other people like him to have a tool to express themselves. And the other co founder was like more pragmatic, I guess. And more of a, he was a designer and so he was, the result was like a tool that pretended to be the thing that Roman wanted. But it was like just an editor I guess. Like a drag and drop editor.
And so if you don't know how to design pages you just like drag headings and text and it just looks awful. Because you don't know how to beautifully position something, you don't know how to automate... like how to lay things out. So it was like a fancy drag and drop tool but it was too simple for designers but not restricting enough for beginners. So people just created a lot of, like really shit content. And so that was pretty frustrating and we figured that nobody has good content on iPad anyways because like people usually have pictures, like very low-quality pictures of their family. And this is what they post then, instead of like, beautiful editorials. So we scrapped the iPad app and we started building a web app. And this was, so the iPad app was a hybrid app. It was like parts of it were native. I mean C# but still it used native APIs. But the drag and drop editor was built with WAP because we wanted to have the same exact experience in the editor. And in the viewer part like, when you view a piece of content and since you can view it on the internet it follows that it has to be a web thing otherwise the fonts are going to be different. The layouts are going to be slightly different, so we implemented that as hybrid thing. That was really cohesive, I'd say. I'm pretty proud of how we did. And it wasn't noticeable that it was a hybrid thing. I mean even like Apple agreed. So yeah. And the web part was built with Backbone at the time. And I kind of, I mean, I knew like MVC paradigm. So it wasn't hard.
Although, the logic was kind of messy in some places. And so we started with building the web app from scratch. Completely from scratch because they had a different, design slightly different like target audience it was more, supposed to be more automatic, and so on. And so we had to choose between Backbone and Angular at the time. Angular won. Or Angular.js I'm not sure what's the right way. And so we picked Angular for a prototype of this, and we didn't have a good experience with it. Like, we had cryptic errors. Like, not the js, middle of the js or something. We just decided to go with backbone because like we understood was going on there. So yeah. We started building a complex single page app in Backbone. And at some point we just hit the limits. Like, it's not dynamic enough and we had this custom system where like a custom data binding system which would try to re-render a template if there's any change. And like replace the poorest of poor marks especially. I even remember looking at some library that diff'ed the DOM nodes. So there was like a diff node or something like this but it never occurred to me that those could have been plain objects. So I was like thinking what if we have Backbone call the render method and the render method creates the DOM nodes but then we diff'ed them and applied the changes from the diff to the regional nodes but we never made it...
Tyler: So close.
Dan: Yeah. So close. But we never made it work. And then a coworker of mine he showed, so he showed React to me and I was like, "What the hell? This doesn't make sense." and I just forgot about it. And then in a few months he showed it again and he said, "Actually this might be good." and so I tried, and at the time I was , so I needed a like button that would show 'Liked by... and three other people." And like, it had to be dynamic and feel light and personal. What if like there's like two people and it comes to just one person and like, there is a few combinations there? And it was the same text was used in several different places so like this label would be online. But it was also be on top of the page and they needed to like sync with each other? Yeah. And so I tried to implement this React component and it took me just one evening. I would just write a switch case that says, "If like we have these many people we do that. Otherwise like we are going to do that." And it just worked. And we just got it like going up from the like button to like, the whole panel.
And then to the whole page and like to the feed like in the middle of the feed units and then the whole feed and React-Wrapper didn't exist back then. So we used, we tried to use some React-wrapper component by Andrew Bolt. But we didn't understand the API fully so it was the routing was managed by Backbone. And later React-wrapper came out and we just migrated to that. And then it was 100% React but with Backbone models. But then we had these problems where they would get out of sync all the time. And nested entities are very hard. And like pagination is hard and it caching is hard. It's like everything was hard. And then Facebook release Flux and I was like, "This is the solution to the exact problem that we are having with duplicated data." So we adopted Flux. And it took, I think it took about nine months to migrate but we were shipping features all the time. While, so like, we never stopped to rewrite anything. Like, as we started to introduce React and Flux we've been able to ship features along, while we were migrating.
Tyler: At this point, you have obviously a lot of experience, Backbone, React, Flux. Then comes this is like, this is right before Redux is about a thing, right? So what, and I know you have a lot of opinions on like obviously Redux, how Redux is being used today, how that's kind of a little bit different maybe than your initial vision. I want to hear about, why does Redux exist? Like what were the things that you were trying to solve, initially, with Flux, basically?
Dan: So I was trying to solve the problem of promising something for a conference talk. I...
Tyler: Which is a great way to, like make something, right?
Dan: Yeah. I was just...
Tyler: A stressful way probably. But a great way.
Dan: Yeah. So I just, the thing is I wanted to talk about hot reloading. But Brad Simmons already here, so he mentioned it at React conference. But didn't do a demo because Wi-Fi didn't work or something. Some reason I felt that it was mentioned already, so like if I just submit a proposal about hot reloading like, that won't interest anyone. That's not cool. So, and I was really fascinated by Bret Victor vidoes. I know that like I want to add a disclaimer that I know that Bret probably hates everything people do with after watching his videos. Because like they never, they implement like 5% of his vision and like the 95% of really the hard part. And is like just cherry picking the stuff that's easy to do. But I mean I did, I thought of the same thing. I was fascinated by this idea of changing the past, like changing the past and the future. Like when you have this Mario like game where he would show the trajectory, like he would go in the past after in the game. And he would show the trajectory of like the character. And then he would change the code and the trajectory of the character has changed. This is like this thing's already happened but here's what would have happened if the code was different.
And this really fascinated me and I was thinking about Flux and actions. And how if like, if you separate the data from the logic you could hot reload the logic and reapply the same actions on the top, moving the problem into a different state. So there's [00:43:15] I think I do have a think about Flux at that time so I was thinking about some kind of what if I just add time travel to React state itself, and I just did that because I was scared that if the talk was just about hot reloading it would not be accepted. So I said partial loading on time travel and I got some buzz words in it like the talk proposals said that, "In this talk, Dan will demonstrate how like ideas from all Elm and Om or if..." But I never tried Elm or Om. It was just that this post by David Nolan was super influential for me so I figured that, "Yeah. Like, immutability might actually work." And I mentioned Elm, I don't remember why. So we still mention it in Redux with me. Because I think that I probably read Elm architecture at some point. I'm pretty sure that I did not understand it. Because the first version of Redux did not follow Elm architecture at all. It's something Andrew came up with. And he's saying he also probably also read Elm architecture and did not understand it because of the syntax.
Tyler: And now it's just part of the history, yeah.
Dan: But it was part of the subconscious kind of thing. But anyway at that time I didn't try Elm or Om. But I made this proposal and it was accepted and then I had like six months to prepare. But I was like Stampsy was running out of funding at the same time I was trying to polish a drag and drop library. So I kind of just like did not think about the talk for a long time, I was trying to implement a Flux hot loader, like React hot loader but for Flux, and I realized it's really hard because the state has captured the local variables that there is no access to so you can't really like transplant it when you change a module, you can't really put those into the new version. But what if we separated the state from the logic. Like that would allow us to do that. So I think Redux was just like an attempt to actually make a proof of concept of, "There is a Gist, like really old Gist about time travel in Flux. Which if you scroll my Gist far enough maybe you'll find it." I was trying to figure out what is the minimal version of Flux that would work with hot reloading and it's pretty crazy like it's funny. It's naive. We were chatting with, I don't remember who I was chatting with, but I was chatting with someone and they said that I'm not even sure, it was my idea.
Yeah. I don't remember who suggested it but basically, we had this idea that Redux would be a cool name because we have these Reducer functions and it is Flux. And it sounds really good, Redux. I was watching I think, Jeremy Morrel if I'm not mistaken, I was watching his talk where he was explaining Flux conceptually as a reduce operation over time. And I was thinking what if it was actually like a reduce operation like literally. And so yeah. and after a while, Redux is a really good name, I like it. Maybe I should like turn it into a proper library, and so I think somebody gave me the name from, like the npm name. Yeah. And I just, I was trying to make a proof of concept of Flux where I could change the logic. And it would let me time travel. And it would let me reapply the future actions on the code change. So that was like, the goal. And I know people kind of liked it even before it was released. And like they started saying, "Do you use it in production?" I was like, "Wait. I'm not sure if it's actually like usable in production." So I was trying to like write a proper, the readme was ridiculous it was super long and you had like decorators syntax. And like all explain everything in a very rude way. Yeah. It was incomprehensible to anyone who wasn't already in the middle of all of it. But then it exploded after the conference and I spent some time writing the docs.
Tyler: So how was, this all happened just like incredibly fast. Like from your perspective, how was it going from someone who's like even like pre-Stampsy, right? Like even to that you were doing like C# stuff to all of a sudden Redux. It's like the thing that every web app like uses, right? Like it's just so popular, how was managing that, both from a personal standpoint you now have issues you're dealing with like Github issues? And you going to have like this like fame that's like put upon you, whether you ask for it or not, like how is that?
Dan: I don't know, I think it was so bit overwhelming at first, and I've just learned to deal with it. So like I think I spend an unhealthy amount of time on like managing issues and pull requests and stuff. But I also didn't have a full-time job so it was like, I really didn't have a work life balance at all. Eventually, I kind of learned to onboard contributors and just like, if somebody's motivated and they seem talented just give them like commit rights. I think this is all kind of from the program I was talking about where Yury just said, like here is the keys to the root users. Try not to screw up my websites, please. I kind of follow the same way though. People are going to make mistakes anyway and like you're going to make mistakes anyway so you might as well like, if they don't have, at least like I have this kind of influence and visibility. Might then just like let them do their thing and I get there. But it's also, it's not entirely altruistic or something. Because like, in a way I'm making them core maintainers and co-contributors is important for making them more visible but it also means that they're going to get into this potentially unhealthy situation where they take the project too seriously and can't manage work life balance and stuff like this. In a way it feels like, you know, in Tom Sawyer in the first chapter there is this guy who is painting the fence. And he's like, "Wow. This is so amazing." and the other guy just believes it and picks it up. It's just a trick and I kind of feel this way about open source, is that yes, there are some good things. But there are also bad things. And, "Hey. Take the whole package and yeah. Pass it on."
Tyler: What have you managed, what you've done too, because I know in the last year things have gotten better as far as it seems you're going on more vacations. Is there anything that you've done to help that? Or it's literally just like, "Go on vacations and don't bring your computer charger."
Dan: I just voted contributors to the projects that I don't intend to maintain actively. Yeah. And I just am watched everything. And I mean I have a full time job working on open source now, I have to focus like on specific things. And it's just now that I'm not going to do these things that I maybe want to do. And t it's just competing for my attention and I'm just not doing it.
Tyler: Yeah. Makes sense.
Dan: And I stopped writing code at home.
Tyler: Oh yeah. That's probably a big one too.
Dan: Yeah. I was just tired. Like if you do this full time it's not as much fun to like do it
Tyler: At home too.
Dan: Yeah.
Tyler: Yeah, exactly you're not a 17-year-old kid in Russia anymore. All right so what I'm going to do now is, thanks again for telling that story I think I think a lot of people will find it interesting. what I want to do is I saw questions here and we don't have a lot of time left, so it's kind of like rapid fire. I'll ask you and you have like anywhere from a sentence to like 30 seconds to answer them. [00:51:40] we'll be done. So the first one I have is, you mentioned this one before. This is kind of random, Thomas , you have mentioned is an incredible manager and a few people Christopher S_ has mentioned the same thing. What makes Tom so effective at that role?
Dan: I think he just like trusts people. In my experience is hard very good people and he just trusts them. So like he doesn't get in their way he doesn't dictate what to do and just like he is doing everything he can to empower you basically. And get things out of the way And if there are any like people issues. He's going to handle them so like he's going to talk to somebody, he's going to talk to you he's just very good at supporting people. What's your favorite open source project right now?
Dan: React.
Tyler: Besides React.
Dan: Yes. It's still React.
Tyler: All right. I'll take it. I'll let that one slide.
Dan: I'm sorry. It's true.
Tyler: No. You're good. I mean if that's the answer, that's the answer.
Dan: I'm honest.
Tyler: What does building for the web look like in three to five years?
Dan: I've no idea. But I hope that there's less configuration.
Tyler: Knowing what you know now, if you had to learn to program all over again, how would you do it?
Dan: I wouldn't do it.
Tyler: Really?
Dan: I don't imagine what it's like to do it again. I don't have the mental energy anymore.
Tyler: Yeah. To go through...
Dan: Yeah. I don't know how I'll do it. Like it was too hard.
Tyler: How do you measure success?
Dan: Success of what?
Tyler: Anything.
Dan: It feels good. Like if something gives you good vibes then it's probably a success.
Tyler: What's been your favorite memory throughout this whole process?
Dan: So I mean, it's again like unhealthy open-source. But I remember...so when I was 14, I read a book about Erlang. Which is like super random, I don't why I did that. I just remember reading about functional stuff and how Erlang can replace modules upon time while the program runs, and it seemed pretty cool. And then there was this Brad Victor video where he changed code ...And I had this idea that, "Wouldn't it be cool if we could do that in web development?" And and then like I was playing with React for a long time and it was really good at like, it was really the declarative and then I was porting the project to Webpack as RequireJS was super slow and the RequireJS optimizer produced a single bundle so it was too large. I was migrating the project to Webpack and I saw the page about Hot module Replacement. I had no idea what it means so I asked on StackOverflow, "What is Hot Module Replacement in Webpack?"
And Tobias Koppers, creator of Webpack, he answered like, "Here's what it means from a compiler's point of view. From a user's point of view, Webpack's point of view...." A lot of information but some of it made sense and I was like, "Can I use this to Hot reload React components?" And this felt like, "Wow. I can put these two different things together to produce something valuable." And I started like I couldn't resist prototyping this, and I started doing it. And then I sat until like maybe it might 6:00 a.m And I got it working and just enough to record a video And I recorded that video where, "Hey. I'm editing in JSX while the page reloads. Like I can write expressions there and everything still works." And I recorded this video and I tweeted it out and I think Christopher Chedeau retweeted it. And then like I had twenty followers at the time and like it went viral. And I was like, "Wow. This is something. Like I'm not a weird person who cares about this. People want a quick feedback loop." And I think this was one of the most pleasant moments for me.
Tyler: Well, that is all I have for you, thank you so much. I think you've been, whether you want it or not, I think you have been an incredible ambassador for React both myself personally and also the community. Thank you.
Dan: Thank you