Developer Productivity The Problem Statement
Transcript from the "The Problem Statement" Lesson
>> So I'll be using docker on and off throughout this presentation. You don't have to know anything about docker. The only thing you really need to know about docker is that I didn't wanna have to try to go into my system right now and start sudo apt, purging all the libraries out.
[00:00:14] And then deleting all my RC files and doing all that to create a clean environment on my computer. Instead, I just create a new Ubuntu focal, which I believe is 2004 docker container with some basic libraries installed. So I can just have, here's a clean environment, let me now perform these tasks on it to show you kind of how things are being done.
[00:00:36] And you can see that docker container and more right here on this link here, I'll just open it up now. It's a pretty straightforward docker container, I forgot I have. So nothing's really in it, right, like I said, it has pretty much nothing. Do a little bit of this, add a couple libraries, curl git ansible build-essentials.
[00:00:54] Which by the way, build-essentials, I have yet to spell this library correct once ever. Every time, I have screwed it up, and so it just has to be in a docker container at this point cuz I'm not gonna remember how to do it. All right, this is the moment where hopefully you feel as excited as I do cuz I'm trying not to scream here, I'm trying to keep my voice down.
[00:01:16] So we don't blow out the mic or anything, but this is very exciting. At least, I'm very excited. So let's get started, and I think the first topic we're gonna cover, I thought was the most boring and the worst part of this whole presentation. And then about two months ago, I had such a magical moment that I was like, this is the best thing in the universe.
[00:01:38] Obviously, I'm kinda giving away what it is right now, it's called ansible. Well, we'll kinda get there in a moment, but not everything is gonna feel great right away. But when you actually have it become super useful, it's gonna be one of those tools that you're gonna love for a long time.
[00:01:56] So I'm gonna try to start off a lot of these sections with a problem statement. And so that way you can kinda see what's going on, why I'm doing it, why I'm doing what I'm doing. So let's just pretend we have this problem right here. I have a new computer, it's not the problem, and I want to install zsh.
[00:02:11] For those that aren't familiar with zsh or z shell, as some people call it, effectively all it is, actually it's the default shell I believe on Mac OSX. And it's just a little bit easier, more friendly, nicer version of just standard shell that comes on Ubuntu. So I want to install.
[00:02:28] So I have to go through a series of things to do. So let's actually just open up my docker container right now. Here we go, here's a nice clean docker container, I'll zoom it in for you. If I were to try to run zsh, it's not even available.
[00:02:39] So I have a brand new system and I need to install it. So, of course, I'm gonna go, apt install, what is it? zsh, there we go. I now have it installed, this is fantastic, or looking really, really good. So I have zsh installed, but of course, there's a little bit of a problem.
[00:02:56] When I close my terminal, what happens when I reopen it back up? Well, it's gonna use the default shell that's been set. So I got to also remember to do this which I never remember what to do. I'm gonna have to grab which zsh and set it to my shell.
[00:03:10] Okay, I'm gonna change the shell to use zsh, so the next time I open the terminal, everything will be nice, I'm using the program I want to use. Well, I don't just use zsh shell though, I technically use oh-my-zsh now. This is the part where people who are really into zsh kinda make fun of people that use oh-my-zsh.
[00:03:28] I consider this a -1 by the weight point. Please, let's not say anything mean about the broadcaster right now. But so I gotta remember, okay, I gotta go grab this URL, I wanna curl it in and execute it on the machine cuz remember, anything that's on the Internet is perfectly fine to curl and just pipe directly into sh.
[00:03:49] You can even do it with sudo, it's fantastic. By the way, that's a joke, please don't actually do that. Look at things first. And then I got to remember to do this. Now this part is a little bit confusing, I gotta go to my zshrc, and that's at right here.
[00:04:02] What is it? zshrc, yeah, yeah, yeah. And looking for plugins, where are you? There you are. Then go here, and I gotta remember to do zsh-autosuggestions, I believe. And there we go, we got that [SOUND]. And then we got to go back here and what else? Yeah, we need to actually curl down the repository of it, and install it into the zsh plugins.
[00:04:21] There we go. Look at that, I'm done, I've now set up zsh. If I've done zsh correctly, when I type zsh, it should be beautiful. My goodness, look at how beautiful that looks right there. And now look, if I type in a command, when I start typing again, it starts auto filling it for me.
[00:04:37] Look at that, fantastic, I've set up my shell, I'm ready to start working. Well, I mean, technically, I only set up one of many pieces of software that I need to get set up for my machine to start working. I guess I should probably start installing Node now with NPM, then get my Node manager out and then install the versions of Node that I actually want to do.
[00:04:55] You can kinda see this problem, we've all done it. We've all been here where you're constantly having to install a bunch of things just to get started using a new machine. This happens all the time.