Embracing Erlang with Todd Resudek - EMx 268

In this episode of Elixir Mix, we talk with Todd Resudeck about how digging into Erlang empowers you as an Elixir developer, what’s so fun about Nerves and what makes him such a charming and hilarious conference speaker.

Hosted by:

Show Notes

In this episode of Elixir Mix, we talk with Todd Resudeck about how digging into Erlang empowers you as an Elixir developer, what’s so fun about Nerves and what makes him such a charming and hilarious conference speaker.

Links


Picks

Transcript


Hello, everyone, and welcome to today's episode of Elixir Mix. I am one of our hosts for today, Sophie DiBenedetto. We also have here with us Bruce Tate. Hi, everybody. We have Lars Vicman.

Hello. We've got Alex Kupman. Howdy. Howdy. And Josh Adams.

Hey there. And today, we have joining us as a very special guest, Todd Residec. And got a couple of fun interesting things here to talk about, including some of the writing that Todd has been doing as well as his, I believe, last year's talk at Elistr Con entitled It's Time to Embrace Erlang. So welcome, Todd. Thank you.

Thank you for having me. Yeah. No problem. Happy that you could join us. How are you doing?

I'm doing well. Hanging in there. Turns out my lifestyle was mostly staying at home before, so not too different different for me. Yeah. I think that probably resonates with a lot of us, especially any of us who were already working at home.

Some things are very different, and a lot of things really are not. So, Todd, do you wanna maybe kick us off just by introducing yourself a little bit and telling us maybe about what your involvement with the Elixir community is? Sure. Thanks. So you said my name, Todd Resadec, and I work for a company called SimpleBet, where our mission is to power the future of fan engagement, which is a nice way of saying we, allow you to bet on sorts in a very unique way.

And I'd say probably my most active work in the Elixir community is on HEX. So I'm one of the 3, I guess, maintainers of HEX, and I mainly work on the the CLI and the API side of things. And, otherwise, you maybe have seen me talk at conferences about random things. Yeah. Speaking of the conferences, Todd, we were stalking each other for a little while.

What do we have? Like, 3 or 4, maybe even more conferences back to back that that we both had? Yeah. I'm trying to think. I mean, certainly, over the last over, like from elixir comp last year up until the, COVID thing hit this year, we were at maybe 5 out of the 6 conferences together.

But, yeah, this year started off with a bang, and, you know, we had 3 elixir conferences all in, like, February and the 1st week of March. And I think you and I were the only people that were speakers at all three of those, which probably says something about us being really dumb. Right. So I don't know if you gave the same talk at all 3. I think you did the same at 2 of them and then a different one, and then then you got roped into a second talk at Code Beam.

Right. So the the Code Beam was interesting because I was able to use a technique that I've thought about for a long time. So I did a fishbowl where one of the seats was empty, and then I prepopulated the audience with a couple of questions. But I wanted to basically make a point without making any statements. I wanted to just ask pure questions and have the audience make my point for me.

So it was a lot of fun, and and that was a wild conference being right before the pandemic. Yeah. That talk was at the same time as my talk at CodeBeam, so I didn't get to see it. But everybody that I was talking to that was considering going to my talk, I told them, probably go to Bruce's. It's gonna be kind of a once in a lifetime opportunity, and you could just watch mine on video later.

Yeah. So I I wanted to ask you. 1 of I haven't really seen you give talks beyond the, you know, the sprinkle was it the sprinkle 2,000? I don't know. Whisper.

Drizzle 2,000. Drizzle. And but you gave a talk on at the at the LA impacts elixir about embracing Erlang. And one of the things that was gonna ask you was how does knowing Erlang make you a better elixir developer? Yeah.

I think so. Let me rewind, I guess, a little bit. So the the reason I came around to that thinking was, like, when I first started Elixir, it was sort of told to me that that this is a solution to the problem of Erlang syntax. And so I just took that for granted because I heard it from so many people. But as I, like, have been working full time in it, over the past couple of few years, I've met people that have come in from the Erlang side.

And so, like, a lot of a lot of the people that we work with come over from Ruby or or JavaScript, for instance. But you every once in a while, you get that Erlanger that comes over to Elixir. And so getting to know those people, I started to just see how they they think about things a little bit differently and certainly have a lot more history with, like, how how the functional programming works and just how Beam works, I guess, in general. So I would say, first of all, like, you should learn how the Beam works, which is a big part of OTP. Right?

So even if you're never gonna write Erlang, you should understand how the virtual machine works. But I think knowing a little bit of Erlang knows when helps you know when to, drop into Erlang syntax to make things easier. So there's a few things, I think, that just never got moved over to Elixir syntax that only exist in Erlang right now. At least, like, it's standard library wise. There might be libraries that do them on hex.

But one of them that I think is really cool is the queue the queue library, I guess, if it's built into OTP, which is like a FIFO queue that exists. That there's just nothing like that in Elixir, and it's also reversible. And almost everything you do on it is in constant time. So I think of, like, how many times you might make a wanna make a FIFO queue or a LIFO queue and, like, how you might try to figure out how to implement that in Elixir, whereas, like, if you just do colon q, everything's right there at your disposal. So knowing, like, knowing all the things that are in the standard library means knowing everything that's in Elixir standard library as well as knowing what's in Erlang standard library since you have access to that in your Elixir programs.

Yeah. Definitely give them a thumbs up. I've used the, the queue library a bunch of times for especially if you need to do any kind of, like, rate limiting. If you set up a simple gen server that your gen server receives things, and let's say, you know, you're you've you've reached your rate limit, throw it on the queue. I'll generally also keep a, like, a counter of how big the queue is because I think that's an o of n operation on on queue.

If you keep the count of the queue, the queue size in your gen server state, then it's it's super inexpensive. But, yeah, definitely definitely reached for that a lot of times. And I think what you said about, you know, if you're working with Alexa, whether or not you want to ride Erlang or write Erlang, you should know how the beam works. And I think I probably spent the first, like, 2 years of my life as an Elixir programmer just saying things like, oh, yeah. Elixir is syntactic trigger for Erlang, or, oh, yeah.

Elixir is great at concurrency. Without really knowing certainly what concurrency even really means and how it operates on the beam and finally taking a step back, actually, around the time that I and some coworkers were doing a book club with Bruce's book, designing Elixir with OTP. And I finally started thinking, like, you know what? Maybe I should dig a little bit deeper and actually understand, you know, what's going on under the hood and and what it really means when I sort of go around these, like, very buzzy phrases about Elixir. And I read through used a couple of resources.

I read through some of the Erlang on, you know, the Beam's concurrency model. And then I actually read through just kind of googling around different things about kind of the history of this concurrency model and the different phases that it went through in terms of its development. And it really just kinda blew my mind. And I wouldn't say that it enabled me to do things in Elixir that I wasn't able to do before, but just actually having this foundation and understanding how this worked. I think it absolutely made me a better programmer and a better Elixir developer, and I ended up writing a blog post about it just to kind of, like, put it all together in my own head.

And it was actually some of the most fun I've had doing technical writing to finally be able to put these building blocks together. Yeah. I think, like you said, I I think what you were saying is, like, building this mental model that's more that's that's less superficial, I guess, than what you maybe get at a lot of elixir like, from a lot of elixir resources is important. So I think there's, like, Sasha Jurich gave a talk that's really, really good about sort of explaining all the way from beginning to end how Erlang and Elixir works together. So I probably recommend looking that up if that's something that's interesting you.

Yeah. I was gonna bring up that same, confidence talk. I think it's the soul of Erlang and Elixir. That is, I think, the best, like, 40 minutes you could spend to get ramped up on what what exactly the beam is and what the value proposition is. Yeah.

And if you watch it at 2 x, it's only 20 minutes. I I don't know. I mean, can you can you catch what Sasha is saying in, you know, 2 x speed? I think you usually have to go, like, half speed to really digest everything that that Sasha gives you. That's a good point.

So what are some of the other excellent talks that you've seen that can introduce people, Elixir developers, to more Erlang? Well, I think you'd be remiss not to start out with Erlang the movie because that's where it all began. So if you haven't watched that yet, you should watch Earling the movie. You can skip the sequel if you want. Sasha's talk.

I think one that one that got me really excited was well, a couple, I guess, were talks that Miriam Pena has given. So she she gave it at elixirconf last year called Beam Extreme. She also did it at MPEX LA that I know of. That's where I saw it first. And it's all about her work at NextRoll, which is all primarily Erling and just to see how Erling runs at orders of magnitude beyond what most of us will ever work on.

It's just absolutely insane. And she's one of those people that has been working at Erling forever. Not to make any comments on her age. I don't mean that. I mean, like, she's just been working on Erlang for a really long time, I think for, like, probably close to 20 years.

And it's just like she's so many levels ahead of where I am right now. Oh, yeah. One other one I wanted to bring up was I think that it's really, really exciting, and it's more of a about distributed systems than Erlang specifically, but it is Erlang is Christopher Micklejohn's talk at CodeBeam last year on partisan. And that that, I think, is in the same vein as Miriam's talks where it's like, if you what what happens if you wanna go to the next level, I guess, on distributed programming? And I don't know if this was his his dissertation or just a side project that he's been working on, but it it's a really, really cool project.

Kinda continuing on the theme of Erlang goodies. What kinds of Erlang and OTP goodies do you wish more Alexa developers knew about and and leverage in their day to day work? Yeah. I don't I'm not necessarily dogmatic about it, I guess. I think a lot of what exists in Erlang also exists in Elixir.

I would just say my point, I guess, to that talk was, a, to not be scared of Erlang. Like, I think, at least from my experience, was that, like, oh, this is something that exists in Erlang. Okay. Well, let me try to find an Elixir library or a wrapper for that. So I'm using, like, more Elixir type syntax for things.

And I think more than anything else, that's kind of the point that I wanted to get across was that, like, you don't need to bring in a dependency to do the queues for you or the digraphs for you or complex math. You should just learn to read Erlang documentation and get away with the one line of code rather than bringing in a dependency and having 5 lines code. Yeah. And the Erlang manual generally is extremely well written, and there's, like, multiple aspects to it. There's, like, the operating side versus the large overview side, and it's just fun to read, honestly.

You're a unique individual, Josh. Yeah. Maybe. Yeah. I found all kinds of cool stuff.

That was how I found out that WX was involved or included out of the box, and I had a lot of fun with that. And that was where I found out, like, the SSH module, which is just silly and cool. Yeah. No. I agree.

I think it is really, really interesting, and I think think it'd be great to sit down with Robert, like, get the whole story on why some of these things exist in there. I know there's a story why WX was included in OTD, like a specific solution they had at Ericsson that they needed to solve. And when I think about the digraph module, I have to assume it has something to do with cell phone towers and figuring out routes to different switches, like, on the network for that. I wanna hear that story. That's a great point.

Yeah. So I think you're right. I think Elixir documentation looks so good, and it kinda spoils us for other documentation. But I think you compare Erlang's docs to Ruby docs or Java docs or Go, heaven forbid, docs. Like, Erlang docs are just they're basically the same as everything else except for Elixir.

That's my opinion, I guess. But, also, one, one OTP goodie I wanted to mention was J interface because I've used that in production a ton, and it's just a very convenient way to get Java to talk to Erlang. And you can run it on Android if you're squirrely. I was like, I do like the fact that sometimes the Erlang docs do read more of, like, a story. When I was writing my, amnesia blog post, I did find myself digging through a lot of the amnesia doc, and I did read very much like a book as opposed to, like, documentation.

So they would go and say, we made these trade offs because of x y z. You know, it's not a good case for this particular use case, so either one is this. And it it does read very uniquely compared to other documentation that I've read. Yeah. I think that's interesting.

Right? A lot of programming languages are designed for, like, serving a theoretical purpose. Like, what if this elixir or what if this programming language worked in such a way or if it had these characteristics? But I think there's a lot of artifacts in OTP or maybe even most of OTP is an artifact of the work at Ericsson, like, what they needed to fulfill at Ericsson. Right?

So it's like, that's probably easier to tell a story when if you trace this back to whatever the version of project management tools they were using in 1985 was like, yeah. We built Amnesia for this epic, you know, on our Jira board, and so this was the problem that it was solving for us. So maybe it lends itself more to telling stories because there really actually is a story, not just some fictitious theoretical that you're making up. Yeah. My my main takeaway from, that talk was also that there's a community aspect to it.

And that if we speak of Erlang as the old thing that Elixir fixes, there's a lot of people that enjoy Erlang that will take reasonable offense to that. And it's not a good way to build a community. And I think we should value Erlang a lot for what it is, for what OTP is, and for what it brings us. And I think most newer languages, and Elixir is a newish language, don't have a history. Elixir has a very compelling story because of Erlang.

Elixir is a nice language. The syntax, I find more approachable than Erlang because I'm definitely from nonfunctional background. And but the story of why why is the beam reliable? Why is it a compelling story that we now have a slightly more, I dare say, modern approach to programming, slightly more modern tools, more convenient way of using this very same technology? Elixir doesn't change Erlang or doesn't change the Beam at the very least.

So the thing that does make Elixir compelling is the strong history of Erlang and the Beam. And I think when we dismiss Erlang because of its syntax, we also risk dismissing the history and the people that built that history with us, for us. And I think it's a strength of the community. And I think mostly the community has moved past that. Yeah.

I think that one of the cool things about following languages like Erlang and Elixir and being able to kind of play them, use them for what they were intended to do is you get to see what something was about and kinda reminds me of a couple of stories. One, one of the things that I get to do with Groxio is explore new languages. So about half the time, we're working in Elixir to kind of have a deep dive into new things that are going on there. And about half the time, we're introducing new languages. And one of the new languages that I got to explore was one called Pony.

And this is kind of this wild c plus plus like language written by a man named Sylvain Klevich. And the the main quote that I remember from from Sylvain was that languages should be about more than syntax. It should be about more than just doing something that you can do with another body. It's not enough if you intend to move a whole community from something to something similar. It's not enough just to touch on a few elements of syntax.

And the second thing is that I was fortunate to be around Jose when he talked he gave a talk, might have been 2013 or 2014. I think it was in San Francisco at a users group, and the talk was called what Elixir is about. And he specifically mentioned syntax as something that it was not about. He talked about the abstractions that we could layer on top. The idea that if you had the syntax tree and the macro system, we could build the language in itself.

The idea that if you had protocols, then you could have something with streams and list and you could have a common library that was enumerable. But these things about what a core language is about just go all the way back to our DNA. And I think that embracing Erlang helps you understand a core part of the history of Elixir even if you never touch the functions, which are incredible in their own right. Bruce, I have a question for you that's kind of it might be related. And I know you did a series on Crystal, and I, like, I honestly knew more about Crystal.

Like, I I learned about Crystal way earlier than I learned about Elixir, and it seemed like it was a a natural successor to Ruby. Right? Like, when I look at Elixir like, when Ruby programmers move over to Elixir, it's like, I want to have concurrency. I wanna have, like, this memory safety and etcetera. Like, I guess there's a lot of things that it's that they have in common.

And Crystal offers a lot of that as well. Like, it's essentially, like, a very Ruby like syntax that compiles on LLVM, and you get a lot of features like function overloading and pattern matching that are similar to Elixir. But, like, Krystal, I I don't know if it was marketing or if it was I guess I just sort of made a a revelation here that, like, if all you're bragging about is is that it's syntax you know, it's syntax, maybe that's not the right way to market a programming language. And I feel like Crystal was like, this is just like Ruby except for, like, it's on a compiler. And maybe that maybe that is just the absolute wrong way to market your new language.

What do you think? So I I was fortunate to be able to to speak to to a couple of the the Crystal creators as well. And by the way, they did an an amazing job. They they attacked a a problem without a whole lot of knowledge of compilers and compiler theory. They kind of gathered that along the way.

And, I mean, imagine saying, I wanna take this language, Ruby, which has open classes, meaning that you can open anything at any time, and and I wanna make that language type safe. I wanna make it null safe, and I want the same type of flexibility that you had with Ruby. And by the way, I want it to be concurrent as well. So many people told them that this thing just could not be done. But what I noticed as I worked through through Crystal well, first, about the marketing.

It helps if you choose a name a language named Crystal and you choose a term called crystal programming, which also has a massive following in terms of programming crystals for this new age philosophy. Right? So there was this language popularity index that found all these references to crystal programming and mistakenly included them into the popularity of the index. Right? But after that's happened, one of the things that I noticed was that you do lose something about the dynamic nature of Ruby with Crystal.

And I think it it's it is definitely noticeable when you start stacking up the the specific types and the layers and layers and layers of types. The flavor of the programming changes a lot and such it is with Elixir. So what's a programming syntax can buy you is one particular community can give you a look. That's what you can get. You can get a look by a language a language community.

That was true of Java where where they earned a look by the c plus plus developers and on and on and on. You can get a look, and and you have to be good to succeed. You have to solve a real problem. You can't just be a new language for the language sake. Just so everybody knows, I'm showing my crystal sticker that's on my water bottle.

So I'm a crystal fan. I I don't mean to be a critic of it. I actually think it's really, really awesome. Me too. I'm a huge fan.

I think that just that particular team, what they achieved is just, marvelous engineering. And and when you talk to them, one of the things that came through was their love of Ruby and their desire to kind of stay there and take advantage of many of the things that were Ruby like. So they did things like they had a lot of infer typing. They built a macro system so that you would you would get a lot of the feel of the open classes in Ruby. It's tremendous engineering from top to bottom, and I respect the team tremendously.

So now you're, interviewing Bruce on our podcast. Usually, we find you interviewing people on another podcast. Specifically, you interview prominent community members to let the community know them a little bit better. Can you talk to us a little bit about that? Seems like a sweet gig.

Yeah. So the backstory, I guess, on that is I met Justice, who's the host of the other podcast at, ElixirConf 2017. And, yeah, I I I guess we just became friends then. And and so him and Eric were doing the, Smart Logic podcast, and I've been a guest on that. And they approached me this year to ask me if I wanted to do a segment.

So the, segment is called pattern matching with Todd. And if you've ever met me at a conference, like, I'm one of those people that will rarely talk about programming unless I have to with you. Like, I'd much rather talk to you about, like, personal stuff. I guess Bruce can probably verify this. I would much rather, like, talk to you and, like, get to know you as a person than what I can see on your GitHub profile.

Programming is interesting, but I feel like people are a culmination of so many experiences that to only talk about programming is sort of a wasted opportunity. So so, yeah, we sort of bandied about this idea of, like, what if you were to just get to know these people on a personal level? Like, the Smart Logic Podcast is mostly about, like, specific programming projects that people are working on, and my segment is totally not about programming projects. It's all just about getting to know that person a little bit better. And so part of it is selfish.

Like, I wanna get to know these people a little bit better. And part of it is, like, hopefully, you see these people at conferences in the future, or if you're a new member of the Elixir community, you might see one of these people. And you may have heard something on the podcast like, oh, I didn't know you used to live in, you know, so and so that I used to live there too, or just give you some way of making that connection with other people. So I think one of the things that inspired it was I don't remember where I heard this or if maybe it was on a podcast or maybe it was on his Advent of Code, but Jose was doing some recorded event, and I could hear his kids in the background. And I was just like, man, this is, like, I I just never made the connection that other programmers have these families outside like, I'd always think of them in the context of programming things, and I don't think of them in the context of, like, being distracted by their kids coming into their office or things like that.

And it just got me thinking, like, what if we didn't hold Jose and Chris up on a pedestal and think of them like deities as much as we just thought of them as people that like like us, and everything that they've done is are things that we can do as well. That was a, like, maybe a long winded answer. I think it was a good answer. It's I think it's a very good segment to have. Enjoyed what I've seen of it or listened to of it so far, and I think I have the Brooklyn one lined up for listening to.

Yeah. That was a big get for me. I've known Brooklyn for, I guess, a few years now, and she is just I say every time, but I'm just totally enamored by Brooklyn. She is just, like, incredibly smart and incredibly wise. And she is she thinks of things she's just on a totally different plane than most people that I know.

So, like, so multidimensional. So humble. Yeah. I I she if you ever get a chance to watch Brooklyn talk, Brooklyn Zelenka, look it up because she is like, wow. Yeah.

She's just absolutely amazing. So and even though I've known her, I I didn't know all the things that I learned about her from my podcast episode with her, just all the places that she's lived and all the things that she studied. And she's one of the few people that I interviewed who didn't go, like, straight from high school into a programming job, and which is something I can relate to, I guess. And I feel like it's encouraging for other people as well. I think, Sophie, you probably had a I think you had a different career before programming as well.

And I I don't think that's a I think that's a story that doesn't get told enough, in my opinion. Yeah. I did not study computer science or do any engineering. I studied history in college, and I loved it. I'm still a big history nerd.

But I think, like, many people who have liberal arts degrees in this day and age, found ourselves sort of wondering, wondering what to do. And, anyway, I went through a programming boot camp with Ladder in school where I went on teach afterwards. So, yeah, I think it's awesome to have an opportunity to be working with people that have a diversity of background, you know, not at all to knock folks that did come through, you know, CS degrees and go straight into engineering. But especially when I was teaching, it's just truly incredible to see, and I'm sure, Bruce, you can relate to this, you know, where all these people are coming from. Now I've had students that were accountants or waitresses or, you know, just full time caregivers or marines or whatever the case may be, and and coming through and seeing the way that they think about solving problems and the way that their experiences and passions kind of inform.

You know, how they approach engineering is is really a privilege and it's really fascinating. Yeah. At that point, there's a show that was ongoing called No Fluff, Just Stuff, and it was a Java show. And it it went around to mid markets. And it had just an incredible amount of of talent, including a lot of my mentors.

And one was Dave Thomas, one was James Duncan Davidson, the greater band, and on and on and on. Stew Holloway, one of the voices of closure. By the way, congratulations to Stew. But we would all be on a panel and we would look across and people would ask, what was your degree? And we had no computer science or at least no straight computer science degrees.

I was the closest. I had a degree in math with a emphasis in in computer science. Well, a math computer science double major. But, yeah, I I completely agree with you, Sophie. And I think that one of the things that we lack in the Elixir community is that breadth of perspective.

And, like, one of the things that I've noticed is that your writing is different since it doesn't come from that from such a such a academic background. It's a whole lot more approachable for me. And I found myself doing research for topics on cross leo learning and just finding your you blazing a path before me, teaching me exactly what I needed to know so that I could I could teach also. That's yeah. That's a huge compliment because, you know, I think I've mentioned in the past, like, with coworkers and stuff, you know, we've done book clubs with your books.

And, you know, if my writing is approachable, it's because I'm always trying to convince other people like myself to get into Elixir and to find it accessible and exciting and fun. Yeah. And and to realize that, you know, functional programming, it has a lot to offer and that there's a place for those of us that do come from nontraditional backgrounds. So I think most people who come through boot camps are you know? I don't know.

This is obviously very anecdotal, but who are self taught. I think we find our way into programming through more OO languages. It just tends to feel a little bit more approachable. Plenty of reasons. Right?

Lots of jobs and things like Ruby and Rails and JavaScript. So those tend to be things that people, you know, start to teach themselves or that boot camps offer. Yeah. So kind of doing what I can and what all of us can to shift that trend a little bit and really put forward to look towards something that, in my opinion, is very beginner friendly and very powerful for people who are beginners. It's all about that pipe symbol, isn't it?

When you can think in transitions, when you can start to layer your code to take advantage of that, when you can name the concepts for the top of the pipe and the middle of the pipe, things get a lot easier to teach and to and to do. Yeah. That was definitely one of the more influential, talks I remember watching, Dave Thomas talk about thinking about programming as data flow and and the the impact that the pipe had in in the Elixir community. And that was, I I mean, that was, like, 5 years ago now that I remember watching that video. And that was just I I was so amazed by that talk that I just kept on watching more and more talks, you know, by him and other members of the community and then, you know, more and more experimentation.

Before I know it, I just I haven't felt the need to go to any other language for my day to day work. Yeah. So, Todd, you're also just an extremely gifted speaker and teacher. I see you connect in, like, 15 or 20 minutes to to an audience and just kind of own the floor. And it doesn't really matter what you what you speak about.

Can you talk a little bit about how you plan to talk and and how you shape 1? Yeah. Thanks, by the way. Yeah. So I figured out that I really like being in front of crowd and kinda like working the crowd.

So I think, like, I'd really like to be a stand up comedian someday. And so I kind of approach my talks more in that sense of, like, this this is not me talking to you. This is kind of us having a conversation. And that's one thing I I had a really hard time with recording a like, doing a prerecorded talk that I did recently was, like, it's the exact same talk I probably would have given on stage, but not having that back and forth. So, like, figuring out, like, oh, what's hitting?

Like, getting the nonverbals of, like, oh, maybe people aren't understanding what I'm saying. Let's expand on this a little bit more. Or people are leaning in. So, like, let's talk about this a little bit more. Found that really kind of difficult.

So I I usually start like, my talks usually start with either a blog post or just an outline of the topics that I want to express. Like, this is what I wanna talk about, and I kind of work in slides from there. And I think you you gave me some really good advice at Lone Star Elixir 2019, which was, like, turn it into a story. Like, tell tell this as a story. So I was talking about my sprinkler controller, and I was really focused on, like, the technology of what how a sprinkler system works and how you can use nerves to build this.

But there was a story there, which is, like, I needed a sprinkler controller from my house. And, like, what would cause me to, like, try to figure out how to build 1 versus buying 1 off the shelf? And, like, that there's trying to weave a a little bit of a story and making it more personal rather than just, like, reading a white paper out loud is something I'm trying to get better at. So the comedy in your talk really shines through. Is how much of that is extemporaneous, and how much of it is planned?

Yeah. Almost all of it is extemporaneous. Sometimes it lands, and sometimes it doesn't. But that's the comedy business. When I write the, like, when I build my slides, so if I'm, like, on my way out to the conference, when I have my slides built, there's almost no jokes or comedy or levity in them at all.

And I start working on, like, the speaker's dinner and getting to know the people more and figuring out what they're talking about and try to figure out if there's a joke or some sort of segue that I could put in my slides from that. Or if I'm talking on the 2nd day, figuring out stuff that happened on the 1st day and incorporating that. And then some of it is just like riffing on stage. But, luckily, I haven't said anything too dirty that had to be cut. Well, at least I don't think I did.

So this remote talk you mentioned, was this hardware for software engineers? Yeah. For very? I think the the talk covered very good ground. It wasn't maybe it wasn't your most dynamic talk so far, but I think it was a good talk.

I recommend people check it out even if you're not happy entirely. The content was good, and I'll think we can link it in the notes. You just covered almost all the basics for for making, circuitry and what components you might want or need for projects. And I imagine this connects directly to NURBS. So can you tell us a little bit about your journey to NURBS?

Sure. So I I started out being an Arduino programmer. So a coworker of mine years ago introduced me to Arduinos and showed me, like, how cool this stuff was. His little background in that, his father was an engineer that worked on these robotic systems that, like, exist in factories. And he was sort of explaining, like, yeah.

Like, my the machines my dad works on do a lot of the same things, like, these run these routines, and they start at around $600,000. And, like, here's an Arduino that's less than $10, and we could do a lot of the same things with it. And so I was like, wow. That's I that's really important, I guess. This is, like, a really important evolution in technology.

And so, yeah, I started out in, like, learning sensors and electronics through Arduino. And then as I got involved in Elixir I'll be honest. Like, the first time I heard about NERVs, I was like, I don't know. I'm kinda I'm solving things with Arduinos that like, I don't understand really why NERVs would help me out. But then as I got more into OTP, I realized, oh, yeah.

Like, if I wanna do something really processor intensive or if I wanna do more than one thing at the same time, this is actually really, really awesome. And so that's, like, what sparked my interest, I guess, in NERVs. And I, I saw saw some really good talks at ElixirConf, one from James Smith that comes to mind, another one from Tim Mecklen. We can link to them. I'll put links in the show notes for that, about people that were solving, like, real world problems using Elixir on hardware.

And so I thought, well, let's give this a try. And I think my first real in earnest project was the sprinkler controller, which I called Drizzle 2000 that I talked about at Lone Star Elixir 2019. It's it's really amazing how many deeply influential NERVSTALKS there are. You mentioned Tim Beckland's one for the artificial pancreas. That that was just absolutely stunning.

And you've had some really good talks as well. But, Josh, the the NERVSTALKS that I remember the most was yours where you had the, oh, gosh. What was the song that that you played? I'm never gonna dance again or something like that. You know, when to to blinky and then, you know, smoking this this Oh, yeah.

Yeah. Actually, I don't remember the song names, but yeah. Yeah. I'm gonna be stupid and just not remember. But, yes, I really enjoyed that.

So we were stuck we were stuck in so we had sort of a blinky light and, then an RGB and then a self driving tank and then the Parrot AR drone and the Sphero. So, like, we made all this stuff work. It wasn't actually nerves for the most part, I don't say. Not yet. It was too early.

But but yeah. So we had we had just stuff interacting with the hardware, and that was fun. But we I was stuck in hotel room with Robbie for, like, 3 days because we had we gave the same talk in Portland and then in San Francisco for the Erlang factory. And so there was no point, like, flying home and then flying back out. So that gave us a lot of time to really, really drill into the the music accompaniment.

Yeah. That was awesome. Because but I I think that there so, Todd, there's something to working with hardware that that kind of brings out the passion of nerds. Right? Yeah.

I think so, at least. I really enjoy seeing the product that I have and, like, knowing that it exists in the real world. Like, I could give it to somebody versus everything else that I've ever built. Well, I shouldn't say that. Everything else I've ever built with a computer only exists on a hard drive in somewhere in space and and could just be taken down as easily as it was put up, I guess.

But having these physical things blink is, I guess, really exciting to me. So I I like woodworking, like, outside of computers. I like to build things with my hands and woodworking, and I think I think they're all, like, really similar types of work. Like, there's a lot of planning that goes into it and, like, building an architecture of things. Like, in woodworking, we build a lot of fixtures and jigs so that we can produce the same thing over and over again, which is, like, exactly the same as building a class or maybe a module in programming.

But it it it sort of gives you the same, like, creative fulfillment. But at the end of it, you have something you can sit on or put your coffee on or whatever. It also really helps with explaining to parents or elderly relatives what you do. If you have, well, finally, something physical to point to instead of just being, like, well, you know how you go on Instagram a lot? That's what I do.

Yeah. Yeah. I think for my kids, I think they enjoy it much more as well. Like, I think they take the Internet for granted, and all these things that exist on the Internet are, like, whatever. Those just are just there.

But, yeah, seeing these things and I recently worked on a project, and this is the first one where I three d printed the case for it. So I got a 3 d printer during quarantine and decided to speak at opportunity to build something and design my own case for it. And so they get to see that, and, oh, dad, what is that? And kind of talks gets us to talking about what I do. It's really fun.

Yeah. We also got a 3 d printer during quarantine, but it is currently still sitting in its various little pieces on the floor and has yet to be assembled. So I'm gonna have to pick your brain at some point because I think we're finding the assembly to be a little intimidating. Uh-oh. Alright.

What kind of Sam? So I'm actually not the expert on this. My partner got it, and I'm not, like, super involved yet aside from being told I feel like I've complained about this before on this podcast. Anything I now want to buy, whether it's, like, the scale of a bookshelf or, like, something smaller, I'm now told, no. No.

No. Don't buy that. I'll 3 d print it, but the 3 d printer is, like, still sitting in pieces on the floor. So stay tuned for more 3 d printing soon, maybe. Okay.

No. No. No. Don't buy that. I'll build it with the parts from this 3 d printer.

Exactly. Yes. Right. Just with the parts from the 3 d printer. Yeah.

Well, the best intentions. Yeah. Very true. For a moment, I thought you said that that there is a lot of planning that goes into woodworking, which I think is accurate. You were saying planning, but I'm suddenly thinking, like, can we make some software theories of or method methodologies, I think, is good, where we have, like, the planning and the sanding phase.

Maybe we build jigs. I can't assist. Do, like, woodworking driven development? I I pitched this as a talk idea to Chris McCord, and he's a woodworker as well. And he said, I think there's something there, but I don't think it's I don't think it's ready yet.

But I think it's exactly the same. Like, planing things and sanding things are like taking all the rough edges off of your interface. Right? Like, your interface with the with my desk, you know, is the top of the desk, for instance, and I can run my hand across it. It's nice and smooth versus, like, in programming.

You can have an interface. Like, I could have this very jaggedy, sharp desk. It's not well sanded, and it would also be a desk, but it doesn't mean it's a great desk. And I think there's infinite parallels. So maybe maybe I should get around to making that a talk.

And then somebody, Bruce, has to let me give the talk. You know me. I pick great speakers and let them speak about what they're passionate about. That's the secret to a good conference in my book. I was it seems like woodworking is a pretty common hobby or side activity for programs because I'm a woodworker as well.

And, you could probably tie in QA face, like, hanging from your shelf and making sure it doesn't collapse under your way because then you're then then you're guaranteed that it'll hold whatever else you put up on. Yeah. I think think you're probably right. I think it's it's really creative. It's really creative, and it's a good way to, like, force yourself to get away from a computer screen as well, which is something I think us computer files have a hard time doing.

It's like we have this job that we do all day, and then we have our hobby, which involves, like, moving to the couch and looking at our computer screen and doing that. Yeah. I think woodworking, gardening, those are a few that tend to pop up now and then. And I think it's just doing something with your hands that has a real visible impact in the world. It feels good.

It's very satisfying, and it allows your brain at certain points, it allows your brain to just go on idle, which I think I think we all need sometimes. Garbage collection is a lot easier in that world too. Just the broom. My dust collector, it begs to differ. There's nothing easy about that.

Yeah. You have a fancy dust collector. I was thinking more like like, oh, this project didn't work out. Just throw that in the bin. I think we're getting to a point where we're just about out of time.

And what we like to do to wrap up each episode is ask our host and guests if anybody has any picks, any links, or suggestions, or recommendations that they'd like to share. It doesn't have to be related to elixir or programming. A lot of great recommendations and links have certainly come up throughout today's conversation, and we'll definitely be including those in the show notes. But we'll just take a moment and go around and see if anybody has anything else they'd like to share. And why don't we kick it off with Bruce?

Yeah. I have a couple of picks. The first one is that Grazio is going through the live view course right now, so I'll leave a note for that. There are a couple of free videos that pop up along the way. And the second pick is Jose's company Dashbit released an authentication generator, which is wonderful bit of code.

I think it's important because as we become a more mature environment with Phoenix, we need to have a single place where the the important security bugs kind of get polished and fixed in the same place. So there's a there's a video that I made for the Dash bit project, phoenix.gen.auth. Awesome. Thanks, Bruce. How about you, Lars?

Yeah. I have been doing some strange approaches to programming while I've been watching my daughter sleep and making sure she stays sleeping. I'm actually leaving my parental leave now. So I actually do work at a computer now. It's great.

But while looking for good solutions to work from an iPad, I stumbled across CodeServer, which is a Versus code fork, I guess, which is just the 2 run on a server. And if you expose it to the Internet in a safe and responsible manner, you can actually edit your stuff stuff in the browser with a full Versus Code installation. This also led into my recent blog post. That's a separate story. Code server is cool.

Versus code has me a little bit disappointed because you can't use all your extensions. So I guess we can link my blog post as well. Code server. You should try it out. It seems good.

I haven't tried it heavily yet, but I probably would. Awesome. Thanks for that. Alex, any picks for us? Yeah.

So I got 2 picks for today. The first one will be a, shameless plug. I just published the second part of my OTP as the core of your application, blog post series. So then I go over using, the registry, dynamic supervisors, gen servers, and you kinda set up, like, an actor model based bookstore where you use kind of the, the building blocks you have in in OTP versus, you know, falling back to your database and just having kind of, like, a traditional 3 tier app. So I think it's pretty cool.

You should all check it out. My second pick is a service called Plausible. I'll probably be transitioning the analytics portion of my blog to Plausible just just that I can respect my, my visitors' privacy. I saw Jose retweeting it as well, so it's gotta be good in that case. So I'll be probably switching that over soon.

That was my 2 pick. Alright. I'll go next, and then we'll hand it over to Todd. So one of my picks I I'm having, like, kind of a deja vu about, and I don't remember if we've picked this before. So apologies if we have, and I forgot.

But there is a change log video that came out, I think, about a week or 2 ago, taking a look at GitHub actions for your Phoenix app with Jonathan Klem, who is GitHub or who works on action. So it's definitely a great video to check out, and it's really exciting to see GitHub actions integrating with Phoenix Analyzer so nicely. What else? I've got 2 more for you. Oh, we've got this was an Elixir Radar recently.

I'm sure some folks saw it, but we've got Chris Kiefe's post on telemetry conventions, and I've become, like, mildly obsessed with telemetry and all of the excellent, very cool, and seamless ways that Alexa and now Phoenix 15 just kinda work so nicely with telemetry and kind of make observability a first class citizen. And so I'm really excited to see this article. And if you also cannot get enough of telemetry and observability, I'll do a shameless plug. Very excited to be speaking on that topic at elixir comp this year in September. So if you're on the fence about whether or not you should get a ticket for this year's comp.

I mean, if that doesn't sell it, I don't know what will. And then last but not least, I have a nontechnical pick, which is a really amazing brownie recipe that I made this past weekend. They're called Guinness brownies. It's a New York Times recipe. It's basically brownies with a whole can of Guinness in them, and they came out so amazing.

They kinda reminded me of I don't know if anybody else had these, but, like, in the elementary school cafeteria, those brownies that would come in, like, the little cellophane wrappers and had that, like, very thin layer of, like, fudge on top. They were kind of exactly like that, but amazing. And that it wasn't too complicated. I'm not, like, a very fancy baker, so interested if you like chocolate. Definitely check them out.

And last but not least, we will ask Todd for his pick. Thank you. I also had plausible.io on my list by Alex. I'll have Scott to it first, and I wanna promote the talk that got me really interested in Elixir, which was Chris Bell's talk at ElixirConf 2016 called selling food with Elixir. So if you are just poking around the Elixir community, I would check that out.

I thought it was really, really interesting. And lastly, I wanna talk about something that I launched recently called Devito, which is an Elixir link shortener, and it is all built ready to be deployed to Gig Elixir. All you have to do is set one environment variable, and it'll be working for you. And that's at try Devito. Alright.

Awesome. Thank you, Todd, and thank you so much for joining us today. And stay tuned for next week's episode of Electromit.
Album Art
Embracing Erlang with Todd Resudek - EMx 268
0:00
42:04
Playback Speed: