GUI vs CLI – Differences in Programmer Workflows

cligui

I've heard a lot about the advantages of doing less programming work in GUI apps and using more command-line tools (especially with regard to getting things done more efficiently). However, since I don't understand how my workflow would be different if I depended more on command-line tools, I can't readily evaluate whether there's enough of a payoff for me personally to invest time and effort learning a new toolset and changing my workflow.

Right now:

  • I code some side projects in languages like C/C++/D/C#/Java/Python using Visual Studio, Eclipse, etc., and run them by setting up the build settings, and pressing F5 to build/run.

  • I'm developing a web program at work, so that involves using Django to set up a server, connect to a database, etc… almost all within the SciTE text editor.

  • For launching regular programs, I use Launchy… still no terminal. 🙂

  • For copying files and whatnot, I use a regular find/move in the graphical file manager (Windows Explorer, Nautilus).

  • Debugging: I use either Visual Studio or Debugging tools for Windows (if I'm on Windows). I haven't done much debugging on Linux, but for the things I've done, I've used Eclipse (also for Java on Windows).

  • At work: To connect to the build system and set up a project, I just use tools that have been integrated into Eclipse for my use — no need for a terminal or anything (although I'm certainly welcome to use a terminal if I indeed want to)

What is it like to do these things in CLI? Which parts become more/less efficient? Which aspects of my workflow would need to be changed to get the greatest advantage from a shift to working mostly in CLI? In other words… If you magically transformed me into a command-line guru, how would my new coding workflow be different from my current, GUI-centered, way of doing things?

Best Answer

I don't think that this is true anymore. CLI has a specific advantage- if you know in advance what you're looking for, then you can type it faster than you can navigate to it in a menu. This means that if you explicitly want to issue commands to the program that have little context, then it's mostly faster. However, there are two problems.

Firstly, GUI programs can infer context for you. For example, Visual Studio's Go To Definition feature and Intellisense. How could you replicate those features in a CLI?

Secondly, GUI programs can display a lot more back to you. For example, the Visual Studio Parallel Profiler, which is a graph of CPU usage across multiple cores over time. How could you display that in a CLI? It just wouldn't make sense. As soon as your data would be better expressed as something other than text, CLI is instantly lost. Another easy example is breakpoints. In Visual Studio, you click in the margin of the line you want broken on. What are you going to do in a CLI, try to find the file and line number and enter that command? That's going to take you a relative decade. That isn't even counting some of the newer GUI innovations, like the Debugger Canvas.

A GUI might be slower if you want to spend your time pushing Debug over and over again, but as soon as the use cases become more complex, then there's no way that CLI can keep up.

Related Topic