Hey guys, we are at UConn U.S. 2019. On the ball every time of that year. Good job. Thanks. Not bad. Hey, Brian, where are we at? We are in Tampa, Florida at the? Straza Performing Arts Center. Oh, yeah, that's right. We've been here all day, and we're going to be here all day tomorrow, too. We're interviewing all of the amazing guests. And speaking of which, we have an amazing guest with us. We have the one, the only, John Papa. John, welcome to the show. Thanks for having me back. Yeah, absolutely. Thank you.
Yeah, we've had you on the show quite a bit at times, and we're always having happy moms. I appreciate it. It's always fun. Yeah. We didn't bring the jacket this time for you. That's okay. We're in Florida. Well, instead of Florida, it should be like a, I don't know, like a tank top. Flip bops. Flip bops, there you go. Flip bops. Flip bops. Flip bops. That's happening. You actually sell them all the store. Oh, there you go. The T and the flip bops. There you go.
John, so you're not talking about what you normally, I guess, would speak about at some of these shows. What are you talking about today? Shows. Yeah, shows. Shows, conferences, entertainment. I think of it as a show. I'm here for entertainment and for education. It's good that you admit it. Yeah. Me too. You may not get much entertainment out of it, but I'm going to be talking about how you can take a view app and pretty much run it anywhere through cloud services, like Docker, debugging, other kind of cloud stuff too. Okay. Do it in Azure. You can do it in Azure. You can do it in a box. You can do it in a box. You can do it in a box. Do it in a boat. Over to go.
So a lot of times I go talk to companies where they've got these apps and they want to scale them. And they're used to using VMs and virtual machines and trying to scale them up. And one of the problems they have is it's hard to... They look at their apps, and they figure out that they're very coupled on the back end. And when they do that, it's just natural. It happens over time. It's OK. You're there. I've been there. I'm still there. What you can do is, once you start decoupling little pieces of it, you can start taking those, and then you can scale just those pieces up in the cloud. One of the great advantages I tell companies is that how many times have you run your app, and it worked on your computer, and you tested it? You didn't test everything. It all works. And then you deployed it. And it didn't work, wherever you put it.
test environment, staging, production, etc. Or you gave it to her, and she's like, no, it works for me. And he's like, no. It does not work. Why does it work, John? It happens all the time, right? It's like, oh, you're running Node 10, you're running Node 11, you're not even running Node. I tried it on my phone, it didn't work, John. What's wrong? I can't help you. Yet. But that's the idea, is that not wanting to worry about these things when you put things into a Docker container. Instead of writing out the list you normally do, she's like, you know what? To get this to work, you just have to install Node and NPM and Vue. You get rid of the list, right? It's like a grocery list you write down anyway.
Why not just write that down for a Docker file? and then you can run a Docker container. You're already doing the work. Just put it in a file, runs in a Docker container, and then it runs on everybody's machine, whether you've got Windows, or you've got Mac, or Linux, or, you know, hate notes, or whatever you want to do, it works. I can put it on my Sega Genesis and boom, yeah. Maybe. Yeah. We need to try that now. Yeah. Someone somewhere out there made a node run in Sega Genesis. As I asked a recent board developer, they're like, what's a Sega Genesis? Yeah, exactly. It's like a mouse. One of these days, I'll be looking at, what's a mouse? Oh, pretty much, I'm sure. It's all going to be hand gestures. It's going to be those rings that you put on the mind. The mind?
Oh, I'm going to be out of luck. I don't want to do that. I don't know what I think. What the hell is that? When can I go in swimming today? No, no, no, don't hate that. That's true. You have to have a very focused mindset. So did you do your talk yet? No, no. Talk's tomorrow afternoon. And I'm going to go practice it because I heard the Wi-Fi was a little spotty, which is pretty normal. So I'm going to go practice it offline. Nice. Because going to the cloud is kind of tough if you can.
You get the cloud. Yeah. You have to fly there first, right? Is that like a thing? Into the cloud? Yeah. Hot air balloons work best because it's slow. Got it. Can you talk about it with all the helium? Yes. Oh, yeah. That's what happened the other day. Cool. So a quick question. How do you helium? Oh my gosh.
Last time we spoke about debugging a little bit too. How would you marry these two talks together? I think it was a debugging talk last time. A lot of different ways. There's so many ways to debug. That's part of the story too. One of the fears that I have when I went to Docker, maybe you all didn't, but when I got into Docker, first, how do I do this? Why would I want to do it? Once you buy it off on, this sounds good. I thought it works on a machine. Then you're like, all right. When I put it in a container, it sounds like I can't see the files.
I can't see the code. How do I get to it? So the debugging story, Mary, is really nice with that, because with VS Code and some of the tools, you can actually basically poke a hole through the box, and you can see the file, the box, only to shake it. But it works out really good. I really like the debugging inside the container, because then you can see. You don't have to keep rebuilding the container, rebuilding the bug. Plus, you're seeing what's wrong with the build process, not necessarily the app. Yes. 90% of my bugs when I go to Docker or pretty much anywhere these days is a file path.
It's like, it works here. And then all of a sudden, I moved it somewhere else, and the folder structure is slightly different. And you're like, I know the code works, but it's telling me I can't find this file. And I'm like, it's right there. So how easy or how hard is it, I guess, to make up this whole setup, to have your Node and your view all working together simultaneously? It's not as easy as it's going to be. There's a couple. To be very fair, everything evolves. One of the catches with Vue, React, or Angular, with Node specifically, is that you have to decide, do you want to serve your application?
Is it going to be Node that's serving Vue, React, or Angular, or whatever your favorite framework is these days? Or are you going to serve it from something else? If you choose to serve Vue, in this case, run Node, well, then you've got a Node app, which is going to serve Vue. Well, when you normally run Vue, as we all know at this conference, you run the Vue CLI, which doesn't require a Node Express server. I mean, it just runs up in a desktop like Webpack.
which isn't for production, right? That's for the build. So the real danger gets when people start thinking, well, I don't have to think about Node. I'm building Vue. Why do I have to have this other thing? So that's one hurdle is you have to get people in the mindset of if you want to serve it from somewhere and you need a Node server, let's go to Node Express. Another option is that you can say, forget the Node server, the blocker, and let's just host it in the storage in the cloud, like in the storage bucket, where you can say there's no server. We're going to serve it off a CDN where it's just a Vue app. But then in that case, your Vue app is going to hit APIs somewhere. So how does it get its data?
So then you've got to decide, do I want to go hit a serverless function, or do I want to go hit another node server somewhere else, or Java? So it really depends on your architecture. To me, that's the most confusing part. Because you have to decide, it's not just view. It's what does your environment look like. Once you figure out your environment, the rest of it's actually easy.
So what makes you choose then Docker, you know, as opposed to like doing anything else, right? Like, you know, yeah, like, why would you go ahead and maybe even learn Docker, right? Like, it's a new thing to you. You're like, I hear it's pretty awesome, but I don't want to touch it. It looks scary. Like, how do you get started with, you know, doing all these things together? Honestly, if you don't have the problem, you shouldn't touch technology. Like, there's too many of them out there, you know, and also often you're, oh, it's so cool. We got to use that new thing. I don't need it. Dude, that was yesterday. No, not that thing. Oh, yeah. That's a problem, too. I've been around long enough to go to way too many things.
I got the scars and I lost the hair to prove it. It's a great question. You really should ask it to yourself. To me, for me, Docker's light bulb went on when I started realizing I always have a server somewhere. All the apps that I've personally built, 99% of them have a server. And I need to solve that. How do I make it run here, there, everywhere? And with Docker, that totally took all the guesswork out, made it easy. In the past, what was I doing? I was deploying to another machine that had a different OS server. Let me give you a horror story. I worked at a large company.
And this happened probably at least a dozen times where I got a phone call from the couple hundred apps of this company were written based on my architecture. Every time it breaks, of course, it's my fault. Apps that have been working, fine. All of a sudden don't work. So I get a phone call. It's not working. Once I figured out what's actually happening, this is what the call would give me. Hey, it's John. How are you guys doing over in the CI department? Continuous integration. Oh, we're doing good, John. Oh, John, is something broken? Like, yes. Hold on, let me go check. Let me go check. Yeah, somebody changed the version of Node on this machine.
So they were changing the version of Node on the CI build machines. What? So every time they upgraded Node, oh, it's an old version of Node. We should just upgrade it. The code that those 100 apps were running on depended upon whatever version of Node it was. Yeah. Oy. And let's say 98% of them still worked, but those 2% were calling, going, we didn't change anything. What happened? Yeah. So by putting Docker into a CI process like that, that's an old app. The company, we all know Shepard.
But the company doesn't have money to say, hey, let me take the 100 apps that we have and every week let's upgrade to the newest version of Node and Vue. Yeah, that doesn't make sense. You can't do that. The budgets and time are not there. I wish they were. But because you can't do that, if you Dockerize and you containerize the version of the thing you have, say this thing needs Node 8.1 with Vue 3.2 and Foo 6.4. It's locked. So then if somebody upgrades another one to Node 11.
That thing still works. That's security. That's great. You would say definitely this is useful for more enterprise and larger companies. Instead of like, hey, I just want to play around with Docker for this client. Probably not the best idea to start off with. I wouldn't start there. If you don't have experience. I never think you should say, play around client. It always depends. There could be a lot of people that might not know what they're doing. New people that you bring on that might think just like, John was saying, how come we're using such an old version of this? That's okay.
And so, I mean, smaller companies, I wouldn't say shouldn't go there, but if they have those same problems, they should. It all depends on what your problem set is. If your problem set isn't, you know what? We only have one app for this company. There are companies like that. We've got two or three apps for each of those apps on its own server. We control it. I am CI and the developer and the working administrator. You have more control. You know, Docker is still a good idea, but I wouldn't put it as top priority.
That's really good to know because I feel like we're hearing Docker this, Docker that, a lot of places. Sometimes it's just like, well, I don't know why. You just really want to ask why. What is the purpose for it? And that's really awesome that you're able to say, hey, maybe it's kind of like Redux, right? Maybe you don't need it. Maybe. Think about it. You might not need it. We like hooks or suspense. We like React. We like React. Hooks are great. Let's wait until they're actually out. I love it. You're like, hey, Dan Abramow had an idea. Let's go implement it today. Dan's amazing. Let's wait until Dan says it.
I actually did this at the last time we switched it. Can you give us a little behind-the-scenes of building this talk? How long it took you? What pitfalls came across? Did you make your family listen to you? No. Give us a little behind-the-scenes look at building the talk. Yeah, I'd say the biggest thing for me was I wrote this View app that I'm going to be showing tomorrow. I think I wrote it second out of three apps. I wrote one in React, then in View, then in Angular. And it's all the same app, but I wrote it in the styles of different frameworks with the same data and same backend. Yeah. There's no point in the backend. Just make a Node app with it. And I wrote them. I kind of went back and forth to see what the differences were. It was really illuminating to see.
You know, when you code things in the React way, really, what's the difference? You get past the biases. You get past the, oh, I'm scared that my career, I bet my career on one of those three. John's saying I've got to use that one. Wrong one. You really look at them and go, which one appeals to me best? Because they all solve the same problems. Too many, too often, we're too busy fighting over, you know, why did you pick this versus that? They're all OK. There's very few things in our technology world that you can say, pick A, B, or C, and you're going to be OK. But this is one of those. And this talk resulted from that, which I liked. The hard thing with this app was,
trying to get Node and Vue to work together in the Docker container, there were some things that I started doing where I wanted to run Vue serve, CLI to serve with Webpack, but I wanted it to talk to my Node backend so I could get the hot module replacement in development node because that's so fast and amazing. But I didn't want to lose that on my Node backend. When I run it in production, that's not the way I run it. I need to run a node backend and run the production version of my view app, which doesn't have hot module placement. So the hard part of my talk was, how do I transition easily and don't make it a real pain? And I ended up using NPM scripts to do it, where one NPM script will run the node backend and use Webpack to crank up view. It's like my development mode. And then I had another command that was, it's not really production, it's kind of like I'm getting ready to go to production mode. So I had another NPM script that runs the node backend and builds view and runs the two together the way we work in production. That's cool. I don't feel comfortable saying, hey, I worked in Webpack, now let's go to production.
like Webpack and all, but if it's not the same, something's going to break. Yeah, that's nifty to have those checks and balances for sure. It is. But it was a pain setting it up, not because of view or node or anything, just because by heading my mental model around, I've got all these moving parts, how do I make sure they all connect? Yeah, architecting, that sounds kind of like a...
like a brain, I want to say brain fuck, but like that's really like what I mean. Yeah, it does sound kind of like, okay, what are the challenges that I'm going to have, you know, as, you know, in development mode? And what am I, what challenges am I going to have, you know, testing production? And what challenges are, you know, do I not even know, right? What are going to happen after like 0.3, right? That's pretty awesome. Yeah. I mean, that's the real thing. If you think about it, the hardest in our industry, in my opinion, it's not syntax. We don't learn syntax of anything. We really can't. We do over and over again, even when it changes. The hard part is that how do you take
the technologies and put them together into a puzzle that is your world, your company or your project, and make them all work in a way that makes sense for your situation. It's what you do and what you do and what I do is going to be different. So to me the value is in how do you think is your problem. In terms of the problem, you can solve these things. And that's kind of the nuts of what this talks about. It's not do or no, it's let's think through what are we trying to accomplish. I love that. What's the worst problem you've ever had at a conference? At a conference? Oh, okay, let's not go there. That I caused? Nope, edit. But at a conference. I definitely had all the speaker fails. Like what? So my first time speaking, which I have a presentation course I do, first time speaking, terrified. I was terrified. Never did theater, always wanted to. And I just...
I'm going to try this. A hundred people come into a company and I was speaking on some topic 20 years ago. And at the time I was wearing brown khakis. I went into the bathroom to wash my hands and do all this stuff five minutes before my talk. I'm not going to want to have to use the men's room when I'm up there. And public restroom there. Water hits the sink. It's one of those big troughs. Everywhere. Sink. It's like a fire hose. You know what area we've got? Of course. Out of here. I'm brown khakis. Five minutes before I went on.
I was just humiliated in myself, right? Like, what do I do? What do I do? And so, at the time, there was these things called folders and paper that we used to have. Oh, I heard about that stuff. Folder and paper? So I held the folder and walked up to the podium. I effectively didn't move for the entire talk. It was like the worst talk I'm sure I've ever given. At the end, I thought, you know, I can get through this. There's really nothing that's going to bother me. And since then, I've had the weirdest things happen, where my audio was hooked up to the room next door and vice versa. So I'm talking, once you're hearing the other guy, so...
We were having so much fun with each other on this. That's awesome. Lights went out during the talk one time. Did it keep going? Oh, yeah. Computer dies, you know, blue screen or beach ball, whatever you want to call it. Computer's dead, and you're doing a talk. That's all code, live coding. So then you just live with your hands. Do you restart? Or do you restart but keep talking? You try. But that particular time, nothing was coming back. It was like smoke coming out of my computer, literally. Whoa!
Imagine my code. That's why having fun with it helps. Yeah, you have to kind of beat water, if you will, and just kind of go with the flow of that and enjoy the moment. You have to beat water on tackies. Don't wear jeans, man. More jeans ever since. No, we're gagging. I swear I didn't pee my pants. That's how you open the top. Run from the building, and tear. It's fun, though. Love that. That's a good memory to look back on.
We can overcome it. We're very resilient people. When you're on stage, people want you to succeed. They want to learn, but they also want to be able to entertain. They don't want you to go, hi, my name's John. You want the value of a little bit of like, I'm going to pick it up more if you provide a little bit of your personality. It's all about those relationships. You don't have to be funny or comedian or anything else. Just be yourself. And people will like you and like what you're talking about. If you're passionate about your topic, it comes out. Just don't wash your hands in the sink.
Good tip, good tip. John, we're just about at the end. First off, how can people get to know you? For our audio listeners, we'll put links in the show notes, but where do they go? What's the website? What's your Twitter? Twitter's best place. You can get everything else from there. Twitter, John underscore Papa. On Twitter, at John underscore Papa. I blog at dev2, which is dev.to, which is a cool site. You have a podcast, too, right? I'm down to one, thankfully. One podcast, okay. Real Talk JavaScript is my podcast I've been doing. I cut out my Angular and my new podcast only because I kept it away. Yes.
It's fun. It's a lot of fun. I hope to hear you or have you hear me. Nothing else. Thank you so much, John. Thanks for having me back on. Thank you. Thanks, everybody, and stay tuned for more. Stay dry. Thanks for consuming the Thunder Nerds. We honestly and sincerely appreciate you watching and or listening to the show. Please subscribe on YouTube and iTunes. Write us a review. Kick a few stars our way. And above all else, please remember to send your favorite book suggestions to Brian Hinton. I like romance novels. They have happy endings.
I should have known the territory didn't mean us any harm when the Sword of Omens didn't obey me. And anyway, it was just plain stupid to assume it might be bad. Just what the fuck am I talking about?