In this episode of the Elixir Mentor Podcast, your go-to source for All Things Elixir, I sit down with Andrew Stewart, who runs his own educational YouTube channel under the username @srcrip. We are discussing the best practices and potential pitfalls of LiveView and other intricacies involved in developing a real-time web application with LiveView. Our conversation covers an assortment of topics ranging from streams to JS hooks. We conclude by discussing general development experiences and some open-source projects. It's a whole stream of great information. You won't regret tuning in! #ElixirLang #LiveView #ElixirMentor #TechTalk #SoftwareDevelopment #ElixirProgramming #DeveloperCommunity #CareerDevelopment #TechJobs #ElixirCourse #AnalyticsServer #OpenSource #projectdevelopment Connect with Andrew: X: Follow Andrew on X (Twitter) YouTube: Subscribe to Andrew's YouTube Channel SUPPORT ELIXIR MENTOR 🌐 My website: Visit Elixir Mentor Website 🎙 Check out my podcast: Listen to Hired Gun Apps Podcast 🆘 NEED HELP?? Join our Discord Server 🔗 All my Links: Connect with Jacob on Linktree Join this channel to get access to perks: YouTube Channel Membership
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
Testing. What's up? I'm Jacob Blitzow, your Elixir mentor, and I welcome you to the show. This is a place where we discuss everything related to Elixir, from interviews with enthusiasts and pioneers in the community to innovative projects and libraries that are shaping Elixir's future. So let's get started. Today we've got Andrew Stewart with us, a key player in the Elixir scene, and the brain's behind an awesome YouTube channel, which I'll put in the description below with tons of Elixir content.
And I think he's even going to be doing a lot of other stuff that he's interested in, so definitely worth checking out. Andrew, welcome. Could you give us a quick intro about yourself and your experience with Elixir? Yes, definitely. Thank you very much. I got started with Elixir through Ruby originally. I was a Ruby web developer for a while and worked at a company
that had a little bit of Elixir stuff and got really interested in it there and quickly got to the point where I was like I don't want to do Ruby anymore. I I want to go full time just writing Elixir. So that's what we that's what I did, and it's been fantastic. You know, I'm really glad that I made the switch to it. There's a lot of like overlapping knowledge, I think. I mean, I was already a Ruby,
Rails web developer for a while, but but yeah, so that's kind of how I got to writing Elixir. And before that point I was already really interested in doing a little bit more front end kind of stuff than most just back end web developers I guess. I had a couple people that I worked with that were really big
JavaScript people that got me more interested in it. So on my spare time for quite a while, everything I wrote was just JavaScript, single page apps and that kind of thing. So I think I kind of have brought that perspective to the rest of my career too, of like I really enjoy doing the full spectrum. You know, I'm totally fine just
sitting back and doing back end work exclusively if that's what the situation calls for. But I really enjoy more doing a mix of everything and getting to kind of do true full stack developments and that's coming around to like Live View. That's one of the things that really interested me about it. I'm not like some people that I think get interested in Live
View are coming at it from the perspective of it being an alternative to JavaScript and that's certainly one way to look at it. But I think it really works better if you look at it as it's just it's another tool. You know, there's some things that I think Live View does really well for doing rich interactions on seemingly on the front end and there's some things that are best done still
in in JavaScript. But yeah, so that's kind of like an overview of what I'm interested with regards to the Elixir ecosystem, I think. I love that I'll. I never understood you front end guys. I hated it. I never wanted to do it And then and then I started this YouTube channel and I was only, I was like originally I called it back end stuff. I was like that's all we're going to do. And then so many people were like, can you please do a
Phoenix course? Do the new Phoenix do. And it forced me to learn how to do front end dev. And I'm by no means a pro, but I'm figuring it out and it is becoming a lot more enjoyable. But that kind of, yeah. Somehow. Oh, go ahead. I was going to say it kind of brings us into our topic today where we're going to talk about the learning curve of Live View, right? Definitely, yeah, there there is. There is a learning curve I'm
really amazed making, Starting to make YouTube content about Live View. How many people are interested in starting with it that seem like they, you know, are hitting the ground running? Like learning Phoenix and Live View at the same time and maybe learning Elixir at the same time? I don't know. That's a big, that's a big learning curve. I don't know. I would be very intimidated if
that was me trying to start from scratch. It's a huge learning curve. I always try to recommend learning Elixir, like learn the basics of Elixir, then start playing around with Phoenix and then enter Live view, right? But people like to jump all in. And I I mean, I think it's the best way to learn, especially if you're building something. If you're building a project you really want to get done, you're going to learn a ton. You're going to make a lot of mistakes, but that's how you learn.
Yeah, when I first started getting interested in it, I kind of took that approach because that's what I had done in the past in my career or interests, just looking at other programming languages. And I was working as a Ruby developer and so I just started picking up, you know, Elixir tutorial stuff online and doing like a lot of what it shows you
is, you know, talking about the whole process system, how it's different and inevitably it always goes into like writing Gen. servers to do something. And it's a good way of learning Elixir, I guess, But it's very impractical to what you're probably going to do 99% of the time working as a web developer in the Elixir space, because you're probably going to be working with Phoenix. So, you know, it's tricky. Like I think it's helpful if people can get some kind of
Elixir grounding before they try more practical project. But I think there's only so far that you can really go and without just kind of digging into Phoenix stuff as the best path forward, you know what I mean? Yeah, once you bring in the the Phoenix framework, it makes everything all the pain points of Elixir so much easier, right? Like I had the idea of building just an Elixir API without using
Phoenix and it's for me it it wasn't worth the pain points so. Did you do it with Cowboy or? Probably Cowboy. I can't remember. It was quite a few years ago and then I just jumped on board with Phoenix and haven't looked back. Yeah. I I like, I like to always tell people I'm not that smart guy that's going to create a framework or a programming language.
I'm only smart enough to use other people's tools that they were that they created, you know? Yeah, I I do think Phoenix right now and Live View, I've seen a lot of posts about the ecosystem of it being like the most powerful part of it right now because there's so much that you can do with Elixir, Phoenix and Live View that you can really can't do anywhere else. If you look at another
ecosystem, you know, look at like JavaScript, if you're doing next JS apps or something, there's so many things that you can do with Elixir that are going to be basically impossible to do. If you have a an X JS app, you can't just bolt on something like we have like Obon in an X JS app and handle like millions of concurrent jobs or anything like that. It just can't be done.
And I think people have, I think people are really on to something when they point out that that's the real, the powerful thing about the language and the ecosystem around it. Which is ironic because it's such a small it's a small ecosystem really compared to like Rails or JavaScript, but it's just powerful, you know, People have built so much on top of it. That and what you can build and accomplish with very small
teams. Yeah, that's a good point. Yeah. I feel like you're it's kind of like a double edged sword, right? You can take like a team of eight developers from another stack and replace it with like one or two Elixir devs. That's a very good point, yeah. Especially with Live View, that can really take the place of a lot of what you would otherwise have to do with JavaScript, and you would need you know at least
a couple people, ideally, that know it pretty well. Not that that always works out in practice, but. Yeah, no for sure. Well, like before I came into the Elixir space, I only wanted to do, you know, back end development, you know, Node JS, Express stuff and I hated going into the front end world. It just wasn't. It didn't, I didn't even want it to be an option. And now, yeah, I actually enjoy it quite a bit and I don't know,
it's just it's been good. Yeah. Should we introduce Live View a little bit. I'm sure our audience and people that are watching this probably know what it is, but maybe we should discuss what it is and how it solves like real time web app issues and what what the benefits of it are. Yeah, definitely. Would you like to give it a a rundown or should I? You know I'll I'll let you do the rundown and I'll make
additions if I feel like you miss anything or it doesn't really matter to me. Perfect. All right, well, I've done a number. I've been recording a video about the Phoenix router that includes a lot of live view stuff. And so I felt every time I try to like jump into talking about Live View, I feel like I have to give like a short a summation. So I'll, I'll go over what's been in my head thinking about that video. So basically the main difference
with Live View is when your app kind of has like two different ways of loading the Live view that would normally replace like a controller and an MVC framework. The initial page loads are going to be just like a controller. They're serving regular HTML, they go through the plugs in Phoenix, they go through the regular router and everything
like that. And in the head of the page that gets sent down, there's going to be a JavaScript file that's going to load. It's going to load a JavaScript library for live view. It's going to mount and open a websocket, and it's going to look for a specific route that the Phoenix endpoint is serving. It's going to connect to. And then once it's mounted, it's going to send like a connection
request over the socket. And it all uses the Phoenix channel implementation under the hood I'm pretty sure. And it sends the connection event, it tells it the socket process on the Phoenix side, what page we're on, and then it's going to go open up the router again. Except it's a little bit different because it's only the live macros that it builds the second router out of, but then
it matches up the proper live view again, it runs all the callbacks again, and the whole thing happens twice. And so it's kind of, you kind of have to think about it like because you have the ability to go from one live view to the other with just without a full page reload. Basically you kind of always have to be thinking about like what's going to happen if I do that.
Because when that happens, it's going to skip all of the plug requests or all the plugs, all the middleware and everything, and it's just going to be remount. It's just going to be changing the page live instead of doing a full page reload, much like a single page app in JavaScript world. So that's kind of the power there. That's I think what draws most people to it. Because if you take like a regular regular Phoenix app that has a bunch of live views, like
just at work recently we had like a a whole bunch of live views that were all written before the live navigate thing. Well, I think it was there, but like it was a different, it was in a a different form and they didn't use it to navigate between pages for whatever reason. There's a lot of old live views at the app I work on at work and we added live Navigate to all of them by just going to all the links and replacing the H refs with navigate and it's it's
instantly just amazing how much faster they load and just it feels weird. It feels like it shouldn't load that fast because it's still pulling everything down, but you know, whatever is in our head tag or whatever I guess is just so much slower to load it. It just feels like night and day. Well, and it's only concentrating on updating the dynamic values of yeah, the components, correct? Exactly. Yeah, yeah, I should have mentioned that too.
Yeah, it's going to do a DIF that's going to change. It's not just doing inner HTML equals whatever, It's going to diff the state of the current Dom and insert the new stuff. And really, with the you're only really doing a full HTML load on the first git request, before the socket connection is created, correct? Exactly. Yeah. And you can kind of if you, I was just thinking about all this because I've been working on
some content about the router. But you also have the ability to kind of draw session boundaries around parts of your live routes that can force full page reloads if you are navigating across them with the live session macro. But otherwise, yeah, if you're going to do navigate between them, then yes. That's awesome. Yeah, I'm a fan. I don't think I've ever had
issues like live view just is so fast. But with that being said, there's a lot of bad practices that people get into. I think when leveraging live views with hidden, maybe the server too many times for requests and data when they don't necessarily need to do it. What? Do you have any experience with that or what? What are your best practices with, you know, flexing the live view, hitting the server for
things like handling events versus maybe using JavaScript hooks? Now specifically with data loading or just. Just I guess in Jet. Well, with data loading or I guess any kind of web event, where do you see a lot of mistakes getting made with new developers? Yeah, yeah. Yeah, I think the biggest thing, if I could point to one thing I think people probably do wrong, is doing too much stuff, putting
too much state and too many interactions happening in the live view. That could be done entirely client side. Because live view has a a really interesting take on a JavaScript library that's in the live view dot JS module. And it does this really cool thing where it like can serialize these JS commands, they call it and then you can say that when you click a button it's going to execute a certain command and then anything you
put in there is just going to happen entirely client side. And it makes a huge difference if you're building something like a modal or you want to pop open a dialogue or something. You could go into your component and put a piece of state in there that says open is true or false, and you could just toggle that with a handle event. But as soon as you do that, every time someone wants to open the modal, if they're sitting, I
don't know, in a train or a plane or something, it has to go all the way to your server and back to open it up. And it can feel OK when you're developing it locally. But as soon as you host it on the Internet and you really test that out, you will kind of immediately know that it doesn't feel right. Well, and then you also introduce just bandwidth issues too. We're we're pretty lucky. Like being in the United States, we usually have really good Internet speeds.
But when you start getting into other countries, bandwidth and speeds change a lot. So you could have the snappiest web app and perfect for, you know, as you test it. But then it sucks in a different country. Exactly. I like to flex JS hooks a lot, and in a project I'm currently making the GitHub just clone, we do a lot of JavaScript hooks and it's because anything that can
be done on the client side should be done on the client side. You should take advantage of the resources, right? Exactly. It's imperative and I I think the docs say something to that effect from my memory of them, but it's probably not emphasized enough. But it's hard because the documentation needs to show off how you do things in a live view. So then it's hard to kind of get across when not to do that, you know what I mean?
I think what's really hard is most people learning only work in a local environment, so they don't understand that you know you're making a server request and it's actually going to be quite a bit slower when it's on a real server in production than you know, your local host, you know. Exactly. Yeah, yeah, I think that's the big one. I've even seen big name component libraries that do that very thing of having like way
too much state in the live view. Oh no. Do we want to mention names? No, I'm just kidding. I'm not going to name names, but yeah, it's an easy thing to do. We have a couple. We have polar pair, baby. That said, that he's the kind of guy who jumps into all the good stuff as a newbie and always runs into problems with having bugs and errors in the future. That that reminds me of another thing that I had tweeted about recently, that basically every
live view tutorial you see after going over the basic stuff, they immediately go to stuff like pub sub and Presents. And I I mean those two things are really cool and like I have used them here and there, but I have not used them anywhere. I've not needed them anywhere near as much as Live view tutorials seem to pull them out. Yeah, I think tutorials 'cause it. It's cool, right? It looks cool, but you're not going to really have the need to
apply in in many cases, like presence, obviously. Like any kind of interactive app, but for the most part you're not building a very community interactive app where you need to know if someone's watching what you're doing. Yeah, exactly. I I saw someone I think it was on the Elixir, Discord or something asking a question once and they were talking about how they had some kind of app where you could like change your username or whatever and they
wanted to store it in presence or something so that when they changed it, it would get updated everywhere. And I don't really know why they came to that conclusion because the regular thing to do would just be if the user's name changes then everyone else will see it the next time they reload. You know, most things don't need to be real time. Yeah, I think it's definitely something that you want to think about and plan before you just
use something that takes resources, right? Yeah, and it's just it's very complex. Once you start adding in state, that's then stored in presence or messages passing around with pub sub. What about packing on too much into your assigns map? Do you think that's an issue? Yeah, I've seen it. I mean like you mentioned, we we have a lot of live views at work
and some of them definitely fall into that category of putting too much on the assigns. Do you find like that's probably where live components would be more beneficial? We break that stuff up or. I don't know. I mean, you know, I have. I haven't honestly seen like a whole lot of instances of our live views at work where they where it was very obvious that performance problems were
because of this. Like I can definitely find some of them if I want to look that are like, you know, this has more stuff than it needs, but I haven't really found. I haven't really tracked down a whole lot of performance problems from it, honestly. That's good to know. When Speaking of components, how would you break down the difference between like function components and live components and where do you use them both? Yeah, this is my favorite
interview question to give people to, so I I hope I answer it well. But I'm sure, yeah, basic, basically functional components. They're like React components kind of they they're pure functions. They take a set of inputs and they render HTML with them. They can't like hold mutable state or anything like that. So yeah, it's a pure function. And live components are much
more like a mini little live view. Like they run in the same process as the parent live view, but they have their own state. However, they can't do certain things that a live view can like. They because they share a process, they can't receive messages. If you need them to receive messages, you need to put a handle info in the live view and then pass the information to the live components.
So they have some some tricky parts like that, but basically they're yeah, they're a way to like compose a live view itself into smaller pieces that you can reuse. That's how I would describe them. Yeah, I think that's good and I actually have a good example in my GitHub just clone. I just recently in one of in my first live stream I refactored the create a gist form because
in in a future in a very near episode I haven't recorded it yet but I'm going to be we need to be able to edit the gist clone and why would I rebuild the create gist form when we can use all those features again and it holds it's it holds you know the gist state and all of that good stuff. So that's a good example of that. And then I would say as far as like function components, it would just kind of be. Views that you. Reuse everywhere that it's more UI related than you know, not a
live view. It doesn't need state or any more functionality than just presenting data, right? Yeah, yeah. And I think the docs do say something to the effect of. You know, you should prefer to use functional components as much as possible because they're easier to compose functionality with. They don't have any state to think about. And I have said on Twitter and elsewhere that like you should honestly just try to avoid live components as much as you can.
Because I think it's easy to just kind of make build spaghetti with them, because they suffer from the same thing that like React components have that in React world they call prop drilling where you need to pass state down to them. Live components suffer from the same thing. As soon as you are building something with live with live view and live components for every piece of state, you need
to ask yourself do I want the live component to own this or do I want the live view to own this? And depending on which decision you make, you will face a different set of problems. Neither one of them is the right answer all the time. If you put the state in the live component, well then if the live view, parent live view needs to know about it that somehow you need to communicate that information back up. And if you put it in the live view, then you have to do a lot of this, you know, prop drilling
kind of thing where you're constantly passing like a lot of information back down. So they're very hard. There's a very hard, like state management problem there, which is not easy to solve. And it can be easy to kind of end up with spaghetti. Yeah. And to. Go off of that. Like the more spaghetti that you create, it's harder for other developers to jump into your project too, because you can kind of make a nightmare of coding components that just kind
of make debugging and tracking things down difficult, right? Yeah, some. Old live components can be very hard that someone else has written to jump into and really make sense of, yeah. I I'm not a big fan of making them too often. I I feel like in the gist clone it's a good use case and I still don't like to overuse them because I've had questions like why don't you break things up
into live components more and it complicates things. I'm also that person that likes my Higgs templates in a separate file and I know a lot of people don't like that, but I like think like I like my separation of code and I don't know how do you feel about that? Do you like everything in your live view dot EX as in the render function if my render function is very small. I'll keep it in. My live view file, but if it's a normal page that gets its own
file. Yeah. That's basically how I treat it. It just depends. If it's just like a tiny little thing, then then yeah, and you know, one of the ways to. I've been one of the patterns that I use a lot with using live components and everything. That does make a lot of sense and won't really end up with spaghetti is if you have like regular Restful kind of routes
for something. Like you have a a new page to make something and then edit page and an index page or whatever to have like a live view for each one of those and then a live component for the form. That usually works out really good and I think the generators do that same thing and it makes it generally works out fine. The thing that gets trickier is when you're building like actual
like what you would think of as like React component kind of things like a type ahead or a drop down. Those things start to get really tricky to write in a way that's composable with. Live components. Yeah, I agree with that. All right, let's see here. We got a lot of people chatting. You're a popular guy, Andrew. Oh and go ahead, sorry, I was just going to say the other
addendum to that is live render the same exact problem, but 10 times worse. If you start to like compose functionality with more than one live view on the page, you are going into the pain realm and it's really really bad and no one should ever do that. Can you explain? That a little more, I don't know if I understand it well live. Component. I don't remember when it got added, but it wasn't always in live view.
And especially if you look at like earlier material on live view from some of the early versions like guides and stuff like that. You do see where people were making websites that had like one live view that did like the navigation bar and one live view that did the sidebar and they used live render to render them into a dead view. You would see that kind of thing sometimes.
And it's just a mess. Like if you inherit, working on a project that has any of that, the message passing to and from those things is just. Oh, I see. Yeah, that would be messy, yeah. But also, does anyone ever enjoy inheriting code? I think you'll always talk straight about code that you inherit, like everyone is always an idiot before you got there, right? That's very true, but. That's funny, we have Daniel
Berg, he said. He lives in Brazil and sometimes Live View experience is not super fast and that's because the the server's getting hit too much. Yeah, exactly. It's so noticeable and if you're making like a drop down or something and it's it has to go all the way to the server to open, it will feel awful. Like 100 times out of 100. It may feel OK when you're working on it, but it's never going to feel right. Yeah, you got to. Add that latency to it that.
'D be a good idea. Yeah, probably be good for more people to just leave that on I I. Used to work for a start up where I was just an iOS developer, but it was basically it's like a music streaming app and it works great on good Internet And we had the craziest bugs when low latency became an issue to the point where I constantly kept like a latency filter on my computer just on. So I was always developing in a crappy Internet environment
because we had to make sure our app worked and buffered properly for, you know, crappy bandwidth. That's really interesting. Yeah, I do have a big interest in like web performance. There's like a whole nother realm that's kind of more relevant to like the front end world because they've got apps with a MB of JavaScript and so they really need to care about the performance of loading all those assets.
But there's such a deep like knowledge that you can learn there of like literally like the most minute stuff of like what order to put stuff in your head tag. There's that's literally a thing of like what is the right order to do that in can make a slight difference in web performance. And every company I've ever worked for has not been like an e-commerce site like eBay or something where they really have
metrics on this and a couple milliseconds here or there means like real money to them. Every place I've worked at has had like a more or less captive audience of people that are going to use the app for one reason or another. And yeah, I mean, to me a little bit of performance increases a big deal, but it's kind of hard to sell that to, you know, non-technical people like why? Why should we stop everything
and make the app load 50 milliseconds faster? It goes into all. The the memes of like the ignored back end developer, they're like you know, what have you done? Well, I increased this endpoint to you know make it more responsive by like 20 milliseconds. No one cares. And then the front end guys like I made this button red and they they get all the love and attention. Yeah, I haven't. Seen a whole lot of people talking about performance in Live View and I think I'll it's
kind of an unknown waters like the performance characteristics of multi page apps and single page apps is pretty well known how to optimize those two things and Live View is like a weird amalgamation of both. So I don't think there is a really good understanding out there right now of how to optimize Live View apps. And probably also because it's pretty new and I don't know of like a giant website that uses
it. I feel like the biggest one I could think of would be like cars.com, you know, they use Live view. See, I didn't. I didn't even know. That that's kind of cool to know. Yeah, they do so. But as it becomes more popular, maybe we'll learn more about what are the common performance problems, and especially as more frameworks copy the live view model, yeah. It'll be interesting I. I so I.
Love the server side rendering with live view right? But I also think that makes it difficult because a lot of people want performance web apps and it makes like caching and dealing with, you know, offline support very difficult. And I don't think there's a good solution for that with Live View, at least that I know of right now either. That it, that's that's a very good point. Yeah, caching basically dead on arrival. If you want to do that at the level of the browser, it's not
going to happen. But on the other hand, Graph QL is wildly popular and that also has basically 0 caching, so that's true. But. Depending on what you're using right? Like if you're using view for instance, you can still cache things even using Graph QL. You would just have to have another service that holds your data like yeah, Realm or something like that. I think Realm is. This is like. A totally wild speculation
territory, but I've always wondered if it would be possible for someone to build something that takes advantage of service workers to make something like live view function offline. I feel like it would probably be possible, but you'd have to have a very good knowledge of live view to do it. So yeah, like this is where I. Would be like, no, I'm not smart enough, but I hope someone does that because that would be pretty cool. I think it would be. Possible. I mean, you know, I at least I
think it is. I I don't know a whole lot about how service workers interact with the with web sockets, but I think they can play messages over the socket. I I don't know. I know that live view can fall back to the long polling, so if it did that you can definitely like hijack http://requests with service workers. So maybe that would be a way to do it, I don't know. Now I'm going to. Go on this rabbit hole of
looking into this stuff. I'm sure someone out. There is thinking about it for sure. Thank you for making. This stream in this channel, You're welcome, Felix. It's been fun. The the best part about like, and I'm sure you're learning this, Andrew 'cause you have a YouTube channel as well and guys go subscribe 'cause he actually makes really good content. Thank you. The level of understanding. When you go to regurgitate something you already know, you
realize you have to learn it. So much better just to teach it and. I found myself having to reteach myself just so I know how to communicate it, Yes. Yeah, I think that was like I had been writing a little bit of like, blog stuff for a while, but not like a lot of learning materials. And when I started my YouTube channel, I think that was the most interesting thing was once
I started trying to think about how to really explain some of these things to someone that's getting started, you realize that you literally cannot explain everything in one go. Not because it's impossible. Like you could make a several hour video and just talk about every detail of everything, I guess, but it won't be effective because there's only a certain amount of attention you can keep to one thing.
And so you need to pick and choose what you're going to talk about and what you're going to leave unsaid and trust that either the audience already knows or they are capable of finding it out on their own. And that's really challenging knowing what that boundary is I have found. Going over 20 minutes is not ideal and interesting. And it's really. Easy to hit that 20 minute mark. Like a lot of my videos go over 20 minutes. I just find that I get the most like interaction and comments
and everyone loves the 10 to 20 minute videos. But it's so hard to get a point across in 20 minutes you don't realize until you start recording. Like, wow, This little chunk of text that I wanted to go over just took me 10 minutes to talk about. See. I wanna hit that. 4000 watch hours, though, so you'll you'll get there. How long have? When did you start your channel? It's only been in. December. So this been super long this last December.
Oh yeah, you'll be good. Dude, I think I hit my 4000 watch hours at like a year. I think a year. Almost a year exactly, which was pretty cool. Yeah, I didn't realize how. Much slower that grows then just it's. Subscribers. Yeah. You'll you'll hit your subscribers probably before the watch hours, but you'll get there 'cause you got you have good content, man, and you explain things well. I think that's. Where a lot a lot of people struggle at explaining difficult
subjects. Yeah. The the Elixir community as a whole is really amazing. Like, I I don't know, I was really just surprised how just welcoming people are and. You know, like. I had used Twitter for a while before making any content, Not for very long but and I was really amazed, like how quickly
people wanted to actually interact with it on online. I just kind of assumed that you'd put it out there and like you would get no interaction for months and months and months. But no, I agree the. Elixir Community is awesome and I don't want to like curse myself, but the amount of like positivity behind everything is awesome too. Like, I get yeah, I get a lot more love than hate, and that's pretty awesome. Yeah, I it is amazing.
I I'm always surprised seeing any comment on YouTube that's positive because I feel like my brain is just conditioned to think that everyone trolls. Trolls and haters, right? Yeah. Exactly. But, but actually, it's like, yeah, overwhelmingly positive all the time. And it's just really surprising, I guess. Maybe I don't have enough faith in people, I don't know. But yeah, that's funny. No, I feel the same way, but it's it's nice, it's kind of,
it's refreshing I guess like with that being said, we can, we can wrap this up. It was awesome meeting you and I know we've been chatting quite a bit. We we chat on Twitter quite a bit, but it's awesome, you know, having a conversation with you and I I love my new live streams with guests because I'm going to, I have been meeting tons of awesome people and I'm going to just keep this going and it's been fun and maybe we'll be able to have you back on.
And yeah, and I know we were talking about my Gist clone a little bit and when it turns into an open source project, you have a lot of awesome ideas with that as well. So yeah, that is a really cool. Series. Yeah, so. I'm sure we'll bring you back and talk about turning it into an open source project when I get a little closer. Awesome. I. Love it? Yeah, let's. See, Mike Wilson Would love to see more advanced Live View content. Kind of sick of seeing the same Twitter button counters, dude.
I agree. That's why I'm I went with the Gist clone like I thought that was a fun project and I can hit on a lot of things with that, you know? Yeah, you know. I I haven't actually. I never looked at the the pragmatic studio guide or whatever. Everyone says that it's really good, but I never looked at it when learning Live View. And I had looked at it a little bit recently just to get a feel
for what people like, I guess. And I was kind of surprised that it it too kind of starts pretty early on with the example of like a light switch or something like that, like a bit of state like that. And it's kind of like the opposite of pragmatic like the the real thing you're doing 90% of the time is forms. So that's it's kind of boring I guess. But that if you want to know how to make an app with Live View, that is kind of the thing you need to know. Yeah, I.
I think they they make a lot of really good content for sure. And I think they probably started that 'cause, you know, creating buttons and whatever it is, is a lot flashier and more satisfying right out of the gate. And maybe it's maybe it's the responsiveness, the reactiveness and they can just teach how like how you handle an event and things like that, but. It is, yeah. They do have a. Lot of good content and yeah, I definitely appreciate people like that just with like their
publishing company and then the courses that they put out. Yeah, I'd be interested in. Purchasing the paid 1 cause I've only seen the free materials but. Yeah, I I went through like right when Phoenix 1.7. 1.7 right? But yeah, right when that was released I got their like updated course and it's it's
pretty good. I thought it was pretty bad. Check it out. Yeah. It's. It's real hard right now. If you want to make like a comprehensive thing like a course or a book. I mean, you can't really do it right now until Live View is at one point. OI mean it's changed so much over the last year. It's a totally Yeah, you'd be screwed. Everything you would write would be out of date. So I'm. Sure, a lot of. People. Yeah, I'm sure a lot of people
are waiting for one point O to really dig into more learning material in the form of like a book or that kind of thing. Yeah, I'm sure. Well, like currently I'm building an Elixir course and that is kind of why I'm staying away from live view right now, but just like. Building A. Comprehensive like introductory course is very hard and I actually just recorded. I'll be releasing Gen. A Gen. server video today and
the A supervisor video today to my course. So that's exciting. Yeah, that. Would be. That would be some cool stuff to do, some content about. Genservers are a lot of fun. There's a lot of power behind them. That's another one. Too where I will say I think there's like a tendency to I have seen people like. Try to. Solve problems with OTP that
maybe they shouldn't like. Maybe there's a better solution you can definitely. You can definitely overuse it, and you know, get you can pretty much F up your your your statefulness really easily if you're trying to hold. If you're trying to have too many things communicate with a single stateful process, right that. Is the problem. Yeah, you could probably write a whole book about architecting Gen. servers for web applications. But there's so many things that
like for instance if you want to send emails or something or you know, storing some kind of notification state or something like that. You could like say you want to like deliver them later and you need to have them go out at a certain time. I've seen people solve this problem by having a Gen. server that that holds the state of all the messages or the emails or the text messages that need to go out. But there's a lot that can go
wrong there, like you need to worry about handling it crashing. Well, yeah, if your. Process crashes, you lose your queue. Yeah, unless. Unless you're using a database to also track, I don't know. There's a lot of things you can do. Yeah, I. That's another thing I've been wanting to make some kind of content about TOO is like recovering from those crashes, particularly as it pertains to multi like clustered Elixir like
multi node Phoenix deployments. I'm really surprised how many people don't do it because the company that I worked at, where I first used Elixir, we had everything, Kubernetes was everything. So from day one all everything Phoenix we did was deployed in a in a cluster and so we didn't have the luxury of writing Gen. servers that didn't work in a cluster. Like, you know, I think it's hard to. Get that out. It's hard to. Find content on like distributed
systems and like on a production level. It's not easy and I'm like eventually I'd like to make content on it too, but I have a lot to learn myself. But it's a really. Hard. Problem. Yeah, it is 'cause there's just so many things you can do to recover from those crashes. There's so many ways you can store state there's you have like an infinite amount of options. So yeah, it's hard to have like a comprehensive guide on this is
what you should do, but right? Yeah. But I mean, I think any content on the subject would be beneficial just because there's not a lot out there. Yeah. Yeah, I don't know. I was just going to say I think the alternative there is if you, if you happen to be architecting something like that, don't be afraid to just put the state in something like Redis or a database, you know? Yep. Yeah, it doesn't have. To go in OTPI built just.
Some like a basically public tooling for my dev shop, my own company. But I have an API with common tools that I use for like in house projects and I use Redis for. Now I'm going blank. On the word but basically. Tracking Dude I hit. Why does my brain have to stop working on a on a live stream,
but when you? When someone's hitting an. Endpoint too many times and you want to cut them off. What is the word I'm looking for? Oh, Ray limiting. Yeah, so I. Use Dreadis for a rate limiting system and it it works amazing. What did did you use the? Library for it? Or did you just write it by hand I. Wrote it by hand. I spun up basically just a Redis instance in a docker container and then I looked at some
examples and just ended up writing my own rate limiting software or script. Yeah. I think I saw one called Hammer that had like a bunch of like backends that you could plug in or out. Like there was one that was I think ETS based. There's one that was Amnesia based, There's one that was Redis. OK. But it like worked. At the plug level, yeah, I was gonna say. I wrote my own plug and just
threw it in and so it rate. It rate limits all my routes, which is nice, and then I can whitelist like my IP address if I want to. Speaking of which, that would. Be another interesting thing to put more content out about would be like ETS and amnesia. How to use that more? Although that is one thing that I never really have messed around with a whole lot because I guess I've just always felt
like if I needed that, especially Amnesia, because I guess I personally probably wouldn't use ETSA whole lot. Not saying that you can't use it, but because it's hard to work in a cluster and you have to kind of use Amnesia, I've just always looked at it as like well, if I was ever going to want Amnesia, I'm just going to use Redis. But maybe I should learn Amnesia more to try to. I don't know. I yeah, I. Wish I wish I knew more about it to contribute to this
conversation. But yeah, I don't really know that much. I know I know what like what ETS is. I actually plan to learn how to like I I want to in my Elixir course I'm building out. An analytic. Server and I'm trying to integrate as much of that, like as much of as many concepts as possible into the final project so people see real world applications of all this stuff instead of just like yeah, you
learn that like you know you have your stateful Gen. server and it can process a queue of messages at you know you can hammer it with 1000 new messages and it goes through as fast as it can and does that. Like great, but give me a real example of that which would be like an analytics endpoint getting hit from a website because now you can have thousands of hits coming into your your processes. Did you use? Plausible for that?
Or is it just all written by hand? I'm. A. So for my course it's Plausible gave me the idea, and I actually use Plausible for my HG as websites for analytics. It's great. Open source project, highly recommend, but that's what gave me the idea of I'm I'm going to build a very like simplified version of Plausible for the project, but it like teaches you how you can, you know, have a JavaScript script hit your endpoints, all from just, you
know your live session on a website. And it's it's going to be a lot of fun. Now are you? Using Postgres for that, Or yeah, it'll be. Postgres. Because plausible. Uses click house for querying and indexing and everything. Which I've always been interested. In, but I've I haven't messed around with Click House very much. I haven't, dude. I I wish I had four times the amount of time in a day, but then I would, I probably still
wouldn't have time to do things. Yeah, I mean. I know you can. I know Postgres can handle the scale of like an analytics tool. I think the like I said, I'm not a click house expert, but I think the reason they use it is it's got more indexing ability and you can just query stuff about the data better than you can in Postgres. Oh, OK, I think. Like for.
As far as my examples going, it's going to be fine, like it's going to be a very small version of a large analytic server, right? But it will give a lot of. Principles that you. Need to actually build a more robust system, you know. Yeah, I I've been wanting. To build something kind of like a like a developer tool for Phoenix for like user tracking in like your own app.
Like I don't know if you've ever seen these services like replay dot IO or a couple other ones like that. They call them like real user monitoring and it's like instead of just knowing what pages got visited, it's like an actual thing that's running and tracking like what the user clicked on. And down to that level of granularity, which I guess can maybe be a little ethically
Gray. But I feel like if you are not selling that and you are doing that in your app and not giving it out to some third party that they never agreed to feel like it's kind of like, yeah, what's? Funny is, so I have a podcast called Big App Energy and we talk about ethics and software all the time where you just have to, if you're using third party analytic software, you have to be well aware of what's being collected and you need to, you know, be transparent about that.
But then also if you're only using it for in house, just be responsible with how you store their data. So if you ever get hacked or information gets leaked, you're not losing, you know, sensitive customer data, but you definitely need to collect things like that just to improve UX experience across the board to actually build a good product, right. So the way people use your app is usually a lot different than the way you designed your app. Yeah, exactly. And I like, I wish I was a
lawyer and knew exactly how to comply with everything. But I mean, I try. I do my best to learn how to comply with, like, GDPR and everything. That's what lawyers. Are for, yeah, I guess that's. True but. It but it is the big. Burden. If you want to get into like the indie hacker thing and like, launch your own SAS apps, it's really kind of terrifying to think that you're gonna run
afoul of some regulatory body. Yeah, you got to be careful. It's definitely an eye opener. You can't just build whatever you want without thinking things through. Mike Wilson said that Plausible started out on Postgres but migrated to Click House because Postgres couldn't keep up. It's good to know I. Would love to. I'd love to know what the bottlenecks were. Yeah, I. I would, well, I would like to know 'cause I think, I mean, I think you can shove as much data
in either one, but I I think it's something about doing queries on Click house again. Like. Yeah, like giant sets of data. I think is easier for some reason, and I thought that's. Like, isn't that where relational databases shine? Or like SQL in general? Yeah, I don't know. I really. Need to learn more about Click House. I only know enough. To do what I do, honestly. So what I was I was going to. Say I the whole thing with the
like user real user monitoring thing. I saw a talk, I think it was at the last elixir conf. I don't know, I saw clips of it online I feel like. Or maybe it was the one in Europe that just happened, or someone was showing off something similar where they had like the live view thing where they're using presents to show all the cursors on the page of everyone else and they like Mike. Actually in the comments just
said at a previous company, they literally would replay their session. Helpful, but kind of. Wild that a user can be tracked like that, yeah? That is kind of scary. Yeah, well, I mean, if. You're using like Sentry. Sentry has a real user monitoring component built in, so it is tracking all your users. If you're using that, yeah, that's wild. I think you got to pay. For it but. Do either of you?
Happen to know what the general Elixir Phoenix job market looks like in Europe versus USI have no idea. Honestly, it's a hard market to be in right now, that's for sure in. Europe, yeah, I have no, I mean I have no idea about Europe. I can tell you it's not very good in the States right now. So I would imagine it's probably similar, but maybe not. I don't know. I mean I think here it's mainly driven by the interest rates have just dried up tech investment.
So maybe that's not the case in Europe, I don't know. The tech space is. Not a comfortable one right now. Yeah, it's not. Very good right now. But I guess the flip side of that is it's, I mean we are seeing like a contraction bigger than any other part of the economy right now. Like all there's these big tech layoffs that are happening. They're not happening in any other industry. There's no other industry right now that's laying off thousands of people.
It's only tech. So in that respect it is kind of uniquely bad. But I think there is like fundamental thing there too of like there's worse things to there's worse industries to be in right now. From the long term outlook, I would still rather be a programmer in 2024 than any than anything else. It's fun. I. Enjoy it because you you each day is never the same. That's true. You get to.
Solve new problems all the time, right? Yeah, and. You get to, yeah, you get to solve new problems. And I really like, I really enjoy working at companies where there's a lot of like ownership over the product and the processes. I think a lot of companies try to foster that. But it's it's hard, you know, but if you can get. Yeah, if you can get. Developers that really just know
almost what needs to happen before you have to tell them. That's where you really unlock like real efficiency, I think. Yeah, I agree. If you can, give your developers some freedom and that's actually how you build a good engineering team as well as just let them manage their own project, be their own cost. Yeah, exactly. Not everyone. Is capable of doing that either? Because I've I've met people that are from both sides where
you have to delegate and micromanage everything they do and always tell them what to do next. And then there's people that will just take the ball and run. I mean, yeah. It is really interesting Speaking of the job market because we we've been hiring at at my company for a while and you would think with the amount of layoffs we have had, you would just get like a tremendous increase in like the kind of like resumes you get and everything. But it's the exact same, it's
just more so it's just a lot of resumes and it's still really hard to find people with multiple years of Elixir experience. It's still just a really small industry and but you are just competing with way more people, you know? Yep. Yeah, for sure as of right now. All right. Well, I think we should wrap this thing up. It's been fun. If there's any plugs that you
want to give, like your Twitter handle, your YouTube channel, share them right now my. Yeah, my YouTube SRC dot RIP is my Twitter. If you go to SRC dot RIP it'll take you to my Twitter and my YouTube channel is at SRCRIP and I'll put it in the chat. And yeah, I think that's about it. I am working on like free
YouTube content right now but I'm hoping in 2024 to branch out into some paid courses. And also what I'm working on is a like a paid live view component library that I don't have a whole lot to show of yet but I'm hoping to since I have a big front end. I'm a big front end aficionado. I'm hoping to produce something that's like of the caliber of
what they have and react in live view I think that would be. Awesome man, keep everyone posted. Follow this guy, he puts out good content. And for everyone that joined us and watched today, thank you so much and we will we'll see you in the next one. Testing.
Francesco Cesarini, founder of Erlang Solutions, and Allen Wyma, hosts of BEAM There, Done That, join Jacob for a live crossover of both podcasts. They trade origin stories, compare what the Erlang and Elixir...
Jason Cohen, founder of WP Engine and Smart Bear, joins Jacob to talk about his new book Hidden Multipliers. They dig into why engineers avoid marketing, the onboarding math behind SaaS trials, finding your ideal...
Filipe Cabaço, team lead on Realtime at Supabase, returns after two years to talk about his side projects: Vitro, a browser for every AI agent with a replayable timeline of what each one did, and Ampoule, which packs an...
Peter Ullrich returns to talk about Pushin.eu, the European GitHub alternative he's building in Elixir. Five months in, it has about 700 confirmed registrations after going viral on Hacker News, and Peter walks through...
Nathan Hessler, organizer of ExMex and RBQ Conf, is back four weeks out from ExMex 2026 in Austin. We cover MCing Rails World, how he picks speakers and keynotes for a single track, what running a Ruby conference taught...