 What's going on YouTube? My name is Lee Brandt. I'm a developer ad kid here at octa today We're going to talk about why GUI suck and CLIs are just better. Let's check it out. I Don't know why I pointed over there. That was sorry So I've always tended to lean towards command line interfaces over graphical user interfaces anyway Maybe it's just because I kind of cut my teeth in the windows 95 windows 3 1 days Back in Windows 95 a if you remember that before it was called Windows 95 a And I kind of split my time so like one of my first jobs was building machines for everyone that was in the office that I worked at so I Would build Linux machines and I would build Windows machines and I Spent a lot of time on the command line because when things went wrong in the GUI You pretty much had to drop to the CLI and things went wrong a lot in the GUI's back in the day So it wasn't unusual during a Linux install to not even be able to get the X-WINDOW system to boot up And you'd have to go into the command line log in through the command line Get the right driver put in a floppy disk if you remember what those are really dating myself. So Put in a floppy disk get the right video driver installed Compiled into the kernel maybe even and then you could actually get X windows to come up and you can actually do stuff Now don't get me wrong. I love my windowing systems. I mean I'm using Ubuntu right now That's my daily driver. So 99% of my time is spent in the Linux and It's much better now And I love my GNOME back, you know, my GNOME windowing system I wouldn't want to have to CD into folders all the time and I like being able to just Go and click in my home folder and click around in there and find what I'm looking for. I like that But sometimes like poorly designed GUIs can make a really simple task way more complicated than it needs to be So the first thing that I'll say about CLIs is that they're centrally located Generally you open up your terminal window and there you are any CLI you need to use Whether you're using the Git CLI whether you're using AWS CLI Heroku Create Reactapp CLI or any of those things npm Any of those things that you're using you're using right there from the command line You don't need to open up another program. You don't need to wait for some other GUI to load You don't need to wait through some splash screen or anything like that to get to doing the work that you're trying to do which is you know committing code or creating a new a new app in Heroku or adding dinos to an existing app or Creating an S3 bucket in AWS. You don't need to wait for the for the browser to come up You don't need to wait for some GUI window to come up It's right there in your command line window. You just start typing AWS commands or you just start typing Heroku commands, right? so everything is right there and it's super lightweight so The terminal really isn't much in the way of a GUI it is kind of a GUI I mean most people who are using terminals now are using a terminal emulator They're not actually using the terminal. They're using a terminal emulator Inside of a window manager of some sort. So whether you're on a Mac or if you're in the Windows Linux subsystem or Power shell in Windows or Like I use oh my Z shell quite a bit Which is basically just a package on top of Z shell It has a lot of great features and customizations Once I've got that open everything is there whether I'm using AWS Git or Heroku or Whatever it is. It's all right there a lot of times Some of the GUI tools can have kind of confusing menus like like I didn't know that creating a new Git repo was under Under my Git repos create drop, you know, I have to go three levels deep into a menu item just to create a new repo Instead of I'm in a folder and I type get a knit and we're done, right? Things like that are a little bit hokey now Yes, Guies can make some complicated things that you need to do Easy, but for the most part They're usually The commands are usually pretty self-explanatory They are I mean the GUI's the CLIs that I've used recently are very similar to what I would say If I wanted to like, you know get clone in a repo name. That's it That's what I wanted to do Now I do need to remember that it's called get clone and not get Pull down or get copy or whatever But even in a GUI you still have to Remember what the command what the what the menu item is and may you it mean you may have to remember Wow, you may have to remember that it's under file new repo and then type in the name into a window a little pop-up window and you have to wait for the pop-up window and Not ideal So the fact that everything's right there in the CLI and I know people that I work with now That just do just about everything from command line like they code from the command line with Vim They get their email from the command line with mutt Some of them if you're even really hardcore browse the web with a text-based web browser, but wow Um But still Everything's right there. You don't have to wait for another program to load Another thing that I love about CLI is is that generally help is just a few keystrokes away If you're searching for help with a git command you type get the command name and dash dash help and There's a nice big text explanation without waiting for some GUI to load A lot of the times in a GUI the help menu may be under about It may be under file preferences and then there's a help menu item under that window There's a lot of different places where help might be Generally most CLIs It's just dash dash help after the command that you want help with Now you can do git dash dash help, but there's gonna be a lot of stuff there but Even with you know being a Linux guy What I first got started Man pages were kind of a steady diet for somebody just getting started It was just you know man PS to figure out all the switches that I can send to To the PS command or whatever command I was trying to do Even if it's something like a CD command Maybe I don't remember what CD is. I'm not used to the command line So I type CD dash or man CD and I can get a little Linux document that tells me what arguments need to be passed to that command How they need to be formatted what switches I can do to add stuff to So help being just a few keystrokes away can be super helpful whether using just dash dash help Where you're deep down in the bowels of something Consuming man pages like their pizza and and diet soda so GUIs a Lot of the times they'll put them in the same places, but I've seen them either in about or I've seen them in under file and preferences I've also seen them under about with a link off to a web page That now has to load and all the graphics for that web page Need to load for you to get the help that you need and sometimes help is just Take sheet of the main help page Now you have to find the command that you wanted and Get help on that command where you could just type the command that you want to run and dash dash help and get focused contextual help with just that command So that's one of the places where I think CLI's really outshine GUIs Another place where CLI's really shine is the fact that they're scriptable and this is one of the things that Like with help helps usually there in a GUI Okay But you really it's really hard to script something out in a GUI Like let's say that there's a series of commands that I generally always run together Let's say my team has decided that what we're going to do when we merge to master is we're going to pull them on the branch that we're on To make sure that we've gotten any changes that somebody else might have pushed in that branch Then we're going to do a rebase then we're going to merge into master I can write a little script that is just my corporate merge That does all those steps for me and I don't have to type type Get pull branch name get rebase to master get get merged to master. I don't I don't need to switch over to master and then None of that stuff do I have to worry about I can script all that back out and I can even script out rules that say Hey run this this pre-commit Check now you can do that with pre-commit hooks and get as well But I can do a specific thing in my own little script that like Something I know that I do a lot that maybe none of the rest of my team does I don't want to put that up get like a github pre-commit hook Let me just do that to my local thing So when I do my corporate merge it checks for this thing that I always do Same thing with AWS The fact is is if I know I want to Set up an S3 bucket and then I want to secure it I can create a script that will create the S3 bucket for me set the proper permissions All the things I need to do and maybe even upload a little help file into the S3 bucket for anybody That's going to be using it that they can get help on What kind of permissions you need and what kind of what the permissions are set to like maybe anybody can read Pictures in this S3 bucket, but only administrators can put images in this S3 bucket, whatever it is So there's lots of things that you can do where you can combine those commands And you don't have to drop find a menu click on it Do this thing and then go back to the menu and find the next thing that you need to do And then go back to the menu and find the next command that you want to run And now it's all the way you want it to be Which can you know be 10 12 clicks in where in my case it's just Corporate merge and it just executes a corporate merge. So That thing is just something that GUIs are not even capable of And CLIs it's really simple now Do you need to learn a little bit of bash scripting or whatever your shell script language is? If it's PowerShell scripting or whatever do you need to learn a little bit of that? Yeah, but if you're gonna use the CLI you might as well learn how to make it do your bidding on a much more massive scale So Again, that's just one of those things that CLIs can do that GUIs just can't even do One of the last places that I can think of that CLIs really outshine GUIs is aliases for my CLI I tend to use Z shell with oh my Z shell installed and They have a package for git that comes with a bunch of premade aliases For instance when I want to check out a branch. I don't have to type git checkout now There's not that's not a lot of typing But if you're one of those people like me who has a tendency to maybe Type checkout with C-H-E-K-C-O-U-T instead of C-K Then GCO is a really good Aliase for that so I just typed GCO-B in the name of the branch and now I've created a new branch and checked out into it so Aliases can really speed things up for you when they're only three or four letter three or four letter aliases One of the ones that I use all the time is GLOG Which is actually Git log with a bunch of switches that give me a nice pretty Timeline with branches off of it and all the comments Right there in the command line and I don't need to go to a GUI to see that I just typed G-Log and I get this pretty little graph like you would get in a GUI It's just all made with ASCII characters instead of with lines and boxes. So those aliases can really help Speed things up through your daily work for me to just type G-Log or GST, which is the git status command That can those really help and my fingers just do it GST plan done GLOG done And I'm just looking at it. So that's another place where I think CLIs really outshine GUIs So what's the verdict here? I know this is called why GUIs suck and CLIs are better Part of that was just to kind of a little jab back at my colleague Heather for her why CLIs suck and GUIs are better but It doesn't necessarily mean that I'm going to forsake all GUIs from here till the end of time Obviously, GUIs have their place I still tend to edit documents in GUIs like notepad or text edit I Do use Vim for some minor edits, but I haven't taken the time to learn all the keyboard shortcuts a friend of mine told me once that Get there Vim plays like a video game. You need to know all the key combinations And you can move around like a master and I've seen guys do it But I still use GUIs for that. I obviously still use GUIs for the browser For even recording this screencast. I'm not using a command line recorder Like some people I work with might actually use command line recorders but I still like GUIs for certain things, but for my everyday stuff, especially for things like NPM package installs or even NuGet package installs when I'm doing .NET I tend to go down to the command line Mostly because I'm working in Visual Studio code most of the time with .NET core So when I want to install a new NuGet package, I can just use the package install command And yes, I have to go look up what the whole name of it is and I can't just search through a list and oh That's the one I think I Have to know the name and cut and paste it into my terminal window But I think that's a small price to pay for I'm not even having to leave my terminal for most things If I was still really hardcore, I'd probably be checking my mail through mutt though Yeah, that might be my next little project So hopefully you found this informative maybe even a little bit mildly entertaining I can guarantee you there's some people watching it right now that have smoke coming out of their ears Cool. Leave comments down below Make sure you subscribe to the channel hit that little bell icon so you get notified when we put out more stuff That's going to annoy you For those of you who agree with me If there's something else I mentioned down below besides, you know, it's scriptability and the ability to use aliases and get help with dash dash help if there's something else that I missed that are like This is another reason why I love GUI's or why I love CLI's over GUI's Leave a comment about that down below too. If you like GUI's better than CLI's leave a comment down below saying why you hate CLI's That's totally fine. That's totally valid opinion. I just have a tendency to favor the CLI over a GUI Much to the chagrin of some of my colleagues, so Uh, what are you gonna do? Can't please everyone all the time. So Again, hit the notifications subscribe down below leave your comments down below Drag me over the coals. I'm totally fine with it Until next time. We'll see you back here. Have fun