Skip to content
PodSubs
ShowsPeopleGuestsJobsNewsEvents
More
BlogPodCred
Menu
ShowsPeopleGuestsJobsNewsEventsBlogPodCredNetworksSign in
Join nowSign in
  • Shows
  • People
  • Jobs
  • News
  • More
    • Guests
    • Events
    • Blog
    • PodCred
    • Networks
    Join nowSign in

DevQuestions with Tim Corey

DevQuestions with Tim Corey artwork

302. Why Do Developers Use the Command Line

Mar 26, 202611 minAudio
ShareXLinkedInFacebookWhatsAppEmail

Why do developers create and use Command Line Interface (CLI) apps? Why are TUIs on the rise? Why did Claude Code decide to make their application a Terminal UI instead of a GUI? These are the questions we will answer in today's episode of DevQuestions. Website: https://www.DevForge.com/ Ask Your Question: https://suggestions.iamtimcorey.com/ Sign Up to Get More Great Developer Content in Your Inbox: https://signup.iamtimcorey.com/

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.

SPEAKER_00Why do developers use the command line so much? If you watch any older developer, you will probably see them drop into the terminal to execute git commands, to launch programs, or even to edit documents. Even with the advent of AI and advanced coding techniques, the TUI or terminal user interface is seeing a huge rise in popularity. Claude code primarily runs in the terminal. Why don't they develop modern GUIs instead? That's what we're going to talk about in today's episode of DevQuestions.

SPEAKER_01Welcome to the DevQuesti podcast with Tim Corey.

SPEAKER_00Software development is more than just writing code. So let's talk about the rest of it. Specifically, let's talk about the purpose and value of command line applications. Now, whenever I show off the terminal application or a set of commands in the terminal, inevitably someone pushes back, complaining that the terminal is outdated. But there's a very important reason why software development has so many tools and systems that work on the command line. Here are just some of the benefits.

SPEAKER_00Number one, predictability. Things don't move around. If you have to use Microsoft Word today, it's different than Microsoft Word was five years ago. But a command line, unless they have deprecated commands, the command line stays the same. That means a script that ran five years ago probably will still run today. Now, yes, things are deprecated or changed, but for the most part, for example, git, those git commands still work.

SPEAKER_00So when it comes to predictability, you know that the command will run on this machine, will run on that machine, will run the next machine, because it's going to do the same exact thing the same exact way. Things don't move around. Buttons don't have to adjust based upon the screen resolution. So you don't have to say, well, click this menu, then go down to here, then click these options, then scale down to just say run this command and it will work. So predictability, number one.

SPEAKER_00Number two kind of goes along with that, and that's repeatability. If I run this specific command, it will do this specific thing. If I run that same command later or on a different machine, it will do that same exact thing. Having something that's repeatable is really valuable. If you're installing a server and you set things up, you set things up manually, you're going to install Windows and you install this software and that software, that's okay because it's one server.

SPEAKER_00But imagine you have a hundred servers to do, and they're all the same. Well, if you write a script, then you can say, hey, this is a script that installs all these things. And then just run that a hundred times. Guess what? All 100 instances will be exactly the same. Now, you can have exactly the same problem if you're not careful, but that's on you. So repeatability is number two. Number three, again, kind of goes along with these first two, and that's automation.

SPEAKER_00Having a predictable, repeatable process that you can run without having to use your mouse allows you to automate these things, allows you to create repeatable commands that you can execute over and over again. This is the entire foundation of CI CD, the continuous integration and continuous deployment process. We use automation to run commands, run things that are predictable, that are repeatable.

SPEAKER_00That way we know that if it worked the first time, the second time, the third time, it's going to work the fourth time. And that's really what CI CD is. We deploy locally, deploy to our dev box, we deploy to our testing box, our staging box, our QA box, and then finally to our production box. And what do we get? The same results every time. Which means by the time we get to production, we're happy with results. That's number three.

SPEAKER_00Number four is speed. If I say, go ahead and create a new project for.NET, I'm gonna create a new console app. Well, if you look at command line, that's.NET New Console, I believe. And then you can give it a name in the switches. If I say I do that in Visual Studio, okay, file, new project, and then you're gonna search for console, you're gonna find that, click on it, then you're gonna fill out all the fields, or at least look at them because they're all there.

SPEAKER_00But they're probably the defaults, which would be the default in the command line, by the way. And then you fill the name, and then you hit next, and then you hit complete, and it and it creates the the application. Well, that's a whole lot more steps, and it's more click here and go there and search this and do that, instead of just.NET New Console. Right? Much faster to execute, much easier to execute. And it's also actually faster in terms of actual processing, too, because Visual Studio has to load the GUI and it has to load the lists and it has to show you things and process things.

SPEAKER_00Whereas on the terminal, all it's doing is running the actual commands. So the GUI is on top of those commands. So it's only gonna be faster to run on the terminal. Same is true for Git. If you're using a Git client, well, you can visually do things. And quite frankly, the GUIs are nice for Git because some of it's rather confusing. But when you drop down to the terminal and run the Git commands, they can be much faster because of the fact that GUI doesn't have to render all that, at the very least.

SPEAKER_00So terminal is both faster for you as a human, but also faster in terms of CPU cycles as well. Number five, it's easy to use. Now you may push back and say, I can't remember the commands. I can't either. I actually made a mouse mat that has commands for Git and the shortcuts for VS code and all these other things because of the fact that I can't remember it all. So, yes, I get that. But at the same time, it's easy to use in the fact that I can train you to say, hey, write this down in your notebook or write this down in a notepad somewhere that says.NET New Console.

SPEAKER_00That's easy to understand, as opposed to install this application, make sure these settings are installed as well, then go here and do this. Oh, they said an update. It's actually now over here. That's more problematic. Number six, it requires less or no installation. So this allows for much easier work. If you've got the.NET 10 SDK installed, for example, well, by having that installed, you can just say.NET and then whatever command you want, and it's already there.

SPEAKER_00Whereas if you actually want on GUI, well then you gotta figure out which GUI you want to have installed and then download it, install that, set it up, configure, and all the rest. This is true for pretty much anything. If you have Git installed on the device, well, you can just start using Git commands on the terminal. But if you want to have a GUI, then you have to install a GUI on top. Now, sometimes you may not realize that's what's happening because you're installing two things. Like if you install Visual Studio, it installs a.NET 10 SDK. But that's actually two things in one.

SPEAKER_00So when you're installing that bigger thing, you're usually installing the smaller thing first. So it requires less or no installation, depending on if it's already built into the system or if it requires an install, but it's a quick install. Okay. So this easily works on more systems. So it also allows you to work on different systems. You're working on Windows today and Mac tomorrow when it comes to.NET or Linux, like we're doing our series right now. Not a problem because the.NET command line is the same.

SPEAKER_00Easy to use. All right, number seven, they're easier to execute remotely. Let's say that you want to uh work on a server. Maybe you're working on um, I don't know, remotely from your your parents' house, and they they have an old computer and nothing installed as far as your tools, but you can SSH into your server. Well, all of a sudden you can run commands on your server that do all the work that you need to do because it's just a command line, as opposed to having to have a work laptop and everything set up on it and configured and all the rest.

SPEAKER_00You just use SSH and terminal into the server and run your commands. It's very easy to execute commands remotely if you're using some type of terminal or command line, as opposed to the overhead that comes into trying to connect a system remotely. Number eight is efficiency. Terminals and terminal applications use less memory to execute commands, which means you can do more with less.

SPEAKER_00You can be more efficient and have, especially if you're using like a CI CD system, where the more you can save your memory, the better. Well, this is where command line really comes in handy. So that's eight. There's a bonus one. Um it's easier to make cross-platform. Okay. Um if you're a.NET developer, super easy to make cross-platform apps if you're using terminal applications, creating terminal applications, because they just work. If you create a console application, it can run on Linux, Mac, and Windows out of the box.

SPEAKER_00You just say deploy to Linux, deploy to Mac, deploy it to Windows, and it will just work. So it's easier to make cross-platform. That's just a bonus. Command line interfaces can have higher barriers to entry because yes, you have to learn the command line, you have to learn how it works. But once you understand how to use them, they offer a lot of advantage over a full GUI system. So that's why developers, especially experienced developers, often favor CLI applications or at least use them consistently.

SPEAKER_00The GUIs may change, but the command line is still there. Thanks for listening. As always, I am Tim Corey.

SPEAKER_01Thank you for joining us for this episode of Dev Questions. When you're ready to learn to think and code like a professional developer, head over to IamtimCorey.com and enroll in a course.

Open the transcript file

Hosts and Guests

Nobody is credited on this episode yet.

Credit the people on this episode

Be the first to rate this episode

More episodes

All episodes
  1. 334. Is Entity Framework Still Relevant When AI Can Write SQL?

    Nov 5, 202614 minAudio

    Entity Framework and other ORMs write the SQL for us. But are they necessary now that AI can do that work? Is the overhead of EF on every query worth the limited benefits we now get at design time? Do ORMs still make...

    Credit the people on this episode

  2. 333. Why Boring Technology Wins

    Oct 29, 202621 minAudio

    Why don't companies use the latest frameworks and systems? Why is .NET Framework still used in companies? Why don't companies follow industry best practices in their apps? Why can't I use the latest tech at my software...

    Credit the people on this episode

  3. 332. What To Do When You Are Burned Out

    Oct 22, 202628 minAudio

    What do I do if I am burned out? How do I get through burnout? How do I get to the other side? How do I endure my job and my situation while experiencing burnout? These are the questions we will answer in today's...

    Credit the people on this episode

  4. 331. .NET 8 and .NET 9 Both Expire Next Month: Is LTS Still a Thing?

    Oct 15, 202613 minAudio

    .NET 8 is the LTS version of .NET, but it expires next month. Why? Why does .NET 9 expire at the same time as .NET 8? How does LTS work with .NET and why is it so short? Do these versions stop working next month? Why...

    Credit the people on this episode

  5. 330. What To Do When Someone Pitches You An App Idea

    Oct 8, 202621 minAudio

    What do I do if my friend wants me to build an app? How do I evaluate if an app is a good idea? Who should own an app if one person has the idea and the other builds it? How do I say no to an app idea? These are the...

    Credit the people on this episode